diff --git a/src/aks-preview/azext_aks_preview/agentpool_decorator.py b/src/aks-preview/azext_aks_preview/agentpool_decorator.py index 9258ab58d98..e6b28bba459 100644 --- a/src/aks-preview/azext_aks_preview/agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/agentpool_decorator.py @@ -17,8 +17,8 @@ AKSAgentPoolUpdateDecorator, ) from azure.cli.core.azclierror import ( - ArgumentUsageError, InvalidArgumentValueError, + MutuallyExclusiveArgumentError, ) from azure.cli.core.commands import AzCliCommand from azure.cli.core.profiles import ResourceType @@ -174,6 +174,65 @@ def get_workload_runtime(self) -> Union[str, None]: # this parameter does not need validation return workload_runtime + def _get_enable_custom_ca_trust(self, enable_validation: bool = False) -> bool: + """Internal function to obtain the value of enable_custom_ca_trust. + + This function supports the option of enable_validation. When enabled, if both enable_custom_ca_trust and + disable_custom_ca_trust are specified, raise a MutuallyExclusiveArgumentError. + + :return: bool + """ + # read the original value passed by the command + enable_custom_ca_trust = self.raw_param.get("enable_custom_ca_trust") + # In create mode, try to read the property value corresponding to the parameter from the `agentpool` object + if self.decorator_mode == DecoratorMode.CREATE: + if self.agentpool and self.agentpool.enable_custom_ca_trust is not None: + enable_custom_ca_trust = self.agentpool.enable_custom_ca_trust + + # this parameter does not need dynamic completion + # validation + if enable_validation: + if enable_custom_ca_trust and self._get_disable_custom_ca_trust(enable_validation=False): + raise MutuallyExclusiveArgumentError( + 'Cannot specify "--enable-custom-ca-trust" and "--disable-custom-ca-trust" at the same time' + ) + return enable_custom_ca_trust + + def get_enable_custom_ca_trust(self) -> bool: + """Obtain the value of enable_custom_ca_trust. + + :return: bool + """ + return self._get_enable_custom_ca_trust(enable_validation=True) + + def _get_disable_custom_ca_trust(self, enable_validation: bool = False) -> bool: + """Internal function to obtain the value of disable_custom_ca_trust. + + This function supports the option of enable_validation. When enabled, if both enable_custom_ca_trust and + disable_custom_ca_trust are specified, raise a MutuallyExclusiveArgumentError. + + :return: bool + """ + # read the original value passed by the command + disable_custom_ca_trust = self.raw_param.get("disable_custom_ca_trust") + # This option is not supported in create mode, so its value is not read from `agentpool`. + + # this parameter does not need dynamic completion + # validation + if enable_validation: + if disable_custom_ca_trust and self._get_enable_custom_ca_trust(enable_validation=False): + raise MutuallyExclusiveArgumentError( + 'Cannot specify "--enable-custom-ca-trust" and "--disable-custom-ca-trust" at the same time' + ) + return disable_custom_ca_trust + + def get_disable_custom_ca_trust(self) -> bool: + """Obtain the value of disable_custom_ca_trust. + + :return: bool + """ + return self._get_disable_custom_ca_trust(enable_validation=True) + class AKSPreviewAgentPoolAddDecorator(AKSAgentPoolAddDecorator): def __init__( @@ -229,7 +288,7 @@ def set_up_motd(self, agentpool: AgentPool) -> AgentPool: agentpool.message_of_the_day = self.context.get_message_of_the_day() return agentpool - def set_up_gpu_propertes(self, agentpool: AgentPool) -> AgentPool: + def set_up_gpu_properties(self, agentpool: AgentPool) -> AgentPool: """Set up gpu related properties for the AgentPool object. :return: the AgentPool object @@ -240,6 +299,16 @@ def set_up_gpu_propertes(self, agentpool: AgentPool) -> AgentPool: agentpool.workload_runtime = self.context.get_workload_runtime() return agentpool + def set_up_custom_ca_trust(self, agentpool: AgentPool) -> AgentPool: + """Set up custom ca trust property for the AgentPool object. + + :return: the AgentPool object + """ + self._ensure_agentpool(agentpool) + + agentpool.enable_custom_ca_trust = self.context.get_enable_custom_ca_trust() + return agentpool + def construct_agentpool_profile_preview(self) -> AgentPool: """The overall controller used to construct the preview AgentPool profile. @@ -248,14 +317,17 @@ def construct_agentpool_profile_preview(self) -> AgentPool: :return: the AgentPool object """ - # construct the default AgentPool profile + # DO NOT MOVE: keep this on top, construct the default AgentPool profile agentpool = self.construct_agentpool_profile_default(bypass_restore_defaults=True) + # set up preview vm properties agentpool = self.set_up_preview_vm_properties(agentpool) # set up message of the day agentpool = self.set_up_motd(agentpool) # set up gpu profiles - agentpool = self.set_up_gpu_propertes(agentpool) + agentpool = self.set_up_gpu_properties(agentpool) + # set up custom ca trust + agentpool = self.set_up_custom_ca_trust(agentpool) # DO NOT MOVE: keep this at the bottom, restore defaults agentpool = self._restore_defaults_in_agentpool(agentpool) @@ -295,6 +367,20 @@ def init_context(self) -> None: self.agentpool_decorator_mode, ) + def update_custom_ca_trust(self, agentpool: AgentPool) -> AgentPool: + """Update custom ca trust property for the AgentPool object. + + :return: the AgentPool object + """ + self._ensure_agentpool(agentpool) + + if self.context.get_enable_custom_ca_trust(): + agentpool.enable_custom_ca_trust = True + + if self.context.get_disable_custom_ca_trust(): + agentpool.enable_custom_ca_trust = False + return agentpool + def update_agentpool_profile_preview(self, agentpools: List[AgentPool] = None) -> AgentPool: """The overall controller used to update the preview AgentPool profile. @@ -303,6 +389,9 @@ def update_agentpool_profile_preview(self, agentpools: List[AgentPool] = None) - :return: the AgentPool object """ - # fetch and update the default AgentPool profile + # DO NOT MOVE: keep this on top, fetch and update the default AgentPool profile agentpool = self.update_agentpool_profile_default(agentpools) + + # update custom ca trust + agentpool = self.update_custom_ca_trust(agentpool) return agentpool diff --git a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py index b6dece9853c..56e9026608e 100644 --- a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py @@ -54,15 +54,8 @@ # type variables ContainerServiceClient = TypeVar("ContainerServiceClient") -Identity = TypeVar("Identity") ManagedCluster = TypeVar("ManagedCluster") -ManagedClusterLoadBalancerProfile = TypeVar("ManagedClusterLoadBalancerProfile") -ManagedClusterPropertiesAutoScalerProfile = TypeVar("ManagedClusterPropertiesAutoScalerProfile") -ResourceReference = TypeVar("ResourceReference") ManagedClusterAddonProfile = TypeVar("ManagedClusterAddonProfile") -Snapshot = TypeVar("Snapshot") -KubeletConfig = TypeVar("KubeletConfig") -LinuxOSConfig = TypeVar("LinuxOSConfig") ManagedClusterHTTPProxyConfig = TypeVar("ManagedClusterHTTPProxyConfig") ManagedClusterSecurityProfileWorkloadIdentity = TypeVar("ManagedClusterSecurityProfileWorkloadIdentity") ManagedClusterOIDCIssuerProfile = TypeVar("ManagedClusterOIDCIssuerProfile") @@ -71,6 +64,7 @@ ManagedClusterStorageProfileDiskCSIDriver = TypeVar('ManagedClusterStorageProfileDiskCSIDriver') ManagedClusterStorageProfileFileCSIDriver = TypeVar('ManagedClusterStorageProfileFileCSIDriver') ManagedClusterStorageProfileSnapshotController = TypeVar('ManagedClusterStorageProfileSnapshotController') +ManagedClusterIngressProfileWebAppRouting = TypeVar("ManagedClusterIngressProfileWebAppRouting") # pylint: disable=too-few-public-methods @@ -232,8 +226,8 @@ def get_service_cidrs(self) -> Union[List[str], None]: # this parameter does not need validation return service_cidrs - def get_ip_families(self): - """Obtain the CIDR ranges for the service subnet. + def get_ip_families(self) -> Union[List[str], None]: + """Obtain the value of ip_families. :return: List[str] or None """ @@ -1026,6 +1020,26 @@ def get_apiserver_subnet_id(self) -> Union[str, None]: """ return self._get_apiserver_subnet_id(enable_validation=True) + def get_dns_zone_resource_id(self) -> Union[str, None]: + """Obtain the value of ip_families. + + :return: string or None + """ + # read the original value passed by the command + dns_zone_resource_id = self.raw_param.get("dns_zone_resource_id") + # try to read the property value corresponding to the parameter from the `mc` object + if ( + self.mc and + self.mc.ingress_profile and + self.mc.ingress_profile.web_app_routing and + self.mc.ingress_profile.web_app_routing.dns_zone_resource_id is not None + ): + dns_zone_resource_id = self.mc.ingress_profile.web_app_routing.dns_zone_resource_id + + # this parameter does not need dynamic completion + # this parameter does not need validation + return dns_zone_resource_id + class AKSPreviewManagedClusterCreateDecorator(AKSManagedClusterCreateDecorator): def __init__( @@ -1272,6 +1286,22 @@ def set_up_storage_profile(self, mc: ManagedCluster) -> ManagedCluster: return mc + def set_up_ingress_web_app_routing(self, mc: ManagedCluster) -> ManagedCluster: + """Set up web app routing profile in ingress profile for the ManagedCluster object. + + :return: the ManagedCluster object + """ + addons = self.context.get_enable_addons() + if "web_application_routing" in addons: + if mc.ingress_profile is None: + mc.ingress_profile = self.models.ManagedClusterIngressProfile() + dns_zone_resource_id = self.context.get_dns_zone_resource_id() + mc.ingress_profile.web_app_routing = self.models.ManagedClusterIngressProfileWebAppRouting( + enabled=True, + dns_zone_resource_id=dns_zone_resource_id, + ) + return mc + def construct_mc_profile_preview(self, bypass_restore_defaults: bool = False) -> ManagedCluster: """The overall controller used to construct the default ManagedCluster profile. @@ -1304,6 +1334,8 @@ def construct_mc_profile_preview(self, bypass_restore_defaults: bool = False) -> mc = self.set_up_creationdata_of_cluster_snapshot(mc) # set up storage profile mc = self.set_up_storage_profile(mc) + # set up ingress web app routing profile + mc = self.set_up_ingress_web_app_routing(mc) # DO NOT MOVE: keep this at the bottom, restore defaults mc = self._restore_defaults_in_mc(mc) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py index 4588c91fb3d..c48078091b1 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py @@ -28,7 +28,7 @@ ) from azure.cli.command_modules.acs.agentpool_decorator import AKSAgentPoolParamDict from azure.cli.command_modules.acs.tests.latest.mocks import MockCLI, MockClient, MockCmd -from azure.cli.core.azclierror import CLIInternalError, InvalidArgumentValueError +from azure.cli.core.azclierror import CLIInternalError, InvalidArgumentValueError, MutuallyExclusiveArgumentError class AKSPreviewAgentPoolContextCommonTestCase(unittest.TestCase): @@ -194,6 +194,69 @@ def common_get_workload_runtime(self): ctx_1.attach_agentpool(agentpool_1) self.assertEqual(ctx_1.get_workload_runtime(), "test_workload_runtime") + def common_get_enable_custom_ca_trust(self): + # default + ctx_1 = AKSPreviewAgentPoolContext( + self.cmd, + AKSAgentPoolParamDict({"enable_custom_ca_trust": True}), + self.models, + DecoratorMode.CREATE, + self.agentpool_decorator_mode, + ) + self.assertEqual(ctx_1.get_enable_custom_ca_trust(), True) + agentpool_1 = self.create_initialized_agentpool_instance(enable_custom_ca_trust=False) + ctx_1.attach_agentpool(agentpool_1) + self.assertEqual(ctx_1.get_enable_custom_ca_trust(), False) + + # custom + ctx_2 = AKSPreviewAgentPoolContext( + self.cmd, + AKSAgentPoolParamDict({"enable_custom_ca_trust": True}), + self.models, + DecoratorMode.UPDATE, + self.agentpool_decorator_mode, + ) + self.assertEqual(ctx_2.get_enable_custom_ca_trust(), True) + agentpool_2 = self.create_initialized_agentpool_instance(enable_custom_ca_trust=False) + ctx_2.attach_agentpool(agentpool_2) + self.assertEqual(ctx_2.get_enable_custom_ca_trust(), True) + + # custom + ctx_3 = AKSPreviewAgentPoolContext( + self.cmd, + AKSAgentPoolParamDict({"enable_custom_ca_trust": True, "disable_custom_ca_trust": True}), + self.models, + DecoratorMode.UPDATE, + self.agentpool_decorator_mode, + ) + with self.assertRaises(MutuallyExclusiveArgumentError): + ctx_3.get_enable_custom_ca_trust() + + def common_get_disable_custom_ca_trust(self): + # default + ctx_1 = AKSPreviewAgentPoolContext( + self.cmd, + AKSAgentPoolParamDict({"disable_custom_ca_trust": True}), + self.models, + DecoratorMode.UPDATE, + self.agentpool_decorator_mode, + ) + self.assertEqual(ctx_1.get_disable_custom_ca_trust(), True) + agentpool_1 = self.create_initialized_agentpool_instance(enable_custom_ca_trust=True) + ctx_1.attach_agentpool(agentpool_1) + self.assertEqual(ctx_1.get_disable_custom_ca_trust(), True) + + # custom + ctx_2 = AKSPreviewAgentPoolContext( + self.cmd, + AKSAgentPoolParamDict({"enable_custom_ca_trust": True, "disable_custom_ca_trust": True}), + self.models, + DecoratorMode.UPDATE, + self.agentpool_decorator_mode, + ) + with self.assertRaises(MutuallyExclusiveArgumentError): + ctx_2.get_disable_custom_ca_trust() + class AKSPreviewAgentPoolContextStandaloneModeTestCase(AKSPreviewAgentPoolContextCommonTestCase): def setUp(self): @@ -223,6 +286,12 @@ def test_get_gpu_instance_profile(self): def test_get_workload_runtime(self): self.common_get_workload_runtime() + def test_get_enable_custom_ca_trust(self): + self.common_get_enable_custom_ca_trust() + + def test_get_disable_custom_ca_trust(self): + self.common_get_disable_custom_ca_trust() + class AKSPreviewAgentPoolContextManagedClusterModeTestCase(AKSPreviewAgentPoolContextCommonTestCase): def setUp(self): @@ -252,6 +321,12 @@ def test_get_gpu_instance_profile(self): def test_get_workload_runtime(self): self.common_get_workload_runtime() + def test_get_enable_custom_ca_trust(self): + self.common_get_enable_custom_ca_trust() + + def test_get_disable_custom_ca_trust(self): + self.common_get_disable_custom_ca_trust() + class AKSPreviewAgentPoolAddDecoratorCommonTestCase(unittest.TestCase): def _remove_defaults_in_agentpool(self, agentpool): @@ -344,10 +419,10 @@ def common_set_up_gpu_propertes(self): ) # fail on passing the wrong agentpool object with self.assertRaises(CLIInternalError): - dec_1.set_up_gpu_propertes(None) + dec_1.set_up_gpu_properties(None) agentpool_1 = self.create_initialized_agentpool_instance(restore_defaults=False) dec_1.context.attach_agentpool(agentpool_1) - dec_agentpool_1 = dec_1.set_up_gpu_propertes(agentpool_1) + dec_agentpool_1 = dec_1.set_up_gpu_properties(agentpool_1) dec_agentpool_1 = self._restore_defaults_in_agentpool(dec_agentpool_1) ground_truth_agentpool_1 = self.create_initialized_agentpool_instance( gpu_instance_profile="test_gpu_instance_profile", @@ -355,6 +430,26 @@ def common_set_up_gpu_propertes(self): ) self.assertEqual(dec_agentpool_1, ground_truth_agentpool_1) + def common_set_up_custom_ca_trust(self): + dec_1 = AKSPreviewAgentPoolAddDecorator( + self.cmd, + self.client, + {"enable_custom_ca_trust": True}, + self.resource_type, + self.agentpool_decorator_mode, + ) + # fail on passing the wrong agentpool object + with self.assertRaises(CLIInternalError): + dec_1.set_up_custom_ca_trust(None) + agentpool_1 = self.create_initialized_agentpool_instance(restore_defaults=False) + dec_1.context.attach_agentpool(agentpool_1) + dec_agentpool_1 = dec_1.set_up_custom_ca_trust(agentpool_1) + dec_agentpool_1 = self._restore_defaults_in_agentpool(dec_agentpool_1) + ground_truth_agentpool_1 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=True, + ) + self.assertEqual(dec_agentpool_1, ground_truth_agentpool_1) + class AKSPreviewAgentPoolAddDecoratorStandaloneModeTestCase(AKSPreviewAgentPoolAddDecoratorCommonTestCase): def setUp(self): @@ -376,6 +471,9 @@ def test_set_up_motd(self): def test_set_up_gpu_propertes(self): self.common_set_up_gpu_propertes() + def test_set_up_custom_ca_trust(self): + self.common_set_up_custom_ca_trust() + def test_construct_agentpool_profile_preview(self): import inspect @@ -438,6 +536,7 @@ def test_construct_agentpool_profile_preview(self): mode=CONST_NODEPOOL_MODE_USER, scale_down_mode=CONST_SCALE_DOWN_MODE_DELETE, workload_runtime=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, + enable_custom_ca_trust=False, ) self.assertEqual(dec_agentpool_1, ground_truth_agentpool_1) @@ -464,6 +563,9 @@ def test_set_up_motd(self): def test_set_up_gpu_propertes(self): self.common_set_up_gpu_propertes() + def test_set_up_custom_ca_trust(self): + self.common_set_up_custom_ca_trust() + def test_construct_agentpool_profile_preview(self): import inspect @@ -526,6 +628,7 @@ def test_construct_agentpool_profile_preview(self): enable_fips=False, mode=CONST_NODEPOOL_MODE_SYSTEM, workload_runtime=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, + enable_custom_ca_trust=False, ) self.assertEqual(dec_agentpool_1, ground_truth_agentpool_1) @@ -573,6 +676,47 @@ def create_initialized_agentpool_instance( self._restore_defaults_in_agentpool(agentpool) return agentpool + def common_update_custom_ca_trust(self): + dec_1 = AKSPreviewAgentPoolUpdateDecorator( + self.cmd, + self.client, + {"enable_custom_ca_trust": True, "disable_custom_ca_trust": False}, + self.resource_type, + self.agentpool_decorator_mode, + ) + # fail on passing the wrong agentpool object + with self.assertRaises(CLIInternalError): + dec_1.update_vm_properties(None) + agentpool_1 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=False, + ) + dec_1.context.attach_agentpool(agentpool_1) + dec_agentpool_1 = dec_1.update_custom_ca_trust(agentpool_1) + grond_truth_agentpool_1 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=True, + ) + self.assertEqual(dec_agentpool_1, grond_truth_agentpool_1) + + dec_2 = AKSPreviewAgentPoolUpdateDecorator( + self.cmd, + self.client, + {"enable_custom_ca_trust": False, "disable_custom_ca_trust": True}, + self.resource_type, + self.agentpool_decorator_mode, + ) + # fail on passing the wrong agentpool object + with self.assertRaises(CLIInternalError): + dec_2.update_vm_properties(None) + agentpool_2 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=True, + ) + dec_2.context.attach_agentpool(agentpool_2) + dec_agentpool_2 = dec_2.update_custom_ca_trust(agentpool_2) + grond_truth_agentpool_2 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=False, + ) + self.assertEqual(dec_agentpool_2, grond_truth_agentpool_2) + class AKSPreviewAgentPoolUpdateDecoratorStandaloneModeTestCase(AKSPreviewAgentPoolUpdateDecoratorCommonTestCase): def setUp(self): @@ -585,6 +729,9 @@ def setUp(self): self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) self.client = MockClient() + def test_update_custom_ca_trust(self): + self.common_update_custom_ca_trust() + def test_update_agentpool_profile_preview(self): import inspect @@ -645,6 +792,9 @@ def setUp(self): self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) self.client = MockClient() + def test_update_custom_ca_trust(self): + self.common_update_custom_ca_trust() + def test_update_agentpool_profile_preview(self): import inspect diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py index 79e3292eed2..ac16adb670b 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py @@ -1487,6 +1487,30 @@ def test_get_apiserver_subnet_id(self): with self.assertRaises(RequiredArgumentMissingError): ctx_6.get_apiserver_subnet_id() + def test_get_dns_zone_resource_id(self): + ctx_1 = AKSPreviewManagedClusterContext( + self.cmd, + AKSManagedClusterParamDict( + { + "dns_zone_resource_id": "test_dns_zone_resource_id", + } + ), + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + self.assertEqual(ctx_1.get_dns_zone_resource_id(), "test_dns_zone_resource_id") + mc_1 = self.models.ManagedCluster( + location="test_location", + ingress_profile=self.models.ManagedClusterIngressProfile( + web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( + enabled=True, + dns_zone_resource_id="test_mc_dns_zone_resource_id", + ) + ), + ) + ctx_1.attach_mc(mc_1) + self.assertEqual(ctx_1.get_dns_zone_resource_id(), "test_mc_dns_zone_resource_id") + class AKSPreviewManagedClusterCreateDecoratorTestCase(unittest.TestCase): def setUp(self): @@ -1795,7 +1819,6 @@ def test_set_up_addon_profiles(self): ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", addon_profiles=addon_profiles_2 ) - print(dec_mc_2.addon_profiles) self.assertEqual(dec_mc_2, ground_truth_mc_2) self.assertEqual(dec_2.context.get_intermediate("monitoring_addon_enabled"), True) self.assertEqual(dec_2.context.get_intermediate("virtual_node_addon_enabled"), None) @@ -2050,6 +2073,27 @@ def test_set_up_storage_profile(self): ground_truth_mc_1 = self.models.ManagedCluster(location="test_location", storage_profile=storage_profile_1) self.assertEqual(dec_mc_1, ground_truth_mc_1) + def test_set_up_ingress_web_app_routing(self): + dec_1 = AKSPreviewManagedClusterCreateDecorator( + self.cmd, + self.client, + {"enable_addons": "web_application_routing", "dns_zone_resource_id": "test_dns_zone_resource_id"}, + CUSTOM_MGMT_AKS_PREVIEW, + ) + mc_1 = self.models.ManagedCluster(location="test_location") + dec_1.context.attach_mc(mc_1) + dec_mc_1 = dec_1.set_up_ingress_web_app_routing(mc_1) + ground_truth_ingress_profile_1 = self.models.ManagedClusterIngressProfile( + web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( + enabled=True, + dns_zone_resource_id="test_dns_zone_resource_id", + ) + ) + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location", ingress_profile=ground_truth_ingress_profile_1 + ) + self.assertEqual(dec_mc_1, ground_truth_mc_1) + def test_construct_mc_profile_preview(self): import inspect @@ -2115,6 +2159,7 @@ def test_construct_mc_profile_preview(self): enable_fips=False, mode=CONST_NODEPOOL_MODE_SYSTEM, workload_runtime=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, + enable_custom_ca_trust=False, ) ssh_config_1 = self.models.ContainerServiceSshConfiguration( public_keys=[self.models.ContainerServiceSshPublicKey(key_data=public_key)]