From 88117e8e234f07c23fe6f46e7976afaae08532f9 Mon Sep 17 00:00:00 2001 From: jonathan-innis Date: Mon, 15 Mar 2021 10:50:56 -0700 Subject: [PATCH] Fix ExtensionInstanceForCreate for import --- .../azext_k8s_extension/partner_extensions/AzureDefender.py | 2 +- .../partner_extensions/ContainerInsights.py | 2 +- .../partner_extensions/PartnerExtensionModel.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureDefender.py b/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureDefender.py index 793e84da18d..7721ea8c638 100644 --- a/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureDefender.py +++ b/src/k8s-extension/azext_k8s_extension/partner_extensions/AzureDefender.py @@ -46,7 +46,7 @@ def Create(self, cmd, client, resource_group_name, cluster_name, name, cluster_t _get_container_insights_settings(cmd, resource_group_name, cluster_name, configuration_settings, configuration_protected_settings, is_ci_extension_type) - # NOTE-2: Return a valid ExtensionInstanceForCreate object, Instance name and flag for Identity + # NOTE-2: Return a valid ExtensionInstance object, Instance name and flag for Identity create_identity = True extension_instance = ExtensionInstance( extension_type=extension_type, diff --git a/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py b/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py index b9a6a1a66ae..a90b807020d 100644 --- a/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py +++ b/src/k8s-extension/azext_k8s_extension/partner_extensions/ContainerInsights.py @@ -58,7 +58,7 @@ def Create(self, cmd, client, resource_group_name, cluster_name, name, cluster_t _get_container_insights_settings(cmd, resource_group_name, cluster_name, configuration_settings, configuration_protected_settings, is_ci_extension_type) - # NOTE-2: Return a valid ExtensionInstanceForCreate object, Instance name and flag for Identity + # NOTE-2: Return a valid ExtensionInstance object, Instance name and flag for Identity create_identity = True extension_instance = ExtensionInstance( extension_type=extension_type, diff --git a/src/k8s-extension/azext_k8s_extension/partner_extensions/PartnerExtensionModel.py b/src/k8s-extension/azext_k8s_extension/partner_extensions/PartnerExtensionModel.py index c0bf3b6e657..96c489644e7 100644 --- a/src/k8s-extension/azext_k8s_extension/partner_extensions/PartnerExtensionModel.py +++ b/src/k8s-extension/azext_k8s_extension/partner_extensions/PartnerExtensionModel.py @@ -4,7 +4,7 @@ # -------------------------------------------------------------------------------------------- from abc import ABC, abstractmethod -from azext_k8s_extension.vendored_sdks.models import ExtensionInstanceForCreate +from azext_k8s_extension.vendored_sdks.models import ExtensionInstance from azext_k8s_extension.vendored_sdks.models import ExtensionInstanceUpdate @@ -14,10 +14,10 @@ def Create(self, cmd, client, resource_group_name: str, cluster_name: str, name: extension_type: str, scope: str, auto_upgrade_minor_version: bool, release_train: str, version: str, target_namespace: str, release_namespace: str, configuration_settings: dict, configuration_protected_settings: dict, configuration_settings_file: str, - configuration_protected_settings_file: str) -> ExtensionInstanceForCreate: + configuration_protected_settings_file: str) -> ExtensionInstance: pass @abstractmethod - def Update(self, extension: ExtensionInstanceForCreate, auto_upgrade_minor_version: bool, + def Update(self, extension: ExtensionInstance, auto_upgrade_minor_version: bool, release_train: str, version: str) -> ExtensionInstanceUpdate: pass