diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 8a3eb01d039..647deebaced 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -3,6 +3,12 @@ Release History =============== +0.5.63 +++++++ + +* Add support to create cluster with managed cluster snapshot. Command is + * `az aks create --cluster-snapshot-id ` + 0.5.62 ++++++ @@ -10,6 +16,7 @@ Release History 0.5.61 ++++++ + * Add support for `--format` parameter in `az aks get-credentials` command. 0.5.60 diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 8500ce8fcfd..98258519a35 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -397,7 +397,10 @@ You must set or not set --gmsa-dns-server and --gmsa-root-domain-name at the same time when setting --enable-windows-gmsa. - name: --snapshot-id type: string - short-summary: The source snapshot id used to create this cluster. + short-summary: The source nodepool snapshot id used to create this cluster. + - name: --cluster-snapshot-id + type: string + short-summary: The source cluster snapshot id is used to create new cluster. - name: --enable-oidc-issuer type: bool short-summary: (PREVIEW) Enable OIDC issuer. @@ -469,8 +472,10 @@ text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$' --enable-windows-gmsa - name: Create a kubernetes cluster with enabling Windows gmsa but without setting DNS server in the vnet used by the cluster. text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$' --enable-windows-gmsa --gmsa-dns-server "10.240.0.4" --gmsa-root-domain-name "contoso.com" - - name: create a kubernetes cluster with a snapshot id. + - name: create a kubernetes cluster with a nodepool snapshot id. text: az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.20.9 --snapshot-id "/subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/snapshots/mysnapshot1" + - name: create a kubernetes cluster with a cluster snapshot id. + text: az aks create -g MyResourceGroup -n MyManagedCluster --cluster-snapshot-id "/subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/managedclustersnapshots/mysnapshot1" - name: create a kubernetes cluster with a Capacity Reservation Group(CRG) ID. text: az aks create -g MyResourceGroup -n MyMC --kubernetes-version 1.20.9 --node-vm-size VMSize --assign-identity CRG-RG-ID --enable-managed-identity --crg-id "subscriptions/SubID/resourceGroups/RGName/providers/Microsoft.ContainerService/CapacityReservationGroups/MyCRGID" - name: create a kubernetes cluster with support of hostgroup id. diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 2ecdf5c138c..37bed2caa42 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -17,7 +17,7 @@ get_vm_size_completion_list, get_k8s_versions_completion_list, get_k8s_upgrades_completion_list, get_ossku_completion_list) from ._validators import ( validate_create_parameters, validate_k8s_version, validate_linux_host_name, - validate_ssh_key, validate_nodes_count, validate_ip_ranges, validate_snapshot_name, + validate_ssh_key, validate_nodes_count, validate_ip_ranges, validate_snapshot_name, validate_cluster_snapshot_id, validate_nodepool_name, validate_vm_set_type, validate_load_balancer_sku, validate_nodepool_id, validate_cluster_id, validate_snapshot_id, validate_crg_id, validate_load_balancer_outbound_ips, validate_load_balancer_outbound_ip_prefixes, validate_nat_gateway_managed_outbound_ip_count, validate_taints, validate_priority, validate_eviction_policy, validate_spot_max_price, validate_acr, validate_user, @@ -203,6 +203,8 @@ def load_arguments(self, _): c.argument('workload_runtime', arg_type=get_enum_type( workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) c.argument('snapshot_id', type=str, validator=validate_snapshot_id) + c.argument('cluster_snapshot_id', + validator=validate_cluster_snapshot_id, is_preview=True) c.argument('enable_oidc_issuer', action='store_true', is_preview=True) c.argument('host_group_id', validator=validate_host_group_id, is_preview=True) diff --git a/src/aks-preview/azext_aks_preview/_validators.py b/src/aks-preview/azext_aks_preview/_validators.py index f830ea00a35..e0ff5bd00b0 100644 --- a/src/aks-preview/azext_aks_preview/_validators.py +++ b/src/aks-preview/azext_aks_preview/_validators.py @@ -544,6 +544,14 @@ def validate_snapshot_id(namespace): "--snapshot-id is not a valid Azure resource ID.") +def validate_cluster_snapshot_id(namespace): + if namespace.cluster_snapshot_id: + from msrestazure.tools import is_valid_resource_id + if not is_valid_resource_id(namespace.cluster_snapshot_id): + raise InvalidArgumentValueError( + "--cluster-snapshot-id is not a valid Azure resource ID.") + + def validate_host_group_id(namespace): if namespace.host_group_id: from msrestazure.tools import is_valid_resource_id diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index ab51368a8bb..b4d2e999668 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -552,6 +552,27 @@ def _get_snapshot(cli_ctx, snapshot_id): "Cannot parse snapshot name from provided resource id {}.".format(snapshot_id)) +def _get_cluster_snapshot(cli_ctx, snapshot_id): + snapshot_id = snapshot_id.lower() + match = _re_mc_snapshot_resource_id.search(snapshot_id) + if match: + subscription_id = match.group(1) + resource_group_name = match.group(2) + snapshot_name = match.group(3) + snapshot_client = cf_mc_snapshots_client( + cli_ctx, subscription_id=subscription_id) + try: + snapshot = snapshot_client.get(resource_group_name, snapshot_name) + except CloudError as ex: + if 'was not found' in ex.message: + raise InvalidArgumentValueError( + "Managed cluster snapshot {} not found.".format(snapshot_id)) + raise CLIError(ex.message) + return snapshot + raise InvalidArgumentValueError( + "Cannot parse snapshot name from provided resource id {}.".format(snapshot_id)) + + def aks_browse( cmd, client, @@ -769,6 +790,7 @@ def aks_create(cmd, gmsa_dns_server=None, gmsa_root_domain_name=None, snapshot_id=None, + cluster_snapshot_id=None, enable_oidc_issuer=False, host_group_id=None, crg_id=None, diff --git a/src/aks-preview/azext_aks_preview/decorator.py b/src/aks-preview/azext_aks_preview/decorator.py index 15928bdf044..5bc2cd98ee9 100644 --- a/src/aks-preview/azext_aks_preview/decorator.py +++ b/src/aks-preview/azext_aks_preview/decorator.py @@ -65,7 +65,10 @@ ensure_container_insights_for_monitoring, ensure_default_log_analytics_workspace_for_monitoring, ) -from azext_aks_preview.custom import _get_snapshot +from azext_aks_preview.custom import ( + _get_snapshot, + _get_cluster_snapshot, +) logger = get_logger(__name__) @@ -73,7 +76,8 @@ ContainerServiceClient = TypeVar("ContainerServiceClient") Identity = TypeVar("Identity") ManagedCluster = TypeVar("ManagedCluster") -ManagedClusterLoadBalancerProfile = TypeVar("ManagedClusterLoadBalancerProfile") +ManagedClusterLoadBalancerProfile = TypeVar( + "ManagedClusterLoadBalancerProfile") ResourceReference = TypeVar("ResourceReference") KubeletConfig = TypeVar("KubeletConfig") LinuxOSConfig = TypeVar("LinuxOSConfig") @@ -83,6 +87,7 @@ ManagedClusterOIDCIssuerProfile = TypeVar('ManagedClusterOIDCIssuerProfile') ManagedClusterSecurityProfileWorkloadIdentity = TypeVar('ManagedClusterSecurityProfileWorkloadIdentity') Snapshot = TypeVar("Snapshot") +ManagedClusterSnapshot = TypeVar("ManagedClusterSnapshot") AzureKeyVaultKms = TypeVar('AzureKeyVaultKms') @@ -356,7 +361,8 @@ def get_workload_runtime(self) -> Union[str, None]: ) if ( agent_pool_profile and - hasattr(agent_pool_profile, "workload_runtime") and # backward compatibility + # backward compatibility + hasattr(agent_pool_profile, "workload_runtime") and agent_pool_profile.workload_runtime is not None ): workload_runtime = agent_pool_profile.workload_runtime @@ -379,7 +385,8 @@ def get_gpu_instance_profile(self) -> Union[str, None]: ) if ( agent_pool_profile and - hasattr(agent_pool_profile, "gpu_instance_profile") and # backward compatibility + # backward compatibility + hasattr(agent_pool_profile, "gpu_instance_profile") and agent_pool_profile.gpu_instance_profile is not None ): gpu_instance_profile = agent_pool_profile.gpu_instance_profile @@ -404,8 +411,10 @@ def get_message_of_the_day(self) -> Union[str, None]: message_of_the_day_file_path ) ) - message_of_the_day = read_file_content(message_of_the_day_file_path) - message_of_the_day = base64.b64encode(bytes(message_of_the_day, 'ascii')).decode('ascii') + message_of_the_day = read_file_content( + message_of_the_day_file_path) + message_of_the_day = base64.b64encode( + bytes(message_of_the_day, 'ascii')).decode('ascii') # try to read the property value corresponding to the parameter from the `mc` object if self.mc and self.mc.agent_pool_profiles: @@ -414,7 +423,8 @@ def get_message_of_the_day(self) -> Union[str, None]: ) if ( agent_pool_profile and - hasattr(agent_pool_profile, "message_of_the_day") and # backward compatibility + # backward compatibility + hasattr(agent_pool_profile, "message_of_the_day") and agent_pool_profile.message_of_the_day is not None ): message_of_the_day = agent_pool_profile.message_of_the_day @@ -560,7 +570,8 @@ def get_nat_gateway_managed_outbound_ip_count(self) -> Union[int, None]: :return: int or None """ # read the original value passed by the command - nat_gateway_managed_outbound_ip_count = self.raw_param.get("nat_gateway_managed_outbound_ip_count") + nat_gateway_managed_outbound_ip_count = self.raw_param.get( + "nat_gateway_managed_outbound_ip_count") # In create mode, try to read the property value corresponding to the parameter from the `mc` object. if self.decorator_mode == DecoratorMode.CREATE: if ( @@ -586,7 +597,8 @@ def get_nat_gateway_idle_timeout(self) -> Union[int, None]: :return: int or None """ # read the original value passed by the command - nat_gateway_idle_timeout = self.raw_param.get("nat_gateway_idle_timeout") + nat_gateway_idle_timeout = self.raw_param.get( + "nat_gateway_idle_timeout") # In create mode, try to read the property value corresponding to the parameter from the `mc` object. if self.decorator_mode == DecoratorMode.CREATE: if ( @@ -612,7 +624,8 @@ def _get_enable_pod_security_policy(self, enable_validation: bool = False) -> bo :return: bool """ # read the original value passed by the command - enable_pod_security_policy = self.raw_param.get("enable_pod_security_policy") + enable_pod_security_policy = self.raw_param.get( + "enable_pod_security_policy") # In create mode, try to read the property value corresponding to the parameter from the `mc` object. if self.decorator_mode == DecoratorMode.CREATE: if ( @@ -650,7 +663,8 @@ def _get_disable_pod_security_policy(self, enable_validation: bool = False) -> b :return: bool """ # read the original value passed by the command - disable_pod_security_policy = self.raw_param.get("disable_pod_security_policy") + disable_pod_security_policy = self.raw_param.get( + "disable_pod_security_policy") # We do not support this option in create mode, therefore we do not read the value from `mc`. # this parameter does not need dynamic completion @@ -686,7 +700,8 @@ def _get_enable_managed_identity( :return: bool """ - enable_managed_identity = super()._get_enable_managed_identity(enable_validation, read_only) + enable_managed_identity = super()._get_enable_managed_identity( + enable_validation, read_only) # additional validation if enable_validation: if self.decorator_mode == DecoratorMode.CREATE: @@ -807,7 +822,8 @@ def _get_enable_pod_identity_with_kubenet(self, enable_validation: bool = False) :return: bool """ # read the original value passed by the command - enable_pod_identity_with_kubenet = self.raw_param.get("enable_pod_identity_with_kubenet") + enable_pod_identity_with_kubenet = self.raw_param.get( + "enable_pod_identity_with_kubenet") # In create mode, try to read the property value corresponding to the parameter from the `mc` object. if self.decorator_mode == DecoratorMode.CREATE: if ( @@ -868,8 +884,10 @@ def get_appgw_subnet_prefix(self) -> Union[str, None]: """ # determine the value of constants addon_consts = self.get_addon_consts() - CONST_INGRESS_APPGW_ADDON_NAME = addon_consts.get("CONST_INGRESS_APPGW_ADDON_NAME") - CONST_INGRESS_APPGW_SUBNET_CIDR = addon_consts.get("CONST_INGRESS_APPGW_SUBNET_CIDR") + CONST_INGRESS_APPGW_ADDON_NAME = addon_consts.get( + "CONST_INGRESS_APPGW_ADDON_NAME") + CONST_INGRESS_APPGW_SUBNET_CIDR = addon_consts.get( + "CONST_INGRESS_APPGW_SUBNET_CIDR") # read the original value passed by the command appgw_subnet_prefix = self.raw_param.get("appgw_subnet_prefix") @@ -900,11 +918,14 @@ def get_enable_msi_auth_for_monitoring(self) -> Union[bool, None]: """ # determine the value of constants addon_consts = self.get_addon_consts() - CONST_MONITORING_ADDON_NAME = addon_consts.get("CONST_MONITORING_ADDON_NAME") - CONST_MONITORING_USING_AAD_MSI_AUTH = addon_consts.get("CONST_MONITORING_USING_AAD_MSI_AUTH") + CONST_MONITORING_ADDON_NAME = addon_consts.get( + "CONST_MONITORING_ADDON_NAME") + CONST_MONITORING_USING_AAD_MSI_AUTH = addon_consts.get( + "CONST_MONITORING_USING_AAD_MSI_AUTH") # read the original value passed by the command - enable_msi_auth_for_monitoring = self.raw_param.get("enable_msi_auth_for_monitoring") + enable_msi_auth_for_monitoring = self.raw_param.get( + "enable_msi_auth_for_monitoring") # try to read the property value corresponding to the parameter from the `mc` object if ( self.mc and @@ -935,7 +956,8 @@ def get_no_wait(self) -> bool: no_wait = super().get_no_wait() if self.get_intermediate("monitoring") and self.get_enable_msi_auth_for_monitoring(): - logger.warning("Enabling msi auth for monitoring addon requires waiting for cluster creation to complete") + logger.warning( + "Enabling msi auth for monitoring addon requires waiting for cluster creation to complete") if no_wait: logger.warning("The set option '--no-wait' has been ignored") no_wait = False @@ -962,7 +984,8 @@ def _get_workspace_resource_id( """ # determine the value of constants addon_consts = self.get_addon_consts() - CONST_MONITORING_ADDON_NAME = addon_consts.get("CONST_MONITORING_ADDON_NAME") + CONST_MONITORING_ADDON_NAME = addon_consts.get( + "CONST_MONITORING_ADDON_NAME") CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID = addon_consts.get( "CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID" ) @@ -1201,7 +1224,8 @@ def _get_outbound_type( # not been decorated into the mc object at this time, only the value after dynamic completion is # meaningful here. if safe_lower(self._get_load_balancer_sku(enable_validation=False)) == "basic": - raise InvalidArgumentValueError("{} doesn't support basic load balancer sku".format(outbound_type)) + raise InvalidArgumentValueError( + "{} doesn't support basic load balancer sku".format(outbound_type)) if outbound_type == CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY: if self.get_vnet_subnet_id() in ["", None]: raise RequiredArgumentMissingError( @@ -1251,7 +1275,8 @@ def _get_enable_windows_gmsa(self, enable_validation: bool = False) -> bool: if ( self.mc and self.mc.windows_profile and - hasattr(self.mc.windows_profile, "gmsa_profile") and # backward compatibility + # backward compatibility + hasattr(self.mc.windows_profile, "gmsa_profile") and self.mc.windows_profile.gmsa_profile and self.mc.windows_profile.gmsa_profile.enabled is not None ): @@ -1302,7 +1327,8 @@ def _get_gmsa_dns_server_and_root_domain_name(self, enable_validation: bool = Fa if ( self.mc and self.mc.windows_profile and - hasattr(self.mc.windows_profile, "gmsa_profile") and # backward compatibility + # backward compatibility + hasattr(self.mc.windows_profile, "gmsa_profile") and self.mc.windows_profile.gmsa_profile and self.mc.windows_profile.gmsa_profile.dns_server is not None ): @@ -1318,7 +1344,8 @@ def _get_gmsa_dns_server_and_root_domain_name(self, enable_validation: bool = Fa if ( self.mc and self.mc.windows_profile and - hasattr(self.mc.windows_profile, "gmsa_profile") and # backward compatibility + # backward compatibility + hasattr(self.mc.windows_profile, "gmsa_profile") and self.mc.windows_profile.gmsa_profile and self.mc.windows_profile.gmsa_profile.root_domain_name is not None ): @@ -1404,6 +1431,50 @@ def get_snapshot(self) -> Union[Snapshot, None]: self.set_intermediate("snapshot", snapshot, overwrite_exists=True) return snapshot + def get_cluster_snapshot_id(self) -> Union[str, None]: + """Obtain the values of cluster_snapshot_id. + + :return: string or None + """ + # read the original value passed by the command + snapshot_id = self.raw_param.get("cluster_snapshot_id") + # try to read the property value corresponding to the parameter from the `mc` object + if ( + self.mc and + self.mc.creation_data and + self.mc.creation_data.source_resource_id is not None + ): + snapshot_id = ( + self.mc.creation_data.source_resource_id + ) + + # this parameter does not need dynamic completion + # this parameter does not need validation + return snapshot_id + + def get_cluster_snapshot(self) -> Union[ManagedClusterSnapshot, None]: + """Helper function to retrieve the ManagedClusterSnapshot object corresponding to a cluster snapshot id. + + This fuction will store an intermediate "managedclustersnapshot" to avoid sending the same request multiple times. + + Function "_get_cluster_snapshot" will be called to retrieve the ManagedClusterSnapshot object corresponding to a cluster snapshot id, which + internally used the managedclustersnapshot client (managedclustersnapshots operations belonging to container service client) to send + the request. + + :return: ManagedClusterSnapshot or None + """ + # try to read from intermediates + snapshot = self.get_intermediate("managedclustersnapshot") + if snapshot: + return snapshot + + snapshot_id = self.get_cluster_snapshot_id() + if snapshot_id: + snapshot = _get_cluster_snapshot(self.cmd.cli_ctx, snapshot_id) + self.set_intermediate("managedclustersnapshot", + snapshot, overwrite_exists=True) + return snapshot + def get_host_group_id(self) -> Union[str, None]: return self._get_host_group_id() @@ -1439,18 +1510,26 @@ def _get_kubernetes_version(self, read_only: bool = False) -> str: value_obtained_from_mc = self.mc.kubernetes_version # try to retrieve the value from snapshot value_obtained_from_snapshot = None + value_obtained_from_cluster_snapshot = None # skip dynamic completion if read_only is specified if not read_only: snapshot = self.get_snapshot() if snapshot: value_obtained_from_snapshot = snapshot.kubernetes_version + if not read_only: + snapshot = self.get_cluster_snapshot() + if snapshot: + value_obtained_from_cluster_snapshot = snapshot.managed_cluster_properties_read_only.kubernetes_version + # set default value if value_obtained_from_mc is not None: kubernetes_version = value_obtained_from_mc # default value is an empty string elif raw_value: kubernetes_version = raw_value + elif not read_only and value_obtained_from_cluster_snapshot is not None: + kubernetes_version = value_obtained_from_cluster_snapshot elif not read_only and value_obtained_from_snapshot is not None: kubernetes_version = value_obtained_from_snapshot else: @@ -1654,7 +1733,8 @@ def _get_enable_azure_keyvault_kms(self, enable_validation: bool = False) -> boo """ # read the original value passed by the command # TODO: set default value as False after the get function of AKSParamDict accepts parameter `default` - enable_azure_keyvault_kms = self.raw_param.get("enable_azure_keyvault_kms") + enable_azure_keyvault_kms = self.raw_param.get( + "enable_azure_keyvault_kms") # In create mode, try to read the property value corresponding to the parameter from the `mc` object. if self.decorator_mode == DecoratorMode.CREATE: if ( @@ -1693,7 +1773,8 @@ def _get_azure_keyvault_kms_key_id(self, enable_validation: bool = False) -> Uni :return: string or None """ # read the original value passed by the command - azure_keyvault_kms_key_id = self.raw_param.get("azure_keyvault_kms_key_id") + azure_keyvault_kms_key_id = self.raw_param.get( + "azure_keyvault_kms_key_id") # In create mode, try to read the property value corresponding to the parameter from the `mc` object. if self.decorator_mode == DecoratorMode.CREATE: if ( @@ -1705,7 +1786,8 @@ def _get_azure_keyvault_kms_key_id(self, enable_validation: bool = False) -> Uni azure_keyvault_kms_key_id = self.mc.security_profile.azure_key_vault_kms.key_id if enable_validation: - enable_azure_keyvault_kms = self._get_enable_azure_keyvault_kms(enable_validation=False) + enable_azure_keyvault_kms = self._get_enable_azure_keyvault_kms( + enable_validation=False) if ( azure_keyvault_kms_key_id and ( @@ -1713,7 +1795,8 @@ def _get_azure_keyvault_kms_key_id(self, enable_validation: bool = False) -> Uni enable_azure_keyvault_kms is False ) ): - raise RequiredArgumentMissingError('"--azure-keyvault-kms-key-id" requires "--enable-azure-keyvault-kms".') + raise RequiredArgumentMissingError( + '"--azure-keyvault-kms-key-id" requires "--enable-azure-keyvault-kms".') return azure_keyvault_kms_key_id @@ -1795,6 +1878,23 @@ def set_up_agent_pool_profiles(self, mc: ManagedCluster) -> ManagedCluster: mc.agent_pool_profiles = [agent_pool_profile] return mc + def set_up_creationdata_of_cluster_snapshot(self, mc: ManagedCluster) -> ManagedCluster: + """Set up creationData of cluster snapshot for the ManagedCluster object. + + Note: Inherited and extended in aks-preview to set some additional properties. + + :return: the ManagedCluster object + """ + # snapshot creation data + creation_data = None + snapshot_id = self.context.get_cluster_snapshot_id() + if snapshot_id: + creation_data = self.models.CreationData( + source_resource_id=snapshot_id + ) + mc.creation_data = creation_data + return mc + def set_up_http_proxy_config(self, mc: ManagedCluster) -> ManagedCluster: """Set up http proxy config for the ManagedCluster object. @@ -1961,7 +2061,8 @@ def build_monitoring_addon_profile(self) -> ManagedClusterAddonProfile: create_dcra=False, ) # set intermediate - self.context.set_intermediate("monitoring", True, overwrite_exists=True) + self.context.set_intermediate( + "monitoring", True, overwrite_exists=True) return monitoring_addon_profile def build_ingress_appgw_addon_profile(self) -> ManagedClusterAddonProfile: @@ -2111,6 +2212,7 @@ def construct_mc_preview_profile(self) -> ManagedCluster: mc = self.set_up_oidc_issuer_profile(mc) mc = self.set_up_azure_keyvault_kms(mc) + mc = self.set_up_creationdata_of_cluster_snapshot(mc) return mc def create_mc_preview(self, mc: ManagedCluster) -> ManagedCluster: @@ -2125,7 +2227,8 @@ def create_mc_preview(self, mc: ManagedCluster) -> ManagedCluster: # determine the value of constants addon_consts = self.context.get_addon_consts() - CONST_MONITORING_ADDON_NAME = addon_consts.get("CONST_MONITORING_ADDON_NAME") + CONST_MONITORING_ADDON_NAME = addon_consts.get( + "CONST_MONITORING_ADDON_NAME") # Due to SPN replication latency, we do a few retries here max_retry = 30 @@ -2201,7 +2304,8 @@ def check_raw_parameters(self): excluded_keys = ("cmd", "client", "resource_group_name", "name") # check whether the remaining parameters are set # the default value None or False (and other empty values, like empty string) will be considered as not set - is_changed = any(v for k, v in self.context.raw_param.items() if k not in excluded_keys) + is_changed = any( + v for k, v in self.context.raw_param.items() if k not in excluded_keys) # special cases # some parameters support the use of empty string or dictionary to update/remove previously set values @@ -2387,7 +2491,8 @@ def update_pod_identity_profile(self, mc: ManagedCluster) -> ManagedCluster: ) if self.context.get_disable_pod_identity(): - _update_addon_pod_identity(mc, enable=False, models=self.models.pod_identity_models) + _update_addon_pod_identity( + mc, enable=False, models=self.models.pod_identity_models) return mc def update_oidc_issuer_profile(self, mc: ManagedCluster) -> ManagedCluster: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_snapshot.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_snapshot.yaml index 3b7257ee9b4..b6284c30f65 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_snapshot.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_snapshot.yaml @@ -13,45 +13,47 @@ interactions: ParameterSetName: - -l --query User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0 Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0 Python/3.10.2 + (Linux-5.10.25-linuxkit-x86_64-with) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/orchestrators?api-version=2019-04-01&resource-type=managedClusters response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/orchestrators\",\n - \ \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/locations/orchestrators\",\n - \ \"properties\": {\n \"orchestrators\": [\n {\n \"orchestratorType\": - \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.13\",\n \"upgrades\": - [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.20.15\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n - \ \"orchestratorVersion\": \"1.21.7\"\n },\n {\n \"orchestratorType\": - \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.9\"\n }\n ]\n - \ },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.20.15\",\n \"upgrades\": [\n {\n \"orchestratorType\": - \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.7\"\n },\n {\n - \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.21.9\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n - \ \"orchestratorVersion\": \"1.21.7\",\n \"upgrades\": [\n {\n - \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.21.9\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n - \ \"orchestratorVersion\": \"1.22.4\"\n },\n {\n \"orchestratorType\": - \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.6\"\n }\n ]\n - \ },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.21.9\",\n \"default\": true,\n \"upgrades\": [\n {\n \"orchestratorType\": - \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.4\"\n },\n {\n - \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.22.6\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n - \ \"orchestratorVersion\": \"1.22.4\",\n \"upgrades\": [\n {\n - \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.22.6\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n - \ \"orchestratorVersion\": \"1.23.3\",\n \"isPreview\": true\n - \ }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n - \ \"orchestratorVersion\": \"1.22.6\",\n \"upgrades\": [\n {\n - \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.23.3\",\n \"isPreview\": true\n }\n ]\n },\n {\n - \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": - \"1.23.3\",\n \"isPreview\": true\n }\n ]\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/orchestrators\"\ + ,\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/locations/orchestrators\"\ + ,\n \"properties\": {\n \"orchestrators\": [\n {\n \"orchestratorType\"\ + : \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.13\",\n \"upgrades\"\ + : [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.20.15\"\n },\n {\n \"orchestratorType\": \"Kubernetes\"\ + ,\n \"orchestratorVersion\": \"1.21.7\"\n },\n {\n \"\ + orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.9\"\ + \n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\"\ + ,\n \"orchestratorVersion\": \"1.20.15\",\n \"upgrades\": [\n \ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.21.7\"\n },\n {\n \"orchestratorType\": \"Kubernetes\"\ + ,\n \"orchestratorVersion\": \"1.21.9\"\n }\n ]\n },\n \ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.21.7\",\n \"upgrades\": [\n {\n \"orchestratorType\"\ + : \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.9\"\n },\n\ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.22.4\"\n },\n {\n \"orchestratorType\": \"Kubernetes\"\ + ,\n \"orchestratorVersion\": \"1.22.6\"\n }\n ]\n },\n \ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.21.9\",\n \"default\": true,\n \"upgrades\": [\n {\n \ + \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.22.4\"\n },\n {\n \"orchestratorType\": \"Kubernetes\"\ + ,\n \"orchestratorVersion\": \"1.22.6\"\n }\n ]\n },\n \ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.22.4\",\n \"upgrades\": [\n {\n \"orchestratorType\"\ + : \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.6\"\n },\n\ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.23.3\",\n \"isPreview\": true\n }\n ]\n },\n {\n\ + \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.22.6\",\n \"upgrades\": [\n {\n \"orchestratorType\"\ + : \"Kubernetes\",\n \"orchestratorVersion\": \"1.23.3\",\n \"\ + isPreview\": true\n }\n ]\n },\n {\n \"orchestratorType\"\ + : \"Kubernetes\",\n \"orchestratorVersion\": \"1.23.3\",\n \"isPreview\"\ + : true\n }\n ]\n }\n }" headers: cache-control: - no-cache @@ -60,7 +62,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:23:04 GMT + - Mon, 18 Apr 2022 19:41:08 GMT expires: - '-1' pragma: @@ -80,18 +82,18 @@ interactions: message: OK - request: body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestszlpk6fmp-8ecadf", + {"kubernetesVersion": "1.23.3", "dnsPrefix": "cliakstest-clitest7ck6kvljr-8ecadf", "agentPoolProfiles": [{"count": 1, "vmSize": "Standard_DS2_v2", "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": false, "name": "c000004"}], "linuxProfile": - {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLdaun1GPmELROrLmG67+ItXDLcnRD7OCuaXCGdWFneMgqftElrhf0x0zlYjq1XzzDbHsgggcknCg2wwmaJYfqfbyicLixda+M2CxxVNu4ghKIaJ93xsimEgfD+hFdqogwKuB2C7tJr73sgFQhppae0OcbBCETCp3Sp0xmtozdpke0f0YOU8Xqf9J2nOv97+Ot8XOWjowLbQXQm63SrlGS+UkvxHX30UnJzLo6pVSYVVjL+Qu1a6qGMaMIyTSCRpm8aUaixl0xv71eHLH8LkWqDQFFB7Yp4+reIIJIArrdWb6t6zfZ8YKw+xNnafngbUboJUxRYP+lzeiRmVC3zN0L - azcli_aks_live_test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, - "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": "kubenet", - "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", - "dockerBridgeCidr": "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": - "standard"}, "disableLocalAccounts": false}}' + {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "disableLocalAccounts": false}}' headers: Accept: - application/json @@ -102,65 +104,68 @@ interactions: Connection: - keep-alive Content-Length: - - '1417' + - '1752' Content-Type: - application/json ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-03-02-preview response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n - \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": - \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": - \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.21.9\",\n \"currentKubernetesVersion\": \"1.21.9\",\n \"dnsPrefix\": - \"cliakstest-clitestszlpk6fmp-8ecadf\",\n \"fqdn\": \"cliakstest-clitestszlpk6fmp-8ecadf-af61ea2b.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitestszlpk6fmp-8ecadf-af61ea2b.portal.hcp.westus2.azmk8s.io\",\n - \ \"agentPoolProfiles\": [\n {\n \"name\": \"c000004\",\n \"count\": - 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": - \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": - \"OCIContainer\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n - \ \"enableAutoScaling\": false,\n \"provisioningState\": \"Creating\",\n - \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": - \"1.21.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n - \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n - \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-1804gen2containerd-2022.03.29\",\n \"enableFIPS\": false\n - \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n - \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDLdaun1GPmELROrLmG67+ItXDLcnRD7OCuaXCGdWFneMgqftElrhf0x0zlYjq1XzzDbHsgggcknCg2wwmaJYfqfbyicLixda+M2CxxVNu4ghKIaJ93xsimEgfD+hFdqogwKuB2C7tJr73sgFQhppae0OcbBCETCp3Sp0xmtozdpke0f0YOU8Xqf9J2nOv97+Ot8XOWjowLbQXQm63SrlGS+UkvxHX30UnJzLo6pVSYVVjL+Qu1a6qGMaMIyTSCRpm8aUaixl0xv71eHLH8LkWqDQFFB7Yp4+reIIJIArrdWb6t6zfZ8YKw+xNnafngbUboJUxRYP+lzeiRmVC3zN0L - azcli_aks_live_test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": - {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": - \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n - \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": - \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": - {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": - \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": - \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": - \"loadBalancer\",\n \"podCidrs\": [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": - [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n - \ },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": false,\n \"securityProfile\": - {},\n \"oidcIssuerProfile\": {\n \"enabled\": false\n }\n },\n \"identity\": - {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n - \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": - {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.3\",\n \"currentKubernetesVersion\"\ + : \"1.23.3\",\n \"dnsPrefix\": \"cliakstest-clitest7ck6kvljr-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitest7ck6kvljr-8ecadf-79e1bfc8.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest7ck6kvljr-8ecadf-79e1bfc8.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"c000004\",\n \"\ + count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ + 1.23.3\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.03.29\",\n \"enableFIPS\": false\n\ + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\"\ + ,\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"\ + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ + : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ + \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n\ + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ + : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"standard\"\ + ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ + count\": 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"disableLocalAccounts\": false,\n \"securityProfile\": {},\n\ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\n }\n },\n \"identity\"\ + : {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/23789b3f-e7e4-4f6e-ae36-0a9f8c34b314?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 cache-control: - no-cache content-length: - - '3055' + - '3384' content-type: - application/json date: - - Thu, 14 Apr 2022 05:23:06 GMT + - Mon, 18 Apr 2022 19:41:14 GMT expires: - '-1' pragma: @@ -172,7 +177,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1192' + - '1199' status: code: 201 message: Created @@ -188,17 +193,17 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/23789b3f-e7e4-4f6e-ae36-0a9f8c34b314?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"3f9b7823-e4e7-6e4f-ae36-0a9f8c34b314\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2022-04-14T05:23:07.1666666Z\"\n }" + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" headers: cache-control: - no-cache @@ -207,7 +212,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:23:36 GMT + - Mon, 18 Apr 2022 19:41:44 GMT expires: - '-1' pragma: @@ -237,17 +242,17 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/23789b3f-e7e4-4f6e-ae36-0a9f8c34b314?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"3f9b7823-e4e7-6e4f-ae36-0a9f8c34b314\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2022-04-14T05:23:07.1666666Z\"\n }" + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" headers: cache-control: - no-cache @@ -256,7 +261,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:24:07 GMT + - Mon, 18 Apr 2022 19:42:14 GMT expires: - '-1' pragma: @@ -286,17 +291,17 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/23789b3f-e7e4-4f6e-ae36-0a9f8c34b314?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"3f9b7823-e4e7-6e4f-ae36-0a9f8c34b314\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2022-04-14T05:23:07.1666666Z\"\n }" + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" headers: cache-control: - no-cache @@ -305,7 +310,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:24:37 GMT + - Mon, 18 Apr 2022 19:42:44 GMT expires: - '-1' pragma: @@ -335,17 +340,17 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/23789b3f-e7e4-4f6e-ae36-0a9f8c34b314?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"3f9b7823-e4e7-6e4f-ae36-0a9f8c34b314\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2022-04-14T05:23:07.1666666Z\"\n }" + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" headers: cache-control: - no-cache @@ -354,7 +359,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:25:07 GMT + - Mon, 18 Apr 2022 19:43:15 GMT expires: - '-1' pragma: @@ -384,17 +389,17 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/23789b3f-e7e4-4f6e-ae36-0a9f8c34b314?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"3f9b7823-e4e7-6e4f-ae36-0a9f8c34b314\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2022-04-14T05:23:07.1666666Z\"\n }" + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" headers: cache-control: - no-cache @@ -403,7 +408,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:25:37 GMT + - Mon, 18 Apr 2022 19:43:44 GMT expires: - '-1' pragma: @@ -433,18 +438,165 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/23789b3f-e7e4-4f6e-ae36-0a9f8c34b314?api-version=2016-03-30 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 response: body: - string: "{\n \"name\": \"3f9b7823-e4e7-6e4f-ae36-0a9f8c34b314\",\n \"status\": - \"Succeeded\",\n \"startTime\": \"2022-04-14T05:23:07.1666666Z\",\n \"endTime\": - \"2022-04-14T05:25:54.0134598Z\"\n }" + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:44:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value + -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:44:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value + -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:45:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value + -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/8031d346-1044-4e55-b46b-9560b0276755?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"46d33180-4410-554e-b46b-9560b0276755\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-04-18T19:41:14.2533333Z\",\n \"\ + endTime\": \"2022-04-18T19:45:40.8552652Z\"\n }" headers: cache-control: - no-cache @@ -453,7 +605,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:07 GMT + - Mon, 18 Apr 2022 19:45:45 GMT expires: - '-1' pragma: @@ -483,64 +635,68 @@ interactions: Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value + - --resource-group --name --location --nodepool-name --node-count -k --ssh-key-value -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-03-02-preview response: body: - string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n - \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": - \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": - \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.21.9\",\n \"currentKubernetesVersion\": \"1.21.9\",\n \"dnsPrefix\": - \"cliakstest-clitestszlpk6fmp-8ecadf\",\n \"fqdn\": \"cliakstest-clitestszlpk6fmp-8ecadf-af61ea2b.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitestszlpk6fmp-8ecadf-af61ea2b.portal.hcp.westus2.azmk8s.io\",\n - \ \"agentPoolProfiles\": [\n {\n \"name\": \"c000004\",\n \"count\": - 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": - \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": - \"OCIContainer\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n - \ \"enableAutoScaling\": false,\n \"provisioningState\": \"Succeeded\",\n - \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": - \"1.21.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n - \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n - \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-1804gen2containerd-2022.03.29\",\n \"enableFIPS\": false\n - \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n - \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABAQDLdaun1GPmELROrLmG67+ItXDLcnRD7OCuaXCGdWFneMgqftElrhf0x0zlYjq1XzzDbHsgggcknCg2wwmaJYfqfbyicLixda+M2CxxVNu4ghKIaJ93xsimEgfD+hFdqogwKuB2C7tJr73sgFQhppae0OcbBCETCp3Sp0xmtozdpke0f0YOU8Xqf9J2nOv97+Ot8XOWjowLbQXQm63SrlGS+UkvxHX30UnJzLo6pVSYVVjL+Qu1a6qGMaMIyTSCRpm8aUaixl0xv71eHLH8LkWqDQFFB7Yp4+reIIJIArrdWb6t6zfZ8YKw+xNnafngbUboJUxRYP+lzeiRmVC3zN0L - azcli_aks_live_test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": - {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": - \"MC_clitest000001_cliakstest000002_westus2\",\n \"enableRBAC\": true,\n - \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": - \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": - {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": - [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/08e4ed6c-225e-478b-8a44-9b4a557a7af1\"\n - \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": - \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": - \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\": - [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n - \ ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": - 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n - \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n - \ }\n },\n \"disableLocalAccounts\": false,\n \"securityProfile\": - {},\n \"oidcIssuerProfile\": {\n \"enabled\": false\n }\n },\n \"identity\": - {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n - \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": - {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.3\",\n \"currentKubernetesVersion\"\ + : \"1.23.3\",\n \"dnsPrefix\": \"cliakstest-clitest7ck6kvljr-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitest7ck6kvljr-8ecadf-79e1bfc8.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest7ck6kvljr-8ecadf-79e1bfc8.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"c000004\",\n \"\ + count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ + 1.23.3\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.03.29\",\n \"enableFIPS\": false\n\ + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\"\ + ,\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"\ + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ + : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ + \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000002_westus2\",\n\ + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ + : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ + ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ + count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/db2e0a67-9c33-4d1a-84ae-68d5f13787d7\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"oidcIssuerProfile\": {\n \"\ + enabled\": false\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\ + ,\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\"\ + : \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '3708' + - '4037' content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:08 GMT + - Mon, 18 Apr 2022 19:45:46 GMT expires: - '-1' pragma: @@ -572,12 +728,13 @@ interactions: ParameterSetName: - --resource-group --name --location --aks-custom-headers --cluster-id -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.8.10 (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.2 + (Linux-5.10.25-linuxkit-x86_64-with) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"cause":"automation","date":"2022-04-14T05:23:03Z","deletion_due_time":"1650172985","deletion_marked_by":"gc","product":"azurecli"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"cause":"automation","date":"2022-04-18T19:41:04Z","deletion_due_time":"1650570072","deletion_marked_by":"gc","product":"azurecli"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -586,7 +743,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 14 Apr 2022 05:26:08 GMT + - Mon, 18 Apr 2022 19:45:47 GMT expires: - '-1' pragma: @@ -622,34 +779,34 @@ interactions: ParameterSetName: - --resource-group --name --location --aks-custom-headers --cluster-id -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005?api-version=2022-03-02-preview response: body: - string: "{\n \"name\": \"s000005\",\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\",\n - \ \"type\": \"Microsoft.ContainerService/ManagedClusterSnapshots\",\n \"location\": - \"westus2\",\n \"systemData\": {\n \"createdBy\": \"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d\",\n - \ \"createdByType\": \"Application\",\n \"createdAt\": \"2022-04-14T05:26:08.909061Z\",\n - \ \"lastModifiedBy\": \"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d\",\n \"lastModifiedByType\": - \"Application\",\n \"lastModifiedAt\": \"2022-04-14T05:26:08.909061Z\"\n - \ },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\n - \ },\n \"snapshotType\": \"ManagedCluster\",\n \"managedClusterPropertiesReadOnly\": - {\n \"kubernetesVersion\": \"1.21.9\",\n \"sku\": {\n \"name\": - \"Basic\",\n \"tier\": \"Free\"\n },\n \"enableRbac\": true,\n \"networkProfile\": - {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\n - \ }\n }\n }\n }" + string: "{\n \"name\": \"s000005\",\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\"\ + ,\n \"type\": \"Microsoft.ContainerService/ManagedClusterSnapshots\",\n \ + \ \"location\": \"westus2\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ + ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-18T19:45:49.0530129Z\"\ + ,\n \"lastModifiedBy\": \"qizhe@microsoft.com\",\n \"lastModifiedByType\"\ + : \"User\",\n \"lastModifiedAt\": \"2022-04-18T19:45:49.0530129Z\"\n },\n\ + \ \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + \n },\n \"snapshotType\": \"ManagedCluster\",\n \"managedClusterPropertiesReadOnly\"\ + : {\n \"kubernetesVersion\": \"1.23.3\",\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n },\n \"enableRbac\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"\ + loadBalancerSku\": \"Standard\"\n }\n }\n }\n }" headers: cache-control: - no-cache content-length: - - '1116' + - '1070' content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:08 GMT + - Mon, 18 Apr 2022 19:45:49 GMT expires: - '-1' pragma: @@ -665,7 +822,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1199' status: code: 200 message: OK @@ -685,8 +842,8 @@ interactions: ParameterSetName: - -g -n --yes --no-wait User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-03-02-preview response: @@ -694,17 +851,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/437f5a79-9e37-41fc-a830-9e6ec54e5359?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/41a9ccdd-1749-4f11-a0f3-8f676e230b7c?api-version=2016-03-30 cache-control: - no-cache content-length: - '0' date: - - Thu, 14 Apr 2022 05:26:09 GMT + - Mon, 18 Apr 2022 19:45:51 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/437f5a79-9e37-41fc-a830-9e6ec54e5359?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/41a9ccdd-1749-4f11-a0f3-8f676e230b7c?api-version=2016-03-30 pragma: - no-cache server: @@ -714,7 +871,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' status: code: 202 message: Accepted @@ -732,34 +889,34 @@ interactions: ParameterSetName: - --resource-group --name -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005?api-version=2022-03-02-preview response: body: - string: "{\n \"name\": \"s000005\",\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\",\n - \ \"type\": \"Microsoft.ContainerService/ManagedClusterSnapshots\",\n \"location\": - \"westus2\",\n \"systemData\": {\n \"createdBy\": \"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d\",\n - \ \"createdByType\": \"Application\",\n \"createdAt\": \"2022-04-14T05:26:08.909061Z\",\n - \ \"lastModifiedBy\": \"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d\",\n \"lastModifiedByType\": - \"Application\",\n \"lastModifiedAt\": \"2022-04-14T05:26:08.909061Z\"\n - \ },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\n - \ },\n \"snapshotType\": \"ManagedCluster\",\n \"managedClusterPropertiesReadOnly\": - {\n \"kubernetesVersion\": \"1.21.9\",\n \"sku\": {\n \"name\": - \"Basic\",\n \"tier\": \"Free\"\n },\n \"enableRbac\": true,\n \"networkProfile\": - {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\n - \ }\n }\n }\n }" + string: "{\n \"name\": \"s000005\",\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\"\ + ,\n \"type\": \"Microsoft.ContainerService/ManagedClusterSnapshots\",\n \ + \ \"location\": \"westus2\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ + ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-18T19:45:49.0530129Z\"\ + ,\n \"lastModifiedBy\": \"qizhe@microsoft.com\",\n \"lastModifiedByType\"\ + : \"User\",\n \"lastModifiedAt\": \"2022-04-18T19:45:49.0530129Z\"\n },\n\ + \ \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + \n },\n \"snapshotType\": \"ManagedCluster\",\n \"managedClusterPropertiesReadOnly\"\ + : {\n \"kubernetesVersion\": \"1.23.3\",\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n },\n \"enableRbac\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"\ + loadBalancerSku\": \"Standard\"\n }\n }\n }\n }" headers: cache-control: - no-cache content-length: - - '1116' + - '1070' content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:10 GMT + - Mon, 18 Apr 2022 19:45:51 GMT expires: - '-1' pragma: @@ -791,34 +948,36 @@ interactions: ParameterSetName: - --resource-group -o User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots?api-version=2022-03-02-preview response: body: - string: "{\n \"value\": [\n {\n \"name\": \"s000005\",\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\",\n - \ \"type\": \"Microsoft.ContainerService/ManagedClusterSnapshots\",\n \"location\": - \"westus2\",\n \"systemData\": {\n \"createdBy\": \"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d\",\n - \ \"createdByType\": \"Application\",\n \"createdAt\": \"2022-04-14T05:26:08.909061Z\",\n - \ \"lastModifiedBy\": \"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d\",\n \"lastModifiedByType\": - \"Application\",\n \"lastModifiedAt\": \"2022-04-14T05:26:08.909061Z\"\n - \ },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\n - \ },\n \"snapshotType\": \"ManagedCluster\",\n \"managedClusterPropertiesReadOnly\": - {\n \"kubernetesVersion\": \"1.21.9\",\n \"sku\": {\n \"name\": - \"Basic\",\n \"tier\": \"Free\"\n },\n \"enableRbac\": true,\n - \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": - \"Standard\"\n }\n }\n }\n }\n ]\n }" + string: "{\n \"value\": [\n {\n \"name\": \"s000005\",\n \"id\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\"\ + ,\n \"type\": \"Microsoft.ContainerService/ManagedClusterSnapshots\",\n\ + \ \"location\": \"westus2\",\n \"systemData\": {\n \"createdBy\"\ + : \"qizhe@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\"\ + : \"2022-04-18T19:45:49.0530129Z\",\n \"lastModifiedBy\": \"qizhe@microsoft.com\"\ + ,\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2022-04-18T19:45:49.0530129Z\"\ + \n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + \n },\n \"snapshotType\": \"ManagedCluster\",\n \"managedClusterPropertiesReadOnly\"\ + : {\n \"kubernetesVersion\": \"1.23.3\",\n \"sku\": {\n \"\ + name\": \"Basic\",\n \"tier\": \"Free\"\n },\n \"enableRbac\"\ + : true,\n \"networkProfile\": {\n \"networkPlugin\": \"kubenet\"\ + ,\n \"loadBalancerSku\": \"Standard\"\n }\n }\n }\n }\n\ + \ ]\n }" headers: cache-control: - no-cache content-length: - - '1203' + - '1157' content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:10 GMT + - Mon, 18 Apr 2022 19:45:51 GMT expires: - '-1' pragma: @@ -836,6 +995,776 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005?api-version=2022-03-02-preview + response: + body: + string: "{\n \"name\": \"s000005\",\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\"\ + ,\n \"type\": \"Microsoft.ContainerService/ManagedClusterSnapshots\",\n \ + \ \"location\": \"westus2\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ + ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-18T19:45:49.0530129Z\"\ + ,\n \"lastModifiedBy\": \"qizhe@microsoft.com\",\n \"lastModifiedByType\"\ + : \"User\",\n \"lastModifiedAt\": \"2022-04-18T19:45:49.0530129Z\"\n },\n\ + \ \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + \n },\n \"snapshotType\": \"ManagedCluster\",\n \"managedClusterPropertiesReadOnly\"\ + : {\n \"kubernetesVersion\": \"1.23.3\",\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n },\n \"enableRbac\": true,\n\ + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"\ + loadBalancerSku\": \"Standard\"\n }\n }\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '1070' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:45:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"creationData": {"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005"}, + "kubernetesVersion": "1.23.3", "dnsPrefix": "cliakstest-clitest7ck6kvljr-8ecadf", + "agentPoolProfiles": [{"count": 1, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "OCIContainer", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", + "mode": "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", + "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": -1.0, "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false, "name": "c000004"}], "linuxProfile": + {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "disableLocalAccounts": false}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1943' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003?api-version=2022-03-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000003\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"creationData\": {\n \"sourceResourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\"\ + \n },\n \"kubernetesVersion\": \"1.23.3\",\n \"currentKubernetesVersion\"\ + : \"1.23.3\",\n \"dnsPrefix\": \"cliakstest-clitest7ck6kvljr-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitest7ck6kvljr-8ecadf-f684a1d1.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest7ck6kvljr-8ecadf-f684a1d1.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"c000004\",\n \"\ + count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ + 1.23.3\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.03.29\",\n \"enableFIPS\": false\n\ + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\"\ + ,\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"\ + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ + : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ + \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000003_westus2\",\n\ + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ + : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ + ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ + count\": 1\n }\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"disableLocalAccounts\": false,\n \"securityProfile\": {},\n\ + \ \"oidcIssuerProfile\": {\n \"enabled\": false\n }\n },\n \"identity\"\ + : {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3587' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:45:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:46:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:46:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:47:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:47:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:48:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:48:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:49:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:49:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fdf541ad-96c2-4ff8-990f-d2f7c4f43774?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"ad41f5fd-c296-f84f-990f-d2f7c4f43774\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-04-18T19:45:57.6Z\",\n \"endTime\"\ + : \"2022-04-18T19:50:05.1239131Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '164' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:50:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --ssh-key-value -o + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003?api-version=2022-03-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003\"\ + ,\n \"location\": \"westus2\",\n \"name\": \"cliakstest000003\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"creationData\": {\n \"sourceResourceId\": \"\ + /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005\"\ + \n },\n \"kubernetesVersion\": \"1.23.3\",\n \"currentKubernetesVersion\"\ + : \"1.23.3\",\n \"dnsPrefix\": \"cliakstest-clitest7ck6kvljr-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitest7ck6kvljr-8ecadf-f684a1d1.hcp.westus2.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitest7ck6kvljr-8ecadf-f684a1d1.portal.hcp.westus2.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"c000004\",\n \"\ + count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ + 1.23.3\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.03.29\",\n \"enableFIPS\": false\n\ + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\"\ + ,\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"\ + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ==\ + \ test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\"\ + : {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \ + \ \"nodeResourceGroup\": \"MC_clitest000001_cliakstest000003_westus2\",\n\ + \ \"enableRBAC\": true,\n \"enablePodSecurityPolicy\": false,\n \"networkProfile\"\ + : {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": \"Standard\"\ + ,\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"\ + count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"\ + id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000003_westus2/providers/Microsoft.Network/publicIPAddresses/984967e0-919a-4608-80a5-d890bba33799\"\ + \n }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\"\ + : \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\"\ + : \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\"\ + : [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\ + \n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\"\ + : 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000003_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000003-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"oidcIssuerProfile\": {\n \"\ + enabled\": false\n }\n },\n \"identity\": {\n \"type\": \"SystemAssigned\"\ + ,\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n \"tenantId\"\ + : \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": {\n \"name\"\ + : \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4240' + content-type: + - application/json + date: + - Mon, 18 Apr 2022 19:50:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes --no-wait + User-Agent: + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003?api-version=2022-03-02-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/f2c76b67-2219-419d-add4-81ba64d6c6df?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 18 Apr 2022 19:50:30 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operationresults/f2c76b67-2219-419d-add4-81ba64d6c6df?api-version=2016-03-30 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted - request: body: null headers: @@ -852,8 +1781,8 @@ interactions: ParameterSetName: - --resource-group --name --yes --no-wait User-Agent: - - AZURECLI/2.35.0 azsdk-python-azure-mgmt-containerservice/18.0.0b Python/3.8.10 - (Linux-5.13.0-1021-azure-x86_64-with-glibc2.29) + - AZURECLI/2.34.1 (DOCKER) azsdk-python-azure-mgmt-containerservice/18.0.0b + Python/3.10.2 (Linux-5.10.25-linuxkit-x86_64-with) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005?api-version=2022-03-02-preview response: @@ -865,7 +1794,7 @@ interactions: content-length: - '0' date: - - Thu, 14 Apr 2022 05:26:11 GMT + - Mon, 18 Apr 2022 19:50:34 GMT expires: - '-1' pragma: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 6ce92675e95..0db298ee565 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -1642,6 +1642,7 @@ def test_aks_snapshot(self, resource_group, resource_group_location): create_cmd = 'aks create --resource-group {resource_group} --name {name} --location {location} ' \ '--nodepool-name {nodepool_name} ' \ '--node-count 1 ' \ + '-k {upgrade_k8s_version} ' \ '--ssh-key-value={ssh_key_value} -o json' response = self.cmd(create_cmd, checks=[ self.check('provisioningState', 'Succeeded') @@ -1654,7 +1655,6 @@ def test_aks_snapshot(self, resource_group, resource_group_location): }) print("The cluster resource id %s " % cluster_resource_id) - # create snapshot from the cluster create_snapshot_cmd = 'aks snapshot create --resource-group {resource_group} --name {snapshot_name} --location {location} ' \ '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview ' \ @@ -1665,6 +1665,9 @@ def test_aks_snapshot(self, resource_group, resource_group_location): snapshot_resource_id = response["id"] assert snapshot_resource_id is not None + self.kwargs.update({ + 'snapshot_resource_id': snapshot_resource_id, + }) print("The snapshot resource id %s " % snapshot_resource_id) # delete the original AKS cluster @@ -1682,6 +1685,24 @@ def test_aks_snapshot(self, resource_group, resource_group_location): response = self.cmd(list_snapshot_cmd, checks=[]).get_output_in_json() assert len(response) > 0 + # create another aks cluster using this snapshot + create_cmd = 'aks create --resource-group {resource_group} --name {aks_name2} --location {location} ' \ + '--nodepool-name {nodepool_name} ' \ + '--node-count 1 --cluster-snapshot-id {snapshot_resource_id} ' \ + '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview ' \ + '--ssh-key-value={ssh_key_value} -o json' + self.cmd(create_cmd, checks=[ + self.check('provisioningState', 'Succeeded'), + self.check( + 'creationData.sourceResourceId', snapshot_resource_id), + self.check( + 'kubernetesVersion', upgrade_version) + ]).get_output_in_json() + + # delete the 2nd AKS cluster + self.cmd( + 'aks delete -g {resource_group} -n {aks_name2} --yes --no-wait', checks=[self.is_empty()]) + # delete the snapshot delete_snapshot_cmd = 'aks snapshot delete --resource-group {resource_group} --name {snapshot_name} --yes --no-wait' self.cmd(delete_snapshot_cmd, checks=[ diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py index 1f82d31e94c..706fa32e76a 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_decorator.py @@ -81,8 +81,10 @@ def test_models(self): ) module = importlib.import_module(module_name) - self.assertEqual(models.KubeletConfig, getattr(module, "KubeletConfig")) - self.assertEqual(models.LinuxOSConfig, getattr(module, "LinuxOSConfig")) + self.assertEqual(models.KubeletConfig, + getattr(module, "KubeletConfig")) + self.assertEqual(models.LinuxOSConfig, + getattr(module, "LinuxOSConfig")) self.assertEqual( models.ManagedClusterHTTPProxyConfig, getattr(module, "ManagedClusterHTTPProxyConfig"), @@ -1293,6 +1295,49 @@ def test_get_snapshot(self): # test cache self.assertEqual(ctx_1.get_snapshot(), mock_snapshot) + def test_get_cluster_snapshot_id(self): + # default + ctx_1 = AKSPreviewContext( + self.cmd, + { + "cluster_snapshot_id": None, + }, + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + self.assertEqual(ctx_1.get_cluster_snapshot_id(), None) + creation_data = self.models.CreationData( + source_resource_id="test_source_resource_id" + ) + agent_pool_profile = self.models.ManagedClusterAgentPoolProfile( + name="test_nodepool_name") + mc = self.models.ManagedCluster( + location="test_location", agent_pool_profiles=[agent_pool_profile], + creation_data=creation_data, + ) + ctx_1.attach_mc(mc) + self.assertEqual(ctx_1.get_cluster_snapshot_id(), + "test_source_resource_id") + + def test_get_cluster_snapshot(self): + # custom value + ctx_1 = AKSPreviewContext( + self.cmd, + { + "cluster_snapshot_id": "test_source_resource_id", + }, + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + mock_snapshot = Mock() + with patch( + "azext_aks_preview.decorator._get_cluster_snapshot", + return_value=mock_snapshot, + ): + self.assertEqual(ctx_1.get_cluster_snapshot(), mock_snapshot) + # test cache + self.assertEqual(ctx_1.get_cluster_snapshot(), mock_snapshot) + def test_get_host_group_id(self): # default ctx_1 = AKSPreviewContext( @@ -1375,6 +1420,47 @@ def test_get_kubernetes_version(self): ctx_3.get_kubernetes_version(), "custom_kubernetes_version" ) + # custom value + ctx_4 = AKSPreviewContext( + self.cmd, + {"kubernetes_version": "", "cluster_snapshot_id": "test_cluster_snapshot_id"}, + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + mock_snapshot = Mock( + managed_cluster_properties_read_only=Mock(kubernetes_version="test_cluster_kubernetes_version")) + with patch( + "azext_aks_preview.decorator._get_cluster_snapshot", + return_value=mock_snapshot, + ): + self.assertEqual( + ctx_4.get_kubernetes_version(), "test_cluster_kubernetes_version" + ) + + # custom value + ctx_5 = AKSPreviewContext( + self.cmd, + { + "cluster_snapshot_id": "test_cluster_snapshot_id", + "snapshot_id": "test_snapshot_id", + }, + self.models, + decorator_mode=DecoratorMode.CREATE, + ) + mock_snapshot = Mock(kubernetes_version="test_kubernetes_version") + mock_mc_snapshot = Mock( + managed_cluster_properties_read_only=Mock(kubernetes_version="test_cluster_kubernetes_version")) + with patch( + "azext_aks_preview.decorator._get_cluster_snapshot", + return_value=mock_mc_snapshot, + ), patch( + "azext_aks_preview.decorator._get_snapshot", + return_value=mock_snapshot, + ): + self.assertEqual( + ctx_5.get_kubernetes_version(), "test_cluster_kubernetes_version" + ) + def test_get_os_sku(self): # default ctx_1 = AKSPreviewContext( @@ -1798,7 +1884,7 @@ def test_get_enable_azure_keyvault_kms(self): decorator_mode=DecoratorMode.CREATE, ) self.assertIsNone(ctx_0.get_enable_azure_keyvault_kms()) - + ctx_1 = AKSPreviewContext( self.cmd, { @@ -1880,7 +1966,7 @@ def test_get_azure_keyvault_kms_key_id(self): decorator_mode=DecoratorMode.CREATE, ) self.assertIsNone(ctx_0.get_azure_keyvault_kms_key_id()) - + key_id_1 = "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" ctx_1 = AKSPreviewContext( self.cmd, @@ -2043,7 +2129,8 @@ def test_set_up_agent_pool_profiles(self): host_group_id=None, capacity_reservation_group_id=None, ) - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location") + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location") ground_truth_mc_1.agent_pool_profiles = [agent_pool_profile_1] self.assertEqual(dec_mc_1, ground_truth_mc_1) @@ -2151,7 +2238,8 @@ def test_set_up_agent_pool_profiles(self): capacity_reservation_group_id="test_crg_id", host_group_id="test_host_group_id", ) - ground_truth_mc_2 = self.models.ManagedCluster(location="test_location") + ground_truth_mc_2 = self.models.ManagedCluster( + location="test_location") ground_truth_mc_2.agent_pool_profiles = [agent_pool_profile_2] self.assertEqual(dec_mc_2, ground_truth_mc_2) @@ -2170,7 +2258,8 @@ def test_set_up_http_proxy_config(self): with self.assertRaises(CLIInternalError): dec_1.set_up_http_proxy_config(None) dec_mc_1 = dec_1.set_up_http_proxy_config(mc_1) - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location") + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location") self.assertEqual(dec_mc_1, ground_truth_mc_1) # custom value @@ -2208,7 +2297,8 @@ def test_set_up_node_resource_group(self): with self.assertRaises(CLIInternalError): dec_1.set_up_node_resource_group(None) dec_mc_1 = dec_1.set_up_node_resource_group(mc_1) - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location") + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location") self.assertEqual(dec_mc_1, ground_truth_mc_1) # custom value @@ -2427,7 +2517,8 @@ def test_set_up_pod_identity_profile(self): with self.assertRaises(CLIInternalError): dec_1.set_up_pod_identity_profile(None) dec_mc_1 = dec_1.set_up_pod_identity_profile(mc_1) - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location") + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location") self.assertEqual(dec_mc_1, ground_truth_mc_1) # custom value @@ -2487,7 +2578,8 @@ def test_build_monitoring_addon_profile(self): "azext_aks_preview.decorator.ensure_container_insights_for_monitoring", return_value=None, ): - self.assertEqual(dec_1.context.get_intermediate("monitoring"), None) + self.assertEqual( + dec_1.context.get_intermediate("monitoring"), None) monitoring_addon_profile = dec_1.build_monitoring_addon_profile() ground_truth_monitoring_addon_profile = self.models.ManagedClusterAddonProfile( enabled=True, @@ -2499,7 +2591,8 @@ def test_build_monitoring_addon_profile(self): self.assertEqual( monitoring_addon_profile, ground_truth_monitoring_addon_profile ) - self.assertEqual(dec_1.context.get_intermediate("monitoring"), True) + self.assertEqual( + dec_1.context.get_intermediate("monitoring"), True) # custom value dec_2 = AKSPreviewCreateDecorator( @@ -2523,7 +2616,8 @@ def test_build_monitoring_addon_profile(self): "azext_aks_preview.decorator.ensure_container_insights_for_monitoring", return_value=None, ): - self.assertEqual(dec_2.context.get_intermediate("monitoring"), None) + self.assertEqual( + dec_2.context.get_intermediate("monitoring"), None) monitoring_addon_profile = dec_2.build_monitoring_addon_profile() ground_truth_monitoring_addon_profile = self.models.ManagedClusterAddonProfile( enabled=True, @@ -2535,7 +2629,8 @@ def test_build_monitoring_addon_profile(self): self.assertEqual( monitoring_addon_profile, ground_truth_monitoring_addon_profile ) - self.assertEqual(dec_2.context.get_intermediate("monitoring"), True) + self.assertEqual( + dec_2.context.get_intermediate("monitoring"), True) def test_build_ingress_appgw_addon_profile(self): # default @@ -2781,7 +2876,8 @@ def test_set_up_windows_profile(self): dec_1.set_up_windows_profile(None) dec_mc_1 = dec_1.set_up_windows_profile(mc_1) - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location") + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location") self.assertEqual(dec_mc_1, ground_truth_mc_1) # custom value @@ -2932,6 +3028,24 @@ def test_set_up_azure_keyvault_kms(self): self.assertEqual(dec_mc_2, ground_truth_mc_2) + def test_set_up_creationdata_of_cluster_snapshot(self): + dec_1 = AKSPreviewCreateDecorator( + self.cmd, + self.client, + { + "cluster_snapshot_id": "test_cluster_snapshot_id", + }, + CUSTOM_MGMT_AKS_PREVIEW, + ) + mc_1 = self.models.ManagedCluster(location="test_location") + dec_mc_1 = dec_1.set_up_creationdata_of_cluster_snapshot(mc_1) + cd = self.models.CreationData( + source_resource_id="test_cluster_snapshot_id" + ) + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location", creation_data=cd) + self.assertEqual(dec_mc_1, ground_truth_mc_1) + def test_construct_mc_preview_profile(self): import inspect