From 0708043f51747a6e9d3e8a6bf291798f8d0fc30e Mon Sep 17 00:00:00 2001 From: Tyler Gu Date: Tue, 31 Oct 2023 21:39:02 -0500 Subject: [PATCH] Fix Signed-off-by: Tyler Gu --- acto/kubernetes_engine/base.py | 5 ++--- acto/kubernetes_engine/kind.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/acto/kubernetes_engine/base.py b/acto/kubernetes_engine/base.py index f72af63aa..29b7e261a 100644 --- a/acto/kubernetes_engine/base.py +++ b/acto/kubernetes_engine/base.py @@ -1,7 +1,7 @@ import subprocess import time from abc import ABC, abstractmethod -from typing import Callable, List, Tuple +from typing import Callable, Dict, List import kubernetes @@ -9,7 +9,6 @@ from acto.utils import get_thread_logger KubernetesEnginePostHookType = Callable[[kubernetes.client.ApiClient], None] -KeyValuePairType = Tuple[str, str] class KubernetesEngine(ABC): @@ -17,7 +16,7 @@ class KubernetesEngine(ABC): @abstractmethod def __init__(self, acto_namespace: int, posthooks: List[KubernetesEnginePostHookType] = None, - feature_gates: List[KeyValuePairType] = None) -> None: ... + feature_gates: Dict[str, str] = None) -> None: ... '''Constructor for KubernetesEngine Args: diff --git a/acto/kubernetes_engine/kind.py b/acto/kubernetes_engine/kind.py index 5bafdd042..e86eed957 100644 --- a/acto/kubernetes_engine/kind.py +++ b/acto/kubernetes_engine/kind.py @@ -2,7 +2,7 @@ import os import subprocess import time -from typing import List +from typing import Dict, List import kubernetes import yaml @@ -17,7 +17,7 @@ class Kind(base.KubernetesEngine): def __init__( self, acto_namespace: int, posthooks: List[base.KubernetesEnginePostHookType] = None, - feature_gates: List[base.KeyValuePairType] = None): + feature_gates: Dict[str, str] = None): self._config_path = os.path.join(CONST.CLUSTER_CONFIG_FOLDER, f'KIND-{acto_namespace}.yaml') self._posthooks = posthooks self._feature_gates = feature_gates