From 58d329b79ee11417dc24ae7a690b0a2f88747af0 Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Fri, 15 Apr 2022 22:46:20 -0700 Subject: [PATCH 1/7] add support to create cluster with cluster snapshot --- src/aks-preview/HISTORY.md | 8 +- src/aks-preview/azext_aks_preview/_help.py | 9 +- src/aks-preview/azext_aks_preview/_params.py | 4 +- .../azext_aks_preview/_validators.py | 8 + src/aks-preview/azext_aks_preview/custom.py | 22 + .../azext_aks_preview/decorator.py | 168 ++- .../latest/recordings/test_aks_snapshot.yaml | 1144 +++++++++++++---- .../tests/latest/test_aks_commands.py | 25 +- .../tests/latest/test_decorator.py | 139 +- 9 files changed, 1192 insertions(+), 335 deletions(-) diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 43239816ebf..b521f0833c2 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -6,6 +6,12 @@ Release History ++++++ * Add support for `--format` parameter in `az aks get-credentials` command. +0.5.61 +++++++ + +* Add support to create cluster with managed cluster snapshot. Command is + * `az aks create --cluster-snapshot-id ` + 0.5.60 ++++++ @@ -236,7 +242,7 @@ and `az aks nodepool add` 0.5.24 +++++ -* * Add "--aks-custom-headers" for "az aks nodepool upgrade" + * * Add "--aks-custom-headers" for "az aks nodepool upgrade" 0.5.23 +++++ diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index d5516747224..9b950f37b2a 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -394,7 +394,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. @@ -466,8 +469,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 8080dea9180..d08d4288de9 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, @@ -202,6 +202,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', type=str, + 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 75d8ab9c6e4..72e9d465d1b 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, @@ -767,6 +788,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 c65e6dbb830..766393172ff 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") @@ -82,6 +86,7 @@ ManagedClusterAddonProfile = TypeVar("ManagedClusterAddonProfile") ManagedClusterOIDCIssuerProfile = TypeVar('ManagedClusterOIDCIssuerProfile') Snapshot = TypeVar("Snapshot") +ManagedClusterSnapshot = TypeVar("ManagedClusterSnapshot") AzureKeyVaultKms = TypeVar('AzureKeyVaultKms') @@ -350,7 +355,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 @@ -373,7 +379,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 @@ -398,8 +405,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: @@ -408,7 +417,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 @@ -554,7 +564,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 ( @@ -580,7 +591,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 ( @@ -606,7 +618,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 ( @@ -644,7 +657,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 @@ -680,7 +694,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: @@ -801,7 +816,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 ( @@ -862,8 +878,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") @@ -894,11 +912,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 @@ -929,7 +950,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 @@ -956,7 +978,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" ) @@ -1195,7 +1218,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( @@ -1245,7 +1269,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 ): @@ -1296,7 +1321,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 ): @@ -1312,7 +1338,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 ): @@ -1398,6 +1425,49 @@ 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() @@ -1433,18 +1503,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: @@ -1598,7 +1676,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 ( @@ -1637,7 +1716,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 ( @@ -1649,7 +1729,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 ( @@ -1657,7 +1738,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 @@ -1739,6 +1821,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. @@ -1905,7 +2004,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: @@ -2029,6 +2129,7 @@ def construct_mc_preview_profile(self) -> ManagedCluster: mc = self.set_up_pod_identity_profile(mc) 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: @@ -2043,7 +2144,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 @@ -2119,7 +2221,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 @@ -2303,7 +2406,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..eacf5048aef 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,54 +13,50 @@ 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 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/uksouth/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/uksouth/orchestrators\"\ + ,\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/locations/orchestrators\"\ + ,\n \"properties\": {\n \"orchestrators\": [\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 \"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 },\n {\n \"orchestratorType\": \"Kubernetes\"\ + ,\n \"orchestratorVersion\": \"1.23.5\"\n }\n ]\n },\n \ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.22.6\",\n \"default\": true,\n \"upgrades\": [\n {\n \ + \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.23.3\"\n },\n {\n \"orchestratorType\": \"Kubernetes\"\ + ,\n \"orchestratorVersion\": \"1.23.5\"\n }\n ]\n },\n \ + \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + : \"1.23.3\",\n \"upgrades\": [\n {\n \"orchestratorType\"\ + : \"Kubernetes\",\n \"orchestratorVersion\": \"1.23.5\"\n }\n \ + \ ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"\ + orchestratorVersion\": \"1.23.5\"\n }\n ]\n }\n }" headers: cache-control: - no-cache content-length: - - '2410' + - '2022' content-type: - application/json date: - - Thu, 14 Apr 2022 05:23:04 GMT + - Sat, 16 Apr 2022 04:37:59 GMT expires: - '-1' pragma: @@ -79,19 +75,19 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestszlpk6fmp-8ecadf", + body: '{"location": "uksouth", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "1.23.5", "dnsPrefix": "cliakstest-clitestbb5pyvzne-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 +98,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\": \"uksouth\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.5\",\n \"currentKubernetesVersion\"\ + : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.hcp.uksouth.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.portal.hcp.uksouth.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.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.04.05\",\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_uksouth\",\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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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 + - Sat, 16 Apr 2022 04:38:12 GMT expires: - '-1' pragma: @@ -172,7 +171,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1192' + - '1199' status: code: 201 message: Created @@ -188,17 +187,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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\"\n }" headers: cache-control: - no-cache @@ -207,7 +206,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:23:36 GMT + - Sat, 16 Apr 2022 04:38:43 GMT expires: - '-1' pragma: @@ -237,17 +236,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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\"\n }" headers: cache-control: - no-cache @@ -256,7 +255,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:24:07 GMT + - Sat, 16 Apr 2022 04:39:13 GMT expires: - '-1' pragma: @@ -286,17 +285,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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\"\n }" headers: cache-control: - no-cache @@ -305,7 +304,7 @@ interactions: content-type: - application/json date: - - Thu, 14 Apr 2022 05:24:37 GMT + - Sat, 16 Apr 2022 04:39:43 GMT expires: - '-1' pragma: @@ -335,26 +334,27 @@ 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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\",\n \"\ + endTime\": \"2022-04-16T04:42:58.2058857Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '170' content-type: - application/json date: - - Thu, 14 Apr 2022 05:25:07 GMT + - Sat, 16 Apr 2022 05:31:06 GMT expires: - '-1' pragma: @@ -384,26 +384,70 @@ 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/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2022-03-02-preview response: body: - string: "{\n \"name\": \"3f9b7823-e4e7-6e4f-ae36-0a9f8c34b314\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2022-04-14T05:23:07.1666666Z\"\n }" + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ + ,\n \"location\": \"uksouth\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + : \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\"\ + : \"Running\"\n },\n \"kubernetesVersion\": \"1.23.5\",\n \"currentKubernetesVersion\"\ + : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.hcp.uksouth.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.portal.hcp.uksouth.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.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.04.05\",\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_uksouth\",\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_uksouth/providers/Microsoft.Network/publicIPAddresses/a8a45817-2c7a-43c8-a92d-c4983342e191\"\ + \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_uksouth/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 \"azureDefender\": {\n \"enabled\"\ + : true,\n \"logAnalyticsWorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/DefaultResourceGroup-SUK/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-SUK\"\ + \n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n },\n\ + \ \"guardrailsProfile\": {\n \"level\": \"Off\"\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: - - '126' + - '4386' content-type: - application/json date: - - Thu, 14 Apr 2022 05:25:37 GMT + - Sat, 16 Apr 2022 05:31:06 GMT expires: - '-1' pragma: @@ -425,35 +469,95 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - aks create + - aks snapshot create Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value - -o + - --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-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/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/resourcegroups/clitest000001?api-version=2021-04-01 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: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"uksouth","tags":{"cause":"automation","date":"2022-04-16T04:37:52Z","deletion_due_time":"1650343136","deletion_marked_by":"gc","product":"azurecli"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '170' + - '364' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 16 Apr 2022 05:31:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "uksouth", "properties": {"creationData": {"sourceResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002"}, + "snapshotType": "ManagedCluster"}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/ManagedClusterSnapshotPreview + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks snapshot create + Connection: + - keep-alive + Content-Length: + - '265' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --aks-custom-headers --cluster-id -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/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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ + ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-16T05:31:13.3586507Z\"\ + ,\n \"lastModifiedBy\": \"qizhe@microsoft.com\",\n \"lastModifiedByType\"\ + : \"User\",\n \"lastModifiedAt\": \"2022-04-16T05:31:13.3586507Z\"\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.5\",\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: - - Thu, 14 Apr 2022 05:26:07 GMT + - Sat, 16 Apr 2022 05:31:14 GMT expires: - '-1' pragma: @@ -468,6 +572,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' status: code: 200 message: OK @@ -475,72 +581,93 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - aks create + - aks delete Connection: - keep-alive + Content-Length: + - '0' ParameterSetName: - - --resource-group --name --location --nodepool-name --node-count --ssh-key-value - -o + - -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) - method: GET + - 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: 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: '' headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/uksouth/operations/38983f60-2eb5-4562-82a8-4cd9f001fc42?api-version=2016-03-30 cache-control: - no-cache content-length: - - '3708' + - '0' + date: + - Sat, 16 Apr 2022 05:31:18 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/uksouth/operationresults/38983f60-2eb5-4562-82a8-4cd9f001fc42?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: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks snapshot show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name -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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ + ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-16T05:31:13.3586507Z\"\ + ,\n \"lastModifiedBy\": \"qizhe@microsoft.com\",\n \"lastModifiedByType\"\ + : \"User\",\n \"lastModifiedAt\": \"2022-04-16T05:31:13.3586507Z\"\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.5\",\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: - - Thu, 14 Apr 2022 05:26:08 GMT + - Sat, 16 Apr 2022 05:31:19 GMT expires: - '-1' pragma: @@ -566,33 +693,52 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - aks snapshot create + - aks snapshot list Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --aks-custom-headers --cluster-id -o + - --resource-group -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-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?api-version=2021-04-01 + 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: '{"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: "{\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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\"\ + : \"qizhe@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\"\ + : \"2022-04-16T05:31:13.3586507Z\",\n \"lastModifiedBy\": \"qizhe@microsoft.com\"\ + ,\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2022-04-16T05:31:13.3586507Z\"\ + \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.5\",\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: - - '364' + - '1157' content-type: - - application/json; charset=utf-8 + - application/json date: - - Thu, 14 Apr 2022 05:26:08 GMT + - Sat, 16 Apr 2022 05:31:21 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: @@ -601,9 +747,80 @@ interactions: code: 200 message: OK - request: - body: '{"location": "westus2", "properties": {"creationData": {"sourceResourceId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002"}, - "snapshotType": "ManagedCluster"}}' + 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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ + ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-16T05:31:13.3586507Z\"\ + ,\n \"lastModifiedBy\": \"qizhe@microsoft.com\",\n \"lastModifiedByType\"\ + : \"User\",\n \"lastModifiedAt\": \"2022-04-16T05:31:13.3586507Z\"\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.5\",\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: + - Sat, 16 Apr 2022 05:31:22 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": "uksouth", "identity": {"type": "SystemAssigned"}, "properties": + {"creationData": {"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedclustersnapshots/s000005"}, + "kubernetesVersion": "1.23.5", "dnsPrefix": "cliakstest-clitestbb5pyvzne-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 @@ -612,44 +829,123 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - aks snapshot create + - aks create Connection: - keep-alive Content-Length: - - '265' + - '1943' Content-Type: - application/json ParameterSetName: - - --resource-group --name --location --aks-custom-headers --cluster-id -o + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --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/managedclustersnapshots/s000005?api-version=2022-03-02-preview + 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\": \"uksouth\",\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.5\",\n \"currentKubernetesVersion\"\ + : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.hcp.uksouth.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.portal.hcp.uksouth.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.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.04.05\",\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_uksouth\",\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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '3587' + content-type: + - application/json + date: + - Sat, 16 Apr 2022 05:31:34 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" headers: cache-control: - no-cache content-length: - - '1116' + - '126' content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:08 GMT + - Sat, 16 Apr 2022 05:32:05 GMT expires: - '-1' pragma: @@ -664,102 +960,247 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1195' 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: - application/json + date: + - Sat, 16 Apr 2022 05:32:34 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 delete + - aks create Connection: - keep-alive - Content-Length: - - '0' ParameterSetName: - - -g -n --yes --no-wait + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --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) - 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 + - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 response: body: - string: '' + string: "{\n \"name\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" 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 cache-control: - no-cache content-length: - - '0' + - '126' + content-type: + - application/json date: - - Thu, 14 Apr 2022 05:26:09 GMT + - Sat, 16 Apr 2022 05:33:05 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 pragma: - no-cache server: - nginx strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14998' status: - code: 202 - message: Accepted + 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: - application/json + date: + - Sat, 16 Apr 2022 05:33:35 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 snapshot show + - aks create Connection: - keep-alive ParameterSetName: - - --resource-group --name -o + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --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/managedclustersnapshots/s000005?api-version=2022-03-02-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 16 Apr 2022 05:34:05 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" headers: cache-control: - no-cache content-length: - - '1116' + - '126' content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:10 GMT + - Sat, 16 Apr 2022 05:34:35 GMT expires: - '-1' pragma: @@ -780,45 +1221,133 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + response: + body: + string: "{\n \"name\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\",\n \"\ + endTime\": \"2022-04-16T05:35:06.0989304Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: - application/json + date: + - Sat, 16 Apr 2022 05:35:06 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 snapshot list + - aks create Connection: - keep-alive ParameterSetName: - - --resource-group -o + - --resource-group --name --location --nodepool-name --node-count --cluster-snapshot-id + --aks-custom-headers --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/managedclustersnapshots?api-version=2022-03-02-preview + 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 \"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 \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003\"\ + ,\n \"location\": \"uksouth\",\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.5\",\n \"currentKubernetesVersion\"\ + : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.hcp.uksouth.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.portal.hcp.uksouth.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.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-1804gen2containerd-2022.04.05\",\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_uksouth\",\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_uksouth/providers/Microsoft.Network/publicIPAddresses/6525eca4-f6c3-4a7e-b991-8172870ede3e\"\ + \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_uksouth/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: - - '1203' + - '4240' content-type: - application/json date: - - Thu, 14 Apr 2022 05:26:10 GMT + - Sat, 16 Apr 2022 05:35:07 GMT expires: - '-1' pragma: @@ -836,6 +1365,55 @@ interactions: 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/uksouth/operations/082a57d5-3f26-4ab0-b1c1-3abbca2504bf?api-version=2016-03-30 + cache-control: + - no-cache + content-length: + - '0' + date: + - Sat, 16 Apr 2022 05:35:09 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/uksouth/operationresults/082a57d5-3f26-4ab0-b1c1-3abbca2504bf?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: + - '14999' + status: + code: 202 + message: Accepted - request: body: null headers: @@ -852,8 +1430,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 +1443,7 @@ interactions: content-length: - '0' date: - - Thu, 14 Apr 2022 05:26:11 GMT + - Sat, 16 Apr 2022 05:35:17 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 4ab26f23fc1..946cdce0125 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 @@ -1617,7 +1617,7 @@ def test_aks_nodepool_snapshot(self, resource_group, resource_group_location): ]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='uksouth') def test_aks_snapshot(self, resource_group, resource_group_location): create_version, upgrade_version = self._get_versions( resource_group_location) @@ -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 96dacbece67..0b433cab083 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,44 @@ 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( + kubernetes_version="test_cluster_kubernetes_version") + with patch( + "azext_aks_preview.decorator._get_cluster_snapshot", + return_value=mock_snapshot, + ): + self.assertEqual( + ctx_2.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( + kubernetes_version="test_cluster_kubernetes_version") + with patch( + "azext_aks_preview.decorator._get_cluster_snapshot", + return_value=mock_mc_snapshot, + ): + self.assertEqual( + ctx_3.get_kubernetes_version(), "custom_cluster_kubernetes_version" + ) + def test_get_os_sku(self): # default ctx_1 = AKSPreviewContext( @@ -1683,7 +1766,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, { @@ -1765,7 +1848,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, @@ -1928,7 +2011,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) @@ -2036,7 +2120,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) @@ -2055,7 +2140,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 @@ -2093,7 +2179,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 @@ -2312,7 +2399,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 @@ -2372,7 +2460,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, @@ -2384,7 +2473,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( @@ -2408,7 +2498,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, @@ -2420,7 +2511,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 @@ -2666,7 +2758,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 @@ -2787,6 +2880,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 From f07d84620b8eb4b775b194fd9f488aa7f5b6c01f Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Mon, 18 Apr 2022 12:54:35 -0700 Subject: [PATCH 2/7] fix ut --- .../latest/recordings/test_aks_snapshot.yaml | 671 +++++++++++++----- .../tests/latest/test_aks_commands.py | 2 +- .../tests/latest/test_decorator.py | 7 +- 3 files changed, 517 insertions(+), 163 deletions(-) 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 eacf5048aef..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 @@ -16,47 +16,53 @@ interactions: - 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/uksouth/orchestrators?api-version=2019-04-01&resource-type=managedClusters + 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/uksouth/orchestrators\"\ + 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.21.7\",\n \"upgrades\"\ + : \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.13\",\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\"\ + : \"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.21.9\",\n \"upgrades\": [\n \ - \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ + ,\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 },\n {\n \"orchestratorType\": \"Kubernetes\"\ - ,\n \"orchestratorVersion\": \"1.23.5\"\n }\n ]\n },\n \ - \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ - : \"1.22.6\",\n \"default\": true,\n \"upgrades\": [\n {\n \ - \ \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ - : \"1.23.3\"\n },\n {\n \"orchestratorType\": \"Kubernetes\"\ - ,\n \"orchestratorVersion\": \"1.23.5\"\n }\n ]\n },\n \ - \ {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\"\ - : \"1.23.3\",\n \"upgrades\": [\n {\n \"orchestratorType\"\ - : \"Kubernetes\",\n \"orchestratorVersion\": \"1.23.5\"\n }\n \ - \ ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"\ - orchestratorVersion\": \"1.23.5\"\n }\n ]\n }\n }" + : \"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 content-length: - - '2022' + - '2410' content-type: - application/json date: - - Sat, 16 Apr 2022 04:37:59 GMT + - Mon, 18 Apr 2022 19:41:08 GMT expires: - '-1' pragma: @@ -75,8 +81,8 @@ interactions: code: 200 message: OK - request: - body: '{"location": "uksouth", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "1.23.5", "dnsPrefix": "cliakstest-clitestbb5pyvzne-8ecadf", + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": + {"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", @@ -112,13 +118,13 @@ interactions: response: body: string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"uksouth\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + ,\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.5\",\n \"currentKubernetesVersion\"\ - : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.hcp.uksouth.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.portal.hcp.uksouth.azmk8s.io\"\ + : \"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\"\ @@ -126,16 +132,16 @@ interactions: \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ - 1.23.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + 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.04.05\",\n \"enableFIPS\": false\n\ + : \"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_uksouth\",\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 \"\ @@ -151,7 +157,7 @@ interactions: : {\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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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: @@ -159,7 +165,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 04:38:12 GMT + - Mon, 18 Apr 2022 19:41:14 GMT expires: - '-1' pragma: @@ -193,11 +199,256 @@ interactions: - 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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"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:41:44 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:42:14 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:42:44 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:43: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:43:44 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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\"\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 @@ -206,7 +457,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 04:38:43 GMT + - Mon, 18 Apr 2022 19:44:15 GMT expires: - '-1' pragma: @@ -242,11 +493,11 @@ interactions: - 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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\"\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 @@ -255,7 +506,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 04:39:13 GMT + - Mon, 18 Apr 2022 19:44:45 GMT expires: - '-1' pragma: @@ -291,11 +542,11 @@ interactions: - 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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\"\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 @@ -304,7 +555,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 04:39:43 GMT + - Mon, 18 Apr 2022 19:45:15 GMT expires: - '-1' pragma: @@ -340,12 +591,12 @@ interactions: - 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/uksouth/operations/68cf04e0-f26b-43cd-8ae5-b891d43a3883?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\": \"e004cf68-6bf2-cd43-8ae5-b891d43a3883\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2022-04-16T04:38:11.9933333Z\",\n \"\ - endTime\": \"2022-04-16T04:42:58.2058857Z\"\n }" + 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 @@ -354,7 +605,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 05:31:06 GMT + - Mon, 18 Apr 2022 19:45:45 GMT expires: - '-1' pragma: @@ -394,13 +645,13 @@ interactions: response: body: string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\"\ - ,\n \"location\": \"uksouth\",\n \"name\": \"cliakstest000002\",\n \"type\"\ + ,\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.5\",\n \"currentKubernetesVersion\"\ - : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.hcp.uksouth.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-5df26527.portal.hcp.uksouth.azmk8s.io\"\ + : \"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\"\ @@ -408,46 +659,44 @@ interactions: \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ - 1.23.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + 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.04.05\",\n \"enableFIPS\": false\n\ + : \"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_uksouth\",\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_uksouth/providers/Microsoft.Network/publicIPAddresses/a8a45817-2c7a-43c8-a92d-c4983342e191\"\ + 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_uksouth/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + : \"/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 \"azureDefender\": {\n \"enabled\"\ - : true,\n \"logAnalyticsWorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/DefaultResourceGroup-SUK/providers/Microsoft.OperationalInsights/workspaces/DefaultWorkspace-8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8-SUK\"\ - \n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n },\n\ - \ \"guardrailsProfile\": {\n \"level\": \"Off\"\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 }" + : 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: - - '4386' + - '4037' content-type: - application/json date: - - Sat, 16 Apr 2022 05:31:06 GMT + - Mon, 18 Apr 2022 19:45:46 GMT expires: - '-1' pragma: @@ -485,7 +734,7 @@ interactions: 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":"uksouth","tags":{"cause":"automation","date":"2022-04-16T04:37:52Z","deletion_due_time":"1650343136","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 @@ -494,7 +743,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 16 Apr 2022 05:31:07 GMT + - Mon, 18 Apr 2022 19:45:47 GMT expires: - '-1' pragma: @@ -509,7 +758,7 @@ interactions: code: 200 message: OK - request: - body: '{"location": "uksouth", "properties": {"creationData": {"sourceResourceId": + body: '{"location": "westus2", "properties": {"creationData": {"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002"}, "snapshotType": "ManagedCluster"}}' headers: @@ -538,14 +787,14 @@ interactions: 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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ - ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-16T05:31:13.3586507Z\"\ + \ \"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-16T05:31:13.3586507Z\"\n },\n\ + : \"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.5\",\n \"sku\": {\n \"name\"\ + : {\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 }" @@ -557,7 +806,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 05:31:14 GMT + - Mon, 18 Apr 2022 19:45:49 GMT expires: - '-1' pragma: @@ -602,17 +851,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/uksouth/operations/38983f60-2eb5-4562-82a8-4cd9f001fc42?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: - - Sat, 16 Apr 2022 05:31:18 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/uksouth/operationresults/38983f60-2eb5-4562-82a8-4cd9f001fc42?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: @@ -648,14 +897,14 @@ interactions: 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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ - ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-16T05:31:13.3586507Z\"\ + \ \"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-16T05:31:13.3586507Z\"\n },\n\ + : \"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.5\",\n \"sku\": {\n \"name\"\ + : {\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 }" @@ -667,7 +916,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 05:31:19 GMT + - Mon, 18 Apr 2022 19:45:51 GMT expires: - '-1' pragma: @@ -708,14 +957,14 @@ interactions: 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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\"\ + \ \"location\": \"westus2\",\n \"systemData\": {\n \"createdBy\"\ : \"qizhe@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\"\ - : \"2022-04-16T05:31:13.3586507Z\",\n \"lastModifiedBy\": \"qizhe@microsoft.com\"\ - ,\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2022-04-16T05:31:13.3586507Z\"\ + : \"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.5\",\n \"sku\": {\n \"\ + : {\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\ @@ -728,7 +977,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 05:31:21 GMT + - Mon, 18 Apr 2022 19:45:51 GMT expires: - '-1' pragma: @@ -769,14 +1018,14 @@ interactions: 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\": \"uksouth\",\n \"systemData\": {\n \"createdBy\": \"qizhe@microsoft.com\"\ - ,\n \"createdByType\": \"User\",\n \"createdAt\": \"2022-04-16T05:31:13.3586507Z\"\ + \ \"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-16T05:31:13.3586507Z\"\n },\n\ + : \"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.5\",\n \"sku\": {\n \"name\"\ + : {\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 }" @@ -788,7 +1037,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 05:31:22 GMT + - Mon, 18 Apr 2022 19:45:53 GMT expires: - '-1' pragma: @@ -807,9 +1056,9 @@ interactions: code: 200 message: OK - request: - body: '{"location": "uksouth", "identity": {"type": "SystemAssigned"}, "properties": + 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.5", "dnsPrefix": "cliakstest-clitestbb5pyvzne-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", @@ -847,15 +1096,15 @@ interactions: response: body: string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003\"\ - ,\n \"location\": \"uksouth\",\n \"name\": \"cliakstest000003\",\n \"type\"\ + ,\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.5\",\n \"currentKubernetesVersion\"\ - : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.hcp.uksouth.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.portal.hcp.uksouth.azmk8s.io\"\ + \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\"\ @@ -863,16 +1112,16 @@ interactions: \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ - 1.23.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + 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.04.05\",\n \"enableFIPS\": false\n\ + : \"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_uksouth\",\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 \"\ @@ -888,7 +1137,7 @@ interactions: : {\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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + - 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: @@ -896,7 +1145,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 05:31:34 GMT + - Mon, 18 Apr 2022 19:45:57 GMT expires: - '-1' pragma: @@ -932,20 +1181,20 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + 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: - - '126' + - '120' content-type: - application/json date: - - Sat, 16 Apr 2022 05:32:05 GMT + - Mon, 18 Apr 2022 19:46:27 GMT expires: - '-1' pragma: @@ -983,20 +1232,20 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + 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: - - '126' + - '120' content-type: - application/json date: - - Sat, 16 Apr 2022 05:32:34 GMT + - Mon, 18 Apr 2022 19:46:57 GMT expires: - '-1' pragma: @@ -1034,20 +1283,20 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + 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: - - '126' + - '120' content-type: - application/json date: - - Sat, 16 Apr 2022 05:33:05 GMT + - Mon, 18 Apr 2022 19:47:28 GMT expires: - '-1' pragma: @@ -1085,20 +1334,20 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + 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: - - '126' + - '120' content-type: - application/json date: - - Sat, 16 Apr 2022 05:33:35 GMT + - Mon, 18 Apr 2022 19:47:58 GMT expires: - '-1' pragma: @@ -1136,20 +1385,20 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + 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: - - '126' + - '120' content-type: - application/json date: - - Sat, 16 Apr 2022 05:34:05 GMT + - Mon, 18 Apr 2022 19:48:28 GMT expires: - '-1' pragma: @@ -1187,20 +1436,20 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ - : \"InProgress\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\"\n }" + 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: - - '126' + - '120' content-type: - application/json date: - - Sat, 16 Apr 2022 05:34:35 GMT + - Mon, 18 Apr 2022 19:48:58 GMT expires: - '-1' pragma: @@ -1238,21 +1487,123 @@ interactions: - 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/uksouth/operations/56e61e72-c7c1-48fd-9b87-54101a9433b7?api-version=2016-03-30 + 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\": \"721ee656-c1c7-fd48-9b87-54101a9433b7\",\n \"status\"\ - : \"Succeeded\",\n \"startTime\": \"2022-04-16T05:31:34.1666666Z\",\n \"\ - endTime\": \"2022-04-16T05:35:06.0989304Z\"\n }" + 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: - - '170' + - '120' content-type: - application/json date: - - Sat, 16 Apr 2022 05:35:06 GMT + - 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: @@ -1294,15 +1645,15 @@ interactions: response: body: string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000003\"\ - ,\n \"location\": \"uksouth\",\n \"name\": \"cliakstest000003\",\n \"type\"\ + ,\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.5\",\n \"currentKubernetesVersion\"\ - : \"1.23.5\",\n \"dnsPrefix\": \"cliakstest-clitestbb5pyvzne-8ecadf\",\n\ - \ \"fqdn\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.hcp.uksouth.azmk8s.io\"\ - ,\n \"azurePortalFQDN\": \"cliakstest-clitestbb5pyvzne-8ecadf-eaff8f02.portal.hcp.uksouth.azmk8s.io\"\ + \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\"\ @@ -1310,28 +1661,28 @@ interactions: \ \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n\ \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ \ \"code\": \"Running\"\n },\n \"currentOrchestratorVersion\": \"\ - 1.23.5\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\"\ + 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.04.05\",\n \"enableFIPS\": false\n\ + : \"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_uksouth\",\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_uksouth/providers/Microsoft.Network/publicIPAddresses/6525eca4-f6c3-4a7e-b991-8172870ede3e\"\ + 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_uksouth/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000003-agentpool\"\ + : \"/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 \"\ @@ -1347,7 +1698,7 @@ interactions: content-type: - application/json date: - - Sat, 16 Apr 2022 05:35:07 GMT + - Mon, 18 Apr 2022 19:50:29 GMT expires: - '-1' pragma: @@ -1390,17 +1741,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/uksouth/operations/082a57d5-3f26-4ab0-b1c1-3abbca2504bf?api-version=2016-03-30 + - 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: - - Sat, 16 Apr 2022 05:35:09 GMT + - 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/uksouth/operationresults/082a57d5-3f26-4ab0-b1c1-3abbca2504bf?api-version=2016-03-30 + - 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: @@ -1410,7 +1761,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 202 message: Accepted @@ -1443,7 +1794,7 @@ interactions: content-length: - '0' date: - - Sat, 16 Apr 2022 05:35:17 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 946cdce0125..182ddb506ac 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 @@ -1617,7 +1617,7 @@ def test_aks_nodepool_snapshot(self, resource_group, resource_group_location): ]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='uksouth') + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') def test_aks_snapshot(self, resource_group, resource_group_location): create_version, upgrade_version = self._get_versions( resource_group_location) 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 0b433cab083..9b25f6065d5 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 @@ -1434,7 +1434,7 @@ def test_get_kubernetes_version(self): return_value=mock_snapshot, ): self.assertEqual( - ctx_2.get_kubernetes_version(), "test_cluster_kubernetes_version" + ctx_4.get_kubernetes_version(), "test_cluster_kubernetes_version" ) # custom value @@ -1453,9 +1453,12 @@ def test_get_kubernetes_version(self): 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_3.get_kubernetes_version(), "custom_cluster_kubernetes_version" + ctx_5.get_kubernetes_version(), "test_cluster_kubernetes_version" ) def test_get_os_sku(self): From 60c98795ba5a0762dfcbc4e0135f42f1acd9d509 Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Mon, 18 Apr 2022 13:01:07 -0700 Subject: [PATCH 3/7] fix format --- src/aks-preview/HISTORY.md | 2 +- src/aks-preview/azext_aks_preview/_params.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index b521f0833c2..800cb12a185 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -242,7 +242,7 @@ and `az aks nodepool add` 0.5.24 +++++ - * * Add "--aks-custom-headers" for "az aks nodepool upgrade" +* * Add "--aks-custom-headers" for "az aks nodepool upgrade" 0.5.23 +++++ diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index d08d4288de9..1b7918cdf3b 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -202,7 +202,7 @@ 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', type=str, + 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', From 6e2c9219f818c0051e005a9ba46a49ea5d7fcdb0 Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Mon, 18 Apr 2022 13:05:28 -0700 Subject: [PATCH 4/7] change version --- src/aks-preview/HISTORY.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 800cb12a185..b403d244b97 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -2,16 +2,18 @@ Release History =============== -0.5.61 -++++++ -* Add support for `--format` parameter in `az aks get-credentials` command. -0.5.61 +0.5.62 ++++++ * Add support to create cluster with managed cluster snapshot. Command is * `az aks create --cluster-snapshot-id ` +0.5.61 +++++++ + +* Add support for `--format` parameter in `az aks get-credentials` command. + 0.5.60 ++++++ @@ -242,7 +244,7 @@ and `az aks nodepool add` 0.5.24 +++++ -* * Add "--aks-custom-headers" for "az aks nodepool upgrade" + * * Add "--aks-custom-headers" for "az aks nodepool upgrade" 0.5.23 +++++ From e920a97c1874280a5df70fc31a706cef2ce713d0 Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Mon, 18 Apr 2022 13:18:35 -0700 Subject: [PATCH 5/7] fix format --- src/aks-preview/HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index b403d244b97..d6c6125f0f1 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -244,7 +244,7 @@ and `az aks nodepool add` 0.5.24 +++++ - * * Add "--aks-custom-headers" for "az aks nodepool upgrade" +* * Add "--aks-custom-headers" for "az aks nodepool upgrade" 0.5.23 +++++ From 4af04accf1d8ef34f0e66953afcf2fb7df703a57 Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Mon, 18 Apr 2022 16:46:36 -0700 Subject: [PATCH 6/7] fix ut of decorator --- .../azext_aks_preview/tests/latest/test_decorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 9b25f6065d5..cae59b9ec71 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 @@ -1428,7 +1428,7 @@ def test_get_kubernetes_version(self): decorator_mode=DecoratorMode.CREATE, ) mock_snapshot = Mock( - kubernetes_version="test_cluster_kubernetes_version") + 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, @@ -1449,7 +1449,7 @@ def test_get_kubernetes_version(self): ) mock_snapshot = Mock(kubernetes_version="test_kubernetes_version") mock_mc_snapshot = Mock( - kubernetes_version="test_cluster_kubernetes_version") + 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, From fcea9dc69d6844c2fcd7499e6921733413b8951e Mon Sep 17 00:00:00 2001 From: Qingqing Zheng Date: Mon, 18 Apr 2022 19:44:49 -0700 Subject: [PATCH 7/7] fix static check --- src/aks-preview/azext_aks_preview/_help.py | 2 +- src/aks-preview/azext_aks_preview/decorator.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 9b950f37b2a..777e4f0464d 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -472,7 +472,7 @@ - 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" + 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/decorator.py b/src/aks-preview/azext_aks_preview/decorator.py index 766393172ff..994b751fd2e 100644 --- a/src/aks-preview/azext_aks_preview/decorator.py +++ b/src/aks-preview/azext_aks_preview/decorator.py @@ -1433,10 +1433,11 @@ def get_cluster_snapshot_id(self) -> Union[str, 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 - ): + 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 )