From ba08675c85bf6c703f6013504b20985acce60de3 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Wed, 9 Mar 2022 15:49:04 -0800 Subject: [PATCH] Update action file to add depenencies --- src/k8s-configuration/azext_k8s_configuration/action.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/k8s-configuration/azext_k8s_configuration/action.py b/src/k8s-configuration/azext_k8s_configuration/action.py index 7bc2d460742..ca9ce6d92ae 100644 --- a/src/k8s-configuration/azext_k8s_configuration/action.py +++ b/src/k8s-configuration/azext_k8s_configuration/action.py @@ -9,7 +9,6 @@ from .vendored_sdks.v2022_01_01_preview.models import ( KustomizationDefinition, KustomizationPatchDefinition, - DependsOnDefinition, ) from .validators import validate_kustomization from . import consts @@ -37,7 +36,7 @@ def to_KustomizationPatchDefinition(self): class KustomizationAddAction(argparse._AppendAction): def __call__(self, parser, namespace, values, option_string=None): validate_kustomization(values) - model_dependency = [] + dependencies = None sync_interval = None retry_interval = None timeout = None @@ -47,10 +46,6 @@ def __call__(self, parser, namespace, values, option_string=None): key, value = item.split("=", 1) if key in consts.DEPENDENCY_KEYS: dependencies = parse_dependencies(value) - for dep in dependencies: - model_dependency.append( - DependsOnDefinition(kustomization_name=dep) - ) elif key in consts.SYNC_INTERVAL_KEYS: sync_interval = value elif key in consts.RETRY_INTERVAL_KEYS: @@ -67,7 +62,7 @@ def __call__(self, parser, namespace, values, option_string=None): parser, namespace, InternalKustomizationDefinition( - depends_on=model_dependency, + depends_on=dependencies, sync_interval_in_seconds=parse_duration(sync_interval), retry_interval_in_seconds=parse_duration(retry_interval), timeout_in_seconds=parse_duration(timeout),