Skip to content

Commit

Permalink
Remove preview from command groups
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Mar 11, 2022
1 parent ba08675 commit a126ec9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/k8s-configuration/azext_k8s_configuration/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import argparse
from azure.cli.core.azclierror import InvalidArgumentValueError
from .vendored_sdks.v2022_01_01_preview.models import (
from .vendored_sdks.v2022_03_01.models import (
KustomizationDefinition,
KustomizationPatchDefinition,
)
Expand All @@ -17,18 +17,19 @@

class InternalKustomizationDefinition(KustomizationDefinition):
def __init__(self, **kwargs):
self.name = kwargs.get("name", "")
super().__init__(**kwargs)

# This call is after the call to super() to override the init method
# making the self.name field null
self.name = kwargs.get("name", "")

def to_KustomizationDefinition(self):
k_dict = dict(self.__dict__)
del k_dict["name"]
del k_dict["additional_properties"]
return KustomizationDefinition(**k_dict)

def to_KustomizationPatchDefinition(self):
k_dict = dict(self.__dict__)
del k_dict["name"]
del k_dict["additional_properties"]
return KustomizationPatchDefinition(**k_dict)

Expand Down
3 changes: 0 additions & 3 deletions src/k8s-configuration/azext_k8s_configuration/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def load_command_table(self, _):
"k8s-configuration flux",
k8s_configuration_fluxconfig_client,
custom_command_type=flux_configuration_custom_type,
is_preview=True,
) as g:
g.custom_command("create", "create_config", supports_no_wait=True)
g.custom_command("update", "update_config", supports_no_wait=True)
Expand All @@ -52,7 +51,6 @@ def load_command_table(self, _):
"k8s-configuration flux kustomization",
k8s_configuration_fluxconfig_client,
custom_command_type=flux_configuration_custom_type,
is_preview=True,
) as g:
g.custom_command("create", "create_kustomization", supports_no_wait=True)
g.custom_command("update", "update_kustomization", supports_no_wait=True)
Expand All @@ -72,7 +70,6 @@ def load_command_table(self, _):
"k8s-configuration flux deployed-object",
k8s_configuration_fluxconfig_client,
custom_command_type=flux_configuration_custom_type,
is_preview=True,
) as g:
g.custom_command(
"list",
Expand Down
2 changes: 1 addition & 1 deletion src/k8s-configuration/azext_k8s_configuration/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __get_fluxconfig_kustomization_table_row(key, value):
[
("name", key),
("path", value["path"]),
("dependsOn", ",".join(value.get("dependsOn", []))),
("dependsOn", ",".join(value.get("dependsOn") or [])),
("syncInterval", format_duration(value["syncIntervalInSeconds"])),
("timeout", format_duration(value["timeoutInSeconds"])),
("prune", value["prune"]),
Expand Down

0 comments on commit a126ec9

Please sign in to comment.