diff --git a/src/aks-preview/azext_aks_preview/__init__.py b/src/aks-preview/azext_aks_preview/__init__.py index 52b9354c89f..7172e879767 100644 --- a/src/aks-preview/azext_aks_preview/__init__.py +++ b/src/aks-preview/azext_aks_preview/__init__.py @@ -27,23 +27,20 @@ def __init__(self, cli_ctx=None): register_aks_preview_resource_type() acs_custom = CliCommandType(operations_tmpl='azext_aks_preview.custom#{}') - super(ContainerServiceCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=acs_custom, - resource_type=CUSTOM_MGMT_AKS_PREVIEW) + super().__init__( + cli_ctx=cli_ctx, + custom_command_type=acs_custom, + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + ) def load_command_table(self, args): - super(ContainerServiceCommandsLoader, self).load_command_table(args) + super().load_command_table(args) from azext_aks_preview.commands import load_command_table load_command_table(self, args) return self.command_table def load_arguments(self, command): - from sys import version_info - if version_info[0] < 3: - super(ContainerServiceCommandsLoader, self).load_arguments(command) - else: - super().load_arguments(command) - + super().load_arguments(command) from azext_aks_preview._params import load_arguments load_arguments(self, command) diff --git a/src/aks-preview/azext_aks_preview/_client_factory.py b/src/aks-preview/azext_aks_preview/_client_factory.py index 23f5ca8277b..1079efbe18f 100644 --- a/src/aks-preview/azext_aks_preview/_client_factory.py +++ b/src/aks-preview/azext_aks_preview/_client_factory.py @@ -99,7 +99,7 @@ def get_auth_management_client(cli_ctx, scope=None, **_): if matched: subscription_id = matched.groupdict()['subscription'] else: - raise CLIError("{} does not contain subscription Id.".format(scope)) + raise CLIError(f"{scope} does not contain subscription Id.") return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_AUTHORIZATION, subscription_id=subscription_id) @@ -129,23 +129,22 @@ def get_resource_by_name(cli_ctx, resource_name, resource_type): if not elements: from azure.cli.core._profile import Profile profile = Profile(cli_ctx=cli_ctx) - message = "The resource with name '{}' and type '{}' could not be found".format( - resource_name, resource_type) + message = f"The resource with name '{resource_name}' and type '{resource_type}' could not be found" try: subscription = profile.get_subscription( cli_ctx.data['subscription_id']) raise CLIError( - "{} in subscription '{} ({})'.".format(message, subscription['name'], subscription['id'])) - except (KeyError, TypeError): - raise CLIError( - "{} in the current subscription.".format(message)) + f"{message} in subscription '{subscription['name']} ({subscription['id']})'." + ) + except (KeyError, TypeError) as exc: + raise CLIError(f"{message} in the current subscription.") from exc elif len(elements) == 1: return elements[0] else: raise CLIError( - "More than one resources with type '{}' are found with name '{}'.".format( - resource_type, resource_name)) + f"More than one resources with type '{resource_type}' are found with name '{resource_name}'." + ) def get_msi_client(cli_ctx, subscription_id=None): @@ -154,7 +153,11 @@ def get_msi_client(cli_ctx, subscription_id=None): def get_providers_client_factory(cli_ctx, subscription_id=None): - return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, subscription_id=subscription_id).providers + return get_mgmt_service_client( + cli_ctx, + ResourceType.MGMT_RESOURCE_RESOURCES, + subscription_id=subscription_id + ).providers def get_keyvault_client(cli_ctx, subscription_id=None): diff --git a/src/aks-preview/azext_aks_preview/_completers.py b/src/aks-preview/azext_aks_preview/_completers.py index b5a0511d5b5..080b08caae3 100644 --- a/src/aks-preview/azext_aks_preview/_completers.py +++ b/src/aks-preview/azext_aks_preview/_completers.py @@ -88,4 +88,5 @@ def _get_location_from_resource_group(cli_ctx, resource_group_name): # Print a warning if the user hit [TAB] but the `--resource-group` argument was incorrect. # For example: "Warning: Resource group 'bogus' could not be found." from argcomplete import warn - warn('Warning: {}'.format(err.message)) + warn(f'Warning: {err.message}') + return None diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 2da0577b47a..e599c35a446 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -67,7 +67,11 @@ CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD = "standard" CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM = "premium" -CONST_OUTBOUND_MIGRATION_MULTIZONE_TO_NATGATEWAY_MSG = "Warning: this AKS cluster has multi-zonal nodepools, but NAT Gateway is not currently zone redundant. Migrating outbound connectivity to NAT Gateway could lead to a reduction in zone redundancy for this cluster. Continue?" +CONST_OUTBOUND_MIGRATION_MULTIZONE_TO_NATGATEWAY_MSG = ( + "Warning: this AKS cluster has multi-zonal nodepools, but NAT Gateway is not currently zone redundant. " + "Migrating outbound connectivity to NAT Gateway could lead to a reduction in zone redundancy for this cluster. " + "Continue?" +) # load balancer backend pool type CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IP = "nodeIP" CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IPCONFIGURATION = "nodeIPConfiguration" @@ -77,8 +81,8 @@ CONST_PRIVATE_DNS_ZONE_NONE = "none" # used to set identity profile (for kubelet) -CONST_MANAGED_IDENTITY_OPERATOR_ROLE = 'Managed Identity Operator' -CONST_MANAGED_IDENTITY_OPERATOR_ROLE_ID = 'f1a07417-d97a-45cb-824c-7a7467783830' +CONST_MANAGED_IDENTITY_OPERATOR_ROLE = "Managed Identity Operator" +CONST_MANAGED_IDENTITY_OPERATOR_ROLE_ID = "f1a07417-d97a-45cb-824c-7a7467783830" # consts for upgrade channel CONST_RAPID_UPGRADE_CHANNEL = "rapid" @@ -168,31 +172,42 @@ # all supported addons ADDONS = { - 'http_application_routing': CONST_HTTP_APPLICATION_ROUTING_ADDON_NAME, - 'monitoring': CONST_MONITORING_ADDON_NAME, - 'virtual-node': CONST_VIRTUAL_NODE_ADDON_NAME, - 'kube-dashboard': CONST_KUBE_DASHBOARD_ADDON_NAME, - 'azure-policy': CONST_AZURE_POLICY_ADDON_NAME, - 'ingress-appgw': CONST_INGRESS_APPGW_ADDON_NAME, + "http_application_routing": CONST_HTTP_APPLICATION_ROUTING_ADDON_NAME, + "monitoring": CONST_MONITORING_ADDON_NAME, + "virtual-node": CONST_VIRTUAL_NODE_ADDON_NAME, + "kube-dashboard": CONST_KUBE_DASHBOARD_ADDON_NAME, + "azure-policy": CONST_AZURE_POLICY_ADDON_NAME, + "ingress-appgw": CONST_INGRESS_APPGW_ADDON_NAME, "confcom": CONST_CONFCOM_ADDON_NAME, - 'open-service-mesh': CONST_OPEN_SERVICE_MESH_ADDON_NAME, - 'azure-keyvault-secrets-provider': CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, - 'gitops': CONST_GITOPS_ADDON_NAME, - 'web_application_routing': CONST_WEB_APPLICATION_ROUTING_KEY_NAME + "open-service-mesh": CONST_OPEN_SERVICE_MESH_ADDON_NAME, + "azure-keyvault-secrets-provider": CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, + "gitops": CONST_GITOPS_ADDON_NAME, + "web_application_routing": CONST_WEB_APPLICATION_ROUTING_KEY_NAME, } ADDONS_DESCRIPTIONS = { - CONST_HTTP_APPLICATION_ROUTING_ADDON_NAME: '- configure ingress with automatic public DNS name creation', - CONST_MONITORING_ADDON_NAME: '- turn on Log Analytics monitoring. Uses the Log Analytics Default Workspace if it exists, else creates one. Specify "--workspace-resource-id" to use an existing workspace.\nIf monitoring addon is enabled --no-wait argument will have no effect.', - CONST_VIRTUAL_NODE_ADDON_NAME: '- enable AKS Virtual Node. Requires --aci-subnet-name to provide the name of an existing subnet for the Virtual Node to use.\naci-subnet-name must be in the same vnet which is specified by --vnet-subnet-id (required as well).', - CONST_KUBE_DASHBOARD_ADDON_NAME: '- n/a', - CONST_AZURE_POLICY_ADDON_NAME: '- enable Azure policy. The Azure Policy add-on for AKS enables at-scale enforcements and safeguards on your clusters in a centralized, consistent manner.\nLearn more at aka.ms/aks/policy.', - CONST_INGRESS_APPGW_ADDON_NAME: '- enable Application Gateway Ingress Controller addon (PREVIEW).', - CONST_CONFCOM_ADDON_NAME: '- enable confcom addon, this will enable SGX device plugin by default (PREVIEW).', - CONST_OPEN_SERVICE_MESH_ADDON_NAME: '- enable Open Service Mesh addon (PREVIEW).', - CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME: '- enable Azure Keyvault Secrets Provider addon.', - CONST_GITOPS_ADDON_NAME: '- enable GitOps (PREVIEW).', - CONST_WEB_APPLICATION_ROUTING_KEY_NAME: '- enable web application routing (PREVIEW).' + CONST_HTTP_APPLICATION_ROUTING_ADDON_NAME: "- configure ingress with automatic public DNS name creation", + CONST_MONITORING_ADDON_NAME: ( + "- turn on Log Analytics monitoring. Uses the Log Analytics Default Workspace if it exists, " + 'else creates one. Specify "--workspace-resource-id" to use an existing workspace.\n' + "If monitoring addon is enabled --no-wait argument will have no effect." + ), + CONST_VIRTUAL_NODE_ADDON_NAME: ( + "- enable AKS Virtual Node. Requires --aci-subnet-name to provide the name of an existing subnet for " + "the Virtual Node to use.\naci-subnet-name must be in the same vnet which is specified by " + "--vnet-subnet-id (required as well)." + ), + CONST_KUBE_DASHBOARD_ADDON_NAME: "- n/a", + CONST_AZURE_POLICY_ADDON_NAME: ( + "- enable Azure policy. The Azure Policy add-on for AKS enables at-scale enforcements and safeguards on " + "your clusters in a centralized, consistent manner.\nLearn more at aka.ms/aks/policy." + ), + CONST_INGRESS_APPGW_ADDON_NAME: "- enable Application Gateway Ingress Controller addon (PREVIEW).", + CONST_CONFCOM_ADDON_NAME: "- enable confcom addon, this will enable SGX device plugin by default (PREVIEW).", + CONST_OPEN_SERVICE_MESH_ADDON_NAME: "- enable Open Service Mesh addon (PREVIEW).", + CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME: "- enable Azure Keyvault Secrets Provider addon.", + CONST_GITOPS_ADDON_NAME: "- enable GitOps (PREVIEW).", + CONST_WEB_APPLICATION_ROUTING_KEY_NAME: "- enable web application routing (PREVIEW).", } # consts for credential @@ -218,22 +233,24 @@ # Moving away from 1:n release to avoid unwanted breaking changes with auto upgrades. CONST_DRAFT_CLI_VERSION = "v0.0.22" -CONST_CUSTOM_CA_TEST_CERT = '-----BEGIN CERTIFICATE-----\n' \ - 'MIICljCCAX4CCQC9zUAgqqqrWzANBgkqhkiG9w0BA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G9w0BAQsFADANMQswCQYDVQQGEwJQ\n" + "TDAeFw0yMjA5MTQwNjIzMjdaFw0yMjA5MTUwNjIzMjdaMA0xCzAJBgNVBAYTAlBM\n" + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAopKNIIbvvcPCw9fc4KLX\n" + "KDtRZobp5L+/1hCN+3OGhk5NvSTpSUrFifxqc0o3IF7YkO3K1n2jAvCMXO16Bf9b\n" + "OAR7VkCrwGFVkXNjM4wvXAX8CNNvjqd1zDPXSKdE7Wd8k3fTzx6nGUM0UgljIPhH\n" + "yh4a4Zujd5Ig2P/ZSX0pGJm47JTtMu7MDFHVM5wRWcCrN/H0TCYPIvEOs0B8AZxc\n" + "p3TF7A6veT5U9pVhQ3Xl9JN6LvvLqPxG3ea10rdv9DYzaiXmSY3ujI3Ri1Q11uWC\n" + "dtrFIpFu5cHW2OBW+jBXxL0v8xQmkxTLik4BR/PLCl30wxKQNsq3pjDgu0mutKuu\n" + "5wIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAVEAIs/hLwTVCwpEXdoXR24LelNNuB\n" + "/8ptK6lyjE11XwfMN3yy7F2oB1lrA4rI3j9obpDsHDJBNB13bi/lKgvAcbIn/Tyu\n" + "RKThtUdPgxNnqDUyxnb3OofMF3gB8ePTu+jZpd3zrlEuxdl40ByATCSyOgR6DHMt\n" + "SDd+joypnOHFAeSM+V0AaTelXSCK9OAWSAp5e6S76a6lRx+D5Xl3hBedBI0tX59h\n" + "tEYNEGZaRElFU79WcEF0cH+ZW0+jJ95xE3thZffRz6QI6yF63m8aC9l9bbdJS2zg\n" + "Yv8W+lCZi//ODeOBUugr++z9uj+vGk47JDSpV0n4JOun3ALUDJ0gqmcS\n" + "-----END CERTIFICATE-----" +) # consts for maintenance configuration schedule type CONST_DAILY_MAINTENANCE_SCHEDULE = "Daily" diff --git a/src/aks-preview/azext_aks_preview/_format.py b/src/aks-preview/azext_aks_preview/_format.py index b77e8797b83..82c4b9f5c06 100644 --- a/src/aks-preview/azext_aks_preview/_format.py +++ b/src/aks-preview/azext_aks_preview/_format.py @@ -136,28 +136,6 @@ def find_preview_versions(versions_bag): return parsed.search(result, Options(dict_cls=OrderedDict, custom_functions=_custom_functions(preview))) -def aks_versions_table_format(result): - """Format get-versions results as a summary for display with "-o table".""" - - # get preview orchestrator version - preview = {} - - def find_preview_versions(): - for orchestrator in result.get('orchestrators', []): - if orchestrator.get('isPreview', False): - preview[orchestrator['orchestratorVersion']] = True - find_preview_versions() - - parsed = compile_jmes("""orchestrators[].{ - kubernetesVersion: orchestratorVersion | set_preview(@), - upgrades: upgrades[].orchestratorVersion || [`None available`] | sort_versions(@) | set_preview_array(@) | join(`, `, @) - }""") - # use ordered dicts so headers are predictable - results = parsed.search(result, Options( - dict_cls=OrderedDict, custom_functions=_custom_functions(preview))) - return sorted(results, key=lambda x: version_to_tuple(x.get('kubernetesVersion')), reverse=True) - - def version_to_tuple(version): """Removes preview suffix""" if version.endswith('(preview)'): @@ -181,7 +159,7 @@ def _custom_functions(preview_versions): class CustomFunctions(functions.Functions): # pylint: disable=too-few-public-methods @ functions.signature({'types': ['array']}) - def _func_sort_versions(self, versions): # pylint: disable=no-self-use + def _func_sort_versions(self, versions): """Custom JMESPath `sort_versions` function that sorts an array of strings as software versions""" try: return sorted(versions, key=version_to_tuple) @@ -196,26 +174,26 @@ def _func_set_preview_array(self, versions): for i, _ in enumerate(versions): versions[i] = self._func_set_preview(versions[i]) return versions - except(TypeError, ValueError): + except (TypeError, ValueError): return versions @ functions.signature({'types': ['string']}) - def _func_set_preview(self, version): # pylint: disable=no-self-use + def _func_set_preview(self, version): """Custom JMESPath `set_preview` function that suffixes preview version""" try: if preview_versions.get(version, False): return version + '(preview)' return version - except(TypeError, ValueError): + except (TypeError, ValueError): return version @ functions.signature({'types': ['object']}) - def _func_pprint_labels(self, labels): # pylint: disable=no-self-use + def _func_pprint_labels(self, labels): """Custom JMESPath `pprint_labels` function that pretty print labels""" if not labels: return '' return ' '.join([ - '{}={}'.format(k, labels[k]) + f'{k}={labels[k]}' for k in sorted(labels.keys()) ]) diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index f6fc9efa350..f72febe505c 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -4,6 +4,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=too-many-lines import os.path from knack.help_files import helps @@ -14,7 +15,7 @@ '$HOME', '.azure', 'aksServicePrincipal.json') # AKS command help -helps['aks create'] = """ +helps['aks create'] = f""" type: command short-summary: Create a new managed Kubernetes cluster. parameters: @@ -25,7 +26,7 @@ type: string short-summary: Service principal used for authentication to Azure APIs. long-summary: If not specified, a new service principal is created and cached at - {sp_cache} to be used by subsequent `az aks` commands. + {AKS_SERVICE_PRINCIPAL_CACHE} to be used by subsequent `az aks` commands. - name: --skip-subnet-role-assignment type: bool short-summary: Skip role assignment for subnet (advanced networking). @@ -656,7 +657,7 @@ - name: Create a kubernetes cluster with Azure Monitor Metrics enabled. text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-azuremonitormetrics -""".format(sp_cache=AKS_SERVICE_PRINCIPAL_CACHE) +""" helps['aks scale'] = """ type: command diff --git a/src/aks-preview/azext_aks_preview/_helpers.py b/src/aks-preview/azext_aks_preview/_helpers.py index f33af5b1ba8..32b9add8154 100644 --- a/src/aks-preview/azext_aks_preview/_helpers.py +++ b/src/aks-preview/azext_aks_preview/_helpers.py @@ -8,21 +8,25 @@ import re import stat import tempfile +from typing import TypeVar + import yaml -from typing import Any, List, TypeVar +from azext_aks_preview._client_factory import ( + get_mc_snapshots_client, + get_nodepool_snapshots_client, +) from azure.cli.command_modules.acs._helpers import map_azure_error_to_cli_error -from azure.cli.core.azclierror import InvalidArgumentValueError, ResourceNotFoundError, FileOperationError +from azure.cli.command_modules.acs._validators import extract_comma_separated_string +from azure.cli.core.azclierror import ( + FileOperationError, + InvalidArgumentValueError, + ResourceNotFoundError, +) from azure.core.exceptions import AzureError from knack.log import get_logger from knack.prompting import NoTTYException, prompt_y_n from knack.util import CLIError -from azext_aks_preview._client_factory import get_nodepool_snapshots_client, get_mc_snapshots_client - -from azure.cli.command_modules.acs._validators import ( - extract_comma_separated_string, -) - logger = get_logger(__name__) # type variables @@ -103,8 +107,7 @@ def _merge_kubernetes_configurations(existing_file, addition_file, replace, cont continue if addition is None: - raise CLIError( - 'failed to load additional configuration from {}'.format(addition_file)) + raise CLIError(f'failed to load additional configuration from {addition_file}') if existing is None: existing = addition @@ -116,6 +119,7 @@ def _merge_kubernetes_configurations(existing_file, addition_file, replace, cont # check that ~/.kube/config is only read- and writable by its owner if platform.system() != "Windows" and not os.path.islink(existing_file): + # pylint: disable=consider-using-f-string existing_file_perms = "{:o}".format(stat.S_IMODE(os.lstat(existing_file).st_mode)) if not existing_file_perms.endswith("600"): logger.warning( @@ -124,25 +128,24 @@ def _merge_kubernetes_configurations(existing_file, addition_file, replace, cont existing_file_perms, ) - with open(existing_file, 'w+') as stream: + with open(existing_file, 'w+', encoding="utf-8") as stream: yaml.safe_dump(existing, stream, default_flow_style=False) current_context = addition.get('current-context', 'UNKNOWN') - msg = 'Merged "{}" as current context in {}'.format( - current_context, existing_file) + msg = f'Merged "{current_context}" as current context in {existing_file}' logger.warning(msg) def _load_kubernetes_configuration(filename): try: - with open(filename) as stream: + with open(filename, encoding="utf-8") as stream: return yaml.safe_load(stream) except (IOError, OSError) as ex: if getattr(ex, 'errno', 0) == errno.ENOENT: - raise CLIError('{} does not exist'.format(filename)) + raise CLIError(f'{filename} does not exist') from ex raise except (yaml.parser.ParserError, UnicodeDecodeError) as ex: - raise CLIError('Error parsing {} ({})'.format(filename, str(ex))) + raise CLIError(f'Error parsing {filename} ({str(ex)})') from ex def _handle_merge(existing, addition, key, replace): @@ -150,10 +153,8 @@ def _handle_merge(existing, addition, key, replace): return if key not in existing: raise FileOperationError( - "No such key '{}' in existing config, please confirm whether it is a valid config file. " - "May back up this config file, delete it and retry the command.".format( - key - ) + f"No such key '{key}' in existing config, please confirm whether it is a valid config file. " + "May back up this config file, delete it and retry the command." ) if not existing.get(key): existing[key] = addition[key] @@ -195,7 +196,7 @@ def similar_word(a, b): a_len = len(a) b_len = len(b) if a_len > b_len: # @a should always be the shorter string - return similar_word(b, a) + return similar_word(b, a) # pylint: disable=arguments-out-of-order if a in b: return True if b_len - a_len > 1: @@ -237,7 +238,7 @@ def get_nodepool_snapshot_by_snapshot_id(cli_ctx, snapshot_id): resource_group_name = match.group(2) snapshot_name = match.group(3) return get_nodepool_snapshot(cli_ctx, subscription_id, resource_group_name, snapshot_name) - raise InvalidArgumentValueError("Cannot parse snapshot name from provided resource id '{}'.".format(snapshot_id)) + raise InvalidArgumentValueError(f"Cannot parse snapshot name from provided resource id '{snapshot_id}'.") def get_nodepool_snapshot(cli_ctx, subscription_id, resource_group_name, snapshot_name): @@ -247,8 +248,9 @@ def get_nodepool_snapshot(cli_ctx, subscription_id, resource_group_name, snapsho # track 2 sdk raise exception from azure.core.exceptions except AzureError as ex: if "not found" in ex.message: - raise ResourceNotFoundError("Snapshot '{}' not found.".format(snapshot_name)) - raise map_azure_error_to_cli_error(ex) + # pylint: disable=raise-missing-from + raise ResourceNotFoundError(f"Snapshot '{snapshot_name}' not found.") + raise map_azure_error_to_cli_error(ex) from ex return snapshot @@ -265,7 +267,8 @@ def get_cluster_snapshot_by_snapshot_id(cli_ctx, snapshot_id): snapshot_name = match.group(3) return get_cluster_snapshot(cli_ctx, subscription_id, resource_group_name, snapshot_name) raise InvalidArgumentValueError( - "Cannot parse snapshot name from provided resource id {}.".format(snapshot_id)) + f"Cannot parse snapshot name from provided resource id {snapshot_id}." + ) def get_cluster_snapshot(cli_ctx, subscription_id, resource_group_name, snapshot_name): @@ -275,8 +278,9 @@ def get_cluster_snapshot(cli_ctx, subscription_id, resource_group_name, snapshot # track 2 sdk raise exception from azure.core.exceptions except AzureError as ex: if "not found" in ex.message: - raise ResourceNotFoundError("Managed cluster snapshot '{}' not found.".format(snapshot_name)) - raise map_azure_error_to_cli_error(ex) + # pylint: disable=raise-missing-from + raise ResourceNotFoundError(f"Managed cluster snapshot '{snapshot_name}' not found.") + raise map_azure_error_to_cli_error(ex) from ex return snapshot diff --git a/src/aks-preview/azext_aks_preview/_loadbalancer.py b/src/aks-preview/azext_aks_preview/_loadbalancer.py index 4acc2ebfa25..6d2aeb4b97d 100644 --- a/src/aks-preview/azext_aks_preview/_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/_loadbalancer.py @@ -9,49 +9,120 @@ logger = get_logger(__name__) -def update_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes, outbound_ports, idle_timeout, backend_pool_type, profile, models): +def update_load_balancer_profile( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + outbound_ip_prefixes, + outbound_ports, + idle_timeout, + backend_pool_type, + profile, + models, +): """parse and update an existing load balancer profile""" - if not (is_load_balancer_profile_provided(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes, outbound_ports, idle_timeout) or backend_pool_type): + if not ( + is_load_balancer_profile_provided( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + outbound_ip_prefixes, + outbound_ports, + idle_timeout, + ) + or backend_pool_type + ): return profile if not profile: if isinstance(models, SimpleNamespace): ManagedClusterLoadBalancerProfile = models.ManagedClusterLoadBalancerProfile else: - ManagedClusterLoadBalancerProfile = models.get("ManagedClusterLoadBalancerProfile") + ManagedClusterLoadBalancerProfile = models.get( + "ManagedClusterLoadBalancerProfile" + ) profile = ManagedClusterLoadBalancerProfile() - return configure_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes, outbound_ports, idle_timeout, backend_pool_type, profile, models) - - -def create_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes, outbound_ports, idle_timeout, backend_pool_type, models): + return configure_load_balancer_profile( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + outbound_ip_prefixes, + outbound_ports, + idle_timeout, + backend_pool_type, + profile, + models, + ) + + +def create_load_balancer_profile( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + outbound_ip_prefixes, + outbound_ports, + idle_timeout, + backend_pool_type, + models, +): """parse and build load balancer profile""" - if not (is_load_balancer_profile_provided(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes, outbound_ports, idle_timeout) or backend_pool_type): + if not ( + is_load_balancer_profile_provided( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + outbound_ip_prefixes, + outbound_ports, + idle_timeout, + ) + or backend_pool_type + ): return None if isinstance(models, SimpleNamespace): ManagedClusterLoadBalancerProfile = models.ManagedClusterLoadBalancerProfile else: - ManagedClusterLoadBalancerProfile = models.get("ManagedClusterLoadBalancerProfile") + ManagedClusterLoadBalancerProfile = models.get( + "ManagedClusterLoadBalancerProfile" + ) profile = ManagedClusterLoadBalancerProfile() - return configure_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes, outbound_ports, idle_timeout, backend_pool_type, profile, models) - - -def configure_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes, outbound_ports, idle_timeout, backend_pool_type, profile, models): + return configure_load_balancer_profile( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + outbound_ip_prefixes, + outbound_ports, + idle_timeout, + backend_pool_type, + profile, + models, + ) + + +def configure_load_balancer_profile( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + outbound_ip_prefixes, + outbound_ports, + idle_timeout, + backend_pool_type, + profile, + models, +): """configure a load balancer with customer supplied values""" - if any([managed_outbound_ip_count, + if any( + [ + managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, - outbound_ip_prefixes]): - + outbound_ip_prefixes, + ] + ): outbound_ip_resources = _get_load_balancer_outbound_ips(outbound_ips, models) if outbound_ip_resources: if isinstance(models, SimpleNamespace): - ManagedClusterLoadBalancerProfileOutboundIPs = models.ManagedClusterLoadBalancerProfileOutboundIPs + ManagedClusterLoadBalancerProfileOutboundIPs = ( + models.ManagedClusterLoadBalancerProfileOutboundIPs + ) else: ManagedClusterLoadBalancerProfileOutboundIPs = models.get( "ManagedClusterLoadBalancerProfileOutboundIPs" @@ -62,7 +133,9 @@ def configure_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ ) else: profile.outbound_i_ps = None - outbound_ip_prefix_resources = _get_load_balancer_outbound_ip_prefixes(outbound_ip_prefixes, models) + outbound_ip_prefix_resources = _get_load_balancer_outbound_ip_prefixes( + outbound_ip_prefixes, models + ) if outbound_ip_prefix_resources: if isinstance(models, SimpleNamespace): ManagedClusterLoadBalancerProfileOutboundIPPrefixes = ( @@ -72,8 +145,10 @@ def configure_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ ManagedClusterLoadBalancerProfileOutboundIPPrefixes = models.get( "ManagedClusterLoadBalancerProfileOutboundIPPrefixes" ) - profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( - public_ip_prefixes=outbound_ip_prefix_resources + profile.outbound_ip_prefixes = ( + ManagedClusterLoadBalancerProfileOutboundIPPrefixes( + public_ip_prefixes=outbound_ip_prefix_resources + ) ) else: profile.outbound_ip_prefixes = None @@ -87,7 +162,9 @@ def configure_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ ManagedClusterLoadBalancerProfileManagedOutboundIPs = models.get( "ManagedClusterLoadBalancerProfileManagedOutboundIPs" ) - profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs() + profile.managed_outbound_i_ps = ( + ManagedClusterLoadBalancerProfileManagedOutboundIPs() + ) if managed_outbound_ip_count: profile.managed_outbound_i_ps.count = managed_outbound_ip_count if managed_outbound_ipv6_count: @@ -104,14 +181,24 @@ def configure_load_balancer_profile(managed_outbound_ip_count, managed_outbound_ return profile -def is_load_balancer_profile_provided(managed_outbound_ip_count, managed_outbound_ipv6_count, outbound_ips, ip_prefixes, - outbound_ports, idle_timeout): - return any([managed_outbound_ip_count, - managed_outbound_ipv6_count, - outbound_ips, - ip_prefixes, - outbound_ports, - idle_timeout]) +def is_load_balancer_profile_provided( + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + ip_prefixes, + outbound_ports, + idle_timeout, +): + return any( + [ + managed_outbound_ip_count, + managed_outbound_ipv6_count, + outbound_ips, + ip_prefixes, + outbound_ports, + idle_timeout, + ] + ) def _get_load_balancer_outbound_ips(load_balancer_outbound_ips, models): @@ -123,9 +210,10 @@ def _get_load_balancer_outbound_ips(load_balancer_outbound_ips, models): ResourceReference = models.get("ResourceReference") if load_balancer_outbound_ips is not None: if isinstance(load_balancer_outbound_ips, str): - load_balancer_outbound_ip_resources = \ - [ResourceReference(id=x.strip()) - for x in load_balancer_outbound_ips.split(',')] + load_balancer_outbound_ip_resources = [ + ResourceReference(id=x.strip()) + for x in load_balancer_outbound_ips.split(",") + ] else: load_balancer_outbound_ip_resources = load_balancer_outbound_ips return load_balancer_outbound_ip_resources @@ -141,9 +229,12 @@ def _get_load_balancer_outbound_ip_prefixes(load_balancer_outbound_ip_prefixes, ResourceReference = models.get("ResourceReference") if load_balancer_outbound_ip_prefixes: if isinstance(load_balancer_outbound_ip_prefixes, str): - load_balancer_outbound_ip_prefix_resources = \ - [ResourceReference(id=x.strip()) - for x in load_balancer_outbound_ip_prefixes.split(',')] + load_balancer_outbound_ip_prefix_resources = [ + ResourceReference(id=x.strip()) + for x in load_balancer_outbound_ip_prefixes.split(",") + ] else: - load_balancer_outbound_ip_prefix_resources = load_balancer_outbound_ip_prefixes + load_balancer_outbound_ip_prefix_resources = ( + load_balancer_outbound_ip_prefixes + ) return load_balancer_outbound_ip_prefix_resources diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 0073aff573c..e7860ea3700 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -3,18 +3,11 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long,too-many-statements - +# pylint: disable=too-many-statements,too-many-lines import os.path import platform from argcomplete.completers import FilesCompleter -from azext_aks_preview._client_factory import CUSTOM_MGMT_AKS_PREVIEW -from azext_aks_preview._completers import ( - get_k8s_upgrades_completion_list, - get_k8s_versions_completion_list, - get_vm_size_completion_list, -) from azure.cli.command_modules.acs._consts import ( CONST_OUTBOUND_TYPE_LOAD_BALANCER, CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, @@ -30,6 +23,22 @@ validate_nat_gateway_idle_timeout, validate_nat_gateway_managed_outbound_ip_count, ) +from azure.cli.core.commands.parameters import ( + edge_zone_type, + file_type, + get_enum_type, + get_resource_name_completion_list, + get_three_state_flag, + name_type, + tags_type, + zones_type, +) +from azext_aks_preview._client_factory import CUSTOM_MGMT_AKS_PREVIEW +from azext_aks_preview._completers import ( + get_k8s_upgrades_completion_list, + get_k8s_versions_completion_list, + get_vm_size_completion_list, +) from azext_aks_preview._consts import ( CONST_ABSOLUTEMONTHLY_MAINTENANCE_SCHEDULE, CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PRIVATE, @@ -55,10 +64,6 @@ CONST_NETWORK_PLUGIN_KUBENET, CONST_NETWORK_PLUGIN_MODE_OVERLAY, CONST_NETWORK_PLUGIN_NONE, - CONST_NETWORK_POLICY_AZURE, - CONST_NETWORK_POLICY_CALICO, - CONST_NETWORK_POLICY_CILIUM, - CONST_NETWORK_POLICY_NONE, CONST_NODE_IMAGE_UPGRADE_CHANNEL, CONST_NODE_OS_CHANNEL_NODE_IMAGE, CONST_NODE_OS_CHANNEL_NONE, @@ -165,17 +170,7 @@ validate_vnet_subnet_id, validate_force_upgrade_disable_and_enable_parameters, validate_azure_service_mesh_revision, - validate_artifact_streaming -) -from azure.cli.core.commands.parameters import ( - edge_zone_type, - file_type, - get_enum_type, - get_resource_name_completion_list, - get_three_state_flag, - name_type, - tags_type, - zones_type, + validate_artifact_streaming, ) from azext_aks_preview.azurecontainerstorage._consts import ( CONST_STORAGE_POOL_TYPE_AZURE_DISK, @@ -190,21 +185,36 @@ CONST_STORAGE_POOL_SKU_STANDARDSSD_ZRS, CONST_STORAGE_POOL_OPTION_NVME, CONST_STORAGE_POOL_OPTION_SSD, - CONST_STORAGE_POOL_DEFAULT_SIZE, ) from knack.arguments import CLIArgumentType # candidates for enumeration # consts for AgentPool node_priorities = [CONST_SCALE_SET_PRIORITY_REGULAR, CONST_SCALE_SET_PRIORITY_SPOT] -node_eviction_policies = [CONST_SPOT_EVICTION_POLICY_DELETE, CONST_SPOT_EVICTION_POLICY_DEALLOCATE] +node_eviction_policies = [ + CONST_SPOT_EVICTION_POLICY_DELETE, + CONST_SPOT_EVICTION_POLICY_DEALLOCATE, +] node_os_disk_types = [CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL] node_mode_types = [CONST_NODEPOOL_MODE_SYSTEM, CONST_NODEPOOL_MODE_USER] -node_os_skus_create = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_UBUNTU, CONST_OS_SKU_CBLMARINER, CONST_OS_SKU_MARINER] -node_os_skus = node_os_skus_create + [CONST_OS_SKU_WINDOWS2019, CONST_OS_SKU_WINDOWS2022] +node_os_skus_create = [ + CONST_OS_SKU_AZURELINUX, + CONST_OS_SKU_UBUNTU, + CONST_OS_SKU_CBLMARINER, + CONST_OS_SKU_MARINER, +] +node_os_skus = node_os_skus_create + [ + CONST_OS_SKU_WINDOWS2019, + CONST_OS_SKU_WINDOWS2022, +] node_os_skus_update = [CONST_OS_SKU_AZURELINUX, CONST_OS_SKU_UBUNTU] scale_down_modes = [CONST_SCALE_DOWN_MODE_DELETE, CONST_SCALE_DOWN_MODE_DEALLOCATE] -workload_runtimes = [CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, CONST_WORKLOAD_RUNTIME_WASM_WASI, CONST_WORKLOAD_RUNTIME_KATA_MSHV_VM_ISOLATION, CONST_WORKLOAD_RUNTIME_KATA_CC_ISOLATION] +workload_runtimes = [ + CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, + CONST_WORKLOAD_RUNTIME_WASM_WASI, + CONST_WORKLOAD_RUNTIME_KATA_MSHV_VM_ISOLATION, + CONST_WORKLOAD_RUNTIME_KATA_CC_ISOLATION, +] gpu_instance_profiles = [ CONST_GPU_INSTANCE_PROFILE_MIG1_G, CONST_GPU_INSTANCE_PROFILE_MIG2_G, @@ -215,8 +225,16 @@ # consts for ManagedCluster load_balancer_skus = [CONST_LOAD_BALANCER_SKU_BASIC, CONST_LOAD_BALANCER_SKU_STANDARD] -sku_tiers = [CONST_MANAGED_CLUSTER_SKU_TIER_FREE, CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD, CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM] -network_plugins = [CONST_NETWORK_PLUGIN_KUBENET, CONST_NETWORK_PLUGIN_AZURE, CONST_NETWORK_PLUGIN_NONE] +sku_tiers = [ + CONST_MANAGED_CLUSTER_SKU_TIER_FREE, + CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD, + CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM, +] +network_plugins = [ + CONST_NETWORK_PLUGIN_KUBENET, + CONST_NETWORK_PLUGIN_AZURE, + CONST_NETWORK_PLUGIN_NONE, +] network_plugin_modes = [CONST_NETWORK_PLUGIN_MODE_OVERLAY] network_dataplanes = [CONST_NETWORK_DATAPLANE_AZURE, CONST_NETWORK_DATAPLANE_CILIUM] disk_driver_versions = [CONST_DISK_DRIVER_V1, CONST_DISK_DRIVER_V2] @@ -264,13 +282,16 @@ # consts for credential credential_formats = [CONST_CREDENTIAL_FORMAT_AZURE, CONST_CREDENTIAL_FORMAT_EXEC] -keyvault_network_access_types = [CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PUBLIC, CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PRIVATE] +keyvault_network_access_types = [ + CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PUBLIC, + CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PRIVATE, +] # consts for guardrails level guardrails_levels = [ CONST_GUARDRAILSLEVEL_OFF, CONST_GUARDRAILSLEVEL_WARNING, - CONST_GUARDRAILSLEVEL_ENFORCEMENT + CONST_GUARDRAILSLEVEL_ENFORCEMENT, ] # azure service mesh @@ -309,770 +330,1650 @@ def load_arguments(self, _): - - acr_arg_type = CLIArgumentType(metavar='ACR_NAME_OR_RESOURCE_ID') - k8s_support_plans = self.get_models("KubernetesSupportPlan", resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='managed_clusters') + acr_arg_type = CLIArgumentType(metavar="ACR_NAME_OR_RESOURCE_ID") + k8s_support_plans = self.get_models( + "KubernetesSupportPlan", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="managed_clusters", + ) # AKS command argument configuration - with self.argument_context('aks') as c: - c.argument('resource_name', name_type, help='Name of the managed cluster.', - completer=get_resource_name_completion_list('Microsoft.ContainerService/ManagedClusters')) - c.argument('name', name_type, help='Name of the managed cluster.', - completer=get_resource_name_completion_list('Microsoft.ContainerService/ManagedClusters')) - c.argument('kubernetes_version', options_list=[ - '--kubernetes-version', '-k'], validator=validate_k8s_version) - c.argument('node_count', options_list=['--node-count', '-c'], type=int) - c.argument('tags', tags_type) - - with self.argument_context('aks create') as c: + with self.argument_context("aks") as c: + c.argument( + "resource_name", + name_type, + help="Name of the managed cluster.", + completer=get_resource_name_completion_list( + "Microsoft.ContainerService/ManagedClusters" + ), + ) + c.argument( + "name", + name_type, + help="Name of the managed cluster.", + completer=get_resource_name_completion_list( + "Microsoft.ContainerService/ManagedClusters" + ), + ) + c.argument( + "kubernetes_version", + options_list=["--kubernetes-version", "-k"], + validator=validate_k8s_version, + ) + c.argument("node_count", options_list=["--node-count", "-c"], type=int) + c.argument("tags", tags_type) + + with self.argument_context("aks create") as c: # managed cluster paramerters - c.argument('name', validator=validate_linux_host_name) - c.argument('kubernetes_version', - completer=get_k8s_versions_completion_list) - c.argument('dns_name_prefix', options_list=['--dns-name-prefix', '-p']) - c.argument('node_osdisk_diskencryptionset_id', options_list=['--node-osdisk-diskencryptionset-id', '-d']) - c.argument('disable_local_accounts', action='store_true') - c.argument('disable_rbac', action='store_true') - c.argument('edge_zone', edge_zone_type) - c.argument('admin_username', options_list=['--admin-username', '-u'], default='azureuser') - c.argument('generate_ssh_keys', action='store_true', validator=validate_create_parameters) - c.argument('ssh_key_value', required=False, type=file_type, default=os.path.join('~', '.ssh', 'id_rsa.pub'), - completer=FilesCompleter(), validator=validate_ssh_key) - c.argument('no_ssh_key', options_list=['--no-ssh-key', '-x']) - c.argument('dns_service_ip') - c.argument('docker_bridge_address', deprecate_info=c.deprecate(target='--docker-bridge-address', hide=True)) - c.argument('pod_cidrs') - c.argument('service_cidrs') - c.argument('load_balancer_sku', arg_type=get_enum_type(load_balancer_skus), validator=validate_load_balancer_sku) - c.argument('load_balancer_managed_outbound_ip_count', type=int) - c.argument('load_balancer_outbound_ips', validator=validate_load_balancer_outbound_ips) - c.argument('load_balancer_outbound_ip_prefixes', validator=validate_load_balancer_outbound_ip_prefixes) - c.argument('load_balancer_outbound_ports', type=int, validator=validate_load_balancer_outbound_ports) - c.argument('load_balancer_idle_timeout', type=int, validator=validate_load_balancer_idle_timeout) - c.argument('load_balancer_backend_pool_type', validator=validate_load_balancer_backend_pool_type) - c.argument('nrg_lockdown_restriction_level', arg_type=get_enum_type(nrg_lockdown_restriction_levels)) - c.argument('nat_gateway_managed_outbound_ip_count', type=int, validator=validate_nat_gateway_managed_outbound_ip_count) - c.argument('nat_gateway_idle_timeout', type=int, validator=validate_nat_gateway_idle_timeout) - c.argument('outbound_type', arg_type=get_enum_type(outbound_types)) - c.argument('network_plugin', arg_type=get_enum_type(network_plugins)) - c.argument('network_plugin_mode', arg_type=get_enum_type(network_plugin_modes)) - c.argument('network_policy') - c.argument('network_dataplane', arg_type=get_enum_type(network_dataplanes)) - c.argument('kube_proxy_config') - c.argument('auto_upgrade_channel', arg_type=get_enum_type(auto_upgrade_channels)) - c.argument('node_os_upgrade_channel', arg_type=get_enum_type(node_os_upgrade_channels)) - c.argument('cluster_autoscaler_profile', nargs='+', options_list=["--cluster-autoscaler-profile", "--ca-profile"], - help="Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.") - c.argument('uptime_sla', action='store_true', deprecate_info=c.deprecate(target='--uptime-sla', redirect='--tier', hide=True)) - c.argument('tier', arg_type=get_enum_type(sku_tiers), validator=validate_sku_tier) - c.argument('fqdn_subdomain') - c.argument('api_server_authorized_ip_ranges', validator=validate_ip_ranges) - c.argument('enable_private_cluster', action='store_true') - c.argument('private_dns_zone') - c.argument('disable_public_fqdn', action='store_true') - c.argument('service_principal') - c.argument('client_secret') - c.argument('enable_managed_identity', action='store_true') - c.argument('assign_identity', validator=validate_assign_identity) - c.argument('assign_kubelet_identity', validator=validate_assign_kubelet_identity) - c.argument('enable_aad', action='store_true') - c.argument('enable_azure_rbac', action='store_true') - c.argument('aad_client_app_id', deprecate_info=c.deprecate(target='--aad-client-app-id', hide=True)) - c.argument('aad_server_app_id', deprecate_info=c.deprecate(target='--aad-server-app-id', hide=True)) - c.argument('aad_server_app_secret', deprecate_info=c.deprecate(target='--aad-server-app-secret', hide=True)) - c.argument('aad_tenant_id') - c.argument('aad_admin_group_object_ids') - c.argument('enable_oidc_issuer', action='store_true') - c.argument('windows_admin_username') - c.argument('windows_admin_password') - c.argument('enable_ahub') - c.argument('enable_windows_gmsa', action='store_true') - c.argument('gmsa_dns_server') - c.argument('gmsa_root_domain_name') - c.argument('attach_acr', acr_arg_type) - c.argument('skip_subnet_role_assignment', action='store_true') - c.argument('node_resource_group') - c.argument('k8s_support_plan', arg_type=get_enum_type(k8s_support_plans)) - c.argument('enable_defender', action='store_true') - c.argument('defender_config', validator=validate_defender_config_parameter) - c.argument('disk_driver_version', arg_type=get_enum_type(disk_driver_versions)) - c.argument('disable_disk_driver', action='store_true') - c.argument('disable_file_driver', action='store_true') - c.argument('enable_blob_driver', action='store_true') - c.argument('disable_snapshot_controller', action='store_true') - c.argument('enable_azure_keyvault_kms', action='store_true') - c.argument('azure_keyvault_kms_key_id', validator=validate_azure_keyvault_kms_key_id) - c.argument('azure_keyvault_kms_key_vault_network_access', arg_type=get_enum_type(keyvault_network_access_types), default=CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PUBLIC) - c.argument('azure_keyvault_kms_key_vault_resource_id', validator=validate_azure_keyvault_kms_key_vault_resource_id) - c.argument('http_proxy_config') + c.argument("name", validator=validate_linux_host_name) + c.argument("kubernetes_version", completer=get_k8s_versions_completion_list) + c.argument("dns_name_prefix", options_list=["--dns-name-prefix", "-p"]) + c.argument( + "node_osdisk_diskencryptionset_id", + options_list=["--node-osdisk-diskencryptionset-id", "-d"], + ) + c.argument("disable_local_accounts", action="store_true") + c.argument("disable_rbac", action="store_true") + c.argument("edge_zone", edge_zone_type) + c.argument( + "admin_username", + options_list=["--admin-username", "-u"], + default="azureuser", + ) + c.argument( + "generate_ssh_keys", + action="store_true", + validator=validate_create_parameters, + ) + c.argument( + "ssh_key_value", + required=False, + type=file_type, + default=os.path.join("~", ".ssh", "id_rsa.pub"), + completer=FilesCompleter(), + validator=validate_ssh_key, + ) + c.argument("no_ssh_key", options_list=["--no-ssh-key", "-x"]) + c.argument("dns_service_ip") + c.argument( + "docker_bridge_address", + deprecate_info=c.deprecate(target="--docker-bridge-address", hide=True), + ) + c.argument("pod_cidrs") + c.argument("service_cidrs") + c.argument( + "load_balancer_sku", + arg_type=get_enum_type(load_balancer_skus), + validator=validate_load_balancer_sku, + ) + c.argument("load_balancer_managed_outbound_ip_count", type=int) + c.argument( + "load_balancer_outbound_ips", validator=validate_load_balancer_outbound_ips + ) + c.argument( + "load_balancer_outbound_ip_prefixes", + validator=validate_load_balancer_outbound_ip_prefixes, + ) + c.argument( + "load_balancer_outbound_ports", + type=int, + validator=validate_load_balancer_outbound_ports, + ) + c.argument( + "load_balancer_idle_timeout", + type=int, + validator=validate_load_balancer_idle_timeout, + ) + c.argument( + "load_balancer_backend_pool_type", + validator=validate_load_balancer_backend_pool_type, + ) + c.argument( + "nrg_lockdown_restriction_level", + arg_type=get_enum_type(nrg_lockdown_restriction_levels), + ) + c.argument( + "nat_gateway_managed_outbound_ip_count", + type=int, + validator=validate_nat_gateway_managed_outbound_ip_count, + ) + c.argument( + "nat_gateway_idle_timeout", + type=int, + validator=validate_nat_gateway_idle_timeout, + ) + c.argument("outbound_type", arg_type=get_enum_type(outbound_types)) + c.argument("network_plugin", arg_type=get_enum_type(network_plugins)) + c.argument("network_plugin_mode", arg_type=get_enum_type(network_plugin_modes)) + c.argument("network_policy") + c.argument("network_dataplane", arg_type=get_enum_type(network_dataplanes)) + c.argument("kube_proxy_config") + c.argument( + "auto_upgrade_channel", arg_type=get_enum_type(auto_upgrade_channels) + ) + c.argument( + "node_os_upgrade_channel", arg_type=get_enum_type(node_os_upgrade_channels) + ) + c.argument( + "cluster_autoscaler_profile", + nargs="+", + options_list=["--cluster-autoscaler-profile", "--ca-profile"], + help=( + "Space-separated list of key=value pairs for configuring cluster autoscaler. " + "Pass an empty string to clear the profile." + ), + ) + c.argument( + "uptime_sla", + action="store_true", + deprecate_info=c.deprecate( + target="--uptime-sla", redirect="--tier", hide=True + ), + ) + c.argument( + "tier", arg_type=get_enum_type(sku_tiers), validator=validate_sku_tier + ) + c.argument("fqdn_subdomain") + c.argument("api_server_authorized_ip_ranges", validator=validate_ip_ranges) + c.argument("enable_private_cluster", action="store_true") + c.argument("private_dns_zone") + c.argument("disable_public_fqdn", action="store_true") + c.argument("service_principal") + c.argument("client_secret") + c.argument("enable_managed_identity", action="store_true") + c.argument("assign_identity", validator=validate_assign_identity) + c.argument( + "assign_kubelet_identity", validator=validate_assign_kubelet_identity + ) + c.argument("enable_aad", action="store_true") + c.argument("enable_azure_rbac", action="store_true") + c.argument( + "aad_client_app_id", + deprecate_info=c.deprecate(target="--aad-client-app-id", hide=True), + ) + c.argument( + "aad_server_app_id", + deprecate_info=c.deprecate(target="--aad-server-app-id", hide=True), + ) + c.argument( + "aad_server_app_secret", + deprecate_info=c.deprecate(target="--aad-server-app-secret", hide=True), + ) + c.argument("aad_tenant_id") + c.argument("aad_admin_group_object_ids") + c.argument("enable_oidc_issuer", action="store_true") + c.argument("windows_admin_username") + c.argument("windows_admin_password") + c.argument("enable_ahub") + c.argument("enable_windows_gmsa", action="store_true") + c.argument("gmsa_dns_server") + c.argument("gmsa_root_domain_name") + c.argument("attach_acr", acr_arg_type) + c.argument("skip_subnet_role_assignment", action="store_true") + c.argument("node_resource_group") + c.argument("k8s_support_plan", arg_type=get_enum_type(k8s_support_plans)) + c.argument("enable_defender", action="store_true") + c.argument("defender_config", validator=validate_defender_config_parameter) + c.argument("disk_driver_version", arg_type=get_enum_type(disk_driver_versions)) + c.argument("disable_disk_driver", action="store_true") + c.argument("disable_file_driver", action="store_true") + c.argument("enable_blob_driver", action="store_true") + c.argument("disable_snapshot_controller", action="store_true") + c.argument("enable_azure_keyvault_kms", action="store_true") + c.argument( + "azure_keyvault_kms_key_id", validator=validate_azure_keyvault_kms_key_id + ) + c.argument( + "azure_keyvault_kms_key_vault_network_access", + arg_type=get_enum_type(keyvault_network_access_types), + default=CONST_AZURE_KEYVAULT_NETWORK_ACCESS_PUBLIC, + ) + c.argument( + "azure_keyvault_kms_key_vault_resource_id", + validator=validate_azure_keyvault_kms_key_vault_resource_id, + ) + c.argument("http_proxy_config") # addons - c.argument('enable_addons', options_list=['--enable-addons', '-a'], validator=validate_addons) - c.argument('workspace_resource_id') - c.argument('enable_msi_auth_for_monitoring', arg_type=get_three_state_flag(), is_preview=True) - c.argument('enable_syslog', arg_type=get_three_state_flag(), is_preview=True) - c.argument('data_collection_settings', is_preview=True) - c.argument('aci_subnet_name') - c.argument('appgw_name', arg_group='Application Gateway') - c.argument('appgw_subnet_cidr', arg_group='Application Gateway') - c.argument('appgw_id', arg_group='Application Gateway') - c.argument('appgw_subnet_id', arg_group='Application Gateway') - c.argument('appgw_watch_namespace', arg_group='Application Gateway') - c.argument('enable_secret_rotation', action='store_true') - c.argument('rotation_poll_interval') - c.argument('enable_sgxquotehelper', action='store_true') - c.argument('enable_app_routing', action='store_true', is_preview=True) + c.argument( + "enable_addons", + options_list=["--enable-addons", "-a"], + validator=validate_addons, + ) + c.argument("workspace_resource_id") + c.argument( + "enable_msi_auth_for_monitoring", + arg_type=get_three_state_flag(), + is_preview=True, + ) + c.argument("enable_syslog", arg_type=get_three_state_flag(), is_preview=True) + c.argument("data_collection_settings", is_preview=True) + c.argument("aci_subnet_name") + c.argument("appgw_name", arg_group="Application Gateway") + c.argument("appgw_subnet_cidr", arg_group="Application Gateway") + c.argument("appgw_id", arg_group="Application Gateway") + c.argument("appgw_subnet_id", arg_group="Application Gateway") + c.argument("appgw_watch_namespace", arg_group="Application Gateway") + c.argument("enable_secret_rotation", action="store_true") + c.argument("rotation_poll_interval") + c.argument("enable_sgxquotehelper", action="store_true") + c.argument("enable_app_routing", action="store_true", is_preview=True) # nodepool paramerters - c.argument('nodepool_name', default='nodepool1', - help='Node pool name, upto 12 alphanumeric characters', validator=validate_nodepool_name) - c.argument('node_vm_size', options_list=['--node-vm-size', '-s'], completer=get_vm_size_completion_list) - c.argument('os_sku', arg_type=get_enum_type(node_os_skus_create), validator=validate_os_sku) - c.argument('snapshot_id', validator=validate_snapshot_id) - c.argument('vnet_subnet_id', validator=validate_vnet_subnet_id) - c.argument('pod_subnet_id', validator=validate_pod_subnet_id) - c.argument('enable_node_public_ip', action='store_true') - c.argument('node_public_ip_prefix_id') - c.argument('enable_cluster_autoscaler', action='store_true') - c.argument('min_count', type=int, validator=validate_nodes_count) - c.argument('max_count', type=int, validator=validate_nodes_count) - c.argument('nodepool_tags', nargs='*', validator=validate_nodepool_tags, - help='space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.') - c.argument('nodepool_labels', nargs='*', validator=validate_nodepool_labels, - help='space-separated labels: key[=value] [key[=value] ...]. See https://aka.ms/node-labels for syntax of labels.') - c.argument('nodepool_taints', validator=validate_nodepool_taints) - c.argument('node_osdisk_type', arg_type=get_enum_type(node_os_disk_types)) - c.argument('node_osdisk_size', type=int) - c.argument('max_pods', type=int, options_list=['--max-pods', '-m']) - c.argument('vm_set_type', validator=validate_vm_set_type) - c.argument('enable_vmss', action='store_true', help='To be deprecated. Use vm_set_type instead.', deprecate_info=c.deprecate(redirect='--vm-set-type', hide=True)) - c.argument('zones', zones_type, options_list=['--zones', '-z'], help='Space-separated list of availability zones where agent nodes will be placed.') - c.argument('ppg') - c.argument('enable_encryption_at_host', action='store_true') - c.argument('enable_ultra_ssd', action='store_true') - c.argument('enable_fips_image', action='store_true') - c.argument('kubelet_config') - c.argument('linux_os_config') - c.argument('host_group_id', validator=validate_host_group_id) - c.argument('gpu_instance_profile', arg_type=get_enum_type(gpu_instance_profiles)) + c.argument( + "nodepool_name", + default="nodepool1", + help="Node pool name, upto 12 alphanumeric characters", + validator=validate_nodepool_name, + ) + c.argument( + "node_vm_size", + options_list=["--node-vm-size", "-s"], + completer=get_vm_size_completion_list, + ) + c.argument( + "os_sku", + arg_type=get_enum_type(node_os_skus_create), + validator=validate_os_sku, + ) + c.argument("snapshot_id", validator=validate_snapshot_id) + c.argument("vnet_subnet_id", validator=validate_vnet_subnet_id) + c.argument("pod_subnet_id", validator=validate_pod_subnet_id) + c.argument("enable_node_public_ip", action="store_true") + c.argument("node_public_ip_prefix_id") + c.argument("enable_cluster_autoscaler", action="store_true") + c.argument("min_count", type=int, validator=validate_nodes_count) + c.argument("max_count", type=int, validator=validate_nodes_count) + c.argument( + "nodepool_tags", + nargs="*", + validator=validate_nodepool_tags, + help='space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.', + ) + c.argument( + "nodepool_labels", + nargs="*", + validator=validate_nodepool_labels, + help=( + "space-separated labels: key[=value] [key[=value] ...]. " + "See https://aka.ms/node-labels for syntax of labels." + ), + ) + c.argument("nodepool_taints", validator=validate_nodepool_taints) + c.argument("node_osdisk_type", arg_type=get_enum_type(node_os_disk_types)) + c.argument("node_osdisk_size", type=int) + c.argument("max_pods", type=int, options_list=["--max-pods", "-m"]) + c.argument("vm_set_type", validator=validate_vm_set_type) + c.argument( + "enable_vmss", + action="store_true", + help="To be deprecated. Use vm_set_type instead.", + deprecate_info=c.deprecate(redirect="--vm-set-type", hide=True), + ) + c.argument( + "zones", + zones_type, + options_list=["--zones", "-z"], + help="Space-separated list of availability zones where agent nodes will be placed.", + ) + c.argument("ppg") + c.argument("enable_encryption_at_host", action="store_true") + c.argument("enable_ultra_ssd", action="store_true") + c.argument("enable_fips_image", action="store_true") + c.argument("kubelet_config") + c.argument("linux_os_config") + c.argument("host_group_id", validator=validate_host_group_id) + c.argument( + "gpu_instance_profile", arg_type=get_enum_type(gpu_instance_profiles) + ) # misc - c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') - c.argument('aks_custom_headers') + c.argument( + "yes", + options_list=["--yes", "-y"], + help="Do not prompt for confirmation.", + action="store_true", + ) + c.argument("aks_custom_headers") # extensions # managed cluster - c.argument('ip_families') - c.argument('pod_cidrs') - c.argument('service_cidrs') - c.argument('load_balancer_managed_outbound_ipv6_count', type=int) - c.argument('enable_pod_security_policy', action='store_true', deprecate_info=c.deprecate(target='--enable-pod-security-policy', hide=True)) - c.argument('enable_pod_identity', action='store_true') - c.argument('enable_pod_identity_with_kubenet', action='store_true') - c.argument('enable_workload_identity', action='store_true', is_preview=True) - c.argument('enable_image_cleaner', action='store_true') - c.argument('enable_azure_service_mesh', - options_list=["--enable-azure-service-mesh", "--enable-asm"], - action='store_true', - is_preview=True) - c.argument('image_cleaner_interval_hours', type=int) - c.argument('cluster_snapshot_id', validator=validate_cluster_snapshot_id, is_preview=True) - c.argument('enable_apiserver_vnet_integration', action='store_true', is_preview=True) - c.argument('apiserver_subnet_id', validator=validate_apiserver_subnet_id, is_preview=True) - c.argument('dns_zone_resource_id', deprecate_info=c.deprecate(target='--dns-zone-resource-id', redirect='--dns-zone-resource-ids', hide=True)) - c.argument('dns_zone_resource_ids', is_preview=True) - c.argument('enable_keda', action='store_true', is_preview=True) - c.argument('enable_vpa', action='store_true', is_preview=True, help="enable vertical pod autoscaler for cluster") - c.argument('enable_node_restriction', action='store_true', is_preview=True, help="enable node restriction for cluster") - c.argument('enable_cilium_dataplane', action='store_true', is_preview=True, deprecate_info=c.deprecate(target='--enable-cilium-dataplane', redirect='--network-dataplane', hide=True)) - c.argument('enable_network_observability', action='store_true', is_preview=True, help="enable network observability for cluster") - c.argument('custom_ca_trust_certificates', options_list=["--custom-ca-trust-certificates", "--ca-certs"], is_preview=True, help="path to file containing list of new line separated CAs") + c.argument("ip_families") + c.argument("pod_cidrs") + c.argument("service_cidrs") + c.argument("load_balancer_managed_outbound_ipv6_count", type=int) + c.argument( + "enable_pod_security_policy", + action="store_true", + deprecate_info=c.deprecate( + target="--enable-pod-security-policy", hide=True + ), + ) + c.argument("enable_pod_identity", action="store_true") + c.argument("enable_pod_identity_with_kubenet", action="store_true") + c.argument("enable_workload_identity", action="store_true", is_preview=True) + c.argument("enable_image_cleaner", action="store_true") + c.argument( + "enable_azure_service_mesh", + options_list=["--enable-azure-service-mesh", "--enable-asm"], + action="store_true", + is_preview=True, + ) + c.argument("image_cleaner_interval_hours", type=int) + c.argument( + "cluster_snapshot_id", + validator=validate_cluster_snapshot_id, + is_preview=True, + ) + c.argument( + "enable_apiserver_vnet_integration", action="store_true", is_preview=True + ) + c.argument( + "apiserver_subnet_id", + validator=validate_apiserver_subnet_id, + is_preview=True, + ) + c.argument( + "dns_zone_resource_id", + deprecate_info=c.deprecate( + target="--dns-zone-resource-id", + redirect="--dns-zone-resource-ids", + hide=True, + ), + ) + c.argument("dns_zone_resource_ids", is_preview=True) + c.argument("enable_keda", action="store_true", is_preview=True) + c.argument( + "enable_vpa", + action="store_true", + is_preview=True, + help="enable vertical pod autoscaler for cluster", + ) + c.argument( + "enable_node_restriction", + action="store_true", + is_preview=True, + help="enable node restriction for cluster", + ) + c.argument( + "enable_cilium_dataplane", + action="store_true", + is_preview=True, + deprecate_info=c.deprecate( + target="--enable-cilium-dataplane", + redirect="--network-dataplane", + hide=True, + ), + ) + c.argument( + "enable_network_observability", + action="store_true", + is_preview=True, + help="enable network observability for cluster", + ) + c.argument( + "custom_ca_trust_certificates", + options_list=["--custom-ca-trust-certificates", "--ca-certs"], + is_preview=True, + help="path to file containing list of new line separated CAs", + ) # nodepool - c.argument('crg_id', validator=validate_crg_id, is_preview=True) + c.argument("crg_id", validator=validate_crg_id, is_preview=True) # no validation for aks create because it already only supports Linux. - c.argument('message_of_the_day') - c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) + c.argument("message_of_the_day") + c.argument( + "workload_runtime", + arg_type=get_enum_type(workload_runtimes), + default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, + ) # no validation for aks create because it already only supports Linux. - c.argument('enable_custom_ca_trust', action='store_true') - c.argument('nodepool_allowed_host_ports', validator=validate_allowed_host_ports, is_preview=True, help="allowed host ports for agentpool") - c.argument('nodepool_asg_ids', validator=validate_application_security_groups, is_preview=True, help="application security groups for agentpool") - c.argument('node_public_ip_tags', arg_type=tags_type, validator=validate_node_public_ip_tags, - help='space-separated tags: key[=value] [key[=value] ...].') - c.argument('guardrails_level', arg_type=get_enum_type(guardrails_levels), is_preview=True) - c.argument('guardrails_version', type=str, - help='The guardrails version', is_preview=True) - c.argument('guardrails_excluded_ns', type=str, is_preview=True) + c.argument("enable_custom_ca_trust", action="store_true") + c.argument( + "nodepool_allowed_host_ports", + validator=validate_allowed_host_ports, + is_preview=True, + help="allowed host ports for agentpool", + ) + c.argument( + "nodepool_asg_ids", + validator=validate_application_security_groups, + is_preview=True, + help="application security groups for agentpool", + ) + c.argument( + "node_public_ip_tags", + arg_type=tags_type, + validator=validate_node_public_ip_tags, + help="space-separated tags: key[=value] [key[=value] ...].", + ) + c.argument( + "guardrails_level", + arg_type=get_enum_type(guardrails_levels), + is_preview=True, + ) + c.argument( + "guardrails_version", + type=str, + help="The guardrails version", + is_preview=True, + ) + c.argument("guardrails_excluded_ns", type=str, is_preview=True) # azure monitor profile - c.argument('enable_azuremonitormetrics', action='store_true', deprecate_info=c.deprecate(target='--enable-azuremonitormetrics', redirect='--enable-azure-monitor-metrics', hide=True)) - c.argument('enable_azure_monitor_metrics', action='store_true') - c.argument('azure_monitor_workspace_resource_id', validator=validate_azuremonitorworkspaceresourceid) - c.argument('ksm_metric_labels_allow_list') - c.argument('ksm_metric_annotations_allow_list') - c.argument('grafana_resource_id', validator=validate_grafanaresourceid) - c.argument('enable_windows_recording_rules', action='store_true') - c.argument('enable_cost_analysis', is_preview=True, action='store_true') + c.argument( + "enable_azuremonitormetrics", + action="store_true", + deprecate_info=c.deprecate( + target="--enable-azuremonitormetrics", + redirect="--enable-azure-monitor-metrics", + hide=True, + ), + ) + c.argument("enable_azure_monitor_metrics", action="store_true") + c.argument( + "azure_monitor_workspace_resource_id", + validator=validate_azuremonitorworkspaceresourceid, + ) + c.argument("ksm_metric_labels_allow_list") + c.argument("ksm_metric_annotations_allow_list") + c.argument("grafana_resource_id", validator=validate_grafanaresourceid) + c.argument("enable_windows_recording_rules", action="store_true") + c.argument("enable_cost_analysis", is_preview=True, action="store_true") # azure container storage - c.argument('enable_azure_container_storage', arg_type=get_enum_type(storage_pool_types), - help='enable azure container storage and define storage pool type') - c.argument('storage_pool_name', help='set storage pool name for azure container storage') - c.argument('storage_pool_size', help='set storage pool size for azure container storage') - c.argument('storage_pool_sku', arg_type=get_enum_type(storage_pool_skus), - help='set azure disk type storage pool sku for azure container storage') - c.argument('storage_pool_option', arg_type=get_enum_type(storage_pool_options), - help='set ephemeral disk storage pool option for azure container storage') - c.argument('node_provisioning_mode', is_preview=True, arg_type=get_enum_type(node_provisioning_modes), - help='Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". For more information on "Auto" mode see aka.ms/aks/nap.') - - with self.argument_context('aks update') as c: + c.argument( + "enable_azure_container_storage", + arg_type=get_enum_type(storage_pool_types), + help="enable azure container storage and define storage pool type", + ) + c.argument( + "storage_pool_name", + help="set storage pool name for azure container storage", + ) + c.argument( + "storage_pool_size", + help="set storage pool size for azure container storage", + ) + c.argument( + "storage_pool_sku", + arg_type=get_enum_type(storage_pool_skus), + help="set azure disk type storage pool sku for azure container storage", + ) + c.argument( + "storage_pool_option", + arg_type=get_enum_type(storage_pool_options), + help="set ephemeral disk storage pool option for azure container storage", + ) + c.argument( + "node_provisioning_mode", + is_preview=True, + arg_type=get_enum_type(node_provisioning_modes), + help=( + 'Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". ' + 'For more information on "Auto" mode see aka.ms/aks/nap.' + ) + ) + + with self.argument_context("aks update") as c: # managed cluster paramerters - c.argument('disable_local_accounts', action='store_true') - c.argument('enable_local_accounts', action='store_true') - c.argument('load_balancer_managed_outbound_ip_count', type=int) - c.argument('load_balancer_outbound_ips', validator=validate_load_balancer_outbound_ips) - c.argument('load_balancer_outbound_ip_prefixes', validator=validate_load_balancer_outbound_ip_prefixes) - c.argument('load_balancer_outbound_ports', type=int, validator=validate_load_balancer_outbound_ports) - c.argument('load_balancer_idle_timeout', type=int, validator=validate_load_balancer_idle_timeout) - c.argument('load_balancer_backend_pool_type', validator=validate_load_balancer_backend_pool_type) - c.argument('nrg_lockdown_restriction_level', arg_type=get_enum_type(nrg_lockdown_restriction_levels)) - c.argument('nat_gateway_managed_outbound_ip_count', type=int, validator=validate_nat_gateway_managed_outbound_ip_count) - c.argument('nat_gateway_idle_timeout', type=int, validator=validate_nat_gateway_idle_timeout) - c.argument('network_dataplane', arg_type=get_enum_type(network_dataplanes)) - c.argument('network_policy') - c.argument('network_plugin', arg_type=get_enum_type(network_plugins)) - c.argument('kube_proxy_config') - c.argument('auto_upgrade_channel', arg_type=get_enum_type(auto_upgrade_channels)) - c.argument('node_os_upgrade_channel', arg_type=get_enum_type(node_os_upgrade_channels)) - c.argument('disable_force_upgrade', action='store_true', validator=validate_force_upgrade_disable_and_enable_parameters) - c.argument('enable_force_upgrade', action='store_true', validator=validate_force_upgrade_disable_and_enable_parameters) - c.argument('upgrade_override_until', is_preview=True) - c.argument('cluster_autoscaler_profile', nargs='+', options_list=["--cluster-autoscaler-profile", "--ca-profile"], - help="Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.") - c.argument('uptime_sla', action='store_true', deprecate_info=c.deprecate(target='--uptime-sla', redirect='--tier', hide=True)) - c.argument('no_uptime_sla', action='store_true', deprecate_info=c.deprecate(target='--no-uptime-sla', redirect='--tier', hide=True)) - c.argument('tier', arg_type=get_enum_type(sku_tiers), validator=validate_sku_tier) - c.argument('api_server_authorized_ip_ranges', validator=validate_ip_ranges) - c.argument('enable_public_fqdn', action='store_true') - c.argument('disable_public_fqdn', action='store_true') - c.argument('enable_managed_identity', action='store_true') - c.argument('assign_identity', validator=validate_assign_identity) - c.argument('assign_kubelet_identity', validator=validate_assign_kubelet_identity) - c.argument('enable_aad', action='store_true') - c.argument('enable_azure_rbac', action='store_true') - c.argument('disable_azure_rbac', action='store_true') - c.argument('aad_tenant_id') - c.argument('aad_admin_group_object_ids') - c.argument('enable_oidc_issuer', action='store_true') - c.argument('k8s_support_plan', arg_type=get_enum_type(k8s_support_plans)) - c.argument('windows_admin_password') - c.argument('enable_ahub') - c.argument('disable_ahub') - c.argument('enable_windows_gmsa', action='store_true') - c.argument('gmsa_dns_server') - c.argument('gmsa_root_domain_name') - c.argument('attach_acr', acr_arg_type, validator=validate_acr) - c.argument('detach_acr', acr_arg_type, validator=validate_acr) - c.argument('disable_defender', action='store_true', validator=validate_defender_disable_and_enable_parameters) - c.argument('enable_defender', action='store_true') - c.argument('defender_config', validator=validate_defender_config_parameter) - c.argument('enable_disk_driver', action='store_true') - c.argument('disk_driver_version', arg_type=get_enum_type(disk_driver_versions)) - c.argument('disable_disk_driver', action='store_true') - c.argument('enable_file_driver', action='store_true') - c.argument('disable_file_driver', action='store_true') - c.argument('enable_blob_driver', action='store_true') - c.argument('disable_blob_driver', action='store_true') - c.argument('enable_snapshot_controller', action='store_true') - c.argument('disable_snapshot_controller', action='store_true') - c.argument('enable_azure_keyvault_kms', action='store_true') - c.argument('disable_azure_keyvault_kms', action='store_true') - c.argument('azure_keyvault_kms_key_id', validator=validate_azure_keyvault_kms_key_id) - c.argument('azure_keyvault_kms_key_vault_network_access', arg_type=get_enum_type(keyvault_network_access_types)) - c.argument('azure_keyvault_kms_key_vault_resource_id', validator=validate_azure_keyvault_kms_key_vault_resource_id) - c.argument('http_proxy_config') + c.argument("disable_local_accounts", action="store_true") + c.argument("enable_local_accounts", action="store_true") + c.argument("load_balancer_managed_outbound_ip_count", type=int) + c.argument( + "load_balancer_outbound_ips", validator=validate_load_balancer_outbound_ips + ) + c.argument( + "load_balancer_outbound_ip_prefixes", + validator=validate_load_balancer_outbound_ip_prefixes, + ) + c.argument( + "load_balancer_outbound_ports", + type=int, + validator=validate_load_balancer_outbound_ports, + ) + c.argument( + "load_balancer_idle_timeout", + type=int, + validator=validate_load_balancer_idle_timeout, + ) + c.argument( + "load_balancer_backend_pool_type", + validator=validate_load_balancer_backend_pool_type, + ) + c.argument( + "nrg_lockdown_restriction_level", + arg_type=get_enum_type(nrg_lockdown_restriction_levels), + ) + c.argument( + "nat_gateway_managed_outbound_ip_count", + type=int, + validator=validate_nat_gateway_managed_outbound_ip_count, + ) + c.argument( + "nat_gateway_idle_timeout", + type=int, + validator=validate_nat_gateway_idle_timeout, + ) + c.argument("network_dataplane", arg_type=get_enum_type(network_dataplanes)) + c.argument("network_policy") + c.argument("network_plugin", arg_type=get_enum_type(network_plugins)) + c.argument("kube_proxy_config") + c.argument( + "auto_upgrade_channel", arg_type=get_enum_type(auto_upgrade_channels) + ) + c.argument( + "node_os_upgrade_channel", arg_type=get_enum_type(node_os_upgrade_channels) + ) + c.argument( + "disable_force_upgrade", + action="store_true", + validator=validate_force_upgrade_disable_and_enable_parameters, + ) + c.argument( + "enable_force_upgrade", + action="store_true", + validator=validate_force_upgrade_disable_and_enable_parameters, + ) + c.argument("upgrade_override_until", is_preview=True) + c.argument( + "cluster_autoscaler_profile", + nargs="+", + options_list=["--cluster-autoscaler-profile", "--ca-profile"], + help=( + "Space-separated list of key=value pairs for configuring cluster autoscaler. " + "Pass an empty string to clear the profile." + ), + ) + c.argument( + "uptime_sla", + action="store_true", + deprecate_info=c.deprecate( + target="--uptime-sla", redirect="--tier", hide=True + ), + ) + c.argument( + "no_uptime_sla", + action="store_true", + deprecate_info=c.deprecate( + target="--no-uptime-sla", redirect="--tier", hide=True + ), + ) + c.argument( + "tier", arg_type=get_enum_type(sku_tiers), validator=validate_sku_tier + ) + c.argument("api_server_authorized_ip_ranges", validator=validate_ip_ranges) + c.argument("enable_public_fqdn", action="store_true") + c.argument("disable_public_fqdn", action="store_true") + c.argument("enable_managed_identity", action="store_true") + c.argument("assign_identity", validator=validate_assign_identity) + c.argument( + "assign_kubelet_identity", validator=validate_assign_kubelet_identity + ) + c.argument("enable_aad", action="store_true") + c.argument("enable_azure_rbac", action="store_true") + c.argument("disable_azure_rbac", action="store_true") + c.argument("aad_tenant_id") + c.argument("aad_admin_group_object_ids") + c.argument("enable_oidc_issuer", action="store_true") + c.argument("k8s_support_plan", arg_type=get_enum_type(k8s_support_plans)) + c.argument("windows_admin_password") + c.argument("enable_ahub") + c.argument("disable_ahub") + c.argument("enable_windows_gmsa", action="store_true") + c.argument("gmsa_dns_server") + c.argument("gmsa_root_domain_name") + c.argument("attach_acr", acr_arg_type, validator=validate_acr) + c.argument("detach_acr", acr_arg_type, validator=validate_acr) + c.argument( + "disable_defender", + action="store_true", + validator=validate_defender_disable_and_enable_parameters, + ) + c.argument("enable_defender", action="store_true") + c.argument("defender_config", validator=validate_defender_config_parameter) + c.argument("enable_disk_driver", action="store_true") + c.argument("disk_driver_version", arg_type=get_enum_type(disk_driver_versions)) + c.argument("disable_disk_driver", action="store_true") + c.argument("enable_file_driver", action="store_true") + c.argument("disable_file_driver", action="store_true") + c.argument("enable_blob_driver", action="store_true") + c.argument("disable_blob_driver", action="store_true") + c.argument("enable_snapshot_controller", action="store_true") + c.argument("disable_snapshot_controller", action="store_true") + c.argument("enable_azure_keyvault_kms", action="store_true") + c.argument("disable_azure_keyvault_kms", action="store_true") + c.argument( + "azure_keyvault_kms_key_id", validator=validate_azure_keyvault_kms_key_id + ) + c.argument( + "azure_keyvault_kms_key_vault_network_access", + arg_type=get_enum_type(keyvault_network_access_types), + ) + c.argument( + "azure_keyvault_kms_key_vault_resource_id", + validator=validate_azure_keyvault_kms_key_vault_resource_id, + ) + c.argument("http_proxy_config") # addons - c.argument('enable_secret_rotation', action='store_true') - c.argument('disable_secret_rotation', action='store_true') - c.argument('rotation_poll_interval') + c.argument("enable_secret_rotation", action="store_true") + c.argument("disable_secret_rotation", action="store_true") + c.argument("rotation_poll_interval") # nodepool paramerters - c.argument('enable_cluster_autoscaler', options_list=[ - "--enable-cluster-autoscaler", "-e"], action='store_true') - c.argument('disable_cluster_autoscaler', options_list=[ - "--disable-cluster-autoscaler", "-d"], action='store_true') - c.argument('update_cluster_autoscaler', options_list=[ - "--update-cluster-autoscaler", "-u"], action='store_true') - c.argument('min_count', type=int, validator=validate_nodes_count) - c.argument('max_count', type=int, validator=validate_nodes_count) - c.argument('nodepool_labels', nargs='*', validator=validate_nodepool_labels, - help='space-separated labels: key[=value] [key[=value] ...]. See https://aka.ms/node-labels for syntax of labels.') - c.argument('nodepool_taints', validator=validate_nodepool_taints) + c.argument( + "enable_cluster_autoscaler", + options_list=["--enable-cluster-autoscaler", "-e"], + action="store_true", + ) + c.argument( + "disable_cluster_autoscaler", + options_list=["--disable-cluster-autoscaler", "-d"], + action="store_true", + ) + c.argument( + "update_cluster_autoscaler", + options_list=["--update-cluster-autoscaler", "-u"], + action="store_true", + ) + c.argument("min_count", type=int, validator=validate_nodes_count) + c.argument("max_count", type=int, validator=validate_nodes_count) + c.argument( + "nodepool_labels", + nargs="*", + validator=validate_nodepool_labels, + help=( + "space-separated labels: key[=value] [key[=value] ...]. " + "See https://aka.ms/node-labels for syntax of labels." + ) + ) + c.argument("nodepool_taints", validator=validate_nodepool_taints) # misc - c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') - c.argument('aks_custom_headers') + c.argument( + "yes", + options_list=["--yes", "-y"], + help="Do not prompt for confirmation.", + action="store_true", + ) + c.argument("aks_custom_headers") # extensions # managed cluster - c.argument('ssh_key_value', type=file_type, completer=FilesCompleter(), validator=validate_ssh_key_for_update) - c.argument('load_balancer_managed_outbound_ipv6_count', type=int) - c.argument('outbound_type', arg_type=get_enum_type(outbound_types)) - c.argument('enable_pod_security_policy', action='store_true', deprecate_info=c.deprecate(target='--enable-pod-security-policy', hide=True)) - c.argument('disable_pod_security_policy', action='store_true', is_preview=True) - c.argument('enable_pod_identity', action='store_true') - c.argument('enable_pod_identity_with_kubenet', action='store_true') - c.argument('disable_pod_identity', action='store_true') - c.argument('enable_workload_identity', action='store_true', is_preview=True) - c.argument('disable_workload_identity', action='store_true', is_preview=True) - c.argument('enable_image_cleaner', action='store_true') - c.argument('disable_image_cleaner', action='store_true', validator=validate_image_cleaner_enable_disable_mutually_exclusive) - c.argument('image_cleaner_interval_hours', type=int) - c.argument('disable_image_integrity', action='store_true', is_preview=True) - c.argument('enable_apiserver_vnet_integration', action='store_true', is_preview=True) - c.argument('apiserver_subnet_id', validator=validate_apiserver_subnet_id, is_preview=True) - c.argument('enable_keda', action='store_true', is_preview=True) - c.argument('disable_keda', action='store_true', is_preview=True) - c.argument('enable_node_restriction', action='store_true', is_preview=True, help="enable node restriction for cluster") - c.argument('disable_node_restriction', action='store_true', is_preview=True, help="disable node restriction for cluster") - c.argument('enable_private_cluster', action='store_true', is_preview=True, help='enable private cluster for apiserver vnet integration') - c.argument('disable_private_cluster', action='store_true', is_preview=True, help='disable private cluster for apiserver vnet integration') - c.argument('private_dns_zone', is_preview=True) - c.argument('enable_azuremonitormetrics', action='store_true', deprecate_info=c.deprecate(target='--enable-azuremonitormetrics', redirect='--enable-azure-monitor-metrics', hide=True)) - c.argument('enable_azure_monitor_metrics', action='store_true') - c.argument('azure_monitor_workspace_resource_id', validator=validate_azuremonitorworkspaceresourceid) - c.argument('ksm_metric_labels_allow_list') - c.argument('ksm_metric_annotations_allow_list') - c.argument('grafana_resource_id', validator=validate_grafanaresourceid) - c.argument('enable_windows_recording_rules', action='store_true') - c.argument('disable_azuremonitormetrics', action='store_true', deprecate_info=c.deprecate(target='--disable-azuremonitormetrics', redirect='--disable-azure-monitor-metrics', hide=True)) - c.argument('disable_azure_monitor_metrics', action='store_true') - c.argument('enable_vpa', action='store_true', is_preview=True, help="enable vertical pod autoscaler for cluster") - c.argument('disable_vpa', action='store_true', is_preview=True, help="disable vertical pod autoscaler for cluster") - c.argument('cluster_snapshot_id', validator=validate_cluster_snapshot_id, is_preview=True) - c.argument('custom_ca_trust_certificates', options_list=["--custom-ca-trust-certificates", "--ca-certs"], validator=validate_custom_ca_trust_certificates, is_preview=True, help="path to file containing list of new line separated CAs") - c.argument('guardrails_level', arg_type=get_enum_type(guardrails_levels), is_preview=True) - c.argument('guardrails_version', help='The guardrails version', is_preview=True) - c.argument('guardrails_excluded_ns', is_preview=True) - c.argument('enable_network_observability', action='store_true', is_preview=True, help="enable network observability for cluster") - c.argument('disable_network_observability', action='store_true', is_preview=True, help="disable network observability for cluster") - c.argument('enable_cost_analysis', is_preview=True, action='store_true') - c.argument('disable_cost_analysis', is_preview=True, action='store_true') + c.argument( + "ssh_key_value", + type=file_type, + completer=FilesCompleter(), + validator=validate_ssh_key_for_update, + ) + c.argument("load_balancer_managed_outbound_ipv6_count", type=int) + c.argument("outbound_type", arg_type=get_enum_type(outbound_types)) + c.argument( + "enable_pod_security_policy", + action="store_true", + deprecate_info=c.deprecate( + target="--enable-pod-security-policy", hide=True + ), + ) + c.argument("disable_pod_security_policy", action="store_true", is_preview=True) + c.argument("enable_pod_identity", action="store_true") + c.argument("enable_pod_identity_with_kubenet", action="store_true") + c.argument("disable_pod_identity", action="store_true") + c.argument("enable_workload_identity", action="store_true", is_preview=True) + c.argument("disable_workload_identity", action="store_true", is_preview=True) + c.argument("enable_image_cleaner", action="store_true") + c.argument( + "disable_image_cleaner", + action="store_true", + validator=validate_image_cleaner_enable_disable_mutually_exclusive, + ) + c.argument("image_cleaner_interval_hours", type=int) + c.argument("disable_image_integrity", action="store_true", is_preview=True) + c.argument( + "enable_apiserver_vnet_integration", action="store_true", is_preview=True + ) + c.argument( + "apiserver_subnet_id", + validator=validate_apiserver_subnet_id, + is_preview=True, + ) + c.argument("enable_keda", action="store_true", is_preview=True) + c.argument("disable_keda", action="store_true", is_preview=True) + c.argument( + "enable_node_restriction", + action="store_true", + is_preview=True, + help="enable node restriction for cluster", + ) + c.argument( + "disable_node_restriction", + action="store_true", + is_preview=True, + help="disable node restriction for cluster", + ) + c.argument( + "enable_private_cluster", + action="store_true", + is_preview=True, + help="enable private cluster for apiserver vnet integration", + ) + c.argument( + "disable_private_cluster", + action="store_true", + is_preview=True, + help="disable private cluster for apiserver vnet integration", + ) + c.argument("private_dns_zone", is_preview=True) + c.argument( + "enable_azuremonitormetrics", + action="store_true", + deprecate_info=c.deprecate( + target="--enable-azuremonitormetrics", + redirect="--enable-azure-monitor-metrics", + hide=True, + ), + ) + c.argument("enable_azure_monitor_metrics", action="store_true") + c.argument( + "azure_monitor_workspace_resource_id", + validator=validate_azuremonitorworkspaceresourceid, + ) + c.argument("ksm_metric_labels_allow_list") + c.argument("ksm_metric_annotations_allow_list") + c.argument("grafana_resource_id", validator=validate_grafanaresourceid) + c.argument("enable_windows_recording_rules", action="store_true") + c.argument( + "disable_azuremonitormetrics", + action="store_true", + deprecate_info=c.deprecate( + target="--disable-azuremonitormetrics", + redirect="--disable-azure-monitor-metrics", + hide=True, + ), + ) + c.argument("disable_azure_monitor_metrics", action="store_true") + c.argument( + "enable_vpa", + action="store_true", + is_preview=True, + help="enable vertical pod autoscaler for cluster", + ) + c.argument( + "disable_vpa", + action="store_true", + is_preview=True, + help="disable vertical pod autoscaler for cluster", + ) + c.argument( + "cluster_snapshot_id", + validator=validate_cluster_snapshot_id, + is_preview=True, + ) + c.argument( + "custom_ca_trust_certificates", + options_list=["--custom-ca-trust-certificates", "--ca-certs"], + validator=validate_custom_ca_trust_certificates, + is_preview=True, + help="path to file containing list of new line separated CAs", + ) + c.argument( + "guardrails_level", + arg_type=get_enum_type(guardrails_levels), + is_preview=True, + ) + c.argument("guardrails_version", help="The guardrails version", is_preview=True) + c.argument("guardrails_excluded_ns", is_preview=True) + c.argument( + "enable_network_observability", + action="store_true", + is_preview=True, + help="enable network observability for cluster", + ) + c.argument( + "disable_network_observability", + action="store_true", + is_preview=True, + help="disable network observability for cluster", + ) + c.argument("enable_cost_analysis", is_preview=True, action="store_true") + c.argument("disable_cost_analysis", is_preview=True, action="store_true") # azure container storage - c.argument('enable_azure_container_storage', arg_type=get_enum_type(storage_pool_types), - help='enable azure container storage and define storage pool type') - c.argument('disable_azure_container_storage', action='store_true', - help='Flag to disable azure container storage') - c.argument('storage_pool_name', help='set storage pool name for azure container storage') - c.argument('storage_pool_size', help='set storage pool size for azure container storage') - c.argument('storage_pool_sku', arg_type=get_enum_type(storage_pool_skus), - help='set azure disk type storage pool sku for azure container storage') - c.argument('storage_pool_option', arg_type=get_enum_type(storage_pool_options), - help='set ephemeral disk storage pool option for azure container storage') - c.argument('azure_container_storage_nodepools', - help='define the comma separated nodepool list to install azure container storage') - c.argument('node_provisioning_mode', is_preview=True, arg_type=get_enum_type(node_provisioning_modes), - help='Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". For more information on "Auto" mode see aka.ms/aks/nap.') - - with self.argument_context('aks upgrade') as c: - c.argument('kubernetes_version', completer=get_k8s_upgrades_completion_list) - c.argument('cluster_snapshot_id', validator=validate_cluster_snapshot_id, is_preview=True) - c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') - - with self.argument_context('aks scale') as c: - c.argument('nodepool_name', help='Node pool name, upto 12 alphanumeric characters', validator=validate_nodepool_name) - - with self.argument_context('aks nodepool') as c: - c.argument('cluster_name', help='The cluster name.') - c.argument('nodepool_name', options_list=['--nodepool-name', '--name', '-n'], validator=validate_nodepool_name, help='The node pool name.') - - with self.argument_context('aks nodepool wait') as c: - c.argument('resource_name', options_list=['--cluster-name'], help='The cluster name.') + c.argument( + "enable_azure_container_storage", + arg_type=get_enum_type(storage_pool_types), + help="enable azure container storage and define storage pool type", + ) + c.argument( + "disable_azure_container_storage", + action="store_true", + help="Flag to disable azure container storage", + ) + c.argument( + "storage_pool_name", + help="set storage pool name for azure container storage", + ) + c.argument( + "storage_pool_size", + help="set storage pool size for azure container storage", + ) + c.argument( + "storage_pool_sku", + arg_type=get_enum_type(storage_pool_skus), + help="set azure disk type storage pool sku for azure container storage", + ) + c.argument( + "storage_pool_option", + arg_type=get_enum_type(storage_pool_options), + help="set ephemeral disk storage pool option for azure container storage", + ) + c.argument( + "azure_container_storage_nodepools", + help="define the comma separated nodepool list to install azure container storage", + ) + c.argument( + "node_provisioning_mode", + is_preview=True, + arg_type=get_enum_type(node_provisioning_modes), + help=( + 'Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". ' + 'For more information on "Auto" mode see aka.ms/aks/nap.' + ) + ) + + with self.argument_context("aks upgrade") as c: + c.argument("kubernetes_version", completer=get_k8s_upgrades_completion_list) + c.argument( + "cluster_snapshot_id", + validator=validate_cluster_snapshot_id, + is_preview=True, + ) + c.argument( + "yes", + options_list=["--yes", "-y"], + help="Do not prompt for confirmation.", + action="store_true", + ) + + with self.argument_context("aks scale") as c: + c.argument( + "nodepool_name", + help="Node pool name, upto 12 alphanumeric characters", + validator=validate_nodepool_name, + ) + + with self.argument_context("aks nodepool") as c: + c.argument("cluster_name", help="The cluster name.") + c.argument( + "nodepool_name", + options_list=["--nodepool-name", "--name", "-n"], + validator=validate_nodepool_name, + help="The node pool name.", + ) + + with self.argument_context("aks nodepool wait") as c: + c.argument( + "resource_name", options_list=["--cluster-name"], help="The cluster name." + ) # the option name '--agent-pool-name' is depracated, left for compatibility only - c.argument('agent_pool_name', options_list=['--nodepool-name', '--name', '-n', c.deprecate(target='--agent-pool-name', redirect='--nodepool-name', hide=True)], validator=validate_agent_pool_name, help='The node pool name.') - - with self.argument_context('aks nodepool add') as c: - c.argument('node_vm_size', options_list=['--node-vm-size', '-s'], completer=get_vm_size_completion_list) - c.argument('os_type') - c.argument('os_sku', arg_type=get_enum_type(node_os_skus), validator=validate_os_sku) - c.argument('snapshot_id', validator=validate_snapshot_id) - c.argument('vnet_subnet_id', validator=validate_vnet_subnet_id) - c.argument('pod_subnet_id', validator=validate_pod_subnet_id) - c.argument('enable_node_public_ip', action='store_true') - c.argument('node_public_ip_prefix_id') - c.argument('enable_cluster_autoscaler', options_list=["--enable-cluster-autoscaler", "-e"], action='store_true') - c.argument('min_count', type=int, validator=validate_nodes_count) - c.argument('max_count', type=int, validator=validate_nodes_count) - c.argument('priority', arg_type=get_enum_type(node_priorities), validator=validate_priority) - c.argument('eviction_policy', arg_type=get_enum_type(node_eviction_policies), validator=validate_eviction_policy) - c.argument('spot_max_price', type=float, validator=validate_spot_max_price) - c.argument('labels', nargs='*', validator=validate_nodepool_labels) - c.argument('tags', tags_type) - c.argument('node_taints', validator=validate_nodepool_taints) - c.argument('node_osdisk_type', arg_type=get_enum_type(node_os_disk_types)) - c.argument('node_osdisk_size', type=int) - c.argument('max_surge', validator=validate_max_surge) - c.argument('drain_timeout', type=int) - c.argument('node_soak_duration', type=int) - c.argument('mode', arg_type=get_enum_type(node_mode_types)) - c.argument('scale_down_mode', arg_type=get_enum_type(scale_down_modes)) - c.argument('max_pods', type=int, options_list=['--max-pods', '-m']) - c.argument('zones', zones_type, options_list=['--zones', '-z'], help='Space-separated list of availability zones where agent nodes will be placed.') - c.argument('ppg') - c.argument('vm_set_type', validator=validate_vm_set_type) - c.argument('enable_encryption_at_host', action='store_true') - c.argument('enable_ultra_ssd', action='store_true') - c.argument('enable_fips_image', action='store_true') - c.argument('kubelet_config') - c.argument('linux_os_config') - c.argument('host_group_id', validator=validate_host_group_id) - c.argument('gpu_instance_profile', arg_type=get_enum_type(gpu_instance_profiles)) + c.argument( + "agent_pool_name", + options_list=[ + "--nodepool-name", + "--name", + "-n", + c.deprecate( + target="--agent-pool-name", redirect="--nodepool-name", hide=True + ), + ], + validator=validate_agent_pool_name, + help="The node pool name.", + ) + + with self.argument_context("aks nodepool add") as c: + c.argument( + "node_vm_size", + options_list=["--node-vm-size", "-s"], + completer=get_vm_size_completion_list, + ) + c.argument("os_type") + c.argument( + "os_sku", arg_type=get_enum_type(node_os_skus), validator=validate_os_sku + ) + c.argument("snapshot_id", validator=validate_snapshot_id) + c.argument("vnet_subnet_id", validator=validate_vnet_subnet_id) + c.argument("pod_subnet_id", validator=validate_pod_subnet_id) + c.argument("enable_node_public_ip", action="store_true") + c.argument("node_public_ip_prefix_id") + c.argument( + "enable_cluster_autoscaler", + options_list=["--enable-cluster-autoscaler", "-e"], + action="store_true", + ) + c.argument("min_count", type=int, validator=validate_nodes_count) + c.argument("max_count", type=int, validator=validate_nodes_count) + c.argument( + "priority", + arg_type=get_enum_type(node_priorities), + validator=validate_priority, + ) + c.argument( + "eviction_policy", + arg_type=get_enum_type(node_eviction_policies), + validator=validate_eviction_policy, + ) + c.argument("spot_max_price", type=float, validator=validate_spot_max_price) + c.argument("labels", nargs="*", validator=validate_nodepool_labels) + c.argument("tags", tags_type) + c.argument("node_taints", validator=validate_nodepool_taints) + c.argument("node_osdisk_type", arg_type=get_enum_type(node_os_disk_types)) + c.argument("node_osdisk_size", type=int) + c.argument("max_surge", validator=validate_max_surge) + c.argument("drain_timeout", type=int) + c.argument("node_soak_duration", type=int) + c.argument("mode", arg_type=get_enum_type(node_mode_types)) + c.argument("scale_down_mode", arg_type=get_enum_type(scale_down_modes)) + c.argument("max_pods", type=int, options_list=["--max-pods", "-m"]) + c.argument( + "zones", + zones_type, + options_list=["--zones", "-z"], + help="Space-separated list of availability zones where agent nodes will be placed.", + ) + c.argument("ppg") + c.argument("vm_set_type", validator=validate_vm_set_type) + c.argument("enable_encryption_at_host", action="store_true") + c.argument("enable_ultra_ssd", action="store_true") + c.argument("enable_fips_image", action="store_true") + c.argument("kubelet_config") + c.argument("linux_os_config") + c.argument("host_group_id", validator=validate_host_group_id) + c.argument( + "gpu_instance_profile", arg_type=get_enum_type(gpu_instance_profiles) + ) # misc - c.argument('aks_custom_headers') + c.argument("aks_custom_headers") # extensions - c.argument('crg_id', validator=validate_crg_id, is_preview=True) - c.argument('message_of_the_day', validator=validate_message_of_the_day) - c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) - c.argument('enable_custom_ca_trust', action='store_true', validator=validate_enable_custom_ca_trust) - c.argument('disable_windows_outbound_nat', action='store_true', validator=validate_disable_windows_outbound_nat) - c.argument('allowed_host_ports', validator=validate_allowed_host_ports, is_preview=True) - c.argument('asg_ids', validator=validate_application_security_groups, is_preview=True) - c.argument('enable_artifact_streaming', action='store_true', validator=validate_artifact_streaming, is_preview=True) - c.argument('node_public_ip_tags', arg_type=tags_type, validator=validate_node_public_ip_tags, - help='space-separated tags: key[=value] [key[=value] ...].') - - with self.argument_context('aks nodepool update') as c: - c.argument('enable_cluster_autoscaler', options_list=[ - "--enable-cluster-autoscaler", "-e"], action='store_true') - c.argument('disable_cluster_autoscaler', options_list=[ - "--disable-cluster-autoscaler", "-d"], action='store_true') - c.argument('update_cluster_autoscaler', options_list=[ - "--update-cluster-autoscaler", "-u"], action='store_true') - c.argument('min_count', type=int, validator=validate_nodes_count) - c.argument('max_count', type=int, validator=validate_nodes_count) - c.argument('labels', nargs='*', validator=validate_nodepool_labels) - c.argument('tags', tags_type) - c.argument('node_taints', validator=validate_nodepool_taints) - c.argument('max_surge', validator=validate_max_surge) - c.argument('drain_timeout', type=int) - c.argument('node_soak_duration', type=int) - c.argument('mode', arg_type=get_enum_type(node_mode_types)) - c.argument('scale_down_mode', arg_type=get_enum_type(scale_down_modes)) + c.argument("crg_id", validator=validate_crg_id, is_preview=True) + c.argument("message_of_the_day", validator=validate_message_of_the_day) + c.argument( + "workload_runtime", + arg_type=get_enum_type(workload_runtimes), + default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, + ) + c.argument( + "enable_custom_ca_trust", + action="store_true", + validator=validate_enable_custom_ca_trust, + ) + c.argument( + "disable_windows_outbound_nat", + action="store_true", + validator=validate_disable_windows_outbound_nat, + ) + c.argument( + "allowed_host_ports", validator=validate_allowed_host_ports, is_preview=True + ) + c.argument( + "asg_ids", validator=validate_application_security_groups, is_preview=True + ) + c.argument( + "enable_artifact_streaming", + action="store_true", + validator=validate_artifact_streaming, + is_preview=True, + ) + c.argument( + "node_public_ip_tags", + arg_type=tags_type, + validator=validate_node_public_ip_tags, + help="space-separated tags: key[=value] [key[=value] ...].", + ) + + with self.argument_context("aks nodepool update") as c: + c.argument( + "enable_cluster_autoscaler", + options_list=["--enable-cluster-autoscaler", "-e"], + action="store_true", + ) + c.argument( + "disable_cluster_autoscaler", + options_list=["--disable-cluster-autoscaler", "-d"], + action="store_true", + ) + c.argument( + "update_cluster_autoscaler", + options_list=["--update-cluster-autoscaler", "-u"], + action="store_true", + ) + c.argument("min_count", type=int, validator=validate_nodes_count) + c.argument("max_count", type=int, validator=validate_nodes_count) + c.argument("labels", nargs="*", validator=validate_nodepool_labels) + c.argument("tags", tags_type) + c.argument("node_taints", validator=validate_nodepool_taints) + c.argument("max_surge", validator=validate_max_surge) + c.argument("drain_timeout", type=int) + c.argument("node_soak_duration", type=int) + c.argument("mode", arg_type=get_enum_type(node_mode_types)) + c.argument("scale_down_mode", arg_type=get_enum_type(scale_down_modes)) # extensions - c.argument('enable_custom_ca_trust', action='store_true', validator=validate_enable_custom_ca_trust) - c.argument('disable_custom_ca_trust', options_list=['--disable-custom-ca-trust', '--dcat'], action='store_true') - c.argument('allowed_host_ports', validator=validate_allowed_host_ports, is_preview=True) - c.argument('asg_ids', validator=validate_application_security_groups, is_preview=True) - c.argument('enable_artifact_streaming', action='store_true', validator=validate_artifact_streaming, is_preview=True) - c.argument('os_sku', arg_type=get_enum_type(node_os_skus_update), validator=validate_os_sku) - - with self.argument_context('aks nodepool upgrade') as c: - c.argument('max_surge', validator=validate_max_surge) - c.argument('drain_timeout', type=int) - c.argument('node_soak_duration', type=int) - c.argument('snapshot_id', validator=validate_snapshot_id) - c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') - c.argument('aks_custom_headers') - - with self.argument_context('aks nodepool delete') as c: - c.argument('ignore_pod_disruption_budget', options_list=[ - "--ignore-pod-disruption-budget", "-i"], action=get_three_state_flag(), is_preview=True, - help='delete an AKS nodepool by ignoring PodDisruptionBudget setting') - - with self.argument_context('aks machine') as c: - c.argument('cluster_name', help='The cluster name.') - c.argument('nodepool_name', validator=validate_nodepool_name, help='The node pool name.') - - with self.argument_context('aks machine show') as c: - c.argument('machine_name', help='to display specific information for all machines.') - - with self.argument_context('aks maintenanceconfiguration') as c: - c.argument('cluster_name', help='The cluster name.') - - for scope in ['aks maintenanceconfiguration add', 'aks maintenanceconfiguration update']: + c.argument( + "enable_custom_ca_trust", + action="store_true", + validator=validate_enable_custom_ca_trust, + ) + c.argument( + "disable_custom_ca_trust", + options_list=["--disable-custom-ca-trust", "--dcat"], + action="store_true", + ) + c.argument( + "allowed_host_ports", validator=validate_allowed_host_ports, is_preview=True + ) + c.argument( + "asg_ids", validator=validate_application_security_groups, is_preview=True + ) + c.argument( + "enable_artifact_streaming", + action="store_true", + validator=validate_artifact_streaming, + is_preview=True, + ) + c.argument( + "os_sku", + arg_type=get_enum_type(node_os_skus_update), + validator=validate_os_sku, + ) + + with self.argument_context("aks nodepool upgrade") as c: + c.argument("max_surge", validator=validate_max_surge) + c.argument("drain_timeout", type=int) + c.argument("node_soak_duration", type=int) + c.argument("snapshot_id", validator=validate_snapshot_id) + c.argument( + "yes", + options_list=["--yes", "-y"], + help="Do not prompt for confirmation.", + action="store_true", + ) + c.argument("aks_custom_headers") + + with self.argument_context("aks nodepool delete") as c: + c.argument( + "ignore_pod_disruption_budget", + options_list=["--ignore-pod-disruption-budget", "-i"], + action=get_three_state_flag(), + is_preview=True, + help="delete an AKS nodepool by ignoring PodDisruptionBudget setting", + ) + + with self.argument_context("aks machine") as c: + c.argument("cluster_name", help="The cluster name.") + c.argument( + "nodepool_name", + validator=validate_nodepool_name, + help="The node pool name.", + ) + + with self.argument_context("aks machine show") as c: + c.argument( + "machine_name", help="to display specific information for all machines." + ) + + with self.argument_context("aks maintenanceconfiguration") as c: + c.argument("cluster_name", help="The cluster name.") + + for scope in [ + "aks maintenanceconfiguration add", + "aks maintenanceconfiguration update", + ]: with self.argument_context(scope) as c: - c.argument('config_name', options_list=[ - '--name', '-n'], help='The config name.') - c.argument('config_file', help='The config json file.') - c.argument('weekday', help='Weekday on which maintenance can happen. e.g. Monday') - c.argument('start_hour', type=int, help='Maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am') - c.argument('schedule_type', arg_type=get_enum_type(schedule_types), - help='Schedule type for non-default maintenance configuration.') - c.argument('interval_days', type=int, help='The number of days between each set of occurrences for Daily schedule.') - c.argument('interval_weeks', type=int, help='The number of weeks between each set of occurrences for Weekly schedule.') - c.argument('interval_months', type=int, help='The number of months between each set of occurrences for AbsoluteMonthly or RelativeMonthly schedule.') - c.argument('day_of_week', help='Specify on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.') - c.argument('day_of_month', help='Specify on which date of the month the maintenance occurs for AbsoluteMonthly schedule.') - c.argument('week_index', arg_type=get_enum_type(week_indexes), - help='Specify on which instance of the weekday specified in --day-of-week the maintenance occurs for RelativeMonthly schedule.') - c.argument('duration_hours', options_list=['--duration'], type=int, - help='The length of maintenance window. The value ranges from 4 to 24 hours.') - c.argument('utc_offset', validator=validate_utc_offset, - help='The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.') - c.argument('start_date', validator=validate_start_date, - help='The date the maintenance window activates. e.g. 2023-01-01.') - c.argument('start_time', validator=validate_start_time, - help='The start time of the maintenance window. e.g. 09:30.') - - for scope in ['aks maintenanceconfiguration show', 'aks maintenanceconfiguration delete']: + c.argument( + "config_name", options_list=["--name", "-n"], help="The config name." + ) + c.argument("config_file", help="The config json file.") + c.argument( + "weekday", help="Weekday on which maintenance can happen. e.g. Monday" + ) + c.argument( + "start_hour", + type=int, + help="Maintenance start hour of 1 hour window on the weekday. e.g. 1 means 1:00am - 2:00am", + ) + c.argument( + "schedule_type", + arg_type=get_enum_type(schedule_types), + help="Schedule type for non-default maintenance configuration.", + ) + c.argument( + "interval_days", + type=int, + help="The number of days between each set of occurrences for Daily schedule.", + ) + c.argument( + "interval_weeks", + type=int, + help="The number of weeks between each set of occurrences for Weekly schedule.", + ) + c.argument( + "interval_months", + type=int, + help=( + "The number of months between each set of occurrences for AbsoluteMonthly or " + "RelativeMonthly schedule." + ) + ) + c.argument( + "day_of_week", + help="Specify on which day of the week the maintenance occurs for Weekly or RelativeMonthly schedule.", + ) + c.argument( + "day_of_month", + help="Specify on which date of the month the maintenance occurs for AbsoluteMonthly schedule.", + ) + c.argument( + "week_index", + arg_type=get_enum_type(week_indexes), + help=( + "Specify on which instance of the weekday specified in --day-of-week " + "the maintenance occurs for RelativeMonthly schedule." + ) + ) + c.argument( + "duration_hours", + options_list=["--duration"], + type=int, + help="The length of maintenance window. The value ranges from 4 to 24 hours.", + ) + c.argument( + "utc_offset", + validator=validate_utc_offset, + help="The UTC offset in format +/-HH:mm. e.g. -08:00 or +05:30.", + ) + c.argument( + "start_date", + validator=validate_start_date, + help="The date the maintenance window activates. e.g. 2023-01-01.", + ) + c.argument( + "start_time", + validator=validate_start_time, + help="The start time of the maintenance window. e.g. 09:30.", + ) + + for scope in [ + "aks maintenanceconfiguration show", + "aks maintenanceconfiguration delete", + ]: with self.argument_context(scope) as c: - c.argument('config_name', options_list=[ - '--name', '-n'], help='The config name.') - - with self.argument_context('aks addon show') as c: - c.argument('addon', options_list=[ - '--addon', '-a'], validator=validate_addon) - - with self.argument_context('aks addon enable') as c: - c.argument('addon', options_list=[ - '--addon', '-a'], validator=validate_addon) - c.argument('subnet_name', options_list=['--subnet-name', '-s']) - c.argument('enable_sgxquotehelper', action='store_true') - c.argument('osm_mesh_name', options_list=['--osm-mesh-name']) - c.argument('appgw_name', options_list=[ - '--appgw-name'], arg_group='Application Gateway') - c.argument('appgw_subnet_prefix', options_list=[ - '--appgw-subnet-prefix'], arg_group='Application Gateway', deprecate_info=c.deprecate(redirect='--appgw-subnet-cidr', hide=True)) - c.argument('appgw_subnet_cidr', options_list=[ - '--appgw-subnet-cidr'], arg_group='Application Gateway') - c.argument('appgw_id', options_list=[ - '--appgw-id'], arg_group='Application Gateway') - c.argument('appgw_subnet_id', options_list=[ - '--appgw-subnet-id'], arg_group='Application Gateway') - c.argument('appgw_watch_namespace', options_list=[ - '--appgw-watch-namespace'], arg_group='Application Gateway') - c.argument('enable_secret_rotation', action='store_true') - c.argument('rotation_poll_interval') - c.argument('workspace_resource_id') - c.argument('enable_msi_auth_for_monitoring', - arg_type=get_three_state_flag(), is_preview=True) - c.argument('enable_syslog', arg_type=get_three_state_flag(), is_preview=True) - c.argument('data_collection_settings', is_preview=True) - c.argument('dns_zone_resource_id', deprecate_info=c.deprecate(target='--dns-zone-resource-id', redirect='--dns-zone-resource-ids', hide=True)) - c.argument('dns_zone_resource_ids', is_preview=True) - - with self.argument_context('aks addon disable') as c: - c.argument('addon', options_list=[ - '--addon', '-a'], validator=validate_addon) - - with self.argument_context('aks addon update') as c: - c.argument('addon', options_list=[ - '--addon', '-a'], validator=validate_addon) - c.argument('subnet_name', options_list=['--subnet-name', '-s']) - c.argument('enable_sgxquotehelper', action='store_true') - c.argument('osm_mesh_name', options_list=['--osm-mesh-name']) - c.argument('appgw_name', options_list=[ - '--appgw-name'], arg_group='Application Gateway') - c.argument('appgw_subnet_prefix', options_list=[ - '--appgw-subnet-prefix'], arg_group='Application Gateway', deprecate_info=c.deprecate(redirect='--appgw-subnet-cidr', hide=True)) - c.argument('appgw_subnet_cidr', options_list=[ - '--appgw-subnet-cidr'], arg_group='Application Gateway') - c.argument('appgw_id', options_list=[ - '--appgw-id'], arg_group='Application Gateway') - c.argument('appgw_subnet_id', options_list=[ - '--appgw-subnet-id'], arg_group='Application Gateway') - c.argument('appgw_watch_namespace', options_list=[ - '--appgw-watch-namespace'], arg_group='Application Gateway') - c.argument('enable_secret_rotation', action='store_true') - c.argument('rotation_poll_interval') - c.argument('workspace_resource_id') - c.argument('enable_msi_auth_for_monitoring', - arg_type=get_three_state_flag(), is_preview=True) - c.argument('enable_syslog', arg_type=get_three_state_flag(), is_preview=True) - c.argument('data_collection_settings', is_preview=True) - c.argument('dns_zone_resource_id', deprecate_info=c.deprecate(target='--dns-zone-resource-id', redirect='--dns-zone-resource-ids', hide=True)) - c.argument('dns_zone_resource_ids', is_preview=True) - - with self.argument_context('aks disable-addons') as c: - c.argument('addons', options_list=['--addons', '-a'], validator=validate_addons) - - with self.argument_context('aks enable-addons') as c: - c.argument('addons', options_list=['--addons', '-a'], validator=validate_addons) - c.argument('subnet_name', options_list=['--subnet-name', '-s']) - c.argument('enable_sgxquotehelper', action='store_true') - c.argument('osm_mesh_name') - c.argument('appgw_name', arg_group='Application Gateway') - c.argument('appgw_subnet_prefix', arg_group='Application Gateway', deprecate_info=c.deprecate(redirect='--appgw-subnet-cidr', hide=True)) - c.argument('appgw_subnet_cidr', arg_group='Application Gateway') - c.argument('appgw_id', arg_group='Application Gateway') - c.argument('appgw_subnet_id', arg_group='Application Gateway') - c.argument('appgw_watch_namespace', arg_group='Application Gateway') - c.argument('enable_secret_rotation', action='store_true') - c.argument('rotation_poll_interval') - c.argument('workspace_resource_id') - c.argument('enable_msi_auth_for_monitoring', arg_type=get_three_state_flag(), is_preview=True) - c.argument('enable_syslog', arg_type=get_three_state_flag(), is_preview=True) - c.argument('data_collection_settings', is_preview=True) - c.argument('dns_zone_resource_id', deprecate_info=c.deprecate(target='--dns-zone-resource-id', redirect='--dns-zone-resource-ids', hide=True)) - c.argument('dns_zone_resource_ids', is_preview=True) - - with self.argument_context('aks get-credentials') as c: - c.argument('admin', options_list=['--admin', '-a'], default=False) - c.argument('context_name', options_list=['--context'], - help='If specified, overwrite the default context name.') - c.argument('user', options_list=[ - '--user', '-u'], default='clusterUser', validator=validate_user) - c.argument('path', options_list=['--file', '-f'], type=file_type, completer=FilesCompleter(), - default=os.path.join(os.path.expanduser('~'), '.kube', 'config')) - c.argument('public_fqdn', default=False, action='store_true') - c.argument('credential_format', options_list=['--format'], arg_type=get_enum_type(credential_formats)) - - with self.argument_context('aks pod-identity') as c: - c.argument('cluster_name', help='The cluster name.') - c.argument('aks_custom_headers', help='Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.') - - with self.argument_context('aks pod-identity add') as c: - c.argument('identity_name', options_list=['--name', '-n'], default=None, required=False, - help='The pod identity name. Generate if not specified.', - validator=validate_pod_identity_resource_name('identity_name', required=False)) - c.argument('identity_namespace', options_list=[ - '--namespace'], help='The pod identity namespace.') - c.argument('identity_resource_id', options_list=[ - '--identity-resource-id'], help='Resource id of the identity to use.') - c.argument('binding_selector', options_list=[ - '--binding-selector'], help='Optional binding selector to use.') - - with self.argument_context('aks pod-identity delete') as c: - c.argument('identity_name', options_list=['--name', '-n'], default=None, required=True, - help='The pod identity name.', - validator=validate_pod_identity_resource_name('identity_name', required=True)) - c.argument('identity_namespace', options_list=[ - '--namespace'], help='The pod identity namespace.') - - with self.argument_context('aks pod-identity exception add') as c: - c.argument('exc_name', options_list=['--name', '-n'], default=None, required=False, - help='The pod identity exception name. Generate if not specified.', - validator=validate_pod_identity_resource_name('exc_name', required=False)) - c.argument('exc_namespace', options_list=['--namespace'], required=True, - help='The pod identity exception namespace.', - validator=validate_pod_identity_resource_namespace) - c.argument('pod_labels', nargs='*', required=True, - help='space-separated labels: key=value [key=value ...].', - validator=validate_pod_identity_pod_labels) - - with self.argument_context('aks pod-identity exception delete') as c: - c.argument('exc_name', options_list=['--name', '-n'], required=True, - help='The pod identity exception name to remove.', - validator=validate_pod_identity_resource_name('exc_name', required=True)) - c.argument('exc_namespace', options_list=['--namespace'], required=True, - help='The pod identity exception namespace to remove.', - validator=validate_pod_identity_resource_namespace) - - with self.argument_context('aks pod-identity exception update') as c: - c.argument('exc_name', options_list=['--name', '-n'], required=True, - help='The pod identity exception name to remove.', - validator=validate_pod_identity_resource_name('exc_name', required=True)) - c.argument('exc_namespace', options_list=['--namespace'], required=True, - help='The pod identity exception namespace to remove.', - validator=validate_pod_identity_resource_namespace) - c.argument('pod_labels', nargs='*', required=True, - help='pod labels in key=value [key=value ...].', - validator=validate_pod_identity_pod_labels) - - for scope in ['aks nodepool snapshot create']: + c.argument( + "config_name", options_list=["--name", "-n"], help="The config name." + ) + + with self.argument_context("aks addon show") as c: + c.argument("addon", options_list=["--addon", "-a"], validator=validate_addon) + + with self.argument_context("aks addon enable") as c: + c.argument("addon", options_list=["--addon", "-a"], validator=validate_addon) + c.argument("subnet_name", options_list=["--subnet-name", "-s"]) + c.argument("enable_sgxquotehelper", action="store_true") + c.argument("osm_mesh_name", options_list=["--osm-mesh-name"]) + c.argument( + "appgw_name", options_list=["--appgw-name"], arg_group="Application Gateway" + ) + c.argument( + "appgw_subnet_prefix", + options_list=["--appgw-subnet-prefix"], + arg_group="Application Gateway", + deprecate_info=c.deprecate(redirect="--appgw-subnet-cidr", hide=True), + ) + c.argument( + "appgw_subnet_cidr", + options_list=["--appgw-subnet-cidr"], + arg_group="Application Gateway", + ) + c.argument( + "appgw_id", options_list=["--appgw-id"], arg_group="Application Gateway" + ) + c.argument( + "appgw_subnet_id", + options_list=["--appgw-subnet-id"], + arg_group="Application Gateway", + ) + c.argument( + "appgw_watch_namespace", + options_list=["--appgw-watch-namespace"], + arg_group="Application Gateway", + ) + c.argument("enable_secret_rotation", action="store_true") + c.argument("rotation_poll_interval") + c.argument("workspace_resource_id") + c.argument( + "enable_msi_auth_for_monitoring", + arg_type=get_three_state_flag(), + is_preview=True, + ) + c.argument("enable_syslog", arg_type=get_three_state_flag(), is_preview=True) + c.argument("data_collection_settings", is_preview=True) + c.argument( + "dns_zone_resource_id", + deprecate_info=c.deprecate( + target="--dns-zone-resource-id", + redirect="--dns-zone-resource-ids", + hide=True, + ), + ) + c.argument("dns_zone_resource_ids", is_preview=True) + + with self.argument_context("aks addon disable") as c: + c.argument("addon", options_list=["--addon", "-a"], validator=validate_addon) + + with self.argument_context("aks addon update") as c: + c.argument("addon", options_list=["--addon", "-a"], validator=validate_addon) + c.argument("subnet_name", options_list=["--subnet-name", "-s"]) + c.argument("enable_sgxquotehelper", action="store_true") + c.argument("osm_mesh_name", options_list=["--osm-mesh-name"]) + c.argument( + "appgw_name", options_list=["--appgw-name"], arg_group="Application Gateway" + ) + c.argument( + "appgw_subnet_prefix", + options_list=["--appgw-subnet-prefix"], + arg_group="Application Gateway", + deprecate_info=c.deprecate(redirect="--appgw-subnet-cidr", hide=True), + ) + c.argument( + "appgw_subnet_cidr", + options_list=["--appgw-subnet-cidr"], + arg_group="Application Gateway", + ) + c.argument( + "appgw_id", options_list=["--appgw-id"], arg_group="Application Gateway" + ) + c.argument( + "appgw_subnet_id", + options_list=["--appgw-subnet-id"], + arg_group="Application Gateway", + ) + c.argument( + "appgw_watch_namespace", + options_list=["--appgw-watch-namespace"], + arg_group="Application Gateway", + ) + c.argument("enable_secret_rotation", action="store_true") + c.argument("rotation_poll_interval") + c.argument("workspace_resource_id") + c.argument( + "enable_msi_auth_for_monitoring", + arg_type=get_three_state_flag(), + is_preview=True, + ) + c.argument("enable_syslog", arg_type=get_three_state_flag(), is_preview=True) + c.argument("data_collection_settings", is_preview=True) + c.argument( + "dns_zone_resource_id", + deprecate_info=c.deprecate( + target="--dns-zone-resource-id", + redirect="--dns-zone-resource-ids", + hide=True, + ), + ) + c.argument("dns_zone_resource_ids", is_preview=True) + + with self.argument_context("aks disable-addons") as c: + c.argument("addons", options_list=["--addons", "-a"], validator=validate_addons) + + with self.argument_context("aks enable-addons") as c: + c.argument("addons", options_list=["--addons", "-a"], validator=validate_addons) + c.argument("subnet_name", options_list=["--subnet-name", "-s"]) + c.argument("enable_sgxquotehelper", action="store_true") + c.argument("osm_mesh_name") + c.argument("appgw_name", arg_group="Application Gateway") + c.argument( + "appgw_subnet_prefix", + arg_group="Application Gateway", + deprecate_info=c.deprecate(redirect="--appgw-subnet-cidr", hide=True), + ) + c.argument("appgw_subnet_cidr", arg_group="Application Gateway") + c.argument("appgw_id", arg_group="Application Gateway") + c.argument("appgw_subnet_id", arg_group="Application Gateway") + c.argument("appgw_watch_namespace", arg_group="Application Gateway") + c.argument("enable_secret_rotation", action="store_true") + c.argument("rotation_poll_interval") + c.argument("workspace_resource_id") + c.argument( + "enable_msi_auth_for_monitoring", + arg_type=get_three_state_flag(), + is_preview=True, + ) + c.argument("enable_syslog", arg_type=get_three_state_flag(), is_preview=True) + c.argument("data_collection_settings", is_preview=True) + c.argument( + "dns_zone_resource_id", + deprecate_info=c.deprecate( + target="--dns-zone-resource-id", + redirect="--dns-zone-resource-ids", + hide=True, + ), + ) + c.argument("dns_zone_resource_ids", is_preview=True) + + with self.argument_context("aks get-credentials") as c: + c.argument("admin", options_list=["--admin", "-a"], default=False) + c.argument( + "context_name", + options_list=["--context"], + help="If specified, overwrite the default context name.", + ) + c.argument( + "user", + options_list=["--user", "-u"], + default="clusterUser", + validator=validate_user, + ) + c.argument( + "path", + options_list=["--file", "-f"], + type=file_type, + completer=FilesCompleter(), + default=os.path.join(os.path.expanduser("~"), ".kube", "config"), + ) + c.argument("public_fqdn", default=False, action="store_true") + c.argument( + "credential_format", + options_list=["--format"], + arg_type=get_enum_type(credential_formats), + ) + + with self.argument_context("aks pod-identity") as c: + c.argument("cluster_name", help="The cluster name.") + c.argument( + "aks_custom_headers", + help="Send custom headers. When specified, format should be Key1=Value1,Key2=Value2.", + ) + + with self.argument_context("aks pod-identity add") as c: + c.argument( + "identity_name", + options_list=["--name", "-n"], + default=None, + required=False, + help="The pod identity name. Generate if not specified.", + validator=validate_pod_identity_resource_name( + "identity_name", required=False + ), + ) + c.argument( + "identity_namespace", + options_list=["--namespace"], + help="The pod identity namespace.", + ) + c.argument( + "identity_resource_id", + options_list=["--identity-resource-id"], + help="Resource id of the identity to use.", + ) + c.argument( + "binding_selector", + options_list=["--binding-selector"], + help="Optional binding selector to use.", + ) + + with self.argument_context("aks pod-identity delete") as c: + c.argument( + "identity_name", + options_list=["--name", "-n"], + default=None, + required=True, + help="The pod identity name.", + validator=validate_pod_identity_resource_name( + "identity_name", required=True + ), + ) + c.argument( + "identity_namespace", + options_list=["--namespace"], + help="The pod identity namespace.", + ) + + with self.argument_context("aks pod-identity exception add") as c: + c.argument( + "exc_name", + options_list=["--name", "-n"], + default=None, + required=False, + help="The pod identity exception name. Generate if not specified.", + validator=validate_pod_identity_resource_name("exc_name", required=False), + ) + c.argument( + "exc_namespace", + options_list=["--namespace"], + required=True, + help="The pod identity exception namespace.", + validator=validate_pod_identity_resource_namespace, + ) + c.argument( + "pod_labels", + nargs="*", + required=True, + help="space-separated labels: key=value [key=value ...].", + validator=validate_pod_identity_pod_labels, + ) + + with self.argument_context("aks pod-identity exception delete") as c: + c.argument( + "exc_name", + options_list=["--name", "-n"], + required=True, + help="The pod identity exception name to remove.", + validator=validate_pod_identity_resource_name("exc_name", required=True), + ) + c.argument( + "exc_namespace", + options_list=["--namespace"], + required=True, + help="The pod identity exception namespace to remove.", + validator=validate_pod_identity_resource_namespace, + ) + + with self.argument_context("aks pod-identity exception update") as c: + c.argument( + "exc_name", + options_list=["--name", "-n"], + required=True, + help="The pod identity exception name to remove.", + validator=validate_pod_identity_resource_name("exc_name", required=True), + ) + c.argument( + "exc_namespace", + options_list=["--namespace"], + required=True, + help="The pod identity exception namespace to remove.", + validator=validate_pod_identity_resource_namespace, + ) + c.argument( + "pod_labels", + nargs="*", + required=True, + help="pod labels in key=value [key=value ...].", + validator=validate_pod_identity_pod_labels, + ) + + for scope in ["aks nodepool snapshot create"]: with self.argument_context(scope) as c: - c.argument('snapshot_name', options_list=[ - '--name', '-n'], required=True, help='The nodepool snapshot name.', validator=validate_snapshot_name) - c.argument('tags', tags_type) - c.argument('nodepool_id', required=True, - help='The nodepool id.', validator=validate_nodepool_id) - c.argument('aks_custom_headers') - - with self.argument_context('aks nodepool snapshot update') as c: - c.argument('snapshot_name', options_list=['--name', '-n'], help='The nodepool snapshot name.', validator=validate_snapshot_name) - c.argument('tags', tags_type, help='The tags to set to the snapshot.') - - for scope in ['aks nodepool snapshot show', 'aks nodepool snapshot delete']: + c.argument( + "snapshot_name", + options_list=["--name", "-n"], + required=True, + help="The nodepool snapshot name.", + validator=validate_snapshot_name, + ) + c.argument("tags", tags_type) + c.argument( + "nodepool_id", + required=True, + help="The nodepool id.", + validator=validate_nodepool_id, + ) + c.argument("aks_custom_headers") + + with self.argument_context("aks nodepool snapshot update") as c: + c.argument( + "snapshot_name", + options_list=["--name", "-n"], + help="The nodepool snapshot name.", + validator=validate_snapshot_name, + ) + c.argument("tags", tags_type, help="The tags to set to the snapshot.") + + for scope in ["aks nodepool snapshot show", "aks nodepool snapshot delete"]: with self.argument_context(scope) as c: - c.argument('snapshot_name', options_list=[ - '--name', '-n'], required=True, help='The nodepool snapshot name.', validator=validate_snapshot_name) - c.argument('yes', options_list=[ - '--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') - - for scope in ['aks snapshot create']: + c.argument( + "snapshot_name", + options_list=["--name", "-n"], + required=True, + help="The nodepool snapshot name.", + validator=validate_snapshot_name, + ) + c.argument( + "yes", + options_list=["--yes", "-y"], + help="Do not prompt for confirmation.", + action="store_true", + ) + + for scope in ["aks snapshot create"]: with self.argument_context(scope) as c: - c.argument('snapshot_name', options_list=[ - '--name', '-n'], required=True, help='The cluster snapshot name.', validator=validate_snapshot_name) - c.argument('tags', tags_type) - c.argument('cluster_id', required=True, - validator=validate_cluster_id, help='The cluster id.') - c.argument('aks_custom_headers') - - for scope in ['aks snapshot show', 'aks snapshot delete']: + c.argument( + "snapshot_name", + options_list=["--name", "-n"], + required=True, + help="The cluster snapshot name.", + validator=validate_snapshot_name, + ) + c.argument("tags", tags_type) + c.argument( + "cluster_id", + required=True, + validator=validate_cluster_id, + help="The cluster id.", + ) + c.argument("aks_custom_headers") + + for scope in ["aks snapshot show", "aks snapshot delete"]: with self.argument_context(scope) as c: - c.argument('snapshot_name', options_list=[ - '--name', '-n'], required=True, help='The cluster snapshot name.', validator=validate_snapshot_name) - c.argument('yes', options_list=[ - '--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') - - with self.argument_context('aks trustedaccess rolebinding') as c: - c.argument('cluster_name', help='The cluster name.') - - for scope in ['aks trustedaccess rolebinding show', 'aks trustedaccess rolebinding create', - 'aks trustedaccess rolebinding update', 'aks trustedaccess rolebinding delete']: + c.argument( + "snapshot_name", + options_list=["--name", "-n"], + required=True, + help="The cluster snapshot name.", + validator=validate_snapshot_name, + ) + c.argument( + "yes", + options_list=["--yes", "-y"], + help="Do not prompt for confirmation.", + action="store_true", + ) + + with self.argument_context("aks trustedaccess rolebinding") as c: + c.argument("cluster_name", help="The cluster name.") + + for scope in [ + "aks trustedaccess rolebinding show", + "aks trustedaccess rolebinding create", + "aks trustedaccess rolebinding update", + "aks trustedaccess rolebinding delete", + ]: with self.argument_context(scope) as c: - c.argument('role_binding_name', options_list=[ - '--name', '-n'], required=True, help='The role binding name.') - - with self.argument_context('aks trustedaccess rolebinding create') as c: - c.argument('roles', help='comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...') - c.argument('source_resource_id', options_list=['--source-resource-id', '-r', c.deprecate(target='-s', redirect='--source-resource-id', hide=True)], help='The source resource id of the binding') - - with self.argument_context('aks trustedaccess rolebinding update') as c: - c.argument('roles', help='comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...') - - with self.argument_context('aks mesh enable-ingress-gateway') as c: - c.argument('ingress_gateway_type', - arg_type=get_enum_type(ingress_gateway_types)) - - with self.argument_context('aks mesh disable-ingress-gateway') as c: - c.argument('ingress_gateway_type', - arg_type=get_enum_type(ingress_gateway_types)) - - with self.argument_context('aks mesh enable-egress-gateway') as c: - c.argument('egx_gtw_nodeselector', nargs='*', validator=validate_egress_gtw_nodeselector, required=False, default=None, - options_list=["--egress-gateway-nodeselector", "--egx-gtw-ns"]) - - with self.argument_context('aks mesh enable') as c: - c.argument('revision', validator=validate_azure_service_mesh_revision) - c.argument('key_vault_id') - c.argument('ca_cert_object_name') - c.argument('ca_key_object_name') - c.argument('root_cert_object_name') - c.argument('cert_chain_object_name') - - with self.argument_context('aks mesh get-revisions') as c: - c.argument('location', required=True, help='Location in which to discover available Azure Service Mesh revisions.') - - with self.argument_context('aks mesh upgrade start') as c: - c.argument('revision', validator=validate_azure_service_mesh_revision, required=True) - - with self.argument_context('aks approuting enable') as c: - c.argument('enable_kv', action='store_true') - c.argument('keyvault_id', options_list=[ - '--attach-kv']) - - with self.argument_context('aks approuting update') as c: - c.argument('keyvault_id', options_list=[ - '--attach-kv']) - c.argument('enable_kv', action='store_true') - - with self.argument_context('aks approuting zone add') as c: - c.argument('dns_zone_resource_ids', options_list=[ - '--ids'], required=True) - c.argument('attach_zones') - - with self.argument_context('aks approuting zone delete') as c: - c.argument('dns_zone_resource_ids', options_list=[ - '--ids'], required=True) - - with self.argument_context('aks approuting zone update') as c: - c.argument('dns_zone_resource_ids', options_list=[ - '--ids'], required=True) - c.argument('attach_zones') + c.argument( + "role_binding_name", + options_list=["--name", "-n"], + required=True, + help="The role binding name.", + ) + + with self.argument_context("aks trustedaccess rolebinding create") as c: + c.argument( + "roles", + help="comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...", + ) + c.argument( + "source_resource_id", + options_list=[ + "--source-resource-id", + "-r", + c.deprecate(target="-s", redirect="--source-resource-id", hide=True), + ], + help="The source resource id of the binding", + ) + + with self.argument_context("aks trustedaccess rolebinding update") as c: + c.argument( + "roles", + help="comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...", + ) + + with self.argument_context("aks mesh enable-ingress-gateway") as c: + c.argument( + "ingress_gateway_type", arg_type=get_enum_type(ingress_gateway_types) + ) + + with self.argument_context("aks mesh disable-ingress-gateway") as c: + c.argument( + "ingress_gateway_type", arg_type=get_enum_type(ingress_gateway_types) + ) + + with self.argument_context("aks mesh enable-egress-gateway") as c: + c.argument( + "egx_gtw_nodeselector", + nargs="*", + validator=validate_egress_gtw_nodeselector, + required=False, + default=None, + options_list=["--egress-gateway-nodeselector", "--egx-gtw-ns"], + ) + + with self.argument_context("aks mesh enable") as c: + c.argument("revision", validator=validate_azure_service_mesh_revision) + c.argument("key_vault_id") + c.argument("ca_cert_object_name") + c.argument("ca_key_object_name") + c.argument("root_cert_object_name") + c.argument("cert_chain_object_name") + + with self.argument_context("aks mesh get-revisions") as c: + c.argument( + "location", + required=True, + help="Location in which to discover available Azure Service Mesh revisions.", + ) + + with self.argument_context("aks mesh upgrade start") as c: + c.argument( + "revision", validator=validate_azure_service_mesh_revision, required=True + ) + + with self.argument_context("aks approuting enable") as c: + c.argument("enable_kv", action="store_true") + c.argument("keyvault_id", options_list=["--attach-kv"]) + + with self.argument_context("aks approuting update") as c: + c.argument("keyvault_id", options_list=["--attach-kv"]) + c.argument("enable_kv", action="store_true") + + with self.argument_context("aks approuting zone add") as c: + c.argument("dns_zone_resource_ids", options_list=["--ids"], required=True) + c.argument("attach_zones") + + with self.argument_context("aks approuting zone delete") as c: + c.argument("dns_zone_resource_ids", options_list=["--ids"], required=True) + + with self.argument_context("aks approuting zone update") as c: + c.argument("dns_zone_resource_ids", options_list=["--ids"], required=True) + c.argument("attach_zones") def _get_default_install_location(exe_name): system = platform.system() - if system == 'Windows': - home_dir = os.environ.get('USERPROFILE') + if system == "Windows": + home_dir = os.environ.get("USERPROFILE") if not home_dir: return None install_location = os.path.join( - home_dir, r'.azure-{0}\{0}.exe'.format(exe_name)) - elif system in ('Linux', 'Darwin'): - install_location = '/usr/local/bin/{}'.format(exe_name) + home_dir, f".azure-{exe_name}\\{exe_name}.exe" + ) + elif system in ("Linux", "Darwin"): + install_location = f"/usr/local/bin/{exe_name}" else: install_location = None return install_location diff --git a/src/aks-preview/azext_aks_preview/_podidentity.py b/src/aks-preview/azext_aks_preview/_podidentity.py index ec39ad3f7e0..da9ea60e1c6 100644 --- a/src/aks-preview/azext_aks_preview/_podidentity.py +++ b/src/aks-preview/azext_aks_preview/_podidentity.py @@ -62,7 +62,7 @@ def _fill_defaults_for_pod_identity_exceptions(pod_identity_exceptions): # which will be converted to `None` in response. This behavior will break the extension # when using 2021-10-01 version. As a workaround, we always back fill the empty dict value # before sending to the server side. - exc.pod_labels = dict() + exc.pod_labels = {} def _fill_defaults_for_pod_identity_profile(pod_identity_profile): @@ -115,8 +115,7 @@ def _ensure_managed_identity_operator_permission(cmd, instance, scope): elif instance.identity.type.lower() == 'systemassigned': cluster_identity_object_id = instance.identity.principal_id else: - raise CLIError('unsupported identity type: {}'.format( - instance.identity.type)) + raise CLIError(f"unsupported identity type: {instance.identity.type}") if cluster_identity_object_id is None: raise CLIError('unable to resolve cluster identity') @@ -126,7 +125,7 @@ def _ensure_managed_identity_operator_permission(cmd, instance, scope): scope = scope.lower() # list all assignments of the target identity (scope) that assigned to the cluster identity - filter_query = "atScope() and assignedTo('{}')".format(cluster_identity_object_id) + filter_query = f"atScope() and assignedTo('{cluster_identity_object_id}')" for i in assignments_client.list_for_scope(scope=scope, filter=filter_query): if not i.role_definition_id.lower().endswith(CONST_MANAGED_IDENTITY_OPERATOR_ROLE_ID): continue @@ -140,7 +139,7 @@ def _ensure_managed_identity_operator_permission(cmd, instance, scope): continue # already assigned - logger.debug('Managed Identity Opereator role has been assigned to {}'.format(i.scope)) + logger.debug('Managed Identity Opereator role has been assigned to %s', i.scope) return if not add_role_assignment(cmd, CONST_MANAGED_IDENTITY_OPERATOR_ROLE, cluster_identity_object_id, diff --git a/src/aks-preview/azext_aks_preview/_roleassignments.py b/src/aks-preview/azext_aks_preview/_roleassignments.py index 4edad68824a..b9aa28382a7 100644 --- a/src/aks-preview/azext_aks_preview/_roleassignments.py +++ b/src/aks-preview/azext_aks_preview/_roleassignments.py @@ -27,8 +27,7 @@ def add_role_assignment(cmd, role, service_principal_msi_id, is_service_principa from azure.cli.core import __version__ as core_version if core_version <= "2.45.0": return _add_role_assignment_old(cmd, role, service_principal_msi_id, is_service_principal, delay, scope) - else: - return _add_role_assignment_new(cmd, role, service_principal_msi_id, is_service_principal, delay, scope) + return _add_role_assignment_new(cmd, role, service_principal_msi_id, is_service_principal, delay, scope) # TODO(fuming): remove and replaced by import from azure.cli.command_modules.acs once dependency bumped to 2.47.0 diff --git a/src/aks-preview/azext_aks_preview/_validators.py b/src/aks-preview/azext_aks_preview/_validators.py index 060ce4c564c..c8bb1f8d1e4 100644 --- a/src/aks-preview/azext_aks_preview/_validators.py +++ b/src/aks-preview/azext_aks_preview/_validators.py @@ -11,8 +11,15 @@ from ipaddress import ip_network from math import isclose, isnan -import azure.cli.core.keys as keys -from azure.mgmt.containerservice.models import KubernetesSupportPlan +from azure.cli.core import keys +from azure.cli.core.azclierror import ( + ArgumentUsageError, + InvalidArgumentValueError, + MutuallyExclusiveArgumentError, + RequiredArgumentMissingError, +) +from azure.cli.core.commands.validators import validate_tag +from azure.cli.core.util import CLIError from azext_aks_preview._consts import ( ADDONS, CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IP, @@ -25,14 +32,6 @@ CONST_OS_SKU_MARINER, ) from azext_aks_preview._helpers import _fuzzy_match -from azure.cli.core.azclierror import ( - ArgumentUsageError, - InvalidArgumentValueError, - MutuallyExclusiveArgumentError, - RequiredArgumentMissingError, -) -from azure.cli.core.commands.validators import validate_tag -from azure.cli.core.util import CLIError from knack.log import get_logger logger = get_logger(__name__) @@ -46,7 +45,7 @@ def validate_ssh_key(namespace): content = string_or_file if os.path.exists(string_or_file): logger.info('Use existing SSH public key file: %s', string_or_file) - with open(string_or_file, 'r') as f: + with open(string_or_file, 'r', encoding="utf-8") as f: content = f.read() elif not keys.is_valid_ssh_rsa_public_key(content): if namespace.generate_ssh_keys: @@ -77,7 +76,7 @@ def validate_ssh_key_for_update(namespace): content = string_or_file if os.path.exists(string_or_file): logger.info('Use existing SSH public key file: %s', string_or_file) - with open(string_or_file, 'r') as f: + with open(string_or_file, 'r', encoding="utf-8") as f: content = f.read() elif not keys.is_valid_ssh_rsa_public_key(content): raise InvalidArgumentValueError('An RSA key file or key value must be supplied to SSH Key Value') @@ -159,8 +158,10 @@ def validate_ip_ranges(namespace): raise CLIError( "--api-server-authorized-ip-ranges cannot be IPv6 addresses") except ValueError: + # pylint: disable=raise-missing-from raise CLIError( - "--api-server-authorized-ip-ranges should be a list of IPv4 addresses or CIDRs") + "--api-server-authorized-ip-ranges should be a list of IPv4 addresses or CIDRs" + ) def _validate_nodepool_name(nodepool_name): @@ -208,7 +209,11 @@ def validate_sku_tier(namespace): if namespace.tier is not None: if namespace.tier == '': return - if namespace.tier.lower() not in (CONST_MANAGED_CLUSTER_SKU_TIER_FREE, CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD, CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM): + if namespace.tier.lower() not in ( + CONST_MANAGED_CLUSTER_SKU_TIER_FREE, + CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD, + CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM, + ): raise InvalidArgumentValueError("--tier can only be free, standard, or premium") @@ -236,7 +241,7 @@ def validate_taint(taint): return found = regex.findall(taint) if not found: - raise ArgumentUsageError('Invalid node taint: %s' % taint) + raise ArgumentUsageError(f'Invalid node taint: {taint}') def validate_priority(namespace): @@ -244,8 +249,7 @@ def validate_priority(namespace): if namespace.priority is not None: if namespace.priority == '': return - if namespace.priority != "Spot" and \ - namespace.priority != "Regular": + if namespace.priority not in ("Spot", "Regular"): raise CLIError("--priority can only be Spot or Regular") @@ -254,10 +258,8 @@ def validate_eviction_policy(namespace): if namespace.eviction_policy is not None: if namespace.eviction_policy == '': return - if namespace.eviction_policy != "Delete" and \ - namespace.eviction_policy != "Deallocate": - raise CLIError( - "--eviction-policy can only be Delete or Deallocate") + if namespace.eviction_policy not in ("Delete", "Deallocate"): + raise CLIError("--eviction-policy can only be Delete or Deallocate") def validate_spot_max_price(namespace): @@ -319,10 +321,14 @@ def _validate_subnet_id(subnet_id, name): def validate_load_balancer_backend_pool_type(namespace): """validate load balancer backend pool type""" if namespace.load_balancer_backend_pool_type is not None: - if namespace.load_balancer_backend_pool_type not in [CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IP, - CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IPCONFIGURATION]: + if namespace.load_balancer_backend_pool_type not in [ + CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IP, + CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IPCONFIGURATION, + ]: raise InvalidArgumentValueError( - f"Invalid Load Balancer Backend Pool Type {namespace.load_balancer_backend_pool_type}, supported values are nodeIP and nodeIPConfiguration") + f"Invalid Load Balancer Backend Pool Type {namespace.load_balancer_backend_pool_type}, " + "supported values are nodeIP and nodeIPConfiguration" + ) def validate_nodepool_tags(ns): @@ -404,7 +410,8 @@ def validate_label(label): kv = label.split('=') if len(kv) != 2: raise CLIError( - "Invalid label: %s. Label definition must be of format name=value." % label) + f"Invalid label: {label}. Label definition must be of format name=value." + ) name_parts = kv[0].split('/') if len(name_parts) == 1: name = name_parts[0] @@ -412,34 +419,45 @@ def validate_label(label): prefix = name_parts[0] if not prefix or len(prefix) > 253: raise CLIError( - "Invalid label: %s. Label prefix can't be empty or more than 253 chars." % label) + f"Invalid label: {label}. Label prefix can't be empty or more than 253 chars." + ) if not prefix_regex.match(prefix): - raise CLIError("Invalid label: %s. Prefix part a DNS-1123 label must consist of lower case alphanumeric " - "characters or '-', and must start and end with an alphanumeric character" % label) + raise CLIError( + f"Invalid label: {label}. Prefix part a DNS-1123 label must consist of lower case alphanumeric " + "characters or '-', and must start and end with an alphanumeric character" + ) name = name_parts[1] else: - raise CLIError("Invalid label: %s. A qualified name must consist of alphanumeric characters, '-', '_' " - "or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or " - "'my.name', or '123-abc') with an optional DNS subdomain prefix and '/' " - "(e.g. 'example.com/MyName')" % label) + raise CLIError( + f"Invalid label: {label}. A qualified name must consist of alphanumeric characters, '-', '_' " + "or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or " + "'my.name', or '123-abc') with an optional DNS subdomain prefix and '/' " + "(e.g. 'example.com/MyName')" + ) # validate label name if not name or len(name) > 63: raise CLIError( - "Invalid label: %s. Label name can't be empty or more than 63 chars." % label) + f"Invalid label: {label}. Label name can't be empty or more than 63 chars." + ) if not name_regex.match(name): - raise CLIError("Invalid label: %s. A qualified name must consist of alphanumeric characters, '-', '_' " - "or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or " - "'my.name', or '123-abc') with an optional DNS subdomain prefix and '/' (e.g. " - "'example.com/MyName')" % label) + raise CLIError( + f"Invalid label: {label}. A qualified name must consist of alphanumeric characters, '-', '_' " + "or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or " + "'my.name', or '123-abc') with an optional DNS subdomain prefix and '/' (e.g. " + "'example.com/MyName')" + ) # validate label value if len(kv[1]) > 63: raise CLIError( - "Invalid label: %s. Label must be more than 63 chars." % label) + f"Invalid label: {label}. Label must be more than 63 chars." + ) if not value_regex.match(kv[1]): - raise CLIError("Invalid label: %s. A valid label must be an empty string or consist of alphanumeric " - "characters, '-', '_' or '.', and must start and end with an alphanumeric character" % label) + raise CLIError( + f"Invalid label: {label}. A valid label must be an empty string or consist of alphanumeric " + "characters, '-', '_' or '.', and must start and end with an alphanumeric character" + ) return {kv[0]: kv[1]} @@ -456,6 +474,7 @@ def validate_max_surge(namespace): if int(int_or_percent) < 0: raise CLIError("--max-surge must be positive") except ValueError: + # pylint: disable=raise-missing-from raise CLIError("--max-surge should be an int or percentage") @@ -621,8 +640,10 @@ def validate_crg_id(namespace): def validate_azure_keyvault_kms_key_id(namespace): key_id = namespace.azure_keyvault_kms_key_id if key_id: - err_msg = '--azure-keyvault-kms-key-id is not a valid Key Vault key ID. ' \ - 'See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name' + err_msg = ( + "--azure-keyvault-kms-key-id is not a valid Key Vault key ID. " + "See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name" # pylint: disable=line-too-long + ) https_prefix = "https://" if not key_id.startswith(https_prefix): @@ -678,7 +699,9 @@ def validate_defender_disable_and_enable_parameters(namespace): def validate_force_upgrade_disable_and_enable_parameters(namespace): if namespace.disable_force_upgrade and namespace.enable_force_upgrade: - raise MutuallyExclusiveArgumentError('Providing both --disable-force-upgrade and --enable-force-upgrade flags is invalid') + raise MutuallyExclusiveArgumentError( + 'Providing both --disable-force-upgrade and --enable-force-upgrade flags is invalid' + ) def sanitize_resource_id(resource_id): @@ -695,8 +718,18 @@ def validate_azuremonitorworkspaceresourceid(namespace): if resource_id is None: return resource_id = sanitize_resource_id(resource_id) - if (bool(re.match(r'/subscriptions/.*/resourcegroups/.*/providers/microsoft.monitor/accounts/.*', resource_id))) is False: - raise ArgumentUsageError("--azure-monitor-workspace-resource-id not in the correct format. It should match `/subscriptions//resourceGroups//providers/microsoft.monitor/accounts/`") + if ( + bool( + re.match( + r"/subscriptions/.*/resourcegroups/.*/providers/microsoft.monitor/accounts/.*", + resource_id, + ) + ) + ) is False: + raise ArgumentUsageError( + "--azure-monitor-workspace-resource-id not in the correct format. It should match " + "`/subscriptions//resourceGroups//providers/microsoft.monitor/accounts/`" # pylint: disable=line-too-long + ) def validate_grafanaresourceid(namespace): @@ -704,8 +737,18 @@ def validate_grafanaresourceid(namespace): if resource_id is None: return resource_id = sanitize_resource_id(resource_id) - if (bool(re.match(r'/subscriptions/.*/resourcegroups/.*/providers/microsoft.dashboard/grafana/.*', resource_id))) is False: - raise ArgumentUsageError("--grafana-resource-id not in the correct format. It should match `/subscriptions//resourceGroups//providers/microsoft.dashboard/grafana/`") + if ( + bool( + re.match( + r"/subscriptions/.*/resourcegroups/.*/providers/microsoft.dashboard/grafana/.*", + resource_id, + ) + ) + ) is False: + raise ArgumentUsageError( + "--grafana-resource-id not in the correct format. It should match " + "`/subscriptions//resourceGroups//providers/microsoft.dashboard/grafana/`" # pylint: disable=line-too-long + ) def validate_allowed_host_ports(namespace): @@ -722,7 +765,8 @@ def validate_allowed_host_ports(namespace): if found: continue raise InvalidArgumentValueError( - "--allowed-host-ports must be a comma-separated list of port ranges in the format of /" + "--allowed-host-ports must be a comma-separated list of port ranges " + "in the format of /" ) @@ -747,7 +791,9 @@ def validate_utc_offset(namespace): utc_offset_regex = re.compile(r'^[+-]\d{2}:\d{2}$') found = utc_offset_regex.findall(namespace.utc_offset) if not found: - raise InvalidArgumentValueError('--utc-offset must be in format: "+/-HH:mm". For example, "+05:30" and "-12:00".') + raise InvalidArgumentValueError( + '--utc-offset must be in format: "+/-HH:mm". For example, "+05:30" and "-12:00".' + ) def validate_start_date(namespace): diff --git a/src/aks-preview/azext_aks_preview/addonconfiguration.py b/src/aks-preview/azext_aks_preview/addonconfiguration.py index d55f53a653d..1538649a91c 100644 --- a/src/aks-preview/azext_aks_preview/addonconfiguration.py +++ b/src/aks-preview/azext_aks_preview/addonconfiguration.py @@ -3,7 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import json from knack.log import get_logger from knack.util import CLIError from azure.cli.core.azclierror import ArgumentUsageError @@ -42,29 +41,32 @@ logger = get_logger(__name__) -def enable_addons(cmd, - client, - resource_group_name, - name, - addons, - check_enabled=True, - workspace_resource_id=None, - subnet_name=None, - appgw_name=None, - appgw_subnet_prefix=None, - appgw_subnet_cidr=None, - appgw_id=None, - appgw_subnet_id=None, - appgw_watch_namespace=None, - enable_sgxquotehelper=False, - enable_secret_rotation=False, - rotation_poll_interval=None, - no_wait=False, - dns_zone_resource_id=None, - dns_zone_resource_ids=None, - enable_msi_auth_for_monitoring=True, - enable_syslog=False, - data_collection_settings=None): +# pylint: disable=too-many-locals +def enable_addons( + cmd, + client, + resource_group_name, + name, + addons, + check_enabled=True, + workspace_resource_id=None, + subnet_name=None, + appgw_name=None, + appgw_subnet_prefix=None, + appgw_subnet_cidr=None, + appgw_id=None, + appgw_subnet_id=None, + appgw_watch_namespace=None, + enable_sgxquotehelper=False, + enable_secret_rotation=False, + rotation_poll_interval=None, + no_wait=False, + dns_zone_resource_id=None, + dns_zone_resource_ids=None, + enable_msi_auth_for_monitoring=True, + enable_syslog=False, + data_collection_settings=None +): instance = client.get(resource_group_name, name) # this is overwritten by _update_addons(), so the value needs to be recorded here msi_auth = False @@ -74,18 +76,33 @@ def enable_addons(cmd, enable_msi_auth_for_monitoring = False subscription_id = get_subscription_id(cmd.cli_ctx) - instance = update_addons(cmd, instance, subscription_id, resource_group_name, name, addons, enable=True, - check_enabled=check_enabled, - workspace_resource_id=workspace_resource_id, - enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, subnet_name=subnet_name, - appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, - appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, - appgw_watch_namespace=appgw_watch_namespace, - enable_sgxquotehelper=enable_sgxquotehelper, - enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, - dns_zone_resource_id=dns_zone_resource_id, dns_zone_resource_ids=dns_zone_resource_ids, - enable_syslog=enable_syslog, - data_collection_settings=data_collection_settings) + instance = update_addons( + cmd, + instance, + subscription_id, + resource_group_name, + name, + addons, + enable=True, + check_enabled=check_enabled, + workspace_resource_id=workspace_resource_id, + enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, + subnet_name=subnet_name, + appgw_name=appgw_name, + appgw_subnet_prefix=appgw_subnet_prefix, + appgw_subnet_cidr=appgw_subnet_cidr, + appgw_id=appgw_id, + appgw_subnet_id=appgw_subnet_id, + appgw_watch_namespace=appgw_watch_namespace, + enable_sgxquotehelper=enable_sgxquotehelper, + enable_secret_rotation=enable_secret_rotation, + rotation_poll_interval=rotation_poll_interval, + no_wait=no_wait, + dns_zone_resource_id=dns_zone_resource_id, + dns_zone_resource_ids=dns_zone_resource_ids, + enable_syslog=enable_syslog, + data_collection_settings=data_collection_settings, + ) if CONST_MONITORING_ADDON_NAME in instance.addon_profiles and instance.addon_profiles[ CONST_MONITORING_ADDON_NAME].enabled: @@ -95,21 +112,20 @@ def enable_addons(cmd, if not msi_auth: raise ArgumentUsageError( "--enable-msi-auth-for-monitoring can not be used on clusters with service principal auth.") - else: - # create a Data Collection Rule (DCR) and associate it with the cluster - ensure_container_insights_for_monitoring( - cmd, - instance.addon_profiles[CONST_MONITORING_ADDON_NAME], - subscription_id, - resource_group_name, - name, - instance.location, - aad_route=True, - create_dcr=True, - create_dcra=True, - enable_syslog=enable_syslog, - data_collection_settings=data_collection_settings - ) + # create a Data Collection Rule (DCR) and associate it with the cluster + ensure_container_insights_for_monitoring( + cmd, + instance.addon_profiles[CONST_MONITORING_ADDON_NAME], + subscription_id, + resource_group_name, + name, + instance.location, + aad_route=True, + create_dcr=True, + create_dcra=True, + enable_syslog=enable_syslog, + data_collection_settings=data_collection_settings + ) else: # monitoring addon will use legacy path if enable_syslog: @@ -163,31 +179,34 @@ def enable_addons(cmd, return result -def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements - instance, - subscription_id, - resource_group_name, - name, - addons, - enable, - check_enabled=True, - workspace_resource_id=None, - enable_msi_auth_for_monitoring=True, - subnet_name=None, - appgw_name=None, - appgw_subnet_prefix=None, - appgw_subnet_cidr=None, - appgw_id=None, - appgw_subnet_id=None, - appgw_watch_namespace=None, - enable_sgxquotehelper=False, - enable_secret_rotation=False, - rotation_poll_interval=None, - dns_zone_resource_id=None, - dns_zone_resource_ids=None, - no_wait=False, # pylint: disable=unused-argument - enable_syslog=False, - data_collection_settings=None): +# pylint: disable=too-many-locals, too-many-branches, too-many-statements +def update_addons( + cmd, + instance, + subscription_id, + resource_group_name, + name, + addons, + enable, + check_enabled=True, + workspace_resource_id=None, + enable_msi_auth_for_monitoring=True, + subnet_name=None, + appgw_name=None, + appgw_subnet_prefix=None, + appgw_subnet_cidr=None, + appgw_id=None, + appgw_subnet_id=None, + appgw_watch_namespace=None, + enable_sgxquotehelper=False, + enable_secret_rotation=False, + rotation_poll_interval=None, + dns_zone_resource_id=None, + dns_zone_resource_ids=None, + no_wait=False, # pylint: disable=unused-argument + enable_syslog=False, # pylint: disable=unused-argument + data_collection_settings=None, # pylint: disable=unused-argument +): # parse the comma-separated addons argument addon_args = addons.split(',') @@ -242,7 +261,7 @@ def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements continue if addon_arg not in ADDONS: - raise CLIError("Invalid addon name: {}.".format(addon_arg)) + raise CLIError(f"Invalid addon name: {addon_arg}.") addon = ADDONS[addon_arg] if addon == CONST_VIRTUAL_NODE_ADDON_NAME: # only linux is supported for now, in the future this will be a user flag @@ -274,13 +293,22 @@ def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements cloud_name = cmd.cli_ctx.cloud.name if enable_msi_auth_for_monitoring and (cloud_name.lower() == 'ussec' or cloud_name.lower() == 'usnat'): - if instance.identity is not None and instance.identity.type is not None and instance.identity.type == "userassigned": - logger.warning("--enable_msi_auth_for_monitoring is not supported in %s cloud and continuing monitoring enablement without this flag.", cloud_name) + if ( + instance.identity is not None and + instance.identity.type is not None and + instance.identity.type == "userassigned" + ): + logger.warning( + "--enable_msi_auth_for_monitoring is not supported in %s cloud and continuing " + "monitoring enablement without this flag.", cloud_name + ) enable_msi_auth_for_monitoring = False addon_profile.config = { logAnalyticsConstName: workspace_resource_id} - addon_profile.config[CONST_MONITORING_USING_AAD_MSI_AUTH] = "true" if enable_msi_auth_for_monitoring else "false" + addon_profile.config[CONST_MONITORING_USING_AAD_MSI_AUTH] = ( + "true" if enable_msi_auth_for_monitoring else "false" + ) elif addon == (CONST_VIRTUAL_NODE_ADDON_NAME + os_type): if addon_profile.enabled and check_enabled: raise CLIError('The virtual-node addon is already enabled for this managed cluster.\n' @@ -333,10 +361,11 @@ def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements elif addon == CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME: if addon_profile.enabled and check_enabled: raise CLIError( - 'The azure-keyvault-secrets-provider addon is already enabled for this managed cluster.\n' - 'To change azure-keyvault-secrets-provider configuration, run ' - f'"az aks disable-addons -a azure-keyvault-secrets-provider -n {name} -g {resource_group_name}" ' - 'before enabling it again.') + "The azure-keyvault-secrets-provider addon is already enabled for this managed cluster.\n" + "To change azure-keyvault-secrets-provider configuration, run " + '"az aks disable-addons -a azure-keyvault-secrets-provider ' + f'-n {name} -g {resource_group_name}" before enabling it again.' + ) addon_profile = ManagedClusterAddonProfile( enabled=True, config={CONST_SECRET_ROTATION_ENABLED: "false", CONST_ROTATION_POLL_INTERVAL: "2m"}) if enable_secret_rotation: @@ -352,7 +381,8 @@ def update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements enabled=False) else: raise CLIError( - "The addon {} is not installed.".format(addon)) + f"The addon {addon} is not installed." + ) addon_profiles[addon].config = None addon_profiles[addon].enabled = enable diff --git a/src/aks-preview/azext_aks_preview/agentpool_decorator.py b/src/aks-preview/azext_aks_preview/agentpool_decorator.py index fb5b1c029c1..d50f08f93ba 100644 --- a/src/aks-preview/azext_aks_preview/agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/agentpool_decorator.py @@ -32,9 +32,7 @@ CONST_VIRTUAL_MACHINE_SCALE_SETS, CONST_AVAILABILITY_SET, CONST_VIRTUAL_MACHINES, - CONST_OS_SKU_UBUNTU, ) -from azext_aks_preview._params import node_os_skus_update from azext_aks_preview._helpers import get_nodepool_snapshot_by_snapshot_id logger = get_logger(__name__) @@ -98,7 +96,9 @@ def get_vm_set_type(self) -> str: elif vm_set_type.lower() == CONST_VIRTUAL_MACHINES.lower(): vm_set_type = CONST_VIRTUAL_MACHINES else: - raise InvalidArgumentValueError("--vm-set-type can only be VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(Preview)") + raise InvalidArgumentValueError( + "--vm-set-type can only be VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(Preview)" + ) # this parameter does not need validation return vm_set_type @@ -132,9 +132,7 @@ def get_message_of_the_day(self) -> Union[str, None]: if message_of_the_day_file_path: if not os.path.isfile(message_of_the_day_file_path): raise InvalidArgumentValueError( - "{} is not valid file, or not accessable.".format( - message_of_the_day_file_path - ) + f"{message_of_the_day_file_path} is not valid file, or not accessable." ) message_of_the_day = read_file_content( message_of_the_day_file_path) @@ -507,7 +505,7 @@ def set_up_agentpool_windows_profile(self, agentpool: AgentPool) -> AgentPool: # Construct AgentPoolWindowsProfile if one of the fields has been set if disable_windows_outbound_nat: - agentpool.windows_profile = self.models.AgentPoolWindowsProfile( + agentpool.windows_profile = self.models.AgentPoolWindowsProfile( # pylint: disable=no-member disable_outbound_nat=disable_windows_outbound_nat ) @@ -518,7 +516,7 @@ def set_up_agentpool_network_profile(self, agentpool: AgentPool) -> AgentPool: asg_ids = self.context.get_asg_ids() allowed_host_ports = self.context.get_allowed_host_ports() - agentpool.network_profile = self.models.AgentPoolNetworkProfile() + agentpool.network_profile = self.models.AgentPoolNetworkProfile() # pylint: disable=no-member if allowed_host_ports is not None: agentpool.network_profile.allowed_host_ports = allowed_host_ports agentpool.network_profile.application_security_groups = asg_ids @@ -544,7 +542,9 @@ def set_up_artifact_streaming(self, agentpool: AgentPool) -> AgentPool: if self.context.get_enable_artifact_streaming(): if agentpool.artifact_streaming_profile is None: - agentpool.artifact_streaming_profile = self.models.AgentPoolArtifactStreamingProfile() + agentpool.artifact_streaming_profile = ( + self.models.AgentPoolArtifactStreamingProfile() # pylint: disable=no-member + ) agentpool.artifact_streaming_profile.enabled = True return agentpool @@ -584,7 +584,7 @@ def set_up_upgrade_settings(self, agentpool: AgentPool) -> AgentPool: """ self._ensure_agentpool(agentpool) - upgrade_settings = self.models.AgentPoolUpgradeSettings() + upgrade_settings = self.models.AgentPoolUpgradeSettings() # pylint: disable=no-member max_surge = self.context.get_max_surge() if max_surge: upgrade_settings.max_surge = max_surge @@ -654,7 +654,7 @@ def update_network_profile(self, agentpool: AgentPool) -> AgentPool: asg_ids = self.context.get_asg_ids() allowed_host_ports = self.context.get_allowed_host_ports() if not agentpool.network_profile and (asg_ids or allowed_host_ports): - agentpool.network_profile = self.models.AgentPoolNetworkProfile() + agentpool.network_profile = self.models.AgentPoolNetworkProfile() # pylint: disable=no-member if asg_ids is not None: agentpool.network_profile.application_security_groups = asg_ids if allowed_host_ports is not None: @@ -669,7 +669,7 @@ def update_artifact_streaming(self, agentpool: AgentPool) -> AgentPool: if self.context.get_enable_artifact_streaming(): if agentpool.artifact_streaming_profile is None: - agentpool.artifact_streaming_profile = self.models.AgentPoolArtifactStreamingProfile() + agentpool.artifact_streaming_profile = self.models.AgentPoolArtifactStreamingProfile() # pylint: disable=no-member agentpool.artifact_streaming_profile.enabled = True return agentpool @@ -714,7 +714,7 @@ def update_upgrade_settings(self, agentpool: AgentPool) -> AgentPool: upgrade_settings = agentpool.upgrade_settings if upgrade_settings is None: - upgrade_settings = self.models.AgentPoolUpgradeSettings() + upgrade_settings = self.models.AgentPoolUpgradeSettings() # pylint: disable=no-member max_surge = self.context.get_max_surge() if max_surge: diff --git a/src/aks-preview/azext_aks_preview/aks_diagnostics.py b/src/aks-preview/azext_aks_preview/aks_diagnostics.py index 6328e42c02b..95b81e70fd7 100644 --- a/src/aks-preview/azext_aks_preview/aks_diagnostics.py +++ b/src/aks-preview/azext_aks_preview/aks_diagnostics.py @@ -3,37 +3,37 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import colorama import datetime import json import os import subprocess import tempfile import time - -from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id -from azure.cli.command_modules.acs.custom import k8s_install_kubelogin -from azure.cli.command_modules.acs._params import _get_default_install_location from enum import Flag, auto -from knack.log import get_logger -from knack.prompting import prompt_y_n -from knack.util import CLIError -from msrestazure.azure_exceptions import CloudError -from packaging import version -from tabulate import tabulate +import colorama from azext_aks_preview._client_factory import cf_agent_pools, get_storage_client - from azext_aks_preview._consts import ( CONST_CONTAINER_NAME_MAX_LENGTH, - CONST_PERISCOPE_REPO_ORG, CONST_PERISCOPE_CONTAINER_REGISTRY, - CONST_PERISCOPE_RELEASE_TAG, CONST_PERISCOPE_IMAGE_VERSION, CONST_PERISCOPE_NAMESPACE, + CONST_PERISCOPE_RELEASE_TAG, + CONST_PERISCOPE_REPO_ORG, ) - -from azext_aks_preview._helpers import which, print_or_merge_credentials +from azext_aks_preview._helpers import print_or_merge_credentials, which +from azure.cli.command_modules.acs._params import _get_default_install_location +from azure.cli.command_modules.acs.custom import k8s_install_kubelogin +from azure.cli.core.commands.client_factory import ( + get_mgmt_service_client, + get_subscription_id, +) +from knack.log import get_logger +from knack.prompting import prompt_y_n +from knack.util import CLIError +from msrestazure.azure_exceptions import CloudError +from packaging import version +from tabulate import tabulate logger = get_logger(__name__) @@ -87,9 +87,9 @@ def aks_kollect_cmd(cmd, # pylint: disable=too-many-statements,too-many-local try: parsed_storage_account = parse_resource_id(storage_account_id) except CloudError as ex: - raise CLIError(ex.message) + raise CLIError(ex.message) # pylint: disable=raise-missing-from else: - raise CLIError("Invalid storage account id %s" % storage_account_id) + raise CLIError(f"Invalid storage account id {storage_account_id}") storage_account_name = parsed_storage_account['name'] @@ -133,11 +133,11 @@ def aks_kollect_cmd(cmd, # pylint: disable=too-many-statements,too-many-local return print() - print("Getting credentials for cluster %s " % name) + print(f"Getting credentials for cluster {name}") temp_kubeconfig_path = _get_temp_kubeconfig_path(cmd, client, resource_group_name, name, mc.aad_profile is not None) print() - print("Starts collecting diag info for cluster %s " % name) + print(f"Starts collecting diag info for cluster {name}") # Base the container name on the fqdn (or private fqdn) of the managed cluster container_name = _generate_container_name(mc.fqdn, mc.private_fqdn) @@ -193,7 +193,7 @@ def aks_kollect_cmd(cmd, # pylint: disable=too-many-statements,too-many-local subprocess.check_output(["kubectl", "--kubeconfig", temp_kubeconfig_path, "apply", "-k", kustomize_folder, "-n", CONST_PERISCOPE_NAMESPACE], stderr=subprocess.STDOUT) except subprocess.CalledProcessError as err: - raise CLIError(err.output) + raise CLIError(err.output) # pylint: disable=raise-missing-from finally: os.remove(kustomize_file_path) os.rmdir(kustomize_folder) @@ -322,9 +322,10 @@ def _get_storage_account_from_diag_settings(cli_ctx, resource_group_name, name): diag_settings_client = get_mgmt_service_client( cli_ctx, MonitorManagementClient).diagnostic_settings subscription_id = get_subscription_id(cli_ctx) - aks_resource_id = '/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ContainerService' \ - '/managedClusters/{2}'.format(subscription_id, - resource_group_name, name) + aks_resource_id = ( + f"/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/" + f"Microsoft.ContainerService/managedClusters/{name}" + ) diag_settings = diag_settings_client.list(aks_resource_id) for _, diag_setting in enumerate(diag_settings): if diag_setting: @@ -374,7 +375,7 @@ def _is_windows_hpc_supported(agent_pools): # The full (major.minor.patch) version *may* be stored in currentOrchestratorVersion. # If not, it'll be in orchestratorVersion. windows_k8s_versions = [p.current_orchestrator_version or p.orchestrator_version for p in agent_pools if p.os_type.casefold() == "Windows".casefold()] - return all([version.parse(v) >= version.parse("1.23.0") for v in windows_k8s_versions]) + return all((version.parse(v) >= version.parse("1.23.0") for v in windows_k8s_versions)) def _display_diagnostics_report(temp_kubeconfig_path): # pylint: disable=too-many-statements @@ -420,17 +421,15 @@ def _display_diagnostics_report(temp_kubeconfig_path): # pylint: disable=too-m if apd_lines and 'No resources found' in apd_lines[0]: apd_lines.pop(0) - print("Got {} diagnostic results for {} ready nodes{}\r".format(len(apd_lines), - len(ready_nodes), - '.' * retry), end='') + print(f"Got {len(apd_lines)} diagnostic results for {len(ready_nodes)} ready nodes{'.' * retry}\r", end='') if len(apd_lines) < len(ready_nodes): time.sleep(3) else: apds_created = True print() else: - for node_name in ready_nodes: - if ready_nodes[node_name]: + for node_name, node_ready in ready_nodes.items(): + if node_ready: continue apdName = "aks-periscope-diagnostic-" + node_name try: @@ -450,8 +449,10 @@ def _display_diagnostics_report(temp_kubeconfig_path): # pylint: disable=too-m node_name, network_status) if not network_config or not network_status: - print("The diagnostics information for node {} is not ready yet. " - "Will try again in 10 seconds.".format(node_name)) + print( + f"The diagnostics information for node {node_name} is not ready yet. " + "Will try again in 10 seconds." + ) time.sleep(10) break @@ -462,7 +463,7 @@ def _display_diagnostics_report(temp_kubeconfig_path): # pylint: disable=too-m network_status_object) ready_nodes[node_name] = True except subprocess.CalledProcessError as err: - raise CLIError(err.output) + raise CLIError(err.output) # pylint: disable=raise-missing-from print() if network_config_array: diff --git a/src/aks-preview/azext_aks_preview/aks_draft/commands.py b/src/aks-preview/azext_aks_preview/aks_draft/commands.py index 7df5c322201..18d53461716 100644 --- a/src/aks-preview/azext_aks_preview/aks_draft/commands.py +++ b/src/aks-preview/azext_aks_preview/aks_draft/commands.py @@ -4,19 +4,16 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import json -from posixpath import dirname -from typing import Dict, List, Optional, Tuple -import subprocess -import requests +import logging import os import platform +import subprocess from pathlib import Path +from typing import Dict, List, Optional, Tuple + +import requests +from azext_aks_preview._consts import CONST_DRAFT_CLI_VERSION from knack.prompting import prompt_y_n -import logging -from azext_aks_preview._consts import ( - CONST_DRAFT_CLI_VERSION -) # `az aks draft create` function @@ -147,10 +144,10 @@ def _run(binary_path: str, command: str, arguments: List[str]) -> bool: if binary_path is None: raise ValueError('The given Binary path was null or empty') - logging.info(f'Running `az aks draft {command}`') + logging.info("Running `az aks draft %s`", command) cmd = [binary_path, command] + arguments - process = subprocess.Popen(cmd) - exit_code = process.wait() + with subprocess.Popen(cmd) as process: + exit_code = process.wait() return exit_code == 0 @@ -189,25 +186,23 @@ def _binary_pre_check(download_path: str) -> Optional[str]: if response: return _download_binary() return draft_binary_path - else: # prompt the user to download binary - # If users says no, we error out and tell them that this requires the binary - msg = 'The required binary was not found. Would you like us to download the required binary for you?' - - if not prompt_y_n(msg, default='n'): - raise ValueError('`az aks draft` requires the missing dependency') - - return _download_binary() + # prompt the user to download binary + # If users says no, we error out and tell them that this requires the binary + msg = 'The required binary was not found. Would you like us to download the required binary for you?' + if not prompt_y_n(msg, default='n'): + raise ValueError('`az aks draft` requires the missing dependency') + return _download_binary() # Returns True if the local binary is the latest version, False otherwise def _is_latest_version(binary_path: str) -> bool: latest_version = CONST_DRAFT_CLI_VERSION - process = subprocess.Popen([binary_path, 'version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = process.communicate() + with subprocess.Popen([binary_path, 'version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) as process: + stdout, stderr = process.communicate() if stderr.decode(): return False # return string of result is "version: v0.0.x" - current_version = stdout.decode().split('\n')[0].strip().split()[-1] + current_version = stdout.decode().split('\n', maxsplit=1)[0].strip().split()[-1] return latest_version == current_version @@ -220,7 +215,9 @@ def _get_filename() -> Optional[str]: if architecture == 'x86_64': architecture = 'amd64' if architecture not in ['arm64', 'amd64']: - logging.error('Cannot find a suitable download for the current system architecture. Draft only supports AMD64 and ARM64.') + logging.error( + "Cannot find a suitable download for the current system architecture. Draft only supports AMD64 and ARM64." + ) return None file_suffix = ".exe" if operating_system == "windows" else "" @@ -243,7 +240,7 @@ def _get_existing_path() -> Optional[str]: for path in paths: binary_file_path = path + '/' + filename if os.path.exists(binary_file_path): - logging.info('Existing binary found at: ' + binary_file_path) + logging.info("Existing binary found at: %s", binary_file_path) return binary_file_path return None @@ -277,15 +274,15 @@ def _download_binary(download_path: str = '~/.aksdraft') -> Optional[str]: # Directory if os.path.exists(download_path) is False: Path(download_path).mkdir(parents=True, exist_ok=True) - logging.info(f'Directory {download_path} was created inside of your HOME directory') + logging.info("Directory %s was created inside of your HOME directory", download_path) full_path = f'{download_path}/{filename}' # Writing the file to the local file system with open(full_path, 'wb') as output_file: output_file.write(response.content) - logging.info(f'Download of Draft binary was successful with a status code: {response.status_code}') + logging.info("Download of Draft binary was successful with a status code: %s", response.status_code) os.chmod(full_path, 0o755) return full_path - logging.error(f'Download of Draft binary was unsuccessful with a status code: {response.status_code}') + logging.error("Download of Draft binary was unsuccessful with a status code: %s", response.status_code) return None diff --git a/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py b/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py index 1e258f18a40..6ce4aa7beb4 100644 --- a/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py +++ b/src/aks-preview/azext_aks_preview/azurecontainerstorage/_helpers.py @@ -3,12 +3,9 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.core.azclierror import UnknownError -from azure.cli.command_modules.acs._roleassignments import ( - add_role_assignment, - build_role_scope, - delete_role_assignments, -) +import time +from datetime import datetime + from azext_aks_preview._client_factory import get_providers_client_factory from azext_aks_preview.azurecontainerstorage._consts import ( CONST_ACSTOR_K8S_EXTENSION_NAME, @@ -16,25 +13,32 @@ CONST_K8S_EXTENSION_CLIENT_FACTORY_MOD_NAME, CONST_K8S_EXTENSION_CUSTOM_MOD_NAME, CONST_K8S_EXTENSION_NAME, - CONST_STORAGE_POOL_NAME_PREFIX, CONST_STORAGE_POOL_OPTION_NVME, CONST_STORAGE_POOL_TYPE_ELASTIC_SAN, CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK, RP_REGISTRATION_POLLING_INTERVAL_IN_SEC, ) - -from datetime import datetime +from azure.cli.command_modules.acs._roleassignments import ( + add_role_assignment, + build_role_scope, + delete_role_assignments, +) +from azure.cli.core.azclierror import UnknownError from knack.log import get_logger -import time logger = get_logger(__name__) def register_dependent_rps(cmd, subscription_id) -> bool: required_rp = 'Microsoft.KubernetesConfiguration' - from azure.mgmt.resource.resources.models import ProviderRegistrationRequest, ProviderConsentDefinition + from azure.mgmt.resource.resources.models import ( + ProviderConsentDefinition, ProviderRegistrationRequest) - properties = ProviderRegistrationRequest(third_party_provider_consent=ProviderConsentDefinition(consent_to_authorization=False)) + properties = ProviderRegistrationRequest( + third_party_provider_consent=ProviderConsentDefinition( + consent_to_authorization=False + ) + ) client = get_providers_client_factory(cmd.cli_ctx) is_registered = False try: @@ -50,16 +54,17 @@ def register_dependent_rps(cmd, subscription_id) -> bool: is_registered = _is_rp_registered(cmd, required_rp, subscription_id) time.sleep(RP_REGISTRATION_POLLING_INTERVAL_IN_SEC) if (datetime.utcnow() - start).seconds >= timeout_secs: - logger.error("Timed out while waiting for the {0} resource provider to be registered.".format(required_rp)) + logger.error( + "Timed out while waiting for the %s resource provider to be registered.", required_rp + ) break - except Exception as e: + except Exception as e: # pylint: disable=broad-except logger.error( - "Installation of Azure Container Storage requires registering to the following resource provider: {0}. " - "We were unable to perform the registration on your behalf due to the following error: {1}\n" - "Please check with your admin on permissions, " - "or try running registration manually with: `az provider register --namespace {0}` command." - .format(required_rp, e.msg) + "Installation of Azure Container Storage requires registering to the following resource provider: %s. " + "We were unable to perform the registration on your behalf due to the following error: %s\n" + "Please check with your admin on permissions, or try running registration manually with: " + "`az provider register --namespace %s` command.", required_rp, e, required_rp ) return is_registered @@ -75,7 +80,13 @@ def should_create_storagepool( agentpool_details, nodepool_name, ): - role_assignment_success = perform_role_operations_on_managed_rg(cmd, subscription_id, node_resource_group, kubelet_identity_object_id, True) + role_assignment_success = perform_role_operations_on_managed_rg( + cmd, + subscription_id, + node_resource_group, + kubelet_identity_object_id, + True + ) return_val = True if not role_assignment_success: @@ -108,7 +119,13 @@ def should_create_storagepool( return return_val -def perform_role_operations_on_managed_rg(cmd, subscription_id, node_resource_group, kubelet_identity_object_id, assign): +def perform_role_operations_on_managed_rg( + cmd, + subscription_id, + node_resource_group, + kubelet_identity_object_id, + assign +): managed_rg_role_scope = build_role_scope(node_resource_group, None, subscription_id) roles = ["Reader", "Network Contributor", "Elastic SAN Owner", "Elastic SAN Volume Group Owner"] result = True @@ -136,7 +153,7 @@ def perform_role_operations_on_managed_rg(cmd, subscription_id, node_resource_gr if not result: break - except Exception as ex: + except Exception: # pylint: disable=broad-except break else: return True @@ -156,8 +173,8 @@ def get_k8s_extension_module(module_name): from importlib import import_module azext_custom = import_module(module_name) return azext_custom - except ImportError as ie: - raise UnknownError( + except ImportError: + raise UnknownError( # pylint: disable=raise-missing-from "Please add CLI extension `k8s-extension` for performing Azure Container Storage operations.\n" "Run command `az extension add --name k8s-extension`" ) @@ -180,7 +197,7 @@ def check_if_extension_is_installed(cmd, resource_group, cluster_name) -> bool: extension_type = extension.extension_type.lower() if extension_type != CONST_ACSTOR_K8S_EXTENSION_NAME: return_val = False - except: + except: # pylint: disable=bare-except return_val = False return return_val diff --git a/src/aks-preview/azext_aks_preview/azurecontainerstorage/_validators.py b/src/aks-preview/azext_aks_preview/azurecontainerstorage/_validators.py index 7a1f4a5b98f..c54f035b2eb 100644 --- a/src/aks-preview/azext_aks_preview/azurecontainerstorage/_validators.py +++ b/src/aks-preview/azext_aks_preview/azurecontainerstorage/_validators.py @@ -3,23 +3,22 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +import re + from azext_aks_preview.azurecontainerstorage._consts import ( CONST_STORAGE_POOL_OPTION_SSD, CONST_STORAGE_POOL_SKU_PREMIUM_LRS, CONST_STORAGE_POOL_SKU_PREMIUM_ZRS, - CONST_STORAGE_POOL_TYPE_AZURE_DISK, - CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK, CONST_STORAGE_POOL_TYPE_ELASTIC_SAN, + CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK, ) - from azure.cli.core.azclierror import ( ArgumentUsageError, InvalidArgumentValueError, MutuallyExclusiveArgumentError, ) - from knack.log import get_logger -import re + elastic_san_supported_skus = [ CONST_STORAGE_POOL_SKU_PREMIUM_LRS, @@ -142,20 +141,25 @@ def _validate_enable_azure_container_storage_params( if storage_pool_sku is not None: if storage_pool_type == CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK: - raise ArgumentUsageError('Cannot set --storage-pool-sku when --enable-azure-container-storage is ephemeralDisk.') - elif storage_pool_type == CONST_STORAGE_POOL_TYPE_ELASTIC_SAN and \ - storage_pool_sku not in elastic_san_supported_skus: + raise ArgumentUsageError( + 'Cannot set --storage-pool-sku when --enable-azure-container-storage is ephemeralDisk.' + ) + if ( + storage_pool_type == CONST_STORAGE_POOL_TYPE_ELASTIC_SAN and + storage_pool_sku not in elastic_san_supported_skus + ): supported_skus_str = ", ".join(elastic_san_supported_skus) raise ArgumentUsageError( 'Invalid --storage-pool-sku value. ' - 'Supported value for --storage-pool-sku are {0} ' + f'Supported value for --storage-pool-sku are {supported_skus_str} ' 'when --enable-azure-container-storage is set to elasticSan.' - .format(supported_skus_str) ) if storage_pool_type != CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK and \ storage_pool_option is not None: - raise ArgumentUsageError('Cannot set --storage-pool-option when --enable-azure-container-storage is not ephemeralDisk.') + raise ArgumentUsageError( + 'Cannot set --storage-pool-option when --enable-azure-container-storage is not ephemeralDisk.' + ) if storage_pool_type == CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK and \ storage_pool_option == CONST_STORAGE_POOL_OPTION_SSD: @@ -171,25 +175,23 @@ def _validate_enable_azure_container_storage_params( 'Value for --storage-pool-size should be defined ' 'with size followed by Gi or Ti e.g. 512Gi or 2Ti.' ) - - else: - if storage_pool_type == CONST_STORAGE_POOL_TYPE_ELASTIC_SAN: - pool_size_qty = float(storage_pool_size[:-2]) - pool_size_unit = storage_pool_size[-2:] - - if ( - (pool_size_unit == "Gi" and pool_size_qty < 1024) or - (pool_size_unit == "Ti" and pool_size_qty < 1) - ): - raise ArgumentUsageError( - 'Value for --storage-pool-size must be at least 1Ti when ' - '--enable-azure-container-storage is elasticSan.') - - elif storage_pool_type == CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK: - logger.warning( - 'Storage pools using Ephemeral disk use all capacity available on the local device. ' - ' --storage-pool-size will be ignored.' - ) + if storage_pool_type == CONST_STORAGE_POOL_TYPE_ELASTIC_SAN: + pool_size_qty = float(storage_pool_size[:-2]) + pool_size_unit = storage_pool_size[-2:] + + if ( + (pool_size_unit == "Gi" and pool_size_qty < 1024) or + (pool_size_unit == "Ti" and pool_size_qty < 1) + ): + raise ArgumentUsageError( + 'Value for --storage-pool-size must be at least 1Ti when ' + '--enable-azure-container-storage is elasticSan.') + + elif storage_pool_type == CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK: + logger.warning( + 'Storage pools using Ephemeral disk use all capacity available on the local device. ' + ' --storage-pool-size will be ignored.' + ) def _validate_nodepool_names(nodepool_names, agentpool_details): @@ -210,19 +212,16 @@ def _validate_nodepool_names(nodepool_names, agentpool_details): if nodepool not in agentpool_details: if len(agentpool_details) > 1: raise InvalidArgumentValueError( - 'Nodepool: {0} not found. ' + f'Nodepool: {nodepool} not found. ' 'Please provide a comma separated string of existing nodepool names ' 'in --azure-container-storage-nodepools.' - '\nNodepools available in the cluster are: {1}.' + f"\nNodepools available in the cluster are: {', '.join(agentpool_details)}." '\nAborting installation of Azure Container Storage.' - .format(nodepool, ', '.join(agentpool_details)) - ) - else: - raise InvalidArgumentValueError( - 'Nodepool: {0} not found. ' - 'Please provide a comma separated string of existing nodepool names ' - 'in --azure-container-storage-nodepools.' - '\nNodepool available in the cluster is: {1}.' - '\nAborting installation of Azure Container Storage.' - .format(nodepool, agentpool_details[0]) ) + raise InvalidArgumentValueError( + f'Nodepool: {nodepool} not found. ' + 'Please provide a comma separated string of existing nodepool names ' + 'in --azure-container-storage-nodepools.' + f'\nNodepool available in the cluster is: {agentpool_details[0]}.' + '\nAborting installation of Azure Container Storage.' + ) diff --git a/src/aks-preview/azext_aks_preview/azurecontainerstorage/acstor_ops.py b/src/aks-preview/azext_aks_preview/azurecontainerstorage/acstor_ops.py index 837141c6cc4..669dd9273d4 100644 --- a/src/aks-preview/azext_aks_preview/azurecontainerstorage/acstor_ops.py +++ b/src/aks-preview/azext_aks_preview/azurecontainerstorage/acstor_ops.py @@ -20,14 +20,12 @@ CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK, ) from azext_aks_preview.azurecontainerstorage._helpers import ( - check_if_extension_is_installed, get_k8s_extension_module, perform_role_operations_on_managed_rg, register_dependent_rps, should_create_storagepool, ) from knack.log import get_logger -from knack.prompting import prompt_y_n logger = get_logger(__name__) @@ -139,16 +137,16 @@ def perform_enable_azure_container_storage( create_result = LongRunningOperation(cmd.cli_ctx)(result) if create_result.provisioning_state == "Succeeded": logger.warning("Azure Container Storage successfully installed.") - except Exception as ex: + except Exception as ex: # pylint: disable=broad-except if is_cluster_create: - logger.error("Azure Container Storage failed to install.\nError: {0}".format(ex.message)) + logger.error("Azure Container Storage failed to install.\nError: %s", ex) logger.warning( "AKS cluster is created. " "Please run `az aks update` along with `--enable-azure-container-storage` " "to enable Azure Container Storage." ) else: - logger.error("AKS update to enable Azure Container Storage failed.\nError: {0}".format(ex.message)) + logger.error("AKS update to enable Azure Container Storage failed.\nError: %s", ex) def perform_disable_azure_container_storage( @@ -194,7 +192,7 @@ def perform_disable_azure_container_storage( # we don't need to long wait while performing the delete operation. # Setting no_wait_delete_op = True. no_wait_delete_op = True - except Exception as ex: + except Exception as ex: # pylint: disable=broad-except config_settings = [{"cli.storagePool.uninstallValidation": False}] k8s_extension_custom_mod.update_k8s_extension( cmd, @@ -208,15 +206,16 @@ def perform_disable_azure_container_storage( no_wait=True, ) - if ex.message.__contains__("pre-upgrade hooks failed"): + if "pre-upgrade hooks failed" in str(ex): raise UnknownError( "Validation failed. " "Please ensure that storagepools are not being used. " "Unable to disable Azure Container Storage. " "Reseting cluster state." - ) - else: - raise UnknownError("Validation failed. Unable to disable Azure Container Storage. Reseting cluster state.") + ) from ex + raise UnknownError( + "Validation failed. Unable to disable Azure Container Storage. Reseting cluster state." + ) from ex # Step 2: If the extension is installed and validation succeeded or skipped, call delete_k8s_extension try: @@ -234,7 +233,9 @@ def perform_disable_azure_container_storage( if not no_wait_delete_op: LongRunningOperation(cmd.cli_ctx)(delete_op_result) except Exception as delete_ex: - raise UnknownError("Failure observed while disabling Azure Container Storage.\nError: {0}".format(delete_ex.message)) + raise UnknownError( + "Failure observed while disabling Azure Container Storage." + ) from delete_ex logger.warning("Azure Container Storage has been disabled.") diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/addonput.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/addonput.py index 4d40878f2e3..4d2241f8508 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/addonput.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/addonput.py @@ -4,7 +4,6 @@ # -------------------------------------------------------------------------------------------- import json from azext_aks_preview.azuremonitormetrics.constants import AKS_CLUSTER_API -from azure.cli.core.profiles import ResourceType from azure.cli.core.azclierror import ( UnknownError, CLIError @@ -14,13 +13,16 @@ def addon_put(cmd, cluster_subscription, cluster_resource_group_name, cluster_name): from azure.cli.core.util import send_raw_request armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - feature_check_url = f"{armendpoint}/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/Microsoft.ContainerService/managedClusters/{cluster_name}?api-version={AKS_CLUSTER_API}" + feature_check_url = ( + f"{armendpoint}/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.ContainerService/managedClusters/{cluster_name}?api-version={AKS_CLUSTER_API}" + ) try: headers = ['User-Agent=azuremonitormetrics.addon_get'] r = send_raw_request(cmd.cli_ctx, "GET", feature_check_url, body={}, headers=headers) except CLIError as e: - raise UnknownError(e) + raise UnknownError(e) from e json_response = json.loads(r.text) if "azureMonitorProfile" in json_response["properties"]: if "metrics" in json_response["properties"]["azureMonitorProfile"]: @@ -33,4 +35,4 @@ def addon_put(cmd, cluster_subscription, cluster_resource_group_name, cluster_na r = send_raw_request(cmd.cli_ctx, "PUT", feature_check_url, body=body, headers=headers) except CLIError as e: - raise UnknownError(e) + raise UnknownError(e) from e diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amg/link.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amg/link.py index af5f5ba64b1..bc05c60d22c 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amg/link.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amg/link.py @@ -21,37 +21,39 @@ def link_grafana_instance(cmd, raw_parameters, azure_monitor_workspace_resource_ if grafana_resource_id is None or grafana_resource_id == "": return GrafanaLink.NOPARAMPROVIDED grafana_resource_id = sanitize_resource_id(grafana_resource_id) - grafanaURI = "{0}{1}?api-version={2}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, - grafana_resource_id, - GRAFANA_API - ) + grafanaURI = f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{grafana_resource_id}?api-version={GRAFANA_API}" headers = ['User-Agent=azuremonitormetrics.link_grafana_instance'] grafanaArmResponse = send_raw_request(cmd.cli_ctx, "GET", grafanaURI, body={}, headers=headers) servicePrincipalId = grafanaArmResponse.json()["identity"]["principalId"] except CLIError as e: - raise CLIError(e) + raise CLIError(e) # pylint: disable=raise-missing-from # Add Role Assignment try: MonitoringDataReader = "b0d8363b-8ddd-447d-831f-62ca05bff136" - roleDefinitionURI = "{0}{1}/providers/Microsoft.Authorization/roleAssignments/{2}?api-version={3}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, - azure_monitor_workspace_resource_id, - uuid.uuid4(), - GRAFANA_ROLE_ASSIGNMENT_API + roleDefinitionURI = ( + f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{azure_monitor_workspace_resource_id}/providers/" + f"Microsoft.Authorization/roleAssignments/{uuid.uuid4()}?api-version={GRAFANA_ROLE_ASSIGNMENT_API}" + ) + roleDefinitionId = ( + f"{azure_monitor_workspace_resource_id}/providers/" + f"Microsoft.Authorization/roleDefinitions/{MonitoringDataReader}" ) - roleDefinitionId = "{0}/providers/Microsoft.Authorization/roleDefinitions/{1}".format( - azure_monitor_workspace_resource_id, - MonitoringDataReader + association_body = json.dumps( + { + "properties": { + "roleDefinitionId": roleDefinitionId, + "principalId": servicePrincipalId, + } + } ) - association_body = json.dumps({"properties": {"roleDefinitionId": roleDefinitionId, "principalId": servicePrincipalId}}) headers = ['User-Agent=azuremonitormetrics.add_role_assignment'] send_raw_request(cmd.cli_ctx, "PUT", roleDefinitionURI, body=association_body, headers=headers) except CLIError as e: if e.response.status_code != 409: - erroString = "Role Assingment failed. Please manually assign the `Monitoring Data Reader` role to the Azure Monitor Workspace ({0}) for the Azure Managed Grafana System Assigned Managed Identity ({1})".format( - azure_monitor_workspace_resource_id, - servicePrincipalId + erroString = ( + "Role Assingment failed. Please manually assign the `Monitoring Data Reader` role to " + f"the Azure Monitor Workspace ({azure_monitor_workspace_resource_id}) for the Azure Managed Grafana " + f"System Assigned Managed Identity ({servicePrincipalId})" ) print(erroString) # Setting up AMW Integration @@ -66,15 +68,15 @@ def link_grafana_instance(cmd, raw_parameters, azure_monitor_workspace_resource_ if amwIntegrations and azure_monitor_workspace_resource_id in json.dumps(amwIntegrations).lower(): return GrafanaLink.ALREADYPRESENT try: - grafanaURI = "{0}{1}?api-version={2}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, - grafana_resource_id, - GRAFANA_API + grafanaURI = f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{grafana_resource_id}?api-version={GRAFANA_API}" + targetGrafanaArmPayload["properties"]["grafanaIntegrations"][ + "azureMonitorWorkspaceIntegrations" + ].append( + {"azureMonitorWorkspaceResourceId": azure_monitor_workspace_resource_id} ) - targetGrafanaArmPayload["properties"]["grafanaIntegrations"]["azureMonitorWorkspaceIntegrations"].append({"azureMonitorWorkspaceResourceId": azure_monitor_workspace_resource_id}) targetGrafanaArmPayload = json.dumps(targetGrafanaArmPayload) headers = ['User-Agent=azuremonitormetrics.setup_amw_grafana_integration', 'Content-Type=application/json'] send_raw_request(cmd.cli_ctx, "PUT", grafanaURI, body=targetGrafanaArmPayload, headers=headers) except CLIError as e: - raise CLIError(e) + raise CLIError(e) # pylint: disable=raise-missing-from return GrafanaLink.SUCCESS diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/create.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/create.py index f861f037def..57e473ab64d 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/create.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/create.py @@ -4,18 +4,22 @@ # -------------------------------------------------------------------------------------------- import json -from azext_aks_preview.azuremonitormetrics.constants import MAC_API from azure.cli.command_modules.acs._client_factory import get_resource_groups_client, get_resources_client from azure.core.exceptions import HttpResponseError -from knack.util import CLIError +from azext_aks_preview.azuremonitormetrics.constants import MAC_API from azext_aks_preview.azuremonitormetrics.amw.defaults import get_default_mac_name_and_region +from knack.util import CLIError + def create_default_mac(cmd, cluster_subscription, cluster_region): from azure.cli.core.util import send_raw_request default_mac_name, default_mac_region = get_default_mac_name_and_region(cmd, cluster_region) - default_resource_group_name = "DefaultResourceGroup-{0}".format(default_mac_region) - azure_monitor_workspace_resource_id = "/subscriptions/{0}/resourceGroups/{1}/providers/microsoft.monitor/accounts/{2}".format(cluster_subscription, default_resource_group_name, default_mac_name) + default_resource_group_name = f"DefaultResourceGroup-{default_mac_region}" + azure_monitor_workspace_resource_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{default_resource_group_name}/providers/" + f"microsoft.monitor/accounts/{default_mac_name}" + ) # Check if default resource group exists or not, if it does not then create it resource_groups = get_resource_groups_client(cmd.cli_ctx, cluster_subscription) resources = get_resources_client(cmd.cli_ctx, cluster_subscription) diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/defaults.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/defaults.py index 5628ebb21f4..93675af571a 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/defaults.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/defaults.py @@ -4,7 +4,9 @@ # -------------------------------------------------------------------------------------------- import json from azext_aks_preview.azuremonitormetrics.deaults import get_default_region -from azext_aks_preview.azuremonitormetrics.responseparsers.amwlocationresponseparser import parseResourceProviderResponseForLocations +from azext_aks_preview.azuremonitormetrics.responseparsers.amwlocationresponseparser import ( + parseResourceProviderResponseForLocations, +) from azext_aks_preview.azuremonitormetrics.constants import RP_LOCATION_API from knack.util import CLIError diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/helper.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/helper.py index 41f8045679e..a860483b064 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/helper.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/amw/helper.py @@ -2,14 +2,11 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -import json from azext_aks_preview.azuremonitormetrics.amw.create import create_default_mac from azext_aks_preview.azuremonitormetrics.constants import MAC_API from azext_aks_preview.azuremonitormetrics.helper import sanitize_resource_id -from azure.cli.core.azclierror import ClientRequestError from azure.core.exceptions import HttpResponseError from azure.cli.command_modules.acs._client_factory import get_resources_client -from knack.util import CLIError def get_amw_region(cmd, azure_monitor_workspace_resource_id): @@ -27,7 +24,11 @@ def get_amw_region(cmd, azure_monitor_workspace_resource_id): def get_azure_monitor_workspace_resource(cmd, cluster_subscription, cluster_region, raw_parameters): azure_monitor_workspace_resource_id = raw_parameters.get("azure_monitor_workspace_resource_id") if not azure_monitor_workspace_resource_id: - azure_monitor_workspace_resource_id, azure_monitor_workspace_location = create_default_mac(cmd, cluster_subscription, cluster_region) + azure_monitor_workspace_resource_id, azure_monitor_workspace_location = create_default_mac( + cmd, + cluster_subscription, + cluster_region + ) else: azure_monitor_workspace_resource_id = sanitize_resource_id(azure_monitor_workspace_resource_id) azure_monitor_workspace_location = get_amw_region(cmd, azure_monitor_workspace_resource_id) diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/constants.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/constants.py index ca5e49a7d8a..cf2d999f8cd 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/constants.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/constants.py @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.core import CaseInsensitiveEnumMeta from enum import Enum -from six import with_metaclass + +from azure.core import CaseInsensitiveEnumMeta AKS_CLUSTER_API = "2023-01-01" MAC_API = "2023-04-03" @@ -70,7 +70,7 @@ } -class GrafanaLink(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class GrafanaLink(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ Status of Grafana link to the Prometheus Addon """ @@ -80,7 +80,7 @@ class GrafanaLink(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): NOPARAMPROVIDED = "NOPARAMPROVIDED" -class DC_TYPE(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class DC_TYPE(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ Types of DC* objects """ diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dce_api.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dce_api.py index 8d43bedd552..0b1b09ff35a 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dce_api.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dce_api.py @@ -5,14 +5,16 @@ import json from azext_aks_preview.azuremonitormetrics.constants import DC_API from azext_aks_preview.azuremonitormetrics.dc.defaults import get_default_dce_name -from azext_aks_preview.azuremonitormetrics.constants import DC_API from knack.util import CLIError def create_dce(cmd, cluster_subscription, cluster_resource_group_name, cluster_name, mac_region): from azure.cli.core.util import send_raw_request dce_name = get_default_dce_name(cmd, mac_region, cluster_name) - dce_resource_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Insights/dataCollectionEndpoints/{2}".format(cluster_subscription, cluster_resource_group_name, dce_name) + dce_resource_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.Insights/dataCollectionEndpoints/{dce_name}" + ) try: armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager dce_url = f"{armendpoint}{dce_resource_id}?api-version={DC_API}" diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcr_api.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcr_api.py index 9dae595df8e..e4d2e9c824e 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcr_api.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcr_api.py @@ -13,31 +13,60 @@ def get_default_dcr_name(cmd, mac_region, cluster_name): - region = get_default_region(cmd) - if mac_region in MapToClosestMACRegion: - region = MapToClosestMACRegion[mac_region] + region = MapToClosestMACRegion.get(mac_region, get_default_region(cmd)) default_dcr_name = "MSProm-" + region + "-" + cluster_name return sanitize_name(default_dcr_name, DC_TYPE.DCR, 64) -# pylint: disable=too-many-locals,too-many-branches,too-many-statements,line-too-long -def create_dcr(cmd, mac_region, azure_monitor_workspace_resource_id, cluster_subscription, cluster_resource_group_name, cluster_name, dce_resource_id): +# pylint: disable=too-many-locals,too-many-branches,too-many-statements +def create_dcr( + cmd, + mac_region, + azure_monitor_workspace_resource_id, + cluster_subscription, + cluster_resource_group_name, + cluster_name, + dce_resource_id +): from azure.cli.core.util import send_raw_request dcr_name = get_default_dcr_name(cmd, mac_region, cluster_name) - dcr_resource_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Insights/dataCollectionRules/{2}".format( - cluster_subscription, - cluster_resource_group_name, - dcr_name + dcr_resource_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.Insights/dataCollectionRules/{dcr_name}" + ) + dcr_creation_body = json.dumps( + { + "location": mac_region, + "kind": "Linux", + "properties": { + "dataCollectionEndpointId": dce_resource_id, + "dataSources": { + "prometheusForwarder": [ + { + "name": "PrometheusDataSource", + "streams": ["Microsoft-PrometheusMetrics"], + "labelIncludeFilter": {}, + } + ] + }, + "dataFlows": [ + { + "destinations": ["MonitoringAccount1"], + "streams": ["Microsoft-PrometheusMetrics"], + } + ], + "description": "DCR description", + "destinations": { + "monitoringAccounts": [ + { + "accountResourceId": azure_monitor_workspace_resource_id, + "name": "MonitoringAccount1", + } + ] + }, + }, + } ) - dcr_creation_body = json.dumps({"location": mac_region, - "kind": "Linux", - "properties": { - "dataCollectionEndpointId": dce_resource_id, - "dataSources": {"prometheusForwarder": [{"name": "PrometheusDataSource", "streams": ["Microsoft-PrometheusMetrics"], "labelIncludeFilter": {}}]}, - "dataFlows": [{"destinations": ["MonitoringAccount1"], "streams": ["Microsoft-PrometheusMetrics"]}], - "description": "DCR description", - "destinations": { - "monitoringAccounts": [{"accountResourceId": azure_monitor_workspace_resource_id, "name": "MonitoringAccount1"}]}}}) armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager dcr_url = f"{armendpoint}{dcr_resource_id}?api-version={DC_API}" try: diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcra_api.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcra_api.py index 1a5dd8a071b..c04f1c73d47 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcra_api.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/dcra_api.py @@ -10,25 +10,30 @@ def create_dcra(cmd, cluster_region, cluster_subscription, cluster_resource_group_name, cluster_name, dcr_resource_id): from azure.cli.core.util import send_raw_request - cluster_resource_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ContainerService/managedClusters/{2}".format( - cluster_subscription, - cluster_resource_group_name, - cluster_name + cluster_resource_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.ContainerService/managedClusters/{cluster_name}" ) dcra_name = get_default_dcra_name(cmd, cluster_region, cluster_name) - dcra_resource_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{2}".format( - cluster_subscription, - cluster_resource_group_name, - dcra_name + dcra_resource_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.Insights/dataCollectionRuleAssociations/{dcra_name}" ) # only create or delete the association between the DCR and cluster - association_body = json.dumps({"location": cluster_region, - "properties": { - "dataCollectionRuleId": dcr_resource_id, - "description": "Promtheus data collection association between DCR, DCE and target AKS resource" - }}) + association_body = json.dumps( + { + "location": cluster_region, + "properties": { + "dataCollectionRuleId": dcr_resource_id, + "description": "Promtheus data collection association between DCR, DCE and target AKS resource", + }, + } + ) armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - association_url = f"{armendpoint}{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{dcra_name}?api-version={DC_API}" + association_url = ( + f"{armendpoint}{cluster_resource_id}/providers/Microsoft.Insights/" + f"dataCollectionRuleAssociations/{dcra_name}?api-version={DC_API}" + ) try: headers = ['User-Agent=azuremonitormetrics.create_dcra'] send_raw_request(cmd.cli_ctx, "PUT", association_url, diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/defaults.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/defaults.py index b7b9d3ce41d..32dca05ecfa 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/defaults.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/defaults.py @@ -12,30 +12,26 @@ # DCR = 64, DCE = 44, DCRA = 64 # All DC* object names should end only in alpha numeric (after `length` trim) # DCE remove underscore from cluster name -def sanitize_name(name, type, length): +def sanitize_name(name, dc_type, length): length = length - 1 - if type == DC_TYPE.DCE: + if dc_type == DC_TYPE.DCE: name = name.replace("_", "") name = name[0:length] lastIndexAlphaNumeric = len(name) - 1 while ((name[lastIndexAlphaNumeric].isalnum() is False) and lastIndexAlphaNumeric > -1): lastIndexAlphaNumeric = lastIndexAlphaNumeric - 1 - if (lastIndexAlphaNumeric < 0): + if lastIndexAlphaNumeric < 0: return "" return name[0:lastIndexAlphaNumeric + 1] def get_default_dce_name(cmd, mac_region, cluster_name): - region = get_default_region(cmd) - if mac_region in MapToClosestMACRegion: - region = MapToClosestMACRegion[mac_region] + region = MapToClosestMACRegion.get(mac_region, get_default_region(cmd)) default_dce_name = "MSProm-" + region + "-" + cluster_name return sanitize_name(default_dce_name, DC_TYPE.DCE, 44) def get_default_dcra_name(cmd, cluster_region, cluster_name): - region = get_default_region(cmd) - if cluster_region in MapToClosestMACRegion: - region = MapToClosestMACRegion[cluster_region] + region = MapToClosestMACRegion.get(cluster_region, get_default_region(cmd)) default_dcra_name = "ContainerInsightsMetricsExtension-" + region + "-" + cluster_name return sanitize_name(default_dcra_name, DC_TYPE.DCRA, 64) diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/delete.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/delete.py index 0ec2dc3ad4b..94b94c42686 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/delete.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/dc/delete.py @@ -22,14 +22,15 @@ def get_dce_from_dcr(cmd, dcrId): def get_dc_objects_list(cmd, cluster_subscription, cluster_resource_group_name, cluster_name): try: from azure.cli.core.util import send_raw_request - cluster_resource_id = \ - "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ContainerService/managedClusters/{2}".format( - cluster_subscription, - cluster_resource_group_name, - cluster_name - ) + cluster_resource_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.ContainerService/managedClusters/{cluster_name}" + ) armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - association_url = f"{armendpoint}{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations?api-version={DC_API}" + association_url = ( + f"{armendpoint}{cluster_resource_id}/providers/" + f"Microsoft.Insights/dataCollectionRuleAssociations?api-version={DC_API}" + ) headers = ['User-Agent=azuremonitormetrics.get_dcra'] r = send_raw_request(cmd.cli_ctx, "GET", association_url, headers=headers) data = json.loads(r.text) @@ -37,18 +38,31 @@ def get_dc_objects_list(cmd, cluster_subscription, cluster_resource_group_name, for item in data['value']: if 'properties' in item and 'dataCollectionRuleId' in item['properties']: dce_id = get_dce_from_dcr(cmd, item['properties']['dataCollectionRuleId']) - dc_object_array.append({'name': item['name'], 'dataCollectionRuleId': item['properties']['dataCollectionRuleId'], 'dceId': dce_id}) + dc_object_array.append( + { + "name": item["name"], + "dataCollectionRuleId": item["properties"][ + "dataCollectionRuleId" + ], + "dceId": dce_id, + } + ) return dc_object_array except CLIError as e: - raise CLIError(e) + raise CLIError(e) # pylint: disable=raise-missing-from -def delete_dc_objects_if_prometheus_enabled(cmd, dc_objects_list, cluster_subscription, cluster_resource_group_name, cluster_name): +def delete_dc_objects_if_prometheus_enabled( + cmd, + dc_objects_list, + cluster_subscription, + cluster_resource_group_name, + cluster_name +): from azure.cli.core.util import send_raw_request - cluster_resource_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ContainerService/managedClusters/{2}".format( - cluster_subscription, - cluster_resource_group_name, - cluster_name + cluster_resource_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.ContainerService/managedClusters/{cluster_name}" ) for item in dc_objects_list: armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager @@ -57,10 +71,16 @@ def delete_dc_objects_if_prometheus_enabled(cmd, dc_objects_list, cluster_subscr headers = ['User-Agent=azuremonitormetrics.get_dcr_if_prometheus_enabled'] r = send_raw_request(cmd.cli_ctx, "GET", association_url, headers=headers) data = json.loads(r.text) - if 'microsoft-prometheusmetrics' in [stream.lower() for stream in data['properties']['dataFlows'][0]['streams']]: + if "microsoft-prometheusmetrics" in [ + stream.lower() + for stream in data["properties"]["dataFlows"][0]["streams"] + ]: # delete DCRA armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - url = f"{armendpoint}{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{item['name']}?api-version={DC_API}" + url = ( + f"{armendpoint}{cluster_resource_id}/providers/" + f"Microsoft.Insights/dataCollectionRuleAssociations/{item['name']}?api-version={DC_API}" + ) headers = ['User-Agent=azuremonitormetrics.delete_dcra'] send_raw_request(cmd.cli_ctx, "DELETE", url, headers=headers) # delete DCR @@ -73,4 +93,4 @@ def delete_dc_objects_if_prometheus_enabled(cmd, dc_objects_list, cluster_subscr send_raw_request(cmd.cli_ctx, "DELETE", url, headers=headers) except CLIError as e: error = e - raise CLIError(error) + raise CLIError(error) # pylint: disable=raise-missing-from diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/helper.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/helper.py index e4798326a69..348842c7036 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/helper.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/helper.py @@ -25,16 +25,13 @@ def sanitize_resource_id(resource_id): def post_request(cmd, subscription_id, rp_name, headers): from azure.cli.core.util import send_raw_request armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - customUrl = "{0}/subscriptions/{1}/providers/{2}/register?api-version={3}".format( - armendpoint, - subscription_id, - rp_name, - RP_API, + customUrl = ( + f"{armendpoint}/subscriptions/{subscription_id}/providers/{rp_name}/register?api-version={RP_API}" ) try: send_raw_request(cmd.cli_ctx, "POST", customUrl, headers=headers) except CLIError as e: - raise CLIError(e) + raise CLIError(e) # pylint: disable=raise-missing-from def rp_registrations(cmd, subscription_id): @@ -43,14 +40,13 @@ def rp_registrations(cmd, subscription_id): try: headers = ['User-Agent=azuremonitormetrics.get_mac_sub_list'] armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - customUrl = "{0}/subscriptions/{1}/providers?api-version={2}&$select=namespace,registrationstate".format( - armendpoint, - subscription_id, - RP_API + customUrl = ( + f"{armendpoint}/subscriptions/{subscription_id}/providers?" + f"api-version={RP_API}&$select=namespace,registrationstate" ) r = send_raw_request(cmd.cli_ctx, "GET", customUrl, headers=headers) except CLIError as e: - raise CLIError(e) + raise CLIError(e) # pylint: disable=raise-missing-from isInsightsRpRegistered = False isAlertsManagementRpRegistered = False isMoniotrRpRegistered = False @@ -58,13 +54,25 @@ def rp_registrations(cmd, subscription_id): json_response = json.loads(r.text) values_array = json_response["value"] for value in values_array: - if value["namespace"].lower() == "microsoft.insights" and value["registrationState"].lower() == "registered": + if ( + value["namespace"].lower() == "microsoft.insights" and + value["registrationState"].lower() == "registered" + ): isInsightsRpRegistered = True - if value["namespace"].lower() == "microsoft.alertsmanagement" and value["registrationState"].lower() == "registered": + if ( + value["namespace"].lower() == "microsoft.alertsmanagement" and + value["registrationState"].lower() == "registered" + ): isAlertsManagementRpRegistered = True - if value["namespace"].lower() == "microsoft.monitor" and value["registrationState"].lower() == "registered": + if ( + value["namespace"].lower() == "microsoft.monitor" and + value["registrationState"].lower() == "registered" + ): isAlertsManagementRpRegistered = True - if value["namespace"].lower() == "microsoft.dashboard" and value["registrationState"].lower() == "registered": + if ( + value["namespace"].lower() == "microsoft.dashboard" and + value["registrationState"].lower() == "registered" + ): isAlertsManagementRpRegistered = True if not isInsightsRpRegistered: headers = ['User-Agent=azuremonitormetrics.register_insights_rp'] @@ -83,16 +91,23 @@ def rp_registrations(cmd, subscription_id): def check_azuremonitormetrics_profile(cmd, cluster_subscription, cluster_resource_group_name, cluster_name): from azure.cli.core.util import send_raw_request armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - feature_check_url = f"{armendpoint}/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/Microsoft.ContainerService/managedClusters/{cluster_name}?api-version={AKS_CLUSTER_API}" + feature_check_url = ( + f"{armendpoint}/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.ContainerService/managedClusters/{cluster_name}?api-version={AKS_CLUSTER_API}" + ) try: headers = ['User-Agent=azuremonitormetrics.check_azuremonitormetrics_profile'] r = send_raw_request(cmd.cli_ctx, "GET", feature_check_url, body={}, headers=headers) except CLIError as e: - raise UnknownError(e) + raise UnknownError(e) from e json_response = json.loads(r.text) values_array = json_response["properties"] if "azureMonitorProfile" in values_array: if "metrics" in values_array["azureMonitorProfile"]: if values_array["azureMonitorProfile"]["metrics"]["enabled"] is True: - raise CLIError(f"Azure Monitor Metrics is already enabled for this cluster. Please use `az aks update --disable-azuremonitormetrics -g {cluster_resource_group_name} -n {cluster_name}` and then try enabling.") + raise CLIError( + "Azure Monitor Metrics is already enabled for this cluster. Please use " + f"`az aks update --disable-azuremonitormetrics -g {cluster_resource_group_name} -n {cluster_name}` " + "and then try enabling." + ) diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/create.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/create.py index ade47e2b85c..b17b2fb944f 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/create.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/create.py @@ -7,19 +7,31 @@ from knack.util import CLIError -# pylint: disable=line-too-long def get_recording_rules_template(cmd, azure_monitor_workspace_resource_id): from azure.cli.core.util import send_raw_request headers = ['User-Agent=azuremonitormetrics.get_recording_rules_template'] armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager - url = f"{armendpoint}{azure_monitor_workspace_resource_id}/providers/microsoft.alertsManagement/alertRuleRecommendations?api-version={ALERTS_API}" + url = ( + f"{armendpoint}{azure_monitor_workspace_resource_id}/providers/" + f"microsoft.alertsManagement/alertRuleRecommendations?api-version={ALERTS_API}" + ) r = send_raw_request(cmd.cli_ctx, "GET", url, headers=headers) data = json.loads(r.text) return data['value'] -# pylint: disable=line-too-long -def put_rules(cmd, default_rule_group_id, default_rule_group_name, mac_region, azure_monitor_workspace_resource_id, cluster_name, default_rules_template, url, enable_rules, i): +def put_rules( + cmd, + default_rule_group_id, + default_rule_group_name, + mac_region, + azure_monitor_workspace_resource_id, + cluster_name, + default_rules_template, + url, + enable_rules, + i, +): from azure.cli.core.util import send_raw_request body = json.dumps({ "id": default_rule_group_id, @@ -45,67 +57,97 @@ def put_rules(cmd, default_rule_group_id, default_rule_group_name, mac_region, a except CLIError as e: error = e else: - raise error + # TODO: where is error defined? + raise error # pylint: disable=used-before-assignment -# pylint: disable=line-too-long -def create_rules(cmd, cluster_subscription, cluster_resource_group_name, cluster_name, azure_monitor_workspace_resource_id, mac_region, raw_parameters): - # with urllib.request.urlopen("https://defaultrulessc.blob.core.windows.net/defaultrules/ManagedPrometheusDefaultRecordingRules.json") as url: - # default_rules_template = json.loads(url.read().decode()) +def create_rules( + cmd, + cluster_subscription, + cluster_resource_group_name, + cluster_name, + azure_monitor_workspace_resource_id, + mac_region, + raw_parameters, +): default_rules_template = get_recording_rules_template(cmd, azure_monitor_workspace_resource_id) - default_rule_group_name = "NodeRecordingRulesRuleGroup-{0}".format(cluster_name) - default_rule_group_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{2}".format( - cluster_subscription, - cluster_resource_group_name, - default_rule_group_name + default_rule_group_name = f"NodeRecordingRulesRuleGroup-{cluster_name}" + default_rule_group_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.AlertsManagement/prometheusRuleGroups/{default_rule_group_name}" ) - url = "{0}{1}?api-version={2}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, + url = f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{default_rule_group_id}?api-version={RULES_API}" + put_rules( + cmd, default_rule_group_id, - RULES_API + default_rule_group_name, + mac_region, + azure_monitor_workspace_resource_id, + cluster_name, + default_rules_template, + url, + True, + 0, ) - put_rules(cmd, default_rule_group_id, default_rule_group_name, mac_region, azure_monitor_workspace_resource_id, cluster_name, default_rules_template, url, True, 0) - default_rule_group_name = "KubernetesRecordingRulesRuleGroup-{0}".format(cluster_name) - default_rule_group_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{2}".format( - cluster_subscription, - cluster_resource_group_name, - default_rule_group_name + default_rule_group_name = f"KubernetesRecordingRulesRuleGroup-{cluster_name}" + default_rule_group_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.AlertsManagement/prometheusRuleGroups/{default_rule_group_name}" ) - url = "{0}{1}?api-version={2}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, + url = f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{default_rule_group_id}?api-version={RULES_API}" + put_rules( + cmd, default_rule_group_id, - RULES_API + default_rule_group_name, + mac_region, + azure_monitor_workspace_resource_id, + cluster_name, + default_rules_template, + url, + True, + 1, ) - put_rules(cmd, default_rule_group_id, default_rule_group_name, mac_region, azure_monitor_workspace_resource_id, cluster_name, default_rules_template, url, True, 1) enable_windows_recording_rules = raw_parameters.get("enable_windows_recording_rules") if enable_windows_recording_rules is not True: enable_windows_recording_rules = False - default_rule_group_name = "NodeRecordingRulesRuleGroup-Win-{0}".format(cluster_name) - default_rule_group_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{2}".format( - cluster_subscription, - cluster_resource_group_name, - default_rule_group_name + default_rule_group_name = f"NodeRecordingRulesRuleGroup-Win-{cluster_name}" + default_rule_group_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.AlertsManagement/prometheusRuleGroups/{default_rule_group_name}" ) - url = "{0}{1}?api-version={2}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, + url = f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{default_rule_group_id}?api-version={RULES_API}" + put_rules( + cmd, default_rule_group_id, - RULES_API + default_rule_group_name, + mac_region, + azure_monitor_workspace_resource_id, + cluster_name, + default_rules_template, + url, + enable_windows_recording_rules, + 2, ) - put_rules(cmd, default_rule_group_id, default_rule_group_name, mac_region, azure_monitor_workspace_resource_id, cluster_name, default_rules_template, url, enable_windows_recording_rules, 2) - default_rule_group_name = "NodeAndKubernetesRecordingRulesRuleGroup-Win-{0}".format(cluster_name) - default_rule_group_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{2}".format( - cluster_subscription, - cluster_resource_group_name, - default_rule_group_name + default_rule_group_name = f"NodeAndKubernetesRecordingRulesRuleGroup-Win-{cluster_name}" + default_rule_group_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.AlertsManagement/prometheusRuleGroups/{default_rule_group_name}" ) - url = "{0}{1}?api-version={2}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, + url = f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{default_rule_group_id}?api-version={RULES_API}" + put_rules( + cmd, default_rule_group_id, - RULES_API + default_rule_group_name, + mac_region, + azure_monitor_workspace_resource_id, + cluster_name, + default_rules_template, + url, + enable_windows_recording_rules, + 3, ) - put_rules(cmd, default_rule_group_id, default_rule_group_name, mac_region, azure_monitor_workspace_resource_id, cluster_name, default_rules_template, url, enable_windows_recording_rules, 3) diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/delete.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/delete.py index 0bd782ac3af..5a869997401 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/delete.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/recordingrules/delete.py @@ -7,22 +7,37 @@ def delete_rule(cmd, cluster_subscription, cluster_resource_group_name, default_rule_group_name): from azure.cli.core.util import send_raw_request - default_rule_group_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{2}".format( - cluster_subscription, - cluster_resource_group_name, - default_rule_group_name + default_rule_group_id = ( + f"/subscriptions/{cluster_subscription}/resourceGroups/{cluster_resource_group_name}/providers/" + f"Microsoft.AlertsManagement/prometheusRuleGroups/{default_rule_group_name}" ) headers = ['User-Agent=azuremonitormetrics.delete_rule.' + default_rule_group_name] - url = "{0}{1}?api-version={2}".format( - cmd.cli_ctx.cloud.endpoints.resource_manager, - default_rule_group_id, - RULES_API - ) + url = f"{cmd.cli_ctx.cloud.endpoints.resource_manager}{default_rule_group_id}?api-version={RULES_API}" send_raw_request(cmd.cli_ctx, "DELETE", url, headers=headers) def delete_rules(cmd, cluster_subscription, cluster_resource_group_name, cluster_name): - delete_rule(cmd, cluster_subscription, cluster_resource_group_name, "NodeRecordingRulesRuleGroup-{0}".format(cluster_name)) - delete_rule(cmd, cluster_subscription, cluster_resource_group_name, "KubernetesRecordingRulesRuleGroup-{0}".format(cluster_name)) - delete_rule(cmd, cluster_subscription, cluster_resource_group_name, "NodeRecordingRulesRuleGroup-Win-{0}".format(cluster_name)) - delete_rule(cmd, cluster_subscription, cluster_resource_group_name, "NodeAndKubernetesRecordingRulesRuleGroup-Win-{0}".format(cluster_name)) + delete_rule( + cmd, + cluster_subscription, + cluster_resource_group_name, + f"NodeRecordingRulesRuleGroup-{cluster_name}", + ) + delete_rule( + cmd, + cluster_subscription, + cluster_resource_group_name, + f"KubernetesRecordingRulesRuleGroup-{cluster_name}", + ) + delete_rule( + cmd, + cluster_subscription, + cluster_resource_group_name, + f"NodeRecordingRulesRuleGroup-Win-{cluster_name}", + ) + delete_rule( + cmd, + cluster_subscription, + cluster_resource_group_name, + f"NodeAndKubernetesRecordingRulesRuleGroup-Win-{cluster_name}", + ) diff --git a/src/aks-preview/azext_aks_preview/azuremonitormetrics/responseparsers/amwlocationresponseparser.py b/src/aks-preview/azext_aks_preview/azuremonitormetrics/responseparsers/amwlocationresponseparser.py index 0485fe9160f..98b9c48d0d1 100644 --- a/src/aks-preview/azext_aks_preview/azuremonitormetrics/responseparsers/amwlocationresponseparser.py +++ b/src/aks-preview/azext_aks_preview/azuremonitormetrics/responseparsers/amwlocationresponseparser.py @@ -17,9 +17,9 @@ def parseResourceProviderResponseForLocations(resourceProviderResponse): def parseLocations(locations: List[str]) -> List[str]: - if not locations or not len(locations): + if not locations or len(locations) == 0: return [] - return list(map(lambda location: reduceLocation(location), locations)) + return [reduceLocation(x) for x in locations] def reduceLocation(location: str) -> str: diff --git a/src/aks-preview/azext_aks_preview/commands.py b/src/aks-preview/azext_aks_preview/commands.py index 125e2914eb7..213c18539aa 100644 --- a/src/aks-preview/azext_aks_preview/commands.py +++ b/src/aks-preview/azext_aks_preview/commands.py @@ -13,7 +13,7 @@ cf_nodepool_snapshots, cf_trustedaccess_role, cf_trustedaccess_role_binding, - cf_machines + cf_machines, ) from azext_aks_preview._format import ( aks_addon_list_available_table_format, @@ -50,7 +50,7 @@ def transform_mc_objects_with_custom_cas(result): def _patch_custom_cas_in_security_profile(security_profile): # modify custom_ca_trust_certificates in-place # security_profile shouldn't be None - custom_cas = getattr(security_profile, 'custom_ca_trust_certificates', None) + custom_cas = getattr(security_profile, "custom_ca_trust_certificates", None) if custom_cas: decoded_custom_cas = [] for custom_ca in custom_cas: @@ -71,275 +71,347 @@ def _patch_custom_cas_in_security_profile(security_profile): result = [result] for r in result: - if getattr(r, 'security_profile', None): + if getattr(r, "security_profile", None): # security_profile shouldn't be None _patch_custom_cas_in_security_profile(r.security_profile) return result[0] if singular else result +# pylint: disable=too-many-statements def load_command_table(self, _): - managed_clusters_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._managed_clusters_operations#ManagedClustersOperations.{}', - operation_group='managed_clusters', - client_factory=cf_managed_clusters + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._managed_clusters_operations#ManagedClustersOperations.{}", + operation_group="managed_clusters", + client_factory=cf_managed_clusters, ) agent_pools_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._agent_pools_operations#AgentPoolsOperations.{}', - client_factory=cf_managed_clusters + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._agent_pools_operations#AgentPoolsOperations.{}", + client_factory=cf_managed_clusters, ) machines_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._machine_operations#MachinesOperations.{}', - client_factory=cf_managed_clusters + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._machine_operations#MachinesOperations.{}", + client_factory=cf_managed_clusters, ) maintenance_configuration_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._maintenance_configurations_operations#MaintenanceConfigurationsOperations.{}', - client_factory=cf_maintenance_configurations + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._maintenance_configurations_operations#MaintenanceConfigurationsOperations.{}", + client_factory=cf_maintenance_configurations, ) nodepool_snapshot_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._snapshots_operations#SnapshotsOperations.{}', - client_factory=cf_nodepool_snapshots + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._snapshots_operations#SnapshotsOperations.{}", + client_factory=cf_nodepool_snapshots, ) mc_snapshot_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._managed_clusters_snapshots_operations#ManagedClusterSnapshotsOperations.{}', - client_factory=cf_mc_snapshots + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._managed_clusters_snapshots_operations#ManagedClusterSnapshotsOperations.{}", + client_factory=cf_mc_snapshots, ) trustedaccess_role_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._trusted_access_roles_operations#TrustedAccessRolesOperations.{}', - client_factory=cf_trustedaccess_role + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._trusted_access_roles_operations#TrustedAccessRolesOperations.{}", + client_factory=cf_trustedaccess_role, ) trustedaccess_role_binding_sdk = CliCommandType( - operations_tmpl='azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.' - 'operations._trusted_access_role_bindings_operations#TrustedAccessRoleBindingsOperations.{}', - client_factory=cf_trustedaccess_role_binding + operations_tmpl="azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks." + "operations._trusted_access_role_bindings_operations#TrustedAccessRoleBindingsOperations.{}", + client_factory=cf_trustedaccess_role_binding, ) # AKS managed cluster commands - with self.command_group('aks', managed_clusters_sdk, client_factory=cf_managed_clusters, - transform=transform_mc_objects_with_custom_cas) as g: - g.custom_command('browse', 'aks_browse') - g.custom_command('create', 'aks_create', supports_no_wait=True) - g.custom_command('update', 'aks_update', supports_no_wait=True) - g.command('get-upgrades', 'get_upgrade_profile', table_transformer=aks_upgrades_table_format) - g.custom_command('upgrade', 'aks_upgrade', supports_no_wait=True) - g.custom_command('scale', 'aks_scale', supports_no_wait=True) - g.command('delete', 'begin_delete', supports_no_wait=True, confirmation=True) - g.custom_show_command('show', 'aks_show', table_transformer=aks_show_table_format) - g.custom_command('list', 'aks_list', table_transformer=aks_list_table_format) - g.custom_command('enable-addons', 'aks_enable_addons', supports_no_wait=True) - g.custom_command('disable-addons', 'aks_disable_addons', supports_no_wait=True) - g.custom_command('get-credentials', 'aks_get_credentials') - g.custom_command('rotate-certs', 'aks_rotate_certs', supports_no_wait=True, - confirmation='Kubernetes will be unavailable during certificate rotation process.\n' + - 'Are you sure you want to perform this operation?') - g.custom_command('stop', 'aks_stop', supports_no_wait=True) - g.command('start', 'begin_start', supports_no_wait=True) - g.wait_command('wait') - g.custom_command('get-versions', 'aks_get_versions', table_transformer=aks_versions_table_format) + with self.command_group( + "aks", + managed_clusters_sdk, + client_factory=cf_managed_clusters, + transform=transform_mc_objects_with_custom_cas, + ) as g: + g.custom_command("browse", "aks_browse") + g.custom_command("create", "aks_create", supports_no_wait=True) + g.custom_command("update", "aks_update", supports_no_wait=True) + g.command( + "get-upgrades", + "get_upgrade_profile", + table_transformer=aks_upgrades_table_format, + ) + g.custom_command("upgrade", "aks_upgrade", supports_no_wait=True) + g.custom_command("scale", "aks_scale", supports_no_wait=True) + g.command("delete", "begin_delete", supports_no_wait=True, confirmation=True) + g.custom_show_command( + "show", "aks_show", table_transformer=aks_show_table_format + ) + g.custom_command("list", "aks_list", table_transformer=aks_list_table_format) + g.custom_command("enable-addons", "aks_enable_addons", supports_no_wait=True) + g.custom_command("disable-addons", "aks_disable_addons", supports_no_wait=True) + g.custom_command("get-credentials", "aks_get_credentials") + g.custom_command( + "rotate-certs", + "aks_rotate_certs", + supports_no_wait=True, + confirmation="Kubernetes will be unavailable during certificate rotation process.\n" + + "Are you sure you want to perform this operation?", + ) + g.custom_command("stop", "aks_stop", supports_no_wait=True) + g.command("start", "begin_start", supports_no_wait=True) + g.wait_command("wait") + g.custom_command( + "get-versions", + "aks_get_versions", + table_transformer=aks_versions_table_format, + ) # aks-preview only - g.custom_command('kollect', 'aks_kollect') - g.custom_command('kanalyze', 'aks_kanalyze') - g.custom_command('get-os-options', 'aks_get_os_options') - g.custom_command('operation-abort', 'aks_operation_abort', supports_no_wait=True) + g.custom_command("kollect", "aks_kollect") + g.custom_command("kanalyze", "aks_kanalyze") + g.custom_command("get-os-options", "aks_get_os_options") + g.custom_command( + "operation-abort", "aks_operation_abort", supports_no_wait=True + ) # AKS maintenance configuration commands - with self.command_group('aks maintenanceconfiguration', maintenance_configuration_sdk, client_factory=cf_maintenance_configurations) as g: - g.custom_command('list', 'aks_maintenanceconfiguration_list') - g.custom_show_command('show', 'aks_maintenanceconfiguration_show') - g.custom_command('add', 'aks_maintenanceconfiguration_add') - g.custom_command('update', 'aks_maintenanceconfiguration_update') - g.custom_command('delete', 'aks_maintenanceconfiguration_delete') + with self.command_group( + "aks maintenanceconfiguration", + maintenance_configuration_sdk, + client_factory=cf_maintenance_configurations, + ) as g: + g.custom_command("list", "aks_maintenanceconfiguration_list") + g.custom_show_command("show", "aks_maintenanceconfiguration_show") + g.custom_command("add", "aks_maintenanceconfiguration_add") + g.custom_command("update", "aks_maintenanceconfiguration_update") + g.custom_command("delete", "aks_maintenanceconfiguration_delete") # AKS addon commands - with self.command_group('aks addon', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command('list-available', 'aks_addon_list_available', - table_transformer=aks_addon_list_available_table_format) - g.custom_command('list', 'aks_addon_list', - table_transformer=aks_addon_list_table_format) - g.custom_show_command('show', 'aks_addon_show', - table_transformer=aks_addon_show_table_format) - g.custom_command('enable', 'aks_addon_enable', supports_no_wait=True) - g.custom_command('disable', 'aks_addon_disable', supports_no_wait=True) - g.custom_command('update', 'aks_addon_update', supports_no_wait=True) + with self.command_group( + "aks addon", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command( + "list-available", + "aks_addon_list_available", + table_transformer=aks_addon_list_available_table_format, + ) + g.custom_command( + "list", "aks_addon_list", table_transformer=aks_addon_list_table_format + ) + g.custom_show_command( + "show", "aks_addon_show", table_transformer=aks_addon_show_table_format + ) + g.custom_command("enable", "aks_addon_enable", supports_no_wait=True) + g.custom_command("disable", "aks_addon_disable", supports_no_wait=True) + g.custom_command("update", "aks_addon_update", supports_no_wait=True) # AKS agent pool commands - with self.command_group('aks nodepool', agent_pools_sdk, client_factory=cf_agent_pools) as g: - g.custom_command('list', 'aks_agentpool_list', - table_transformer=aks_agentpool_list_table_format) - g.custom_show_command('show', 'aks_agentpool_show', - table_transformer=aks_agentpool_show_table_format) - g.custom_command('add', 'aks_agentpool_add', supports_no_wait=True) - g.custom_command('scale', 'aks_agentpool_scale', supports_no_wait=True) - g.custom_command('upgrade', 'aks_agentpool_upgrade', - supports_no_wait=True) - g.custom_command('update', 'aks_agentpool_update', - supports_no_wait=True) - g.custom_command('delete', 'aks_agentpool_delete', - supports_no_wait=True) - g.custom_command('get-upgrades', 'aks_agentpool_get_upgrade_profile') - g.custom_command('stop', 'aks_agentpool_stop', supports_no_wait=True) - g.custom_command('start', 'aks_agentpool_start', supports_no_wait=True) - g.custom_command('operation-abort', 'aks_agentpool_operation_abort', supports_no_wait=True) - - with self.command_group('aks machine', machines_sdk, client_factory=cf_machines) as g: - g.custom_command('list', 'aks_machine_list', - table_transformer=aks_machine_list_table_format) - g.custom_show_command('show', 'aks_machine_show', - table_transformer=aks_machine_show_table_format) + with self.command_group( + "aks nodepool", agent_pools_sdk, client_factory=cf_agent_pools + ) as g: + g.custom_command( + "list", + "aks_agentpool_list", + table_transformer=aks_agentpool_list_table_format, + ) + g.custom_show_command( + "show", + "aks_agentpool_show", + table_transformer=aks_agentpool_show_table_format, + ) + g.custom_command("add", "aks_agentpool_add", supports_no_wait=True) + g.custom_command("scale", "aks_agentpool_scale", supports_no_wait=True) + g.custom_command("upgrade", "aks_agentpool_upgrade", supports_no_wait=True) + g.custom_command("update", "aks_agentpool_update", supports_no_wait=True) + g.custom_command("delete", "aks_agentpool_delete", supports_no_wait=True) + g.custom_command("get-upgrades", "aks_agentpool_get_upgrade_profile") + g.custom_command("stop", "aks_agentpool_stop", supports_no_wait=True) + g.custom_command("start", "aks_agentpool_start", supports_no_wait=True) + g.custom_command( + "operation-abort", "aks_agentpool_operation_abort", supports_no_wait=True + ) + + with self.command_group( + "aks machine", machines_sdk, client_factory=cf_machines + ) as g: + g.custom_command( + "list", "aks_machine_list", table_transformer=aks_machine_list_table_format + ) + g.custom_show_command( + "show", "aks_machine_show", table_transformer=aks_machine_show_table_format + ) # AKS draft commands - with self.command_group('aks draft', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command('create', 'aks_draft_create') - g.custom_command('setup-gh', 'aks_draft_setup_gh') - g.custom_command('generate-workflow', 'aks_draft_generate_workflow') - g.custom_command('up', 'aks_draft_up') - g.custom_command('update', 'aks_draft_update') + with self.command_group( + "aks draft", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command("create", "aks_draft_create") + g.custom_command("setup-gh", "aks_draft_setup_gh") + g.custom_command("generate-workflow", "aks_draft_generate_workflow") + g.custom_command("up", "aks_draft_up") + g.custom_command("update", "aks_draft_update") # AKS pod identity commands - with self.command_group('aks pod-identity', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command('add', 'aks_pod_identity_add') - g.custom_command('delete', 'aks_pod_identity_delete') - g.custom_command('list', 'aks_pod_identity_list', - table_transformer=aks_pod_identities_table_format) + with self.command_group( + "aks pod-identity", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command("add", "aks_pod_identity_add") + g.custom_command("delete", "aks_pod_identity_delete") + g.custom_command( + "list", + "aks_pod_identity_list", + table_transformer=aks_pod_identities_table_format, + ) # AKS pod identity exception commands - with self.command_group('aks pod-identity exception', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command('add', 'aks_pod_identity_exception_add') - g.custom_command('delete', 'aks_pod_identity_exception_delete') - g.custom_command('update', 'aks_pod_identity_exception_update') - g.custom_command('list', 'aks_pod_identity_exception_list', - table_transformer=aks_pod_identity_exceptions_table_format) + with self.command_group( + "aks pod-identity exception", + managed_clusters_sdk, + client_factory=cf_managed_clusters, + ) as g: + g.custom_command("add", "aks_pod_identity_exception_add") + g.custom_command("delete", "aks_pod_identity_exception_delete") + g.custom_command("update", "aks_pod_identity_exception_update") + g.custom_command( + "list", + "aks_pod_identity_exception_list", + table_transformer=aks_pod_identity_exceptions_table_format, + ) # AKS egress commands - with self.command_group('aks egress-endpoints', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command('list', 'aks_egress_endpoints_list') + with self.command_group( + "aks egress-endpoints", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command("list", "aks_egress_endpoints_list") # AKS nodepool snapshot commands - with self.command_group('aks nodepool snapshot', nodepool_snapshot_sdk, client_factory=cf_nodepool_snapshots) as g: - g.custom_command('list', 'aks_nodepool_snapshot_list', - table_transformer=aks_list_nodepool_snapshot_table_format) - g.custom_show_command('show', 'aks_nodepool_snapshot_show', - table_transformer=aks_show_nodepool_snapshot_table_format) - g.custom_command('create', 'aks_nodepool_snapshot_create', - supports_no_wait=True) - g.custom_command('update', 'aks_nodepool_snapshot_update') - g.custom_command('delete', 'aks_nodepool_snapshot_delete', - supports_no_wait=True) + with self.command_group( + "aks nodepool snapshot", + nodepool_snapshot_sdk, + client_factory=cf_nodepool_snapshots, + ) as g: + g.custom_command( + "list", + "aks_nodepool_snapshot_list", + table_transformer=aks_list_nodepool_snapshot_table_format, + ) + g.custom_show_command( + "show", + "aks_nodepool_snapshot_show", + table_transformer=aks_show_nodepool_snapshot_table_format, + ) + g.custom_command( + "create", "aks_nodepool_snapshot_create", supports_no_wait=True + ) + g.custom_command("update", "aks_nodepool_snapshot_update") + g.custom_command( + "delete", "aks_nodepool_snapshot_delete", supports_no_wait=True + ) # AKS mc snapshot commands - with self.command_group('aks snapshot', mc_snapshot_sdk, client_factory=cf_mc_snapshots) as g: - g.custom_command('list', 'aks_snapshot_list', - table_transformer=aks_list_snapshot_table_format) - g.custom_show_command('show', 'aks_snapshot_show', - table_transformer=aks_show_snapshot_table_format) - g.custom_command('create', 'aks_snapshot_create', - supports_no_wait=True) - g.custom_command('delete', 'aks_snapshot_delete', - supports_no_wait=True) + with self.command_group( + "aks snapshot", mc_snapshot_sdk, client_factory=cf_mc_snapshots + ) as g: + g.custom_command( + "list", + "aks_snapshot_list", + table_transformer=aks_list_snapshot_table_format, + ) + g.custom_show_command( + "show", + "aks_snapshot_show", + table_transformer=aks_show_snapshot_table_format, + ) + g.custom_command("create", "aks_snapshot_create", supports_no_wait=True) + g.custom_command("delete", "aks_snapshot_delete", supports_no_wait=True) # AKS trusted access role commands - with self.command_group('aks trustedaccess role', trustedaccess_role_sdk, client_factory=cf_trustedaccess_role) as g: - g.custom_command('list', 'aks_trustedaccess_role_list') + with self.command_group( + "aks trustedaccess role", + trustedaccess_role_sdk, + client_factory=cf_trustedaccess_role, + ) as g: + g.custom_command("list", "aks_trustedaccess_role_list") # AKS trusted access rolebinding commands - with self.command_group('aks trustedaccess rolebinding', trustedaccess_role_binding_sdk, client_factory=cf_trustedaccess_role_binding) as g: - g.custom_command('list', 'aks_trustedaccess_role_binding_list') - g.custom_show_command('show', 'aks_trustedaccess_role_binding_get') - g.custom_command('create', 'aks_trustedaccess_role_binding_create') - g.custom_command('update', 'aks_trustedaccess_role_binding_update') - g.custom_command('delete', 'aks_trustedaccess_role_binding_delete', confirmation=True) + with self.command_group( + "aks trustedaccess rolebinding", + trustedaccess_role_binding_sdk, + client_factory=cf_trustedaccess_role_binding, + ) as g: + g.custom_command("list", "aks_trustedaccess_role_binding_list") + g.custom_show_command("show", "aks_trustedaccess_role_binding_get") + g.custom_command("create", "aks_trustedaccess_role_binding_create") + g.custom_command("update", "aks_trustedaccess_role_binding_update") + g.custom_command( + "delete", "aks_trustedaccess_role_binding_delete", confirmation=True + ) # AKS mesh commands - with self.command_group('aks mesh', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: + with self.command_group( + "aks mesh", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command("enable", "aks_mesh_enable", supports_no_wait=True) g.custom_command( - 'enable', - 'aks_mesh_enable', - supports_no_wait=True) + "disable", "aks_mesh_disable", supports_no_wait=True, confirmation=True + ) g.custom_command( - 'disable', - 'aks_mesh_disable', + "enable-ingress-gateway", + "aks_mesh_enable_ingress_gateway", supports_no_wait=True, - confirmation=True) - g.custom_command( - 'enable-ingress-gateway', - 'aks_mesh_enable_ingress_gateway', - supports_no_wait=True) + ) g.custom_command( - 'enable-egress-gateway', - 'aks_mesh_enable_egress_gateway', - supports_no_wait=True) + "enable-egress-gateway", + "aks_mesh_enable_egress_gateway", + supports_no_wait=True, + ) g.custom_command( - 'disable-ingress-gateway', - 'aks_mesh_disable_ingress_gateway', + "disable-ingress-gateway", + "aks_mesh_disable_ingress_gateway", supports_no_wait=True, - confirmation=True) + confirmation=True, + ) g.custom_command( - 'disable-egress-gateway', - 'aks_mesh_disable_egress_gateway', + "disable-egress-gateway", + "aks_mesh_disable_egress_gateway", supports_no_wait=True, - confirmation=True) + confirmation=True, + ) g.custom_command( - 'get-revisions', - 'aks_mesh_get_revisions', - table_transformer=aks_mesh_revisions_table_format) + "get-revisions", + "aks_mesh_get_revisions", + table_transformer=aks_mesh_revisions_table_format, + ) g.custom_command( - 'get-upgrades', - 'aks_mesh_get_upgrades', - table_transformer=aks_mesh_upgrades_table_format) + "get-upgrades", + "aks_mesh_get_upgrades", + table_transformer=aks_mesh_upgrades_table_format, + ) # AKS mesh upgrade commands - with self.command_group('aks mesh upgrade', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command( - 'start', - 'aks_mesh_upgrade_start', - supports_no_wait=True) - g.custom_command( - 'complete', - 'aks_mesh_upgrade_complete', - supports_no_wait=True) - g.custom_command( - 'rollback', - 'aks_mesh_upgrade_rollback', - supports_no_wait=True) + with self.command_group( + "aks mesh upgrade", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command("start", "aks_mesh_upgrade_start", supports_no_wait=True) + g.custom_command("complete", "aks_mesh_upgrade_complete", supports_no_wait=True) + g.custom_command("rollback", "aks_mesh_upgrade_rollback", supports_no_wait=True) # AKS approuting commands - with self.command_group('aks approuting', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command( - 'enable', - 'aks_approuting_enable') - g.custom_command( - 'disable', - 'aks_approuting_disable', confirmation=True) - g.custom_command( - 'update', - 'aks_approuting_update') + with self.command_group( + "aks approuting", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command("enable", "aks_approuting_enable") + g.custom_command("disable", "aks_approuting_disable", confirmation=True) + g.custom_command("update", "aks_approuting_update") # AKS approuting dns-zone commands - with self.command_group('aks approuting zone', managed_clusters_sdk, client_factory=cf_managed_clusters) as g: - g.custom_command( - 'add', - 'aks_approuting_zone_add') - g.custom_command( - 'delete', - 'aks_approuting_zone_delete', confirmation=True) - g.custom_command( - 'update', - 'aks_approuting_zone_update') - g.custom_command( - 'list', - 'aks_approuting_zone_list') + with self.command_group( + "aks approuting zone", managed_clusters_sdk, client_factory=cf_managed_clusters + ) as g: + g.custom_command("add", "aks_approuting_zone_add") + g.custom_command("delete", "aks_approuting_zone_delete", confirmation=True) + g.custom_command("update", "aks_approuting_zone_update") + g.custom_command("list", "aks_approuting_zone_list") diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 638b743f056..9ee5b8915c5 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1,9 +1,9 @@ # -------------------------------------------------------------------------------------------- -# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=too-many-lines import datetime import json import os @@ -22,7 +22,6 @@ cf_agent_pools, get_graph_rbac_management_client, get_msi_client, - cf_machines ) from azext_aks_preview._consts import ( ADDONS, @@ -49,7 +48,6 @@ CONST_SPOT_EVICTION_POLICY_DELETE, CONST_VIRTUAL_NODE_ADDON_NAME, CONST_VIRTUAL_NODE_SUBNET_NAME, - CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START, CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE, CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK, @@ -130,10 +128,10 @@ def wait_then_open(url): """ for _ in range(1, 10): try: - urlopen(url, context=_ssl_context()) + with urlopen(url, context=_ssl_context()): + break except URLError: time.sleep(1) - break webbrowser.open_new_tab(url) @@ -141,7 +139,7 @@ def wait_then_open_async(url): """ Spawns a thread that waits for a bit then opens a URL. """ - t = threading.Thread(target=wait_then_open, args=({url})) + t = threading.Thread(target=wait_then_open, args=url) t.daemon = True t.start() @@ -216,8 +214,10 @@ def create_application(client, display_name, homepage, identifier_uris, except GraphErrorException as ex: if 'insufficient privileges' in str(ex).lower(): link = 'https://docs.microsoft.com/azure/azure-resource-manager/resource-group-create-service-principal-portal' # pylint: disable=line-too-long - raise CLIError("Directory permission is needed for the current user to register the application. " - "For how to configure, please refer '{}'. Original error: {}".format(link, ex)) + raise CLIError( + "Directory permission is needed for the current user to register the application. " + f"For how to configure, please refer '{link}'." + ) from ex raise @@ -260,10 +260,10 @@ def create_service_principal(cli_ctx, identifier, resolve_app=True, rbac_client= try: uuid.UUID(identifier) result = list(rbac_client.applications.list( - filter="appId eq '{}'".format(identifier))) + filter=f"appId eq '{identifier}'")) except ValueError: result = list(rbac_client.applications.list( - filter="identifierUris/any(s:s eq '{}')".format(identifier))) + filter=f"identifierUris/any(s:s eq '{identifier}')")) if not result: # assume we get an object id result = [rbac_client.applications.get(identifier)] @@ -292,11 +292,10 @@ def _get_user_assigned_identity(cli_ctx, resource_id): resource_name=identity_name) except CloudError as ex: if 'was not found' in ex.message: - raise CLIError("Identity {} not found.".format(resource_id)) - raise CLIError(ex.message) + raise CLIError(f"Identity {resource_id} not found.") from ex + raise ex return identity - raise CLIError( - "Cannot parse identity name from provided resource id {}.".format(resource_id)) + raise CLIError(f"Cannot parse identity name from provided resource id {resource_id}.") def aks_browse( @@ -323,7 +322,7 @@ def aks_browse( def aks_maintenanceconfiguration_list( - cmd, + cmd, # pylint: disable=unused-argument client, resource_group_name, cluster_name @@ -332,7 +331,7 @@ def aks_maintenanceconfiguration_list( def aks_maintenanceconfiguration_show( - cmd, + cmd, # pylint: disable=unused-argument client, resource_group_name, cluster_name, @@ -344,7 +343,7 @@ def aks_maintenanceconfiguration_show( def aks_maintenanceconfiguration_delete( - cmd, + cmd, # pylint: disable=unused-argument client, resource_group_name, cluster_name, @@ -355,6 +354,7 @@ def aks_maintenanceconfiguration_delete( return client.delete(resource_group_name, cluster_name, config_name) +# pylint: disable=unused-argument def aks_maintenanceconfiguration_add( cmd, client, @@ -379,8 +379,10 @@ def aks_maintenanceconfiguration_add( configs = client.list_by_managed_cluster(resource_group_name, cluster_name) for config in configs: if config.name == config_name: - raise CLIError("Maintenance configuration '{}' already exists, please try a different name, " - "use 'aks maintenanceconfiguration list' to get current list of maitenance configurations".format(config_name)) + raise CLIError( + f"Maintenance configuration '{config_name}' already exists, please try a different name, " + "use 'aks maintenanceconfiguration list' to get current list of maitenance configurations" + ) # DO NOT MOVE: get all the original parameters and save them as a dictionary raw_parameters = locals() return aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters) @@ -414,14 +416,16 @@ def aks_maintenanceconfiguration_update( found = True break if not found: - raise CLIError("Maintenance configuration '{}' doesn't exist." - "use 'aks maintenanceconfiguration list' to get current list of maitenance configurations".format(config_name)) + raise CLIError( + f"Maintenance configuration '{config_name}' doesn't exist." + "use 'aks maintenanceconfiguration list' to get current list of maitenance configurations" + ) # DO NOT MOVE: get all the original parameters and save them as a dictionary raw_parameters = locals() return aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters) -# pylint: disable=too-many-locals +# pylint: disable=too-many-locals, unused-argument def aks_create( cmd, client, @@ -505,7 +509,7 @@ def aks_create( azure_keyvault_kms_key_vault_resource_id=None, http_proxy_config=None, # addons - enable_addons=None, + enable_addons=None, # pylint: disable=redefined-outer-name workspace_resource_id=None, enable_msi_auth_for_monitoring=True, enable_syslog=False, @@ -646,7 +650,7 @@ def aks_create( return aks_create_decorator.create_mc(mc) -# pylint: disable=too-many-locals +# pylint: disable=too-many-locals, unused-argument def aks_update( cmd, client, @@ -822,13 +826,16 @@ def aks_show(cmd, client, resource_group_name, name, aks_custom_headers=None): return _remove_nulls([mc])[0] +# pylint: disable=unused-argument def aks_stop(cmd, client, resource_group_name, name, no_wait=False): instance = client.get(resource_group_name, name) # print warning when stopping a private cluster if check_is_private_link_cluster(instance): - logger.warning('Your private cluster apiserver IP might get changed when it\'s stopped and started.\n' - 'Any user provisioned private endpoints linked to this private cluster will need to be deleted and created again. ' - 'Any user managed DNS record also needs to be updated with the new IP.') + logger.warning( + "Your private cluster apiserver IP might get changed when it's stopped and started.\n" + "Any user provisioned private endpoints linked to this private cluster will need to be deleted and " + "created again. Any user managed DNS record also needs to be updated with the new IP." + ) return sdk_no_wait(no_wait, client.begin_stop, resource_group_name, name) @@ -922,8 +929,8 @@ def aks_get_credentials( encoding='UTF-8') print_or_merge_credentials( path, kubeconfig, overwrite_existing, context_name) - except (IndexError, ValueError): - raise CLIError("Fail to find kubeconfig file.") + except (IndexError, ValueError) as exc: + raise CLIError("Fail to find kubeconfig file.") from exc def aks_scale(cmd, # pylint: disable=unused-argument @@ -939,8 +946,10 @@ def aks_scale(cmd, # pylint: disable=unused-argument _fill_defaults_for_pod_identity_profile(instance.pod_identity_profile) if len(instance.agent_pool_profiles) > 1 and nodepool_name == "": - raise CLIError('There are more than one node pool in the cluster. ' - 'Please specify nodepool name or use az aks nodepool command to scale node pool') + raise CLIError( + "There are more than one node pool in the cluster. " + "Please specify nodepool name or use az aks nodepool command to scale node pool" + ) for agent_profile in instance.agent_pool_profiles: if agent_profile.name == nodepool_name or (nodepool_name == "" and len(instance.agent_pool_profiles) == 1): @@ -948,14 +957,22 @@ def aks_scale(cmd, # pylint: disable=unused-argument raise CLIError( "Cannot scale cluster autoscaler enabled node pool.") - agent_profile.count = int(node_count) # pylint: disable=no-member + agent_profile.count = int(node_count) # null out the SP profile because otherwise validation complains instance.service_principal_profile = None - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance, headers=headers) - raise CLIError('The nodepool "{}" was not found.'.format(nodepool_name)) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + name, + instance, + headers=headers, + ) + raise CLIError(f'The nodepool "{nodepool_name}" was not found.') -def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-statements +# pylint: disable=too-many-return-statements, too-many-branches +def aks_upgrade(cmd, client, resource_group_name, name, @@ -1028,21 +1045,27 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state # for legacy clusters, we always upgrade node pools with CCP. if instance.max_agent_pools < 8 or vmas_cluster: if control_plane_only: - msg = ("Legacy clusters do not support control plane only upgrade. All node pools will be " - "upgraded to {} as well. Continue?").format(instance.kubernetes_version) + msg = ( + "Legacy clusters do not support control plane only upgrade. All node pools will be " + f"upgraded to {instance.kubernetes_version} as well. Continue?" + ) if not yes and not prompt_y_n(msg, default="n"): return None upgrade_all = True else: if not control_plane_only: - msg = ("Since control-plane-only argument is not specified, this will upgrade the control plane " - "AND all nodepools to version {}. Continue?").format(instance.kubernetes_version) + msg = ( + "Since control-plane-only argument is not specified, this will upgrade the control plane " + f"AND all nodepools to version {instance.kubernetes_version}. Continue?" + ) if not yes and not prompt_y_n(msg, default="n"): return None upgrade_all = True else: - msg = ("Since control-plane-only argument is specified, this will upgrade only the control plane to {}. " - "Node pool will not change. Continue?").format(instance.kubernetes_version) + msg = ( + "Since control-plane-only argument is specified, this will upgrade only the control plane to " + f"{instance.kubernetes_version}. Node pool will not change. Continue?" + ) if not yes and not prompt_y_n(msg, default="n"): return None @@ -1059,12 +1082,21 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance, headers=headers) -def _upgrade_single_nodepool_image_version(no_wait, client, resource_group_name, cluster_name, nodepool_name, snapshot_id=None): +def _upgrade_single_nodepool_image_version( + no_wait, client, resource_group_name, cluster_name, nodepool_name, snapshot_id=None +): headers = {} if snapshot_id: headers["AKSSnapshotId"] = snapshot_id - return sdk_no_wait(no_wait, client.begin_upgrade_node_image_version, resource_group_name, cluster_name, nodepool_name, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_upgrade_node_image_version, + resource_group_name, + cluster_name, + nodepool_name, + headers=headers, + ) def aks_agentpool_show(cmd, # pylint: disable=unused-argument @@ -1234,7 +1266,15 @@ def aks_agentpool_scale(cmd, # pylint: disable=unused-argument raise CLIError( "The new node count is the same as the current node count.") instance.count = new_node_count # pylint: disable=no-member - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + nodepool_name, + instance, + headers=headers, + ) def aks_agentpool_upgrade(cmd, @@ -1266,9 +1306,10 @@ def aks_agentpool_upgrade(cmd, # Note: we exclude this option because node image upgrade can't accept nodepool put fields like max surge if (max_surge or drain_timeout or node_soak_duration) and node_image_only: raise MutuallyExclusiveArgumentError( - 'Conflicting flags. Unable to specify max-surge/drain-timeout/node-soak-duration with node-image-only.' - 'If you want to use max-surge/drain-timeout/node-soak-duration with a node image upgrade, please first ' - 'update max-surge/drain-timeout/node-soak-duration using "az aks nodepool update --max-surge/--drain-timeout/--node-soak-duration".' + "Conflicting flags. Unable to specify max-surge/drain-timeout/node-soak-duration with node-image-only." + "If you want to use max-surge/drain-timeout/node-soak-duration with a node image upgrade, please first " + "update max-surge/drain-timeout/node-soak-duration using " + '"az aks nodepool update --max-surge/--drain-timeout/--node-soak-duration".' ) if node_image_only: @@ -1301,9 +1342,16 @@ def aks_agentpool_upgrade(cmd, if kubernetes_version != '' or instance.orchestrator_version == kubernetes_version: msg = "The new kubernetes version is the same as the current kubernetes version." if instance.provisioning_state == "Succeeded": - msg = "The cluster is already on version {} and is not in a failed state. No operations will occur when upgrading to the same version if the cluster is not in a failed state.".format(instance.orchestrator_version) + msg = ( + f"The cluster is already on version {instance.orchestrator_version} and is not in a failed state. " + "No operations will occur when upgrading to the same version if the cluster " + "is not in a failed state." + ) elif instance.provisioning_state == "Failed": - msg = "Cluster currently in failed state. Proceeding with upgrade to existing version {} to attempt resolution of failed cluster state.".format(instance.orchestrator_version) + msg = ( + "Cluster currently in failed state. Proceeding with upgrade to existing version " + f"{instance.orchestrator_version} to attempt resolution of failed cluster state." + ) if not yes and not prompt_y_n(msg): return None @@ -1370,13 +1418,22 @@ def aks_agentpool_stop(cmd, # pylint: disable=unused-argument if not agentpool_exists: raise InvalidArgumentValueError( - "Node pool {} doesnt exist, use 'aks nodepool list' to get current node pool list".format(nodepool_name)) + f"Node pool {nodepool_name} doesnt exist, use 'aks nodepool list' to get current node pool list" + ) instance = client.get(resource_group_name, cluster_name, nodepool_name) power_state = PowerState(code="Stopped") instance.power_state = power_state headers = get_aks_custom_headers(aks_custom_headers) - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + nodepool_name, + instance, + headers=headers, + ) def aks_agentpool_start(cmd, # pylint: disable=unused-argument @@ -1400,12 +1457,21 @@ def aks_agentpool_start(cmd, # pylint: disable=unused-argument break if not agentpool_exists: raise InvalidArgumentValueError( - "Node pool {} doesnt exist, use 'aks nodepool list' to get current node pool list".format(nodepool_name)) + f"Node pool {nodepool_name} doesnt exist, use 'aks nodepool list' to get current node pool list" + ) instance = client.get(resource_group_name, cluster_name, nodepool_name) power_state = PowerState(code="Running") instance.power_state = power_state headers = get_aks_custom_headers(aks_custom_headers) - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, nodepool_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + nodepool_name, + instance, + headers=headers, + ) def aks_agentpool_delete(cmd, # pylint: disable=unused-argument @@ -1423,10 +1489,19 @@ def aks_agentpool_delete(cmd, # pylint: disable=unused-argument break if not agentpool_exists: - raise CLIError("Node pool {} doesnt exist, " - "use 'aks nodepool list' to get current node pool list".format(nodepool_name)) + raise CLIError( + f"Node pool {nodepool_name} doesnt exist, " + "use 'aks nodepool list' to get current node pool list" + ) - return sdk_no_wait(no_wait, client.begin_delete, resource_group_name, cluster_name, nodepool_name, ignore_pod_disruption_budget=ignore_pod_disruption_budget) + return sdk_no_wait( + no_wait, + client.begin_delete, + resource_group_name, + cluster_name, + nodepool_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + ) def aks_agentpool_operation_abort(cmd, # pylint: disable=unused-argument @@ -1450,12 +1525,19 @@ def aks_agentpool_operation_abort(cmd, # pylint: disable=unused-argument break if not agentpool_exists: raise InvalidArgumentValueError( - "Node pool {} doesnt exist, use 'aks nodepool list' to get current node pool list".format(nodepool_name)) + f"Node pool {nodepool_name} doesnt exist, use 'aks nodepool list' to get current node pool list") instance = client.get(resource_group_name, cluster_name, nodepool_name) power_state = PowerState(code="Running") instance.power_state = power_state headers = get_aks_custom_headers(aks_custom_headers) - return sdk_no_wait(no_wait, client.begin_abort_latest_operation, resource_group_name, cluster_name, nodepool_name, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_abort_latest_operation, + resource_group_name, + cluster_name, + nodepool_name, + headers=headers, + ) def aks_operation_abort(cmd, # pylint: disable=unused-argument @@ -1473,7 +1555,9 @@ def aks_operation_abort(cmd, # pylint: disable=unused-argument instance = client.get(resource_group_name, name) power_state = PowerState(code="Running") if instance is None: - raise InvalidArgumentValueError("Cluster {} doesnt exist, use 'aks list' to get current cluster list".format(name)) + raise InvalidArgumentValueError( + f"Cluster {name} doesnt exist, use 'aks list' to get current cluster list" + ) instance.power_state = power_state headers = get_aks_custom_headers(aks_custom_headers) return sdk_no_wait(no_wait, client.begin_abort_latest_operation, resource_group_name, name, headers=headers) @@ -1503,28 +1587,24 @@ def aks_addon_list(cmd, client, resource_group_name, name): current_addons = [] os_type = 'Linux' - for name, addon_key in ADDONS.items(): + for addon_name, addon_key in ADDONS.items(): # web_application_routing is a special case, the configuration is stored in a separate profile - if name == "web_application_routing": - enabled = ( - True - if mc.ingress_profile and + if addon_name == "web_application_routing": + enabled = bool( + mc.ingress_profile and mc.ingress_profile.web_app_routing and mc.ingress_profile.web_app_routing.enabled - else False ) else: - if name == "virtual-node": + if addon_name == "virtual-node": addon_key += os_type - enabled = ( - True - if mc.addon_profiles and + enabled = bool( + mc.addon_profiles and addon_key in mc.addon_profiles and mc.addon_profiles[addon_key].enabled - else False ) current_addons.append({ - "name": name, + "name": addon_name, "api_key": addon_key, "enabled": enabled }) @@ -1539,7 +1619,11 @@ def aks_addon_show(cmd, client, resource_group_name, name, addon): # web_application_routing is a special case, the configuration is stored in a separate profile if addon == "web_application_routing": - if not mc.ingress_profile and not mc.ingress_profile.web_app_routing and not mc.ingress_profile.web_app_routing.enabled: + if ( + not mc.ingress_profile and + not mc.ingress_profile.web_app_routing and + not mc.ingress_profile.web_app_routing.enabled + ): raise InvalidArgumentValueError(f'Addon "{addon}" is not enabled in this cluster.') return { "name": addon, @@ -1558,32 +1642,84 @@ def aks_addon_show(cmd, client, resource_group_name, name, addon): } -def aks_addon_enable(cmd, client, resource_group_name, name, addon, workspace_resource_id=None, - subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, appgw_id=None, - appgw_subnet_id=None, - appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, - no_wait=False, enable_msi_auth_for_monitoring=True, - dns_zone_resource_id=None, dns_zone_resource_ids=None, enable_syslog=False, data_collection_settings=None): - return enable_addons(cmd, client, resource_group_name, name, addon, workspace_resource_id=workspace_resource_id, - subnet_name=subnet_name, appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, - appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, - appgw_watch_namespace=appgw_watch_namespace, enable_sgxquotehelper=enable_sgxquotehelper, - enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, - enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, - dns_zone_resource_id=dns_zone_resource_id, dns_zone_resource_ids=dns_zone_resource_ids, enable_syslog=enable_syslog, - data_collection_settings=data_collection_settings) +def aks_addon_enable( + cmd, + client, + resource_group_name, + name, + addon, + workspace_resource_id=None, + subnet_name=None, + appgw_name=None, + appgw_subnet_prefix=None, + appgw_subnet_cidr=None, + appgw_id=None, + appgw_subnet_id=None, + appgw_watch_namespace=None, + enable_sgxquotehelper=False, + enable_secret_rotation=False, + rotation_poll_interval=None, + no_wait=False, + enable_msi_auth_for_monitoring=True, + dns_zone_resource_id=None, + dns_zone_resource_ids=None, + enable_syslog=False, + data_collection_settings=None, +): + return enable_addons( + cmd, + client, + resource_group_name, + name, + addon, + workspace_resource_id=workspace_resource_id, + subnet_name=subnet_name, + appgw_name=appgw_name, + appgw_subnet_prefix=appgw_subnet_prefix, + appgw_subnet_cidr=appgw_subnet_cidr, + appgw_id=appgw_id, + appgw_subnet_id=appgw_subnet_id, + appgw_watch_namespace=appgw_watch_namespace, + enable_sgxquotehelper=enable_sgxquotehelper, + enable_secret_rotation=enable_secret_rotation, + rotation_poll_interval=rotation_poll_interval, + no_wait=no_wait, + enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, + dns_zone_resource_id=dns_zone_resource_id, + dns_zone_resource_ids=dns_zone_resource_ids, + enable_syslog=enable_syslog, + data_collection_settings=data_collection_settings, + ) def aks_addon_disable(cmd, client, resource_group_name, name, addon, no_wait=False): return aks_disable_addons(cmd, client, resource_group_name, name, addon, no_wait) -def aks_addon_update(cmd, client, resource_group_name, name, addon, workspace_resource_id=None, - subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, appgw_id=None, - appgw_subnet_id=None, - appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, - no_wait=False, enable_msi_auth_for_monitoring=None, - dns_zone_resource_id=None, dns_zone_resource_ids=None, enable_syslog=False, data_collection_settings=None): +def aks_addon_update( + cmd, + client, + resource_group_name, + name, + addon, + workspace_resource_id=None, + subnet_name=None, + appgw_name=None, + appgw_subnet_prefix=None, + appgw_subnet_cidr=None, + appgw_id=None, + appgw_subnet_id=None, + appgw_watch_namespace=None, + enable_sgxquotehelper=False, + enable_secret_rotation=False, + rotation_poll_interval=None, + no_wait=False, + enable_msi_auth_for_monitoring=None, + dns_zone_resource_id=None, + dns_zone_resource_ids=None, + enable_syslog=False, + data_collection_settings=None, +): instance = client.get(resource_group_name, name) addon_profiles = instance.addon_profiles @@ -1591,8 +1727,14 @@ def aks_addon_update(cmd, client, resource_group_name, name, addon, workspace_re enable_msi_auth_for_monitoring = False if addon == "web_application_routing": - if (instance.ingress_profile is None) or (instance.ingress_profile.web_app_routing is None) or not instance.ingress_profile.web_app_routing.enabled: - raise InvalidArgumentValueError(f'Addon "{addon}" is not enabled in this cluster.') + if ( + (instance.ingress_profile is None) or + (instance.ingress_profile.web_app_routing is None) or + not instance.ingress_profile.web_app_routing.enabled + ): + raise InvalidArgumentValueError( + f'Addon "{addon}" is not enabled in this cluster.' + ) elif addon == "monitoring" and enable_msi_auth_for_monitoring is None: enable_msi_auth_for_monitoring = True @@ -1602,15 +1744,31 @@ def aks_addon_update(cmd, client, resource_group_name, name, addon, workspace_re if not addon_profiles or addon_key not in addon_profiles or not addon_profiles[addon_key].enabled: raise InvalidArgumentValueError(f'Addon "{addon}" is not enabled in this cluster.') - return enable_addons(cmd, client, resource_group_name, name, addon, check_enabled=False, - workspace_resource_id=workspace_resource_id, - subnet_name=subnet_name, appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, - appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, - appgw_watch_namespace=appgw_watch_namespace, enable_sgxquotehelper=enable_sgxquotehelper, - enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, - enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, - dns_zone_resource_id=dns_zone_resource_id, dns_zone_resource_ids=dns_zone_resource_ids, - enable_syslog=enable_syslog, data_collection_settings=data_collection_settings) + return enable_addons( + cmd, + client, + resource_group_name, + name, + addon, + check_enabled=False, + workspace_resource_id=workspace_resource_id, + subnet_name=subnet_name, + appgw_name=appgw_name, + appgw_subnet_prefix=appgw_subnet_prefix, + appgw_subnet_cidr=appgw_subnet_cidr, + appgw_id=appgw_id, + appgw_subnet_id=appgw_subnet_id, + appgw_watch_namespace=appgw_watch_namespace, + enable_sgxquotehelper=enable_sgxquotehelper, + enable_secret_rotation=enable_secret_rotation, + rotation_poll_interval=rotation_poll_interval, + no_wait=no_wait, + enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, + dns_zone_resource_id=dns_zone_resource_id, + dns_zone_resource_ids=dns_zone_resource_ids, + enable_syslog=enable_syslog, + data_collection_settings=data_collection_settings, + ) def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=False): @@ -1618,10 +1776,18 @@ def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=F subscription_id = get_subscription_id(cmd.cli_ctx) try: - if addons == "monitoring" and CONST_MONITORING_ADDON_NAME in instance.addon_profiles and \ - instance.addon_profiles[CONST_MONITORING_ADDON_NAME].enabled and \ - CONST_MONITORING_USING_AAD_MSI_AUTH in instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config and \ - str(instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config[CONST_MONITORING_USING_AAD_MSI_AUTH]).lower() == 'true': + if ( + addons == "monitoring" and + CONST_MONITORING_ADDON_NAME in instance.addon_profiles and + instance.addon_profiles[CONST_MONITORING_ADDON_NAME].enabled and + CONST_MONITORING_USING_AAD_MSI_AUTH in + instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config and + str( + instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config[ + CONST_MONITORING_USING_AAD_MSI_AUTH + ] + ).lower() == "true" + ): # remove the DCR association because otherwise the DCR can't be deleted ensure_container_insights_for_monitoring( cmd, @@ -1655,10 +1821,31 @@ def aks_disable_addons(cmd, client, resource_group_name, name, addons, no_wait=F return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, name, instance) -def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_resource_id=None, - subnet_name=None, appgw_name=None, appgw_subnet_prefix=None, appgw_subnet_cidr=None, appgw_id=None, appgw_subnet_id=None, - appgw_watch_namespace=None, enable_sgxquotehelper=False, enable_secret_rotation=False, rotation_poll_interval=None, no_wait=False, enable_msi_auth_for_monitoring=True, - dns_zone_resource_id=None, dns_zone_resource_ids=None, enable_syslog=False, data_collection_settings=None, aks_custom_headers=None): +def aks_enable_addons( + cmd, + client, + resource_group_name, + name, + addons, + workspace_resource_id=None, + subnet_name=None, + appgw_name=None, + appgw_subnet_prefix=None, + appgw_subnet_cidr=None, + appgw_id=None, + appgw_subnet_id=None, + appgw_watch_namespace=None, + enable_sgxquotehelper=False, + enable_secret_rotation=False, + rotation_poll_interval=None, + no_wait=False, + enable_msi_auth_for_monitoring=True, + dns_zone_resource_id=None, + dns_zone_resource_ids=None, + enable_syslog=False, + data_collection_settings=None, + aks_custom_headers=None, +): headers = get_aks_custom_headers(aks_custom_headers) instance = client.get(resource_group_name, name) # this is overwritten by _update_addons(), so the value needs to be recorded here @@ -1669,33 +1856,62 @@ def aks_enable_addons(cmd, client, resource_group_name, name, addons, workspace_ enable_msi_auth_for_monitoring = False subscription_id = get_subscription_id(cmd.cli_ctx) - instance = _update_addons(cmd, instance, subscription_id, resource_group_name, name, addons, enable=True, - workspace_resource_id=workspace_resource_id, enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, subnet_name=subnet_name, - appgw_name=appgw_name, appgw_subnet_prefix=appgw_subnet_prefix, appgw_subnet_cidr=appgw_subnet_cidr, appgw_id=appgw_id, appgw_subnet_id=appgw_subnet_id, appgw_watch_namespace=appgw_watch_namespace, - enable_sgxquotehelper=enable_sgxquotehelper, enable_secret_rotation=enable_secret_rotation, rotation_poll_interval=rotation_poll_interval, no_wait=no_wait, - dns_zone_resource_id=dns_zone_resource_id, dns_zone_resource_ids=dns_zone_resource_ids, enable_syslog=enable_syslog, data_collection_settings=data_collection_settings) - - if CONST_MONITORING_ADDON_NAME in instance.addon_profiles and instance.addon_profiles[CONST_MONITORING_ADDON_NAME].enabled: - if CONST_MONITORING_USING_AAD_MSI_AUTH in instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config and \ - str(instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config[CONST_MONITORING_USING_AAD_MSI_AUTH]).lower() == 'true': + instance = _update_addons( + cmd, + instance, + subscription_id, + resource_group_name, + name, + addons, + enable=True, + workspace_resource_id=workspace_resource_id, + enable_msi_auth_for_monitoring=enable_msi_auth_for_monitoring, + subnet_name=subnet_name, + appgw_name=appgw_name, + appgw_subnet_prefix=appgw_subnet_prefix, + appgw_subnet_cidr=appgw_subnet_cidr, + appgw_id=appgw_id, + appgw_subnet_id=appgw_subnet_id, + appgw_watch_namespace=appgw_watch_namespace, + enable_sgxquotehelper=enable_sgxquotehelper, + enable_secret_rotation=enable_secret_rotation, + rotation_poll_interval=rotation_poll_interval, + no_wait=no_wait, + dns_zone_resource_id=dns_zone_resource_id, + dns_zone_resource_ids=dns_zone_resource_ids, + enable_syslog=enable_syslog, + data_collection_settings=data_collection_settings, + ) + if ( + CONST_MONITORING_ADDON_NAME in instance.addon_profiles and + instance.addon_profiles[CONST_MONITORING_ADDON_NAME].enabled + ): + if ( + CONST_MONITORING_USING_AAD_MSI_AUTH in + instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config and + str( + instance.addon_profiles[CONST_MONITORING_ADDON_NAME].config[ + CONST_MONITORING_USING_AAD_MSI_AUTH + ] + ).lower() == "true" + ): if not msi_auth: raise ArgumentUsageError( "--enable-msi-auth-for-monitoring can not be used on clusters with service principal auth.") - else: - # create a Data Collection Rule (DCR) and associate it with the cluster - ensure_container_insights_for_monitoring( - cmd, - instance.addon_profiles[CONST_MONITORING_ADDON_NAME], - subscription_id, - resource_group_name, - name, - instance.location, - aad_route=True, - create_dcr=True, - create_dcra=True, - enable_syslog=enable_syslog, - data_collection_settings=data_collection_settings, - ) + # create a Data Collection Rule (DCR) and associate it with the cluster + ensure_container_insights_for_monitoring( + cmd, + instance.addon_profiles[CONST_MONITORING_ADDON_NAME], + subscription_id, + resource_group_name, + name, + instance.location, + aad_route=True, + create_dcr=True, + create_dcra=True, + enable_syslog=enable_syslog, + data_collection_settings=data_collection_settings, + ) else: # monitoring addon will use legacy path if enable_syslog: @@ -1826,7 +2042,7 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements continue if addon_arg not in ADDONS: - raise CLIError("Invalid addon name: {}.".format(addon_arg)) + raise CLIError(f"Invalid addon name: {addon_arg}.") addon = ADDONS[addon_arg] if addon == CONST_VIRTUAL_NODE_ADDON_NAME: # only linux is supported for now, in the future this will be a user flag @@ -1858,13 +2074,23 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements cloud_name = cmd.cli_ctx.cloud.name if enable_msi_auth_for_monitoring and (cloud_name.lower() == 'ussec' or cloud_name.lower() == 'usnat'): - if instance.identity is not None and instance.identity.type is not None and instance.identity.type == "userassigned": - logger.warning("--enable_msi_auth_for_monitoring is not supported in %s cloud and continuing monitoring enablement without this flag.", cloud_name) + if ( + instance.identity is not None and + instance.identity.type is not None and + instance.identity.type == "userassigned" + ): + logger.warning( + "--enable_msi_auth_for_monitoring is not supported in %s cloud and continuing " + "monitoring enablement without this flag.", + cloud_name, + ) enable_msi_auth_for_monitoring = False addon_profile.config = { logAnalyticsConstName: workspace_resource_id} - addon_profile.config[CONST_MONITORING_USING_AAD_MSI_AUTH] = "true" if enable_msi_auth_for_monitoring else "false" + addon_profile.config[CONST_MONITORING_USING_AAD_MSI_AUTH] = ( + "true" if enable_msi_auth_for_monitoring else "false" + ) elif addon == (CONST_VIRTUAL_NODE_ADDON_NAME + os_type): if addon_profile.enabled: raise CLIError('The virtual-node addon is already enabled for this managed cluster.\n' @@ -1916,10 +2142,12 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements addon_profile.config[CONST_ACC_SGX_QUOTE_HELPER_ENABLED] = "true" elif addon == CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME: if addon_profile.enabled: - raise CLIError('The azure-keyvault-secrets-provider addon is already enabled for this managed cluster.\n' - 'To change azure-keyvault-secrets-provider configuration, run ' - f'"az aks disable-addons -a azure-keyvault-secrets-provider -n {name} -g {resource_group_name}" ' - 'before enabling it again.') + raise CLIError( + "The azure-keyvault-secrets-provider addon is already enabled for this managed cluster.\n" + 'To change azure-keyvault-secrets-provider configuration, run "az aks disable-addons ' + f'-a azure-keyvault-secrets-provider -n {name} -g {resource_group_name}" ' + "before enabling it again." + ) addon_profile = ManagedClusterAddonProfile( enabled=True, config={CONST_SECRET_ROTATION_ENABLED: "false", CONST_ROTATION_POLL_INTERVAL: "2m"}) if enable_secret_rotation: @@ -1936,8 +2164,7 @@ def _update_addons(cmd, # pylint: disable=too-many-branches,too-many-statements addon_profiles[addon] = ManagedClusterAddonProfile( enabled=False) else: - raise CLIError( - "The addon {} is not installed.".format(addon)) + raise CLIError(f"The addon {addon} is not installed.") addon_profiles[addon].config = None addon_profiles[addon].enabled = enable @@ -2096,7 +2323,14 @@ def aks_pod_identity_add( headers = get_aks_custom_headers(aks_custom_headers) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + instance, + headers=headers + ) def aks_pod_identity_delete( @@ -2133,7 +2367,14 @@ def aks_pod_identity_delete( headers = get_aks_custom_headers(aks_custom_headers) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + instance, + headers=headers + ) def aks_pod_identity_list(cmd, client, resource_group_name, cluster_name): # pylint: disable=unused-argument @@ -2181,7 +2422,14 @@ def aks_pod_identity_exception_add( headers = get_aks_custom_headers(aks_custom_headers) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + instance, + headers=headers + ) def aks_pod_identity_exception_delete( @@ -2218,7 +2466,14 @@ def aks_pod_identity_exception_delete( headers = get_aks_custom_headers(aks_custom_headers) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + instance, + headers=headers + ) def aks_pod_identity_exception_update( @@ -2254,8 +2509,7 @@ def aks_pod_identity_exception_update( pod_identity_exceptions.append(exc) if not found_target: - raise CLIError( - 'pod identity exception {}/{} not found'.format(exc_namespace, exc_name)) + raise CLIError(f"pod identity exception {exc_namespace}/{exc_name} not found") from azext_aks_preview.managed_cluster_decorator import AKSPreviewManagedClusterModels # store all the models used by pod identity @@ -2270,7 +2524,14 @@ def aks_pod_identity_exception_update( headers = get_aks_custom_headers(aks_custom_headers) # send the managed cluster represeentation to update the pod identity addon - return sdk_no_wait(no_wait, client.begin_create_or_update, resource_group_name, cluster_name, instance, headers=headers) + return sdk_no_wait( + no_wait, + client.begin_create_or_update, + resource_group_name, + cluster_name, + instance, + headers=headers, + ) def aks_pod_identity_exception_list(cmd, client, resource_group_name, cluster_name): @@ -2333,10 +2594,10 @@ def aks_snapshot_delete(cmd, # pylint: disable=unused-argument name, no_wait=False, yes=False): - - from knack.prompting import prompt_y_n - msg = 'This will delete the cluster snapshot "{}" in resource group "{}", Are you sure?'.format( - name, resource_group_name) + msg = ( + f'This will delete the cluster snapshot "{name}" in resource group "{resource_group_name}".\n' + "Are you sure?" + ) if not yes and not prompt_y_n(msg, default="n"): return None @@ -2414,10 +2675,10 @@ def aks_nodepool_snapshot_delete(cmd, # pylint: disable=unused-argument snapshot_name, no_wait=False, yes=False): - - from knack.prompting import prompt_y_n - msg = 'This will delete the nodepool snapshot "{}" in resource group "{}", Are you sure?'.format( - snapshot_name, resource_group_name) + msg = ( + f'This will delete the nodepool snapshot "{snapshot_name}" in resource group "{resource_group_name}".\n' + "Are you sure?" + ) if not yes and not prompt_y_n(msg, default="n"): return None @@ -2457,7 +2718,11 @@ def aks_trustedaccess_role_binding_create(cmd, client, resource_group_name, clus pass if existedBinding: - raise Exception("TrustedAccess RoleBinding " + role_binding_name + " already existed, please use 'az aks trustedaccess rolebinding update' command to update!") + raise Exception( # pylint: disable=broad-exception-raised + "TrustedAccess RoleBinding " + + role_binding_name + + " already existed, please use 'az aks trustedaccess rolebinding update' command to update!" + ) roleList = roles.split(',') roleBinding = TrustedAccessRoleBinding(source_resource_id=source_resource_id, roles=roleList) @@ -2482,34 +2747,51 @@ def aks_trustedaccess_role_binding_delete(cmd, client, resource_group_name, clus def aks_mesh_enable( + cmd, + client, + resource_group_name, + name, + revision=None, + key_vault_id=None, + ca_cert_object_name=None, + ca_key_object_name=None, + root_cert_object_name=None, + cert_chain_object_name=None, +): + instance = client.get(resource_group_name, name) + addon_profiles = instance.addon_profiles + if ( + key_vault_id is not None and + ca_cert_object_name is not None and + ca_key_object_name is not None and + root_cert_object_name is not None and + cert_chain_object_name is not None + ): + if ( + not addon_profiles or + not addon_profiles[CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME] or + not addon_profiles[ + CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME + ].enabled + ): + raise CLIError( + "AzureKeyvaultSecretsProvider addon is required for Azure Service Mesh plugin " + "certificate authority feature." + ) + + return _aks_mesh_update( cmd, client, resource_group_name, name, - revision=None, - key_vault_id=None, - ca_cert_object_name=None, - ca_key_object_name=None, - root_cert_object_name=None, - cert_chain_object_name=None -): - instance = client.get(resource_group_name, name) - addon_profiles = instance.addon_profiles - if key_vault_id is not None and ca_cert_object_name is not None and ca_key_object_name is not None and root_cert_object_name is not None and cert_chain_object_name is not None: - if not addon_profiles or not addon_profiles[CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME] or not addon_profiles[CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME].enabled: - raise CLIError('AzureKeyvaultSecretsProvider addon is required for Azure Service Mesh plugin certificate authority feature.') - - return _aks_mesh_update(cmd, - client, - resource_group_name, - name, - key_vault_id, - ca_cert_object_name, - ca_key_object_name, - root_cert_object_name, - cert_chain_object_name, - revision=revision, - enable_azure_service_mesh=True) + key_vault_id, + ca_cert_object_name, + ca_key_object_name, + root_cert_object_name, + cert_chain_object_name, + revision=revision, + enable_azure_service_mesh=True, + ) def aks_mesh_disable( @@ -2599,8 +2881,7 @@ def aks_mesh_get_revisions( if revisions: return revisions[0].properties - else: - return None + return None def aks_mesh_get_upgrades( @@ -2619,8 +2900,7 @@ def aks_mesh_get_upgrades( if upgrades: return upgrades[0].properties - else: - return None + return None def aks_mesh_upgrade_start( @@ -2666,6 +2946,7 @@ def aks_mesh_upgrade_rollback( mesh_upgrade_command=CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK) +# pylint: disable=unused-argument def _aks_mesh_update( cmd, client, @@ -2836,6 +3117,7 @@ def aks_approuting_zone_list( raise CLIError('App routing addon is not enabled') +# pylint: disable=unused-argument def _aks_approuting_update( cmd, client, @@ -2909,14 +3191,29 @@ def _keyvault_update( try: if keyvault.properties.enable_rbac_authorization: - if not add_role_assignment(cmd, 'Key Vault Secrets User', managed_identity_object_id, is_service_principal, scope=keyvault_id): + if not add_role_assignment( + cmd, + "Key Vault Secrets User", + managed_identity_object_id, + is_service_principal, + scope=keyvault_id, + ): logger.warning( - 'Could not create a role assignment for App Routing. ' - 'Are you an Owner on this subscription?') + "Could not create a role assignment for App Routing. " + "Are you an Owner on this subscription?" + ) else: - keyvault = set_policy(cmd, keyvault_client, keyvault_rg, keyvault_name, object_id=managed_identity_object_id, secret_permissions=['Get'], certificate_permissions=['Get']) + keyvault = set_policy( + cmd, + keyvault_client, + keyvault_rg, + keyvault_name, + object_id=managed_identity_object_id, + secret_permissions=["Get"], + certificate_permissions=["Get"], + ) except Exception as ex: - raise CLIError(f'Error in granting keyvault permissions to managed identity: {ex}\n') + raise CLIError('Error in granting keyvault permissions to managed identity.\n') from ex else: raise CLIError('App Routing is not enabled.\n') diff --git a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py index b8783be410e..5dbd708189c 100644 --- a/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py +++ b/src/aks-preview/azext_aks_preview/maintenanceconfiguration.py @@ -4,7 +4,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from knack.util import CLIError from knack.log import get_logger from azure.cli.core.util import get_file_json from azure.cli.core.azclierror import ( @@ -33,7 +32,12 @@ def aks_maintenanceconfiguration_update_internal(cmd, client, raw_parameters): cluster_name = raw_parameters.get("cluster_name") config_name = raw_parameters.get("config_name") config = getMaintenanceConfiguration(cmd, raw_parameters) - return client.create_or_update(resource_group_name=resource_group_name, resource_name=cluster_name, config_name=config_name, parameters=config) + return client.create_or_update( + resource_group_name=resource_group_name, + resource_name=cluster_name, + config_name=config_name, + parameters=config + ) def getMaintenanceConfiguration(cmd, raw_parameters): @@ -46,10 +50,12 @@ def getMaintenanceConfiguration(cmd, raw_parameters): config_name = raw_parameters.get("config_name") if config_name == CONST_DEFAULT_CONFIGURATION_NAME: return constructDefaultMaintenanceConfiguration(cmd, raw_parameters) - elif config_name == CONST_AUTOUPGRADE_CONFIGURATION_NAME or config_name == CONST_NODEOSUPGRADE_CONFIGURATION_NAME: + if config_name in (CONST_AUTOUPGRADE_CONFIGURATION_NAME, CONST_NODEOSUPGRADE_CONFIGURATION_NAME): return constructDedicatedMaintenanceConfiguration(cmd, raw_parameters) - else: - raise InvalidArgumentValueError('--config-name must be one of default, aksManagedAutoUpgradeSchedule or aksManagedNodeOSUpgradeSchedule, not {}'.format(config_name)) + raise InvalidArgumentValueError( + "--config-name must be one of default, aksManagedAutoUpgradeSchedule or " + f"aksManagedNodeOSUpgradeSchedule, not {config_name}" + ) def constructDefaultMaintenanceConfiguration(cmd, raw_parameters): @@ -58,17 +64,28 @@ def constructDefaultMaintenanceConfiguration(cmd, raw_parameters): schedule_type = raw_parameters.get("schedule_type") if weekday is None or start_hour is None: - raise RequiredArgumentMissingError('Please specify --weekday and --start-hour for default maintenance configuration, or use --config-file instead.') + raise RequiredArgumentMissingError( + "Please specify --weekday and --start-hour for default maintenance configuration, " + "or use --config-file instead." + ) if schedule_type is not None: - raise MutuallyExclusiveArgumentError('--schedule-type is not supported for default maintenance configuration.') + raise MutuallyExclusiveArgumentError("--schedule-type is not supported for default maintenance configuration.") - MaintenanceConfiguration = cmd.get_models('MaintenanceConfiguration', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') - TimeInWeek = cmd.get_models('TimeInWeek', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + MaintenanceConfiguration = cmd.get_models( + "MaintenanceConfiguration", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="maintenance_configurations" + ) + TimeInWeek = cmd.get_models( + "TimeInWeek", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="maintenance_configurations" + ) - dict = {} - dict["day"] = weekday - dict["hour_slots"] = [start_hour] - timeInWeek = TimeInWeek(**dict) + time_in_week_config = {} + time_in_week_config["day"] = weekday + time_in_week_config["hour_slots"] = [start_hour] + timeInWeek = TimeInWeek(**time_in_week_config) result = MaintenanceConfiguration() result.time_in_week = [timeInWeek] result.not_allowed_time = [] @@ -79,9 +96,15 @@ def constructDedicatedMaintenanceConfiguration(cmd, raw_parameters): weekday = raw_parameters.get("weekday") start_hour = raw_parameters.get("start_hour") if weekday is not None or start_hour is not None: - raise MutuallyExclusiveArgumentError('--weekday and --start-hour are only applicable to default maintenance configuration.') - - maintenanceConfiguration = cmd.get_models('MaintenanceConfiguration', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + raise MutuallyExclusiveArgumentError( + "--weekday and --start-hour are only applicable to default maintenance configuration." + ) + + maintenanceConfiguration = cmd.get_models( + "MaintenanceConfiguration", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="maintenance_configurations" + ) result = maintenanceConfiguration() result.maintenance_window = constructMaintenanceWindow(cmd, raw_parameters) return result @@ -99,7 +122,11 @@ def constructMaintenanceWindow(cmd, raw_parameters): if duration_hours is None: raise RequiredArgumentMissingError('Please specify --duration for maintenance window.') - MaintenanceWindow = cmd.get_models('MaintenanceWindow', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + MaintenanceWindow = cmd.get_models( + "MaintenanceWindow", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="maintenance_configurations" + ) maintenanceWindow = MaintenanceWindow( schedule=schedule, start_date=start_date, @@ -119,29 +146,82 @@ def constructSchedule(cmd, raw_parameters): day_of_month = raw_parameters.get("day_of_month") week_index = raw_parameters.get("week_index") - Schedule = cmd.get_models('Schedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + Schedule = cmd.get_models( + "Schedule", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="maintenance_configurations" + ) schedule = Schedule() if schedule_type == CONST_DAILY_MAINTENANCE_SCHEDULE: - schedule.daily = constructDailySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + schedule.daily = constructDailySchedule( + cmd, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index + ) elif schedule_type == CONST_WEEKLY_MAINTENANCE_SCHEDULE: - schedule.weekly = constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + schedule.weekly = constructWeeklySchedule( + cmd, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index + ) elif schedule_type == CONST_ABSOLUTEMONTHLY_MAINTENANCE_SCHEDULE: - schedule.absolute_monthly = constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + schedule.absolute_monthly = constructAbsoluteMonthlySchedule( + cmd, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index + ) elif schedule_type == CONST_RELATIVEMONTHLY_MAINTENANCE_SCHEDULE: - schedule.relative_monthly = constructRelativeMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index) + schedule.relative_monthly = constructRelativeMonthlySchedule( + cmd, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index + ) else: - raise InvalidArgumentValueError('--schedule-type must be one of Daily, Weekly, AbsoluteMonthly or RelativeMonthly.') + raise InvalidArgumentValueError( + "--schedule-type must be one of Daily, Weekly, AbsoluteMonthly or RelativeMonthly." + ) return schedule def constructDailySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): if interval_days is None: - raise RequiredArgumentMissingError("Please specify --interval-days when using daily schedule.") - if interval_weeks is not None or interval_months is not None or day_of_week is not None or day_of_month is not None or week_index is not None: - raise MutuallyExclusiveArgumentError('--interval-weeks, --interval-months, --day-of-week, --day-of-month and --week-index cannot be used for Daily schedule.') - - DailySchedule = cmd.get_models('DailySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + raise RequiredArgumentMissingError( + "Please specify --interval-days when using daily schedule." + ) + if ( + interval_weeks is not None or + interval_months is not None or + day_of_week is not None or + day_of_month is not None or + week_index is not None + ): + raise MutuallyExclusiveArgumentError( + "--interval-weeks, --interval-months, --day-of-week, --day-of-month and " + "--week-index cannot be used for Daily schedule." + ) + + DailySchedule = cmd.get_models( + "DailySchedule", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="maintenance_configurations" + ) dailySchedule = DailySchedule( interval_days=interval_days ) @@ -150,11 +230,19 @@ def constructDailySchedule(cmd, interval_days, interval_weeks, interval_months, def constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): if interval_weeks is None or day_of_week is None: - raise RequiredArgumentMissingError("Please specify --interval-weeks and --day-of-week when using weekly schedule.") + raise RequiredArgumentMissingError( + "Please specify --interval-weeks and --day-of-week when using weekly schedule." + ) if interval_days is not None or interval_months is not None or day_of_month is not None or week_index is not None: - raise MutuallyExclusiveArgumentError('--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule.') - - WeeklySchedule = cmd.get_models('WeeklySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + raise MutuallyExclusiveArgumentError( + "--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule." + ) + + WeeklySchedule = cmd.get_models( + "WeeklySchedule", + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group="maintenance_configurations" + ) weeklySchedule = WeeklySchedule( interval_weeks=interval_weeks, day_of_week=day_of_week @@ -162,13 +250,30 @@ def constructWeeklySchedule(cmd, interval_days, interval_weeks, interval_months, return weeklySchedule -def constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): +def constructAbsoluteMonthlySchedule( + cmd, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index +): if interval_months is None or day_of_month is None: - raise RequiredArgumentMissingError("Please specify --interval-months and --day-of-month when using absolute monthly schedule.") + raise RequiredArgumentMissingError( + "Please specify --interval-months and --day-of-month when using absolute monthly schedule." + ) if interval_days is not None or interval_weeks is not None or day_of_week is not None or week_index is not None: - raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for AbsoluteMonthly schedule.') - - AbsoluteMonthlySchedule = cmd.get_models('AbsoluteMonthlySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + raise MutuallyExclusiveArgumentError( + "--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for " + "AbsoluteMonthly schedule." + ) + + AbsoluteMonthlySchedule = cmd.get_models( + 'AbsoluteMonthlySchedule', + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group='maintenance_configurations' + ) absoluteMonthlySchedule = AbsoluteMonthlySchedule( interval_months=interval_months, day_of_month=day_of_month @@ -176,13 +281,29 @@ def constructAbsoluteMonthlySchedule(cmd, interval_days, interval_weeks, interva return absoluteMonthlySchedule -def constructRelativeMonthlySchedule(cmd, interval_days, interval_weeks, interval_months, day_of_week, day_of_month, week_index): +def constructRelativeMonthlySchedule( + cmd, + interval_days, + interval_weeks, + interval_months, + day_of_week, + day_of_month, + week_index +): if interval_months is None or day_of_week is None or week_index is None: - raise RequiredArgumentMissingError("Please specify --interval-months, --day-of-week and --week-index when using relative monthly schedule.") + raise RequiredArgumentMissingError( + "Please specify --interval-months, --day-of-week and --week-index when using relative monthly schedule." + ) if interval_days is not None or interval_weeks is not None or day_of_month is not None: - raise MutuallyExclusiveArgumentError('--interval-days, --interval-weeks and --day-of-month cannot be used for RelativeMonthly schedule.') - - RelativeMonthlySchedule = cmd.get_models('RelativeMonthlySchedule', resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group='maintenance_configurations') + raise MutuallyExclusiveArgumentError( + "--interval-days, --interval-weeks and --day-of-month cannot be used for RelativeMonthly schedule." + ) + + RelativeMonthlySchedule = cmd.get_models( + 'RelativeMonthlySchedule', + resource_type=CUSTOM_MGMT_AKS_PREVIEW, + operation_group='maintenance_configurations' + ) relativeMonthlySchedule = RelativeMonthlySchedule( interval_months=interval_months, day_of_week=day_of_week, diff --git a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py index 470c866ffd1..cf79f6de9d6 100644 --- a/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py @@ -3,86 +3,39 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=too-many-lines import copy import datetime import os -import semver from types import SimpleNamespace from typing import Any, Dict, List, Optional, Tuple, TypeVar, Union -from knack.util import CLIError - -from azure.mgmt.containerservice.models import KubernetesSupportPlan - -from azure.cli.command_modules.acs._consts import ( - DecoratorEarlyExitException, - DecoratorMode, - CONST_OUTBOUND_TYPE_LOAD_BALANCER, - CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, - CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY, - CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, -) -from azure.cli.command_modules.acs._helpers import ( - check_is_msi_cluster, - format_parameter_name_to_option_name, - safe_lower, -) -from azure.cli.command_modules.acs._validators import ( - extract_comma_separated_string, -) -from azext_aks_preview.azuremonitormetrics.azuremonitorprofile import ( - ensure_azure_monitor_profile_prerequisites -) -from azext_aks_preview.azurecontainerstorage.acstor_ops import ( - perform_enable_azure_container_storage, - perform_disable_azure_container_storage, -) -from azure.cli.command_modules.acs.managed_cluster_decorator import ( - AKSManagedClusterContext, - AKSManagedClusterCreateDecorator, - AKSManagedClusterModels, - AKSManagedClusterParamDict, - AKSManagedClusterUpdateDecorator, -) -from azure.cli.core import AzCommandsLoader -from azure.cli.core.azclierror import ( - ArgumentUsageError, - InvalidArgumentValueError, - MutuallyExclusiveArgumentError, - RequiredArgumentMissingError, - UnknownError, -) -from azure.cli.core.commands import AzCliCommand -from azure.cli.core.profiles import ResourceType -from azure.cli.core.util import get_file_json -from azure.cli.core.util import read_file_content -from knack.log import get_logger -from knack.prompting import prompt_y_n +import semver from azext_aks_preview._consts import ( + CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, CONST_AZURE_SERVICE_MESH_MODE_DISABLED, CONST_AZURE_SERVICE_MESH_MODE_ISTIO, + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE, + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK, + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START, CONST_LOAD_BALANCER_SKU_BASIC, CONST_MANAGED_CLUSTER_SKU_TIER_FREE, - CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD, CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM, + CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD, + CONST_NETWORK_DATAPLANE_CILIUM, CONST_NETWORK_PLUGIN_AZURE, CONST_NETWORK_PLUGIN_MODE_OVERLAY, - CONST_NETWORK_DATAPLANE_CILIUM, CONST_NETWORK_POLICY_CILIUM, CONST_PRIVATE_DNS_ZONE_NONE, CONST_PRIVATE_DNS_ZONE_SYSTEM, - CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, - CONST_SECRET_ROTATION_ENABLED, CONST_ROTATION_POLL_INTERVAL, - CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START, - CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE, - CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK, + CONST_SECRET_ROTATION_ENABLED, ) from azext_aks_preview._helpers import ( - check_is_private_cluster, check_is_apiserver_vnet_integration_cluster, + check_is_private_cluster, get_cluster_snapshot_by_snapshot_id, - setup_common_guardrails_profile + setup_common_guardrails_profile, ) from azext_aks_preview._loadbalancer import create_load_balancer_profile from azext_aks_preview._loadbalancer import ( @@ -93,14 +46,57 @@ _is_pod_identity_addon_enabled, _update_addon_pod_identity, ) +from azext_aks_preview._roleassignments import add_role_assignment from azext_aks_preview.agentpool_decorator import ( AKSPreviewAgentPoolAddDecorator, AKSPreviewAgentPoolUpdateDecorator, ) -from azext_aks_preview._roleassignments import add_role_assignment -from msrestazure.tools import is_valid_resource_id, parse_resource_id - +from azext_aks_preview.azurecontainerstorage.acstor_ops import ( + perform_disable_azure_container_storage, + perform_enable_azure_container_storage, +) +from azext_aks_preview.azuremonitormetrics.azuremonitorprofile import ( + ensure_azure_monitor_profile_prerequisites, +) +from azure.cli.command_modules.acs._consts import ( + CONST_OUTBOUND_TYPE_LOAD_BALANCER, + CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, + CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY, + CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, + DecoratorEarlyExitException, + DecoratorMode, +) +from azure.cli.command_modules.acs._helpers import ( + check_is_msi_cluster, + format_parameter_name_to_option_name, + safe_lower, +) +from azure.cli.command_modules.acs._validators import extract_comma_separated_string +from azure.cli.command_modules.acs.managed_cluster_decorator import ( + AKSManagedClusterContext, + AKSManagedClusterCreateDecorator, + AKSManagedClusterModels, + AKSManagedClusterParamDict, + AKSManagedClusterUpdateDecorator, +) +from azure.cli.core import AzCommandsLoader +from azure.cli.core.azclierror import ( + ArgumentUsageError, + InvalidArgumentValueError, + MutuallyExclusiveArgumentError, + RequiredArgumentMissingError, + UnknownError, +) +from azure.cli.core.commands import AzCliCommand +from azure.cli.core.profiles import ResourceType +from azure.cli.core.util import get_file_json, read_file_content +from azure.mgmt.containerservice.models import KubernetesSupportPlan from dateutil.parser import parse +from knack.log import get_logger +from knack.prompting import prompt_y_n +from knack.util import CLIError +from msrestazure.tools import is_valid_resource_id + logger = get_logger(__name__) @@ -149,12 +145,17 @@ def pod_identity_models(self) -> SimpleNamespace: """ if self.__pod_identity_models is None: pod_identity_models = {} - pod_identity_models["ManagedClusterPodIdentityProfile"] = self.ManagedClusterPodIdentityProfile - pod_identity_models["ManagedClusterPodIdentityException"] = self.ManagedClusterPodIdentityException + pod_identity_models["ManagedClusterPodIdentityProfile"] = ( + self.ManagedClusterPodIdentityProfile # pylint: disable=no-member + ) + pod_identity_models["ManagedClusterPodIdentityException"] = ( + self.ManagedClusterPodIdentityException # pylint: disable=no-member + ) self.__pod_identity_models = SimpleNamespace(**pod_identity_models) return self.__pod_identity_models +# pylint: disable=too-many-public-methods class AKSPreviewManagedClusterContext(AKSManagedClusterContext): def __init__( self, @@ -192,7 +193,6 @@ def get_guardrails_excluded_namespaces(self) -> Union[str, None]: def get_guardrails_version(self) -> Union[str, None]: return self.raw_param.get("guardrails_version") - # pylint: disable=no-self-use def __validate_pod_identity_with_kubenet(self, mc, enable_pod_identity, enable_pod_identity_with_kubenet): """Helper function to check the validity of serveral pod identity related parameters. @@ -343,6 +343,7 @@ def _get_outbound_type( # validation # Note: The parameters involved in the validation are not verified in their own getters. + # pylint: disable=too-many-nested-blocks if enable_validation: if outbound_type in [ CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, @@ -364,7 +365,10 @@ def _get_outbound_type( "be pre-configured with a route table with egress rules" ) - if self.decorator_mode == DecoratorMode.CREATE and outbound_type == CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING: + if ( + self.decorator_mode == DecoratorMode.CREATE and + outbound_type == CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING + ): if load_balancer_profile: if ( load_balancer_profile.managed_outbound_i_ps or @@ -627,6 +631,7 @@ def get_enable_network_observability(self) -> Optional[bool]: return enable_network_observability if disable_network_observability is not None: return not disable_network_observability + return None def get_load_balancer_managed_outbound_ip_count(self) -> Union[int, None]: """Obtain the value of load_balancer_managed_outbound_ip_count. @@ -711,17 +716,13 @@ def get_kube_proxy_config(self) -> Union[Dict, ContainerServiceNetworkProfileKub if kube_proxy_config_file_path: if not os.path.isfile(kube_proxy_config_file_path): raise InvalidArgumentValueError( - "{} is not valid file, or not accessible.".format( - kube_proxy_config_file_path - ) + f"{kube_proxy_config_file_path} is not valid file, or not accessible." ) kube_proxy_config = get_file_json(kube_proxy_config_file_path) if not isinstance(kube_proxy_config, dict): raise InvalidArgumentValueError( - "Error reading kube-proxy config from {}. " - "Please see https://aka.ms/KubeProxyConfig for correct format.".format( - kube_proxy_config_file_path - ) + f"Error reading kube-proxy config from {kube_proxy_config_file_path}. " + "Please see https://aka.ms/KubeProxyConfig for correct format." ) # try to read the property value corresponding to the parameter from the `mc` object @@ -1039,7 +1040,7 @@ def get_workload_identity_profile(self) -> Optional[ManagedClusterSecurityProfil if not hasattr(self.models, "ManagedClusterSecurityProfileWorkloadIdentity"): raise UnknownError("Workload Identity's data model not found") - profile = self.models.ManagedClusterSecurityProfileWorkloadIdentity() + profile = self.models.ManagedClusterSecurityProfileWorkloadIdentity() # pylint: disable=no-member if self.decorator_mode == DecoratorMode.UPDATE: if self.mc.security_profile is not None and self.mc.security_profile.workload_identity is not None: @@ -1196,7 +1197,7 @@ def get_disk_driver(self) -> Optional[ManagedClusterStorageProfileDiskCSIDriver] if not enable_disk_driver and not disable_disk_driver and not disk_driver_version: return None - profile = self.models.ManagedClusterStorageProfileDiskCSIDriver() + profile = self.models.ManagedClusterStorageProfileDiskCSIDriver() # pylint: disable=no-member if enable_disk_driver and disable_disk_driver: raise MutuallyExclusiveArgumentError( @@ -1338,7 +1339,8 @@ def _get_enable_private_cluster(self, enable_validation: bool = False) -> bool: This function supports the option of enable_validation during update. When enable_private_cluster is specified, if api_server_authorized_ip_ranges is assigned, raise an MutuallyExclusiveArgumentError; - When enable_private_cluster is not specified, disable_public_fqdn, enable_public_fqdn or private_dns_zone is assigned, raise an InvalidArgumentValueError. + When enable_private_cluster is not specified, disable_public_fqdn, enable_public_fqdn or private_dns_zone + is assigned, raise an InvalidArgumentValueError. For UPDATE: if existing cluster is not using apiserver vnet integration, raise an ArgumentUsageError; @@ -1407,7 +1409,8 @@ def _get_enable_private_cluster(self, enable_validation: bool = False) -> bool: if enable_private_cluster and not enable_apiserver_vnet_integration: if not is_apiserver_vnet_integration_cluster: raise ArgumentUsageError( - "Enabling private cluster requires enabling apiserver vnet integration(--enable-apiserver-vnet-integration)." + "Enabling private cluster requires enabling apiserver vnet integration" + "(--enable-apiserver-vnet-integration)." ) return enable_private_cluster @@ -1416,7 +1419,8 @@ def get_enable_private_cluster(self) -> bool: """Obtain the value of enable_private_cluster. This function will verify the parameter by default. When enable_private_cluster is specified, - For UPDATE: if enable-apiserver-vnet-integration is not used and existing cluster is not using apiserver vnet integration, raise an ArgumentUsageError + For UPDATE: if enable-apiserver-vnet-integration is not used and existing cluster is not using + apiserver vnet integration, raise an ArgumentUsageError :return: bool """ @@ -1450,9 +1454,13 @@ def _get_disable_private_cluster(self, enable_validation: bool = False) -> bool: ) # new validation added for apiserver vnet integration if disable_private_cluster and not enable_apiserver_vnet_integration: - if self.mc.api_server_access_profile is None or self.mc.api_server_access_profile.enable_vnet_integration is not True: + if ( + self.mc.api_server_access_profile is None or + self.mc.api_server_access_profile.enable_vnet_integration is not True + ): raise ArgumentUsageError( - "Disabling private cluster requires enabling apiserver vnet integration(--enable-apiserver-vnet-integration)." + "Disabling private cluster requires enabling apiserver vnet integration" + "(--enable-apiserver-vnet-integration)." ) return disable_private_cluster @@ -1461,7 +1469,8 @@ def get_disable_private_cluster(self) -> bool: """Obtain the value of disable_private_cluster. This function will verify the parameter by default. When disable_private_cluster is specified, - For UPDATE: if enable-apiserver-vnet-integration is not used and existing cluster is not using apiserver vnet integration, raise an ArgumentUsageError + For UPDATE: if enable-apiserver-vnet-integration is not used and existing cluster is not using + apiserver vnet integration, raise an ArgumentUsageError :return: bool """ @@ -1504,8 +1513,10 @@ def _get_disable_public_fqdn(self, enable_validation: bool = False) -> bool: "Cannot specify '--enable-public-fqdn' and '--disable-public-fqdn' at the same time" ) if ( - safe_lower(self._get_private_dns_zone(enable_validation=False)) == CONST_PRIVATE_DNS_ZONE_NONE or - safe_lower(self.mc.api_server_access_profile.private_dns_zone) == CONST_PRIVATE_DNS_ZONE_NONE + safe_lower(self._get_private_dns_zone(enable_validation=False)) == + CONST_PRIVATE_DNS_ZONE_NONE or + safe_lower(self.mc.api_server_access_profile.private_dns_zone) == + CONST_PRIVATE_DNS_ZONE_NONE ): raise InvalidArgumentValueError( "--disable-public-fqdn cannot be applied for none mode private dns zone cluster" @@ -1817,25 +1828,22 @@ def get_custom_ca_trust_certificates(self) -> Union[List[bytes], None]: return None if not os.path.isfile(custom_ca_certs_file_path): raise InvalidArgumentValueError( - "{} is not valid file, or not accessible.".format( - custom_ca_certs_file_path - ) + f"{custom_ca_certs_file_path} is not valid file, or not accessible." ) - # CAs are supposed to be separated with a new line, we filter out empty strings (e.g. some stray new line). We only allow up to 10 CAs + # CAs are supposed to be separated with a new line, we filter out empty strings (e.g. some stray new line). + # We only allow up to 10 CAs file_content = read_file_content(custom_ca_certs_file_path).split(os.linesep + os.linesep) certs = [str.encode(x) for x in file_content if len(x) > 1] if len(certs) > 10: raise InvalidArgumentValueError( - "Only up to 10 new-line separated CAs can be passed, got {} instead.".format( - len(certs) - ) + f"Only up to 10 new-line separated CAs can be passed, got {len(certs)} instead." ) return certs def _get_enable_node_restriction(self, enable_validation: bool = False) -> bool: """Internal function to obtain the value of enable_node_restriction. - This function supports the option of enable_node_restriction. When enabled, if both enable_node_restriction and disable_node_restriction are - specified, raise a MutuallyExclusiveArgumentError. + This function supports the option of enable_node_restriction. When enabled, if both enable_node_restriction and + disable_node_restriction are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ @@ -1853,14 +1861,17 @@ def _get_enable_node_restriction(self, enable_validation: bool = False) -> bool: def _get_enable_azure_monitor_metrics(self, enable_validation: bool = False) -> bool: """Internal function to obtain the value of enable_azure_monitor_metrics. - This function supports the option of enable_validation. When enabled, if both enable_azure_monitor_metrics and disable_azure_monitor_metrics are - specified, raise a MutuallyExclusiveArgumentError. + This function supports the option of enable_validation. When enabled, if both enable_azure_monitor_metrics and + disable_azure_monitor_metrics are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ # Read the original value passed by the command. # TODO: should remove get value from enable_azuremonitormetrics once the option is removed - enable_azure_monitor_metrics = self.raw_param.get("enable_azure_monitor_metrics") or self.raw_param.get("enable_azuremonitormetrics") + enable_azure_monitor_metrics = ( + self.raw_param.get("enable_azure_monitor_metrics") or + self.raw_param.get("enable_azuremonitormetrics") + ) # In create mode, try to read the property value corresponding to the parameter from the `mc` object. if self.decorator_mode == DecoratorMode.CREATE: if ( @@ -1883,29 +1894,34 @@ def _get_enable_azure_monitor_metrics(self, enable_validation: bool = False) -> def get_enable_azure_monitor_metrics(self) -> bool: """Obtain the value of enable_azure_monitor_metrics. - This function will verify the parameter by default. If both enable_azure_monitor_metrics and disable_azure_monitor_metrics are specified, raise a - MutuallyExclusiveArgumentError. + This function will verify the parameter by default. If both enable_azure_monitor_metrics and + disable_azure_monitor_metrics are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ return self._get_enable_azure_monitor_metrics(enable_validation=True) def _get_disable_azure_monitor_metrics(self, enable_validation: bool = False) -> bool: """Internal function to obtain the value of disable_azure_monitor_metrics. - This function supports the option of enable_validation. When enabled, if both enable_azure_monitor_metrics and disable_azure_monitor_metrics are - specified, raise a MutuallyExclusiveArgumentError. + This function supports the option of enable_validation. When enabled, if both enable_azure_monitor_metrics and + disable_azure_monitor_metrics are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ # Read the original value passed by the command. # TODO: should remove get value from disable_azuremonitormetrics once the option is removed - disable_azure_monitor_metrics = self.raw_param.get("disable_azure_monitor_metrics") or self.raw_param.get("disable_azuremonitormetrics") + disable_azure_monitor_metrics = ( + self.raw_param.get("disable_azure_monitor_metrics") or + self.raw_param.get("disable_azuremonitormetrics") + ) if disable_azure_monitor_metrics and self._get_enable_azure_monitor_metrics(False): - raise MutuallyExclusiveArgumentError("Cannot specify --enable-azuremonitormetrics and --disable-azuremonitormetrics at the same time.") + raise MutuallyExclusiveArgumentError( + "Cannot specify --enable-azuremonitormetrics and --disable-azuremonitormetrics at the same time." + ) return disable_azure_monitor_metrics def get_disable_azure_monitor_metrics(self) -> bool: """Obtain the value of disable_azure_monitor_metrics. - This function will verify the parameter by default. If both enable_azure_monitor_metrics and disable_azure_monitor_metrics are specified, raise a - MutuallyExclusiveArgumentError. + This function will verify the parameter by default. If both enable_azure_monitor_metrics and + disable_azure_monitor_metrics are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ return self._get_disable_azure_monitor_metrics(enable_validation=True) @@ -1913,8 +1929,8 @@ def get_disable_azure_monitor_metrics(self) -> bool: def get_enable_node_restriction(self) -> bool: """Obtain the value of enable_node_restriction. - This function will verify the parameter by default. If both enable_node_restriction and disable_node_restriction are specified, raise a - MutuallyExclusiveArgumentError. + This function will verify the parameter by default. If both enable_node_restriction and + disable_node_restriction are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ @@ -1923,8 +1939,8 @@ def get_enable_node_restriction(self) -> bool: def _get_disable_node_restriction(self, enable_validation: bool = False) -> bool: """Internal function to obtain the value of disable_node_restriction. - This function supports the option of enable_validation. When enabled, if both enable_node_restriction and disable_node_restriction are - specified, raise a MutuallyExclusiveArgumentError. + This function supports the option of enable_validation. When enabled, if both enable_node_restriction and + disable_node_restriction are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ @@ -1944,8 +1960,8 @@ def _get_disable_node_restriction(self, enable_validation: bool = False) -> bool def get_disable_node_restriction(self) -> bool: """Obtain the value of disable_node_restriction. - This function will verify the parameter by default. If both enable_node_restriction and disable_node_restriction are specified, raise a - MutuallyExclusiveArgumentError. + This function will verify the parameter by default. If both enable_node_restriction and + disable_node_restriction are specified, raise a MutuallyExclusiveArgumentError. :return: bool """ @@ -2003,7 +2019,8 @@ def _get_disable_vpa(self, enable_validation: bool = False) -> bool: def get_disable_vpa(self) -> bool: """Obtain the value of disable_vpa. - This function will verify the parameter by default. If both enable_vpa and disable_vpa are specified, raise a MutuallyExclusiveArgumentError. + This function will verify the parameter by default. If both enable_vpa and disable_vpa are specified, + raise a MutuallyExclusiveArgumentError. :return: bool """ @@ -2014,9 +2031,9 @@ def get_ssh_key_value_for_update(self) -> Tuple[str, bool]: Note: no_ssh_key will not be decorated into the `mc` object. - If the user provides a string-like input for --ssh-key-value, the validator function "validate_ssh_key_for_update" will - check whether it is a file path, if so, read its content and return; if it is a valid public key, return it. - Otherwise, raise error. + If the user provides a string-like input for --ssh-key-value, the validator function + "validate_ssh_key_for_update" will check whether it is a file path, if so, read its content and return; + if it is a valid public key, return it. Otherwise, raise error. :return: ssh_key_value of string type """ @@ -2037,13 +2054,14 @@ def get_initial_service_mesh_profile(self) -> ServiceMeshProfile: # returns a service mesh profile only if '--enable-azure-service-mesh' is applied enable_asm = self.raw_param.get("enable_azure_service_mesh", False) if enable_asm: - return self.models.ServiceMeshProfile( + return self.models.ServiceMeshProfile( # pylint: disable=no-member mode=CONST_AZURE_SERVICE_MESH_MODE_ISTIO, - istio=self.models.IstioServiceMesh(), + istio=self.models.IstioServiceMesh(), # pylint: disable=no-member ) return None + # pylint: disable=too-many-branches,too-many-locals,too-many-statements def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: """ Update azure service mesh profile. @@ -2056,8 +2074,11 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: :return: updated service mesh profile """ updated = False - new_profile = self.models.ServiceMeshProfile(mode=CONST_AZURE_SERVICE_MESH_MODE_DISABLED) \ - if self.mc.service_mesh_profile is None else copy.deepcopy(self.mc.service_mesh_profile) + new_profile = ( + self.models.ServiceMeshProfile(mode=CONST_AZURE_SERVICE_MESH_MODE_DISABLED) # pylint: disable=no-member + if self.mc.service_mesh_profile is None + else copy.deepcopy(self.mc.service_mesh_profile) + ) # enable/disable enable_asm = self.raw_param.get("enable_azure_service_mesh", False) @@ -2080,13 +2101,13 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: elif enable_asm: if new_profile is not None and new_profile.mode == CONST_AZURE_SERVICE_MESH_MODE_ISTIO: raise ArgumentUsageError( - "Istio has already been enabled for this cluster, please refer to https://aka.ms/asm-aks-upgrade-docs " - "for more details on updating the mesh profile." + "Istio has already been enabled for this cluster, please refer to " + "https://aka.ms/asm-aks-upgrade-docs for more details on updating the mesh profile." ) requested_revision = self.raw_param.get("revision", None) new_profile.mode = CONST_AZURE_SERVICE_MESH_MODE_ISTIO if new_profile.istio is None: - new_profile.istio = self.models.IstioServiceMesh() + new_profile.istio = self.models.IstioServiceMesh() # pylint: disable=no-member if mesh_upgrade_command is None and requested_revision is not None: new_profile.istio.revisions = [requested_revision] updated = True @@ -2116,7 +2137,7 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: # ensure necessary fields if new_profile.istio.components is None: - new_profile.istio.components = self.models.IstioComponents() + new_profile.istio.components = self.models.IstioComponents() # pylint: disable=no-member updated = True if new_profile.istio.components.ingress_gateways is None: new_profile.istio.components.ingress_gateways = [] @@ -2134,7 +2155,7 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: # ingress gateway not exist, append if not ingress_gateway_exists: new_profile.istio.components.ingress_gateways.append( - self.models.IstioIngressGateway( + self.models.IstioIngressGateway( # pylint: disable=no-member mode=ingress_gateway_type, enabled=enable_ingress_gateway, ) @@ -2160,7 +2181,7 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: # ensure necessary fields if new_profile.istio.components is None: - new_profile.istio.components = self.models.IstioComponents() + new_profile.istio.components = self.models.IstioComponents() # pylint: disable=no-member updated = True if new_profile.istio.components.egress_gateways is None: new_profile.istio.components.egress_gateways = [] @@ -2179,14 +2200,14 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: if not egress_gateway_exists: if egx_gtw_nodeselector: new_profile.istio.components.egress_gateways.append( - self.models.IstioEgressGateway( + self.models.IstioEgressGateway( # pylint: disable=no-member enabled=enable_egress_gateway, node_selector=egx_gtw_nodeselector, ) ) else: new_profile.istio.components.egress_gateways.append( - self.models.IstioEgressGateway( + self.models.IstioEgressGateway( # pylint: disable=no-member enabled=enable_egress_gateway, ) ) @@ -2201,15 +2222,25 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: if any([key_vault_id, ca_cert_object_name, ca_key_object_name, root_cert_object_name, cert_chain_object_name]): if key_vault_id is None: - raise InvalidArgumentValueError('--key-vault-id is required to use Azure Service Mesh plugin CA feature.') + raise InvalidArgumentValueError( + '--key-vault-id is required to use Azure Service Mesh plugin CA feature.' + ) if ca_cert_object_name is None: - raise InvalidArgumentValueError('--ca-cert-object-name is required to use Azure Service Mesh plugin CA feature.') + raise InvalidArgumentValueError( + '--ca-cert-object-name is required to use Azure Service Mesh plugin CA feature.' + ) if ca_key_object_name is None: - raise InvalidArgumentValueError('--ca-key-object-name is required to use Azure Service Mesh plugin CA feature.') + raise InvalidArgumentValueError( + '--ca-key-object-name is required to use Azure Service Mesh plugin CA feature.' + ) if root_cert_object_name is None: - raise InvalidArgumentValueError('--root-cert-object-name is required to use Azure Service Mesh plugin CA feature.') + raise InvalidArgumentValueError( + '--root-cert-object-name is required to use Azure Service Mesh plugin CA feature.' + ) if cert_chain_object_name is None: - raise InvalidArgumentValueError('--cert-chain-object-name is required to use Azure Service Mesh plugin CA feature.') + raise InvalidArgumentValueError( + '--cert-chain-object-name is required to use Azure Service Mesh plugin CA feature.' + ) if key_vault_id is not None and ( not is_valid_resource_id(key_vault_id) or "providers/Microsoft.KeyVault/vaults" not in key_vault_id): @@ -2217,11 +2248,23 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: key_vault_id + " is not a valid Azure Keyvault resource ID." ) - if enable_asm and all([key_vault_id, ca_cert_object_name, ca_key_object_name, root_cert_object_name, cert_chain_object_name]): + if enable_asm and all( + [ + key_vault_id, + ca_cert_object_name, + ca_key_object_name, + root_cert_object_name, + cert_chain_object_name, + ] + ): if new_profile.istio.certificate_authority is None: - new_profile.istio.certificate_authority = self.models.IstioCertificateAuthority() + new_profile.istio.certificate_authority = ( + self.models.IstioCertificateAuthority() # pylint: disable=no-member + ) if new_profile.istio.certificate_authority.plugin is None: - new_profile.istio.certificate_authority.plugin = self.models.IstioPluginCertificateAuthority() + new_profile.istio.certificate_authority.plugin = ( + self.models.IstioPluginCertificateAuthority() # pylint: disable=no-member + ) new_profile.istio.certificate_authority.plugin.key_vault_id = key_vault_id new_profile.istio.certificate_authority.plugin.cert_object_name = ca_cert_object_name new_profile.istio.certificate_authority.plugin.key_object_name = ca_key_object_name @@ -2237,7 +2280,10 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: "for more details on enabling Azure Service Mesh." ) requested_revision = self.raw_param.get("revision", None) - if mesh_upgrade_command == CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE or mesh_upgrade_command == CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK: + if mesh_upgrade_command in ( + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE, + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK, + ): if len(new_profile.istio.revisions) < 2: raise ArgumentUsageError('Azure Service Mesh upgrade is not in progress.') @@ -2248,13 +2294,18 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: else: revision_to_remove = sorted_revisons[-1] revision_to_keep = sorted_revisons[0] - msg = (f"This operation will remove Istio control plane for revision {revision_to_remove}. " - f"Please ensure all data plane workloads have been rolled over to revision {revision_to_keep} so that they are still part of the mesh. " - "\nAre you sure you want to proceed?") + msg = ( + f"This operation will remove Istio control plane for revision {revision_to_remove}. " + f"Please ensure all data plane workloads have been rolled over to revision {revision_to_keep} " + "so that they are still part of the mesh.\nAre you sure you want to proceed?" + ) if prompt_y_n(msg, default="y"): new_profile.istio.revisions.remove(revision_to_remove) updated = True - elif mesh_upgrade_command == CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START and requested_revision is not None: + elif ( + mesh_upgrade_command == CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START and + requested_revision is not None + ): if new_profile.istio.revisions is None: new_profile.istio.revisions = [] new_profile.istio.revisions.append(requested_revision) @@ -2262,8 +2313,7 @@ def update_azure_service_mesh_profile(self) -> ServiceMeshProfile: if updated: return new_profile - else: - return self.mc.service_mesh_profile + return self.mc.service_mesh_profile def _sort_revisions(self, revisions): def _convert_revision_to_semver(rev): @@ -2500,6 +2550,7 @@ def get_node_provisioning_mode(self) -> Union[str, None]: return self.raw_param.get("node_provisioning_mode") +# pylint: disable=too-many-public-methods class AKSPreviewManagedClusterCreateDecorator(AKSManagedClusterCreateDecorator): def __init__( self, cmd: AzCliCommand, client: ContainerServiceClient, raw_parameters: Dict, resource_type: ResourceType @@ -2573,7 +2624,10 @@ def set_up_network_profile(self, mc: ManagedCluster) -> ManagedCluster: network_profile.ip_families = ip_families # recreate the load balancer profile if load_balancer_managed_outbound_ipv6_count is not None - if self.context.get_load_balancer_managed_outbound_ipv6_count() is not None or self.context.get_load_balancer_backend_pool_type() is not None: + if ( + self.context.get_load_balancer_managed_outbound_ipv6_count() is not None or + self.context.get_load_balancer_backend_pool_type() is not None + ): network_profile.load_balancer_profile = create_load_balancer_profile( self.context.get_load_balancer_managed_outbound_ip_count(), self.context.get_load_balancer_managed_outbound_ipv6_count(), @@ -2601,7 +2655,7 @@ def set_up_network_profile(self, mc: ManagedCluster) -> ManagedCluster: network_observability = self.context.get_enable_network_observability() if network_observability is not None: - network_profile.monitoring = self.models.NetworkMonitoring( + network_profile.monitoring = self.models.NetworkMonitoring( # pylint: disable=no-member enabled=network_observability ) @@ -2617,6 +2671,7 @@ def set_up_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster mc = super().set_up_api_server_access_profile(mc) if self.context.get_enable_apiserver_vnet_integration(): if mc.api_server_access_profile is None: + # pylint: disable=no-member mc.api_server_access_profile = self.models.ManagedClusterAPIServerAccessProfile() mc.api_server_access_profile.enable_vnet_integration = True if self.context.get_apiserver_subnet_id(): @@ -2629,7 +2684,7 @@ def build_gitops_addon_profile(self) -> ManagedClusterAddonProfile: :return: a ManagedClusterAddonProfile object """ - gitops_addon_profile = self.models.ManagedClusterAddonProfile( + gitops_addon_profile = self.models.ManagedClusterAddonProfile( # pylint: disable=no-member enabled=True, ) return gitops_addon_profile @@ -2677,6 +2732,7 @@ def set_up_pod_identity_profile(self, mc: ManagedCluster) -> ManagedCluster: enable_pod_identity = self.context.get_enable_pod_identity() enable_pod_identity_with_kubenet = self.context.get_enable_pod_identity_with_kubenet() if enable_pod_identity: + # pylint: disable=no-member pod_identity_profile = self.models.pod_identity_models.ManagedClusterPodIdentityProfile( enabled=True, allow_network_plugin_kubenet=enable_pod_identity_with_kubenet, @@ -2694,7 +2750,7 @@ def set_up_workload_identity_profile(self, mc: ManagedCluster) -> ManagedCluster profile = self.context.get_workload_identity_profile() if profile: if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member mc.security_profile.workload_identity = profile return mc @@ -2708,9 +2764,11 @@ def set_up_image_integrity(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_image_integrity(): if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() - mc.security_profile.image_integrity = self.models.ManagedClusterSecurityProfileImageIntegrity( - enabled=True, + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member + mc.security_profile.image_integrity = ( + self.models.ManagedClusterSecurityProfileImageIntegrity( # pylint: disable=no-member + enabled=True, + ) ) return mc @@ -2726,7 +2784,7 @@ def set_up_creationdata_of_cluster_snapshot(self, mc: ManagedCluster) -> Managed creation_data = None snapshot_id = self.context.get_cluster_snapshot_id() if snapshot_id: - creation_data = self.models.CreationData( + creation_data = self.models.CreationData( # pylint: disable=no-member source_resource_id=snapshot_id ) mc.creation_data = creation_data @@ -2753,8 +2811,10 @@ def set_up_ingress_web_app_routing(self, mc: ManagedCluster) -> ManagedCluster: addons = self.context.get_enable_addons() if "web_application_routing" in addons or self.context.get_enable_app_routing(): if mc.ingress_profile is None: - mc.ingress_profile = self.models.ManagedClusterIngressProfile() - mc.ingress_profile.web_app_routing = self.models.ManagedClusterIngressProfileWebAppRouting(enabled=True) + mc.ingress_profile = self.models.ManagedClusterIngressProfile() # pylint: disable=no-member + mc.ingress_profile.web_app_routing = ( + self.models.ManagedClusterIngressProfileWebAppRouting(enabled=True) # pylint: disable=no-member + ) if "web_application_routing" in addons: dns_zone_resource_ids = self.context.get_dns_zone_resource_ids() mc.ingress_profile.web_app_routing.dns_zone_resource_ids = dns_zone_resource_ids @@ -2770,8 +2830,12 @@ def set_up_workload_auto_scaler_profile(self, mc: ManagedCluster) -> ManagedClus if self.context.get_enable_keda(): if mc.workload_auto_scaler_profile is None: - mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() - mc.workload_auto_scaler_profile.keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) + mc.workload_auto_scaler_profile = ( + self.models.ManagedClusterWorkloadAutoScalerProfile() # pylint: disable=no-member + ) + mc.workload_auto_scaler_profile.keda = ( + self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) # pylint: disable=no-member + ) return mc @@ -2785,7 +2849,7 @@ def set_up_custom_ca_trust_certificates(self, mc: ManagedCluster) -> ManagedClus ca_certs = self.context.get_custom_ca_trust_certificates() if ca_certs: if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member mc.security_profile.custom_ca_trust_certificates = ca_certs @@ -2800,7 +2864,8 @@ def set_up_node_restriction(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_node_restriction(): if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member + # pylint: disable=no-member mc.security_profile.node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction( enabled=True, ) @@ -2816,9 +2881,17 @@ def set_up_vpa(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_vpa(): if mc.workload_auto_scaler_profile is None: - mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() + mc.workload_auto_scaler_profile = ( + # pylint: disable=no-member + self.models.ManagedClusterWorkloadAutoScalerProfile() + ) if mc.workload_auto_scaler_profile.vertical_pod_autoscaler is None: - mc.workload_auto_scaler_profile.vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(enabled=True) + mc.workload_auto_scaler_profile.vertical_pod_autoscaler = ( + # pylint: disable=no-member + self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( + enabled=True + ) + ) else: mc.workload_auto_scaler_profile.vertical_pod_autoscaler.enabled = True return mc @@ -2847,7 +2920,10 @@ def set_up_node_resource_group_profile(self, mc: ManagedCluster) -> ManagedClust node_resource_group_profile = None nrg_lockdown_restriction_level = self.context.get_nrg_lockdown_restriction_level() if nrg_lockdown_restriction_level: - node_resource_group_profile = self.models.ManagedClusterNodeResourceGroupProfile(restriction_level=nrg_lockdown_restriction_level) + # pylint: disable=no-member + node_resource_group_profile = self.models.ManagedClusterNodeResourceGroupProfile( + restriction_level=nrg_lockdown_restriction_level + ) mc.node_resource_group_profile = node_resource_group_profile return mc @@ -2865,9 +2941,12 @@ def set_up_azure_monitor_profile(self, mc: ManagedCluster) -> ManagedCluster: ksm_metric_annotations_allow_list = "" if self.context.get_enable_azure_monitor_metrics(): if mc.azure_monitor_profile is None: - mc.azure_monitor_profile = self.models.ManagedClusterAzureMonitorProfile() - mc.azure_monitor_profile.metrics = self.models.ManagedClusterAzureMonitorProfileMetrics(enabled=False) - mc.azure_monitor_profile.metrics.kube_state_metrics = self.models.ManagedClusterAzureMonitorProfileKubeStateMetrics( # pylint:disable=line-too-long + mc.azure_monitor_profile = self.models.ManagedClusterAzureMonitorProfile() # pylint: disable=no-member + mc.azure_monitor_profile.metrics = ( + self.models.ManagedClusterAzureMonitorProfileMetrics(enabled=False) # pylint: disable=no-member + ) + # pylint: disable=line-too-long, no-member + mc.azure_monitor_profile.metrics.kube_state_metrics = self.models.ManagedClusterAzureMonitorProfileKubeStateMetrics( metric_labels_allowlist=str(ksm_metric_labels_allow_list), metric_annotations_allow_list=str(ksm_metric_annotations_allow_list)) self.context.set_intermediate("azuremonitormetrics_addon_enabled", True, overwrite_exists=True) @@ -2940,7 +3019,7 @@ def set_up_auto_upgrade_profile(self, mc: ManagedCluster) -> ManagedCluster: node_os_upgrade_channel = self.context.get_node_os_upgrade_channel() if node_os_upgrade_channel: if mc.auto_upgrade_profile is None: - mc.auto_upgrade_profile = self.models.ManagedClusterAutoUpgradeProfile() + mc.auto_upgrade_profile = self.models.ManagedClusterAutoUpgradeProfile() # pylint: disable=no-member mc.auto_upgrade_profile.node_os_upgrade_channel = node_os_upgrade_channel return mc @@ -2975,13 +3054,13 @@ def set_up_sku(self, mc: ManagedCluster) -> ManagedCluster: self._ensure_mc(mc) if self.context.get_uptime_sla() or self.context.get_tier() == CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD: - mc.sku = self.models.ManagedClusterSKU( + mc.sku = self.models.ManagedClusterSKU( # pylint: disable=no-member name="Base", tier="Standard" ) if self.context.get_tier() == CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM: - mc.sku = self.models.ManagedClusterSKU( + mc.sku = self.models.ManagedClusterSKU( # pylint: disable=no-member name="Base", tier="Premium" ) @@ -3006,9 +3085,11 @@ def set_up_cost_analysis(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_cost_analysis(): if mc.metrics_profile is None: - mc.metrics_profile = self.models.ManagedClusterMetricsProfile() + mc.metrics_profile = self.models.ManagedClusterMetricsProfile() # pylint: disable=no-member if mc.metrics_profile.cost_analysis is None: - mc.metrics_profile.cost_analysis = self.models.ManagedClusterCostAnalysis() + mc.metrics_profile.cost_analysis = ( + self.models.ManagedClusterCostAnalysis() # pylint: disable=no-member + ) # set enabled mc.metrics_profile.cost_analysis.enabled = True @@ -3030,7 +3111,9 @@ def set_up_node_provisioning_mode(self, mc: ManagedCluster) -> ManagedCluster: mode = self.context.get_node_provisioning_mode() if mode is not None: if mc.node_provisioning_profile is None: - mc.node_provisioning_profile = self.models.ManagedClusterNodeProvisioningProfile() + mc.node_provisioning_profile = ( + self.models.ManagedClusterNodeProvisioningProfile() # pylint: disable=no-member + ) # set mode mc.node_provisioning_profile.mode = mode @@ -3044,6 +3127,7 @@ def set_up_node_provisioning_profile(self, mc: ManagedCluster) -> ManagedCluster return mc + # pylint: disable=unused-argument def construct_mc_profile_preview(self, bypass_restore_defaults: bool = False) -> ManagedCluster: """The overall controller used to construct the default ManagedCluster profile. @@ -3120,8 +3204,12 @@ def check_is_postprocessing_required(self, mc: ManagedCluster) -> bool: need_grant_vnet_permission_to_cluster_identity = self.context.get_intermediate( "need_post_creation_vnet_permission_granting", default_value=False ) - enable_azure_container_storage = self.context.get_intermediate("enable_azure_container_storage", default_value=False) + enable_azure_container_storage = self.context.get_intermediate( + "enable_azure_container_storage", + default_value=False + ) + # pylint: disable=too-many-boolean-expressions if ( monitoring_addon_enabled or ingress_appgw_addon_enabled or @@ -3389,13 +3477,11 @@ def check_raw_parameters(self): return option_names = sorted([ - '"{}"'.format(format_parameter_name_to_option_name(x)) + f'"{format_parameter_name_to_option_name(x)}"' for x in self.context.raw_param.keys() if x not in excluded_keys ]) - error_msg = "Please specify one or more of {}.".format( - " or ".join(option_names) - ) + error_msg = f"Please specify one or more of {' or '.join(option_names)}." raise RequiredArgumentMissingError(error_msg) def update_network_plugin_settings(self, mc: ManagedCluster) -> ManagedCluster: @@ -3405,7 +3491,8 @@ def update_network_plugin_settings(self, mc: ManagedCluster) -> ManagedCluster: """ self._ensure_mc(mc) - network_plugin = self.context._get_network_plugin() + # TODO: replace protected access with public access + network_plugin = self.context._get_network_plugin() # pylint: disable=protected-access if network_plugin: mc.network_profile.network_plugin = network_plugin @@ -3427,7 +3514,8 @@ def update_network_plugin_settings(self, mc: ManagedCluster) -> ManagedCluster: elif network_dataplane == CONST_NETWORK_DATAPLANE_CILIUM: # force network_policy to "cilium" when network_dataplane is "cilium" to pass validation in aks rp # this was needed because api version 2023-08-02preview introduced --network-policy=none - # without forcing network_policy to "cilium" here, when upgrading to cilium without specifying --network-policy, it will be set to none by default and validation in aks rp will fail. + # without forcing network_policy to "cilium" here, when upgrading to cilium without specifying + # --network-policy, it will be set to none by default and validation in aks rp will fail. mc.network_profile.network_policy = CONST_NETWORK_POLICY_CILIUM return mc @@ -3441,7 +3529,7 @@ def update_enable_network_observability_in_network_profile(self, mc: ManagedClus network_observability = self.context.get_enable_network_observability() if network_observability is not None: - mc.network_profile.monitoring = self.models.NetworkMonitoring( + mc.network_profile.monitoring = self.models.NetworkMonitoring( # pylint: disable=no-member enabled=network_observability ) return mc @@ -3472,8 +3560,8 @@ def update_azure_container_storage(self, mc: ManagedCluster) -> ManagedCluster: if enable_azure_container_storage: if not mc.agent_pool_profiles: raise UnknownError( - "Encounter an unexpected error while getting agent pool profiles from the cluster in the process of " - "updating agentpool profile." + "Encounter an unexpected error while getting agent pool profiles from the cluster " + "in the process of updating agentpool profile." ) for agentpool in mc.agent_pool_profiles: @@ -3533,16 +3621,22 @@ def update_azure_container_storage(self, mc: ManagedCluster) -> ManagedCluster: if disable_azure_container_storage: pre_uninstall_validate = False - msg = 'Disabling Azure Container Storage will forcefully delete all the storagepools on the cluster and ' \ - 'affect the applications using these storagepools. Forceful deletion of storagepools can also lead to ' \ - 'leaking of storage resources which are being consumed. Do you want to validate whether any of ' \ - 'the storagepools are being used before disabling Azure Container Storage?' + msg = ( + "Disabling Azure Container Storage will forcefully delete all the storagepools on the cluster and " + "affect the applications using these storagepools. Forceful deletion of storagepools can also lead to " + "leaking of storage resources which are being consumed. Do you want to validate whether any of " + "the storagepools are being used before disabling Azure Container Storage?" + ) if self.context.get_yes() or prompt_y_n(msg, default="y"): pre_uninstall_validate = True # set intermediate self.context.set_intermediate("disable_azure_container_storage", True, overwrite_exists=True) - self.context.set_intermediate("pre_uninstall_validate_azure_container_storage", pre_uninstall_validate, overwrite_exists=True) + self.context.set_intermediate( + "pre_uninstall_validate_azure_container_storage", + pre_uninstall_validate, + overwrite_exists=True + ) return mc @@ -3601,7 +3695,7 @@ def update_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster self._ensure_mc(mc) if mc.api_server_access_profile is None: - profile_holder = self.models.ManagedClusterAPIServerAccessProfile() + profile_holder = self.models.ManagedClusterAPIServerAccessProfile() # pylint: disable=no-member else: profile_holder = mc.api_server_access_profile @@ -3632,7 +3726,7 @@ def update_api_server_access_profile(self, mc: ManagedCluster) -> ManagedCluster # keep api_server_access_profile empty if none of its properties are updated if ( profile_holder != mc.api_server_access_profile and - profile_holder == self.models.ManagedClusterAPIServerAccessProfile() + profile_holder == self.models.ManagedClusterAPIServerAccessProfile() # pylint: disable=no-member ): profile_holder = None mc.api_server_access_profile = profile_holder @@ -3712,7 +3806,7 @@ def update_workload_identity_profile(self, mc: ManagedCluster) -> ManagedCluster return mc if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member mc.security_profile.workload_identity = profile return mc @@ -3754,12 +3848,14 @@ def update_image_integrity(self, mc: ManagedCluster) -> ManagedCluster: shouldEnable_image_integrity = True if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member image_integrity_profile = mc.security_profile.image_integrity if image_integrity_profile is None: - image_integrity_profile = self.models.ManagedClusterSecurityProfileImageIntegrity() + image_integrity_profile = ( + self.models.ManagedClusterSecurityProfileImageIntegrity() # pylint: disable=no-member + ) mc.security_profile.image_integrity = image_integrity_profile image_integrity_profile.enabled = shouldEnable_image_integrity @@ -3786,13 +3882,21 @@ def update_workload_auto_scaler_profile(self, mc: ManagedCluster) -> ManagedClus if self.context.get_enable_keda(): if mc.workload_auto_scaler_profile is None: - mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() - mc.workload_auto_scaler_profile.keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) + mc.workload_auto_scaler_profile = ( + self.models.ManagedClusterWorkloadAutoScalerProfile() # pylint: disable=no-member + ) + mc.workload_auto_scaler_profile.keda = ( + self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) # pylint: disable=no-member + ) if self.context.get_disable_keda(): if mc.workload_auto_scaler_profile is None: - mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() - mc.workload_auto_scaler_profile.keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=False) + mc.workload_auto_scaler_profile = ( + self.models.ManagedClusterWorkloadAutoScalerProfile() # pylint: disable=no-member + ) + mc.workload_auto_scaler_profile.keda = ( + self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=False) # pylint: disable=no-member + ) return mc @@ -3806,7 +3910,7 @@ def update_custom_ca_trust_certificates(self, mc: ManagedCluster) -> ManagedClus ca_certs = self.context.get_custom_ca_trust_certificates() if ca_certs: if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member mc.security_profile.custom_ca_trust_certificates = ca_certs @@ -3829,16 +3933,23 @@ def update_azure_monitor_profile(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_azure_monitor_metrics(): if mc.azure_monitor_profile is None: - mc.azure_monitor_profile = self.models.ManagedClusterAzureMonitorProfile() - mc.azure_monitor_profile.metrics = self.models.ManagedClusterAzureMonitorProfileMetrics(enabled=True) - mc.azure_monitor_profile.metrics.kube_state_metrics = self.models.ManagedClusterAzureMonitorProfileKubeStateMetrics( - metric_labels_allowlist=str(ksm_metric_labels_allow_list), - metric_annotations_allow_list=str(ksm_metric_annotations_allow_list)) + mc.azure_monitor_profile = self.models.ManagedClusterAzureMonitorProfile() # pylint: disable=no-member + mc.azure_monitor_profile.metrics = ( + self.models.ManagedClusterAzureMonitorProfileMetrics(enabled=True) # pylint: disable=no-member + ) + mc.azure_monitor_profile.metrics.kube_state_metrics = ( + self.models.ManagedClusterAzureMonitorProfileKubeStateMetrics( # pylint: disable=no-member + metric_labels_allowlist=str(ksm_metric_labels_allow_list), + metric_annotations_allow_list=str(ksm_metric_annotations_allow_list) + ) + ) if self.context.get_disable_azure_monitor_metrics(): if mc.azure_monitor_profile is None: - mc.azure_monitor_profile = self.models.ManagedClusterAzureMonitorProfile() - mc.azure_monitor_profile.metrics = self.models.ManagedClusterAzureMonitorProfileMetrics(enabled=False) + mc.azure_monitor_profile = self.models.ManagedClusterAzureMonitorProfile() # pylint: disable=no-member + mc.azure_monitor_profile.metrics = ( + self.models.ManagedClusterAzureMonitorProfileMetrics(enabled=False) # pylint: disable=no-member + ) # TODO: should remove get value from enable_azuremonitormetrics once the option is removed # TODO: should remove get value from disable_azuremonitormetrics once the option is removed @@ -3868,18 +3979,23 @@ def update_node_restriction(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_node_restriction(): if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member if mc.security_profile.node_restriction is None: - mc.security_profile.node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction() + mc.security_profile.node_restriction = ( + self.models.ManagedClusterSecurityProfileNodeRestriction() # pylint: disable=no-member + ) # set enabled mc.security_profile.node_restriction.enabled = True if self.context.get_disable_node_restriction(): if mc.security_profile is None: - mc.security_profile = self.models.ManagedClusterSecurityProfile() + mc.security_profile = self.models.ManagedClusterSecurityProfile() # pylint: disable=no-member if mc.security_profile.node_restriction is None: - mc.security_profile.node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction() + mc.security_profile.node_restriction = ( + # pylint: disable=no-member + self.models.ManagedClusterSecurityProfileNodeRestriction() + ) # set disabled mc.security_profile.node_restriction.enabled = False @@ -3895,18 +4011,28 @@ def update_vpa(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_vpa(): if mc.workload_auto_scaler_profile is None: - mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() + mc.workload_auto_scaler_profile = ( + self.models.ManagedClusterWorkloadAutoScalerProfile() # pylint: disable=no-member + ) if mc.workload_auto_scaler_profile.vertical_pod_autoscaler is None: - mc.workload_auto_scaler_profile.vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() + mc.workload_auto_scaler_profile.vertical_pod_autoscaler = ( + # pylint: disable=no-member + self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() + ) # set enabled mc.workload_auto_scaler_profile.vertical_pod_autoscaler.enabled = True if self.context.get_disable_vpa(): if mc.workload_auto_scaler_profile is None: - mc.workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() + mc.workload_auto_scaler_profile = ( + self.models.ManagedClusterWorkloadAutoScalerProfile() # pylint: disable=no-member + ) if mc.workload_auto_scaler_profile.vertical_pod_autoscaler is None: - mc.workload_auto_scaler_profile.vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() + mc.workload_auto_scaler_profile.vertical_pod_autoscaler = ( + # pylint: disable=no-member + self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler() + ) # set disabled mc.workload_auto_scaler_profile.vertical_pod_autoscaler.enabled = False @@ -3924,7 +4050,7 @@ def update_creation_data(self, mc: ManagedCluster) -> ManagedCluster: raise UnknownError( "Please use az aks upgrade --cluster-snapshot-id to upgrade cluster version" ) - creation_data = self.models.CreationData( + creation_data = self.models.CreationData( # pylint: disable=no-member source_resource_id=snapshot_id ) mc.creation_data = creation_data @@ -3942,20 +4068,20 @@ def update_linux_profile(self, mc: ManagedCluster) -> ManagedCluster: if ssh_key_value: if mc.linux_profile is None: - mc.linux_profile = self.models.ContainerServiceLinuxProfile( + mc.linux_profile = self.models.ContainerServiceLinuxProfile( # pylint: disable=no-member admin_username="azureuser", - ssh=self.models.ContainerServiceSshConfiguration( + ssh=self.models.ContainerServiceSshConfiguration( # pylint: disable=no-member public_keys=[ - self.models.ContainerServiceSshPublicKey( + self.models.ContainerServiceSshPublicKey( # pylint: disable=no-member key_data=ssh_key_value ) ] ) ) else: - mc.linux_profile.ssh = self.models.ContainerServiceSshConfiguration( + mc.linux_profile.ssh = self.models.ContainerServiceSshConfiguration( # pylint: disable=no-member public_keys=[ - self.models.ContainerServiceSshPublicKey( + self.models.ContainerServiceSshPublicKey( # pylint: disable=no-member key_data=ssh_key_value ) ] @@ -3971,7 +4097,9 @@ def update_node_resource_group_profile(self, mc: ManagedCluster) -> ManagedClust nrg_lockdown_restriction_level = self.context.get_nrg_lockdown_restriction_level() if nrg_lockdown_restriction_level is not None: if mc.node_resource_group_profile is None: - mc.node_resource_group_profile = self.models.ManagedClusterNodeResourceGroupProfile() + mc.node_resource_group_profile = ( + self.models.ManagedClusterNodeResourceGroupProfile() # pylint: disable=no-member + ) mc.node_resource_group_profile.restriction_level = nrg_lockdown_restriction_level return mc @@ -3984,7 +4112,7 @@ def update_auto_upgrade_profile(self, mc: ManagedCluster) -> ManagedCluster: node_os_upgrade_channel = self.context.get_node_os_upgrade_channel() if node_os_upgrade_channel is not None: if mc.auto_upgrade_profile is None: - mc.auto_upgrade_profile = self.models.ManagedClusterAutoUpgradeProfile() + mc.auto_upgrade_profile = self.models.ManagedClusterAutoUpgradeProfile() # pylint: disable=no-member mc.auto_upgrade_profile.node_os_upgrade_channel = node_os_upgrade_channel return mc @@ -4028,19 +4156,19 @@ def update_sku(self, mc: ManagedCluster) -> ManagedCluster: # Premium without LTS is ok (not vice versa) if self.context.get_tier() == CONST_MANAGED_CLUSTER_SKU_TIER_PREMIUM: - mc.sku = self.models.ManagedClusterSKU( + mc.sku = self.models.ManagedClusterSKU( # pylint: disable=no-member name="Base", tier="Premium" ) if self.context.get_uptime_sla() or self.context.get_tier() == CONST_MANAGED_CLUSTER_SKU_TIER_STANDARD: - mc.sku = self.models.ManagedClusterSKU( + mc.sku = self.models.ManagedClusterSKU( # pylint: disable=no-member name="Base", tier="Standard" ) if self.context.get_no_uptime_sla() or self.context.get_tier() == CONST_MANAGED_CLUSTER_SKU_TIER_FREE: - mc.sku = self.models.ManagedClusterSKU( + mc.sku = self.models.ManagedClusterSKU( # pylint: disable=no-member name="Base", tier="Free" ) @@ -4053,7 +4181,11 @@ def update_upgrade_settings(self, mc: ManagedCluster) -> ManagedCluster: self._ensure_mc(mc) existing_until = None - if mc.upgrade_settings is not None and mc.upgrade_settings.override_settings is not None and mc.upgrade_settings.override_settings.until is not None: + if ( + mc.upgrade_settings is not None and + mc.upgrade_settings.override_settings is not None and + mc.upgrade_settings.override_settings.until is not None + ): existing_until = mc.upgrade_settings.override_settings.until force_upgrade = self.context.get_force_upgrade() @@ -4061,9 +4193,11 @@ def update_upgrade_settings(self, mc: ManagedCluster) -> ManagedCluster: if force_upgrade is not None or override_until is not None: if mc.upgrade_settings is None: - mc.upgrade_settings = self.models.ClusterUpgradeSettings() + mc.upgrade_settings = self.models.ClusterUpgradeSettings() # pylint: disable=no-member if mc.upgrade_settings.override_settings is None: - mc.upgrade_settings.override_settings = self.models.UpgradeOverrideSettings() + mc.upgrade_settings.override_settings = ( + self.models.UpgradeOverrideSettings() # pylint: disable=no-member + ) # sets force_upgrade if force_upgrade is not None: mc.upgrade_settings.override_settings.force_upgrade = force_upgrade @@ -4071,10 +4205,10 @@ def update_upgrade_settings(self, mc: ManagedCluster) -> ManagedCluster: if override_until is not None: try: mc.upgrade_settings.override_settings.until = parse(override_until) - except Exception: # pylint: disable=broad-except + except Exception as exc: # pylint: disable=broad-except raise InvalidArgumentValueError( f"{override_until} is not a valid datatime format." - ) + ) from exc elif force_upgrade: default_extended_until = datetime.datetime.utcnow() + datetime.timedelta(days=3) if existing_until is None or existing_until.timestamp() < default_extended_until.timestamp(): @@ -4103,18 +4237,18 @@ def update_cost_analysis(self, mc: ManagedCluster) -> ManagedCluster: if self.context.get_enable_cost_analysis(): if mc.metrics_profile is None: - mc.metrics_profile = self.models.ManagedClusterMetricsProfile() + mc.metrics_profile = self.models.ManagedClusterMetricsProfile() # pylint: disable=no-member if mc.metrics_profile.cost_analysis is None: - mc.metrics_profile.cost_analysis = self.models.ManagedClusterCostAnalysis() + mc.metrics_profile.cost_analysis = self.models.ManagedClusterCostAnalysis() # pylint: disable=no-member # set enabled mc.metrics_profile.cost_analysis.enabled = True if self.context.get_disable_cost_analysis(): if mc.metrics_profile is None: - mc.metrics_profile = self.models.ManagedClusterMetricsProfile() + mc.metrics_profile = self.models.ManagedClusterMetricsProfile() # pylint: disable=no-member if mc.metrics_profile.cost_analysis is None: - mc.metrics_profile.cost_analysis = self.models.ManagedClusterCostAnalysis() + mc.metrics_profile.cost_analysis = self.models.ManagedClusterCostAnalysis() # pylint: disable=no-member # set disabled mc.metrics_profile.cost_analysis.enabled = False @@ -4127,7 +4261,9 @@ def update_node_provisioning_mode(self, mc: ManagedCluster) -> ManagedCluster: mode = self.context.get_node_provisioning_mode() if mode is not None: if mc.node_provisioning_profile is None: - mc.node_provisioning_profile = self.models.ManagedClusterNodeProvisioningProfile() + mc.node_provisioning_profile = ( + self.models.ManagedClusterNodeProvisioningProfile() # pylint: disable=no-member + ) # set mode mc.node_provisioning_profile.mode = mode @@ -4145,14 +4281,12 @@ def update_metrics_profile(self, mc: ManagedCluster) -> ManagedCluster: return mc + # pylint: disable=too-many-branches def update_app_routing_profile(self, mc: ManagedCluster) -> ManagedCluster: """Update app routing profile for the ManagedCluster object. :return: the ManagedCluster object """ - from azure.cli.command_modules.keyvault.custom import set_policy - from azext_aks_preview._client_factory import get_keyvault_client - self._ensure_mc(mc) # get parameters from context @@ -4165,23 +4299,41 @@ def update_app_routing_profile(self, mc: ManagedCluster) -> ManagedCluster: update_dns_zone = self.context.get_update_dns_zone() # update ManagedCluster object with app routing settings - mc.ingress_profile = mc.ingress_profile or self.models.ManagedClusterIngressProfile() - mc.ingress_profile.web_app_routing = mc.ingress_profile.web_app_routing or self.models.ManagedClusterIngressProfileWebAppRouting() + mc.ingress_profile = ( + mc.ingress_profile or + self.models.ManagedClusterIngressProfile() # pylint: disable=no-member + ) + mc.ingress_profile.web_app_routing = ( + mc.ingress_profile.web_app_routing or + self.models.ManagedClusterIngressProfileWebAppRouting() # pylint: disable=no-member + ) if enable_app_routing is not None: - if mc.ingress_profile.web_app_routing.enabled == enable_app_routing: - error_message = 'App Routing is already enabled.\n' if enable_app_routing else 'App Routing is already disabled.\n' - raise CLIError(error_message) - mc.ingress_profile.web_app_routing.enabled = enable_app_routing + if mc.ingress_profile.web_app_routing.enabled == enable_app_routing: + error_message = ( + "App Routing is already enabled.\n" + if enable_app_routing + else "App Routing is already disabled.\n" + ) + raise CLIError(error_message) + mc.ingress_profile.web_app_routing.enabled = enable_app_routing # update ManagedCluster object with keyvault-secret-provider settings if enable_keyvault_secret_provider: mc.addon_profiles = mc.addon_profiles or {} if not mc.addon_profiles.get(CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME): - mc.addon_profiles[CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME] = self.models.ManagedClusterAddonProfile( - enabled=True, config={CONST_SECRET_ROTATION_ENABLED: "false", CONST_ROTATION_POLL_INTERVAL: "2m"}) + mc.addon_profiles[ + CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME + ] = self.models.ManagedClusterAddonProfile( # pylint: disable=no-member + enabled=True, + config={ + CONST_SECRET_ROTATION_ENABLED: "false", + CONST_ROTATION_POLL_INTERVAL: "2m", + }, + ) elif not mc.addon_profiles[CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME].enabled: mc.addon_profiles[CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME].enabled = True # modify DNS zone resource IDs + # pylint: disable=too-many-nested-blocks if dns_zone_resource_ids: if mc.ingress_profile and mc.ingress_profile.web_app_routing and mc.ingress_profile.web_app_routing.enabled: if add_dns_zone: @@ -4191,15 +4343,25 @@ def update_app_routing_profile(self, mc: ManagedCluster) -> ManagedCluster: if attach_zones: try: for dns_zone in dns_zone_resource_ids: - if not add_role_assignment(self.cmd, 'DNS Zone Contributor', mc.ingress_profile.web_app_routing.identity.object_id, False, scope=dns_zone): + if not add_role_assignment( + self.cmd, + "DNS Zone Contributor", + mc.ingress_profile.web_app_routing.identity.object_id, + False, + scope=dns_zone + ): logger.warning( 'Could not create a role assignment for App Routing. ' 'Are you an Owner on this subscription?') except Exception as ex: - raise CLIError(f'Error in granting dns zone permisions to managed identity: {ex}\n') + raise CLIError('Error in granting dns zone permisions to managed identity.\n') from ex elif delete_dns_zone: if mc.ingress_profile.web_app_routing.dns_zone_resource_ids: - dns_zone_resource_ids = [x for x in mc.ingress_profile.web_app_routing.dns_zone_resource_ids if x not in dns_zone_resource_ids] + dns_zone_resource_ids = [ + x + for x in mc.ingress_profile.web_app_routing.dns_zone_resource_ids + if x not in dns_zone_resource_ids + ] mc.ingress_profile.web_app_routing.dns_zone_resource_ids = dns_zone_resource_ids else: raise CLIError('No DNS zone is used by App Routing.\n') @@ -4208,12 +4370,18 @@ def update_app_routing_profile(self, mc: ManagedCluster) -> ManagedCluster: if attach_zones: try: for dns_zone in dns_zone_resource_ids: - if not add_role_assignment(self.cmd, 'DNS Zone Contributor', mc.ingress_profile.web_app_routing.identity.object_id, False, scope=dns_zone): + if not add_role_assignment( + self.cmd, + "DNS Zone Contributor", + mc.ingress_profile.web_app_routing.identity.object_id, + False, + scope=dns_zone, + ): logger.warning( 'Could not create a role assignment for App Routing. ' 'Are you an Owner on this subscription?') except Exception as ex: - raise CLIError(f'Error in granting dns zone permisions to managed identity: {ex}\n') + raise CLIError('Error in granting dns zone permisions to managed identity.\n') from ex else: raise CLIError('App Routing must be enabled to modify DNS zone resource IDs.\n') @@ -4303,8 +4471,12 @@ def check_is_postprocessing_required(self, mc: ManagedCluster) -> bool: """ postprocessing_required = super().check_is_postprocessing_required(mc) if not postprocessing_required: - enable_azure_container_storage = self.context.get_intermediate("enable_azure_container_storage", default_value=False) - disable_azure_container_storage = self.context.get_intermediate("disable_azure_container_storage", default_value=False) + enable_azure_container_storage = self.context.get_intermediate( + "enable_azure_container_storage", default_value=False + ) + disable_azure_container_storage = self.context.get_intermediate( + "disable_azure_container_storage", default_value=False + ) if (enable_azure_container_storage or disable_azure_container_storage): return True diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recording_processors.py b/src/aks-preview/azext_aks_preview/tests/latest/recording_processors.py index 90fbd9131e0..213980e4817 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/recording_processors.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/recording_processors.py @@ -24,7 +24,6 @@ def process_response(self, response): response['body']['string'] = self._replace_string_keys(response['body']['string']) return response - # pylint: disable=no-self-use def _replace_string_keys(self, val): import re if 'secret' in val: @@ -41,7 +40,6 @@ def _replace_string_keys(self, val): .format(MOCK_GUID), val, flags=re.IGNORECASE) return val - # pylint: disable=no-self-use def _replace_byte_keys(self, val): import re if b'secret' in val: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_and_update_with_http_proxy_config.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_and_update_with_http_proxy_config.yaml index 931f411054a..6111b2298d6 100755 --- a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_and_update_with_http_proxy_config.yaml +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_create_and_update_with_http_proxy_config.yaml @@ -13,23 +13,21 @@ interactions: ParameterSetName: - --resource-group --name --address-prefixes --subnet-name --subnet-prefix User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","test":"test_aks_create_and_update_with_http_proxy_config","date":"2023-09-15T07:45:57Z","module":"aks-preview"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","test":"test_aks_create_and_update_with_http_proxy_config","date":"2023-12-22T10:07:21Z","module":"aks-preview"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache - connection: - - close content-length: - '387' content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:45:58 GMT + - Fri, 22 Dec 2023 10:07:23 GMT expires: - '-1' pragma: @@ -63,19 +61,19 @@ interactions: ParameterSetName: - --resource-group --name --address-prefixes --subnet-name --subnet-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cliakstest000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002\",\r\n - \ \"etag\": \"W/\\\"e6f9158e-13c0-4dbd-a441-9b6e44aa8206\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"ab04d706-99ff-400a-a140-02ae7180dd87\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": - \"c1bc145c-fc66-47c2-8fad-7bba5cdaf269\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"45c3230f-7042-40ba-a954-1d59a3deaf1d\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.42.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n \ {\r\n \"name\": \"aks-subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\r\n - \ \"etag\": \"W/\\\"e6f9158e-13c0-4dbd-a441-9b6e44aa8206\\\"\",\r\n + \ \"etag\": \"W/\\\"ab04d706-99ff-400a-a140-02ae7180dd87\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ \"addressPrefix\": \"10.42.1.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -86,7 +84,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/d8ede50a-faba-4896-b62d-ea4ba3fd2b86?api-version=2022-01-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/f60f05d6-b9a0-4ef6-a6bd-4e6145ed7f0b?api-version=2022-01-01&t=638388364443945317&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1O-5fyph6Tbm3YEnesFPQdchCZcuvlSKfwrlNSNNioLx0atlHNVRkvgMQ_eJNVF3com1NrZ34BY9K_A-e0yc19LrOgBOup-IPk3J5HeNPPECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAG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lMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBALszOCwOHYrcy035-scPtqcAdZCMfIz4dO7xVe3eBVGYgiK-GRi4yks9l8jjYRWIyK-0r4Ta4DZJNEWNwDPuS9lEb7gryEmzYpKkEN1GVpkZkIUpSbalDFucJDXz2ZHvczBlfLFKipvWHWkRSUYgu-rf-3_VpAbFQbRE_ZxpQSTp1GHDD2nrbXEzpU3O58ESJfL99UlgYO12XqeHlPy6k5_7ILX9UrUyuJwliRI56FbKhM-wCXSlPbwt-7U8FvsYyWiovfAU1KqfaDlNtt4u9ZYoKcVyjJjRkUm3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=nsnEmLHFoRCH3CyO1RXkUNViqY5V60uvXUpTHATZmZbpG4xULxrGx-Q2lFqibkk1vTao7HSgkSTzw2wVhZhXHvMjatUmvWtfsTRZhikfsTEcwb4fseEpZq4ZEv-o_0PonJYM8P6_2B-ZZigX_zO-QKAUOroRdyhCUGNuS50XNF3IZGKQoF4AZo3r8Jw_PgERXiulaHlrQYW-xNcksCTvUmrZ6IlfWlvYtsI9z2nx0P6KRzN6_GZedX6M2z2ZJKFfwKw1skLso4x2f8-lQVuoqnxJvxbrIZyPdhnLa_O0eoruxOjcJBVt0ZXArTK6d9MLm816KjsKzOtIHiW3r1A6Lw&h=VTPfs66MgxMS3cv9_DJc_lex-F779AwUGbUY0qPx33I cache-control: - no-cache content-length: @@ -94,7 +92,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:45:59 GMT + - Fri, 22 Dec 2023 10:07:23 GMT expires: - '-1' pragma: @@ -107,7 +105,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 13fe2ed6-e85e-4490-a1d1-f15f4e551307 + - 91f427e6-dd6c-4c3b-9a0f-f4c7cda52509 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -127,9 +125,9 @@ interactions: ParameterSetName: - --resource-group --name --address-prefixes --subnet-name --subnet-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/d8ede50a-faba-4896-b62d-ea4ba3fd2b86?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/f60f05d6-b9a0-4ef6-a6bd-4e6145ed7f0b?api-version=2022-01-01&t=638388364443945317&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NND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_zO-QKAUOroRdyhCUGNuS50XNF3IZGKQoF4AZo3r8Jw_PgERXiulaHlrQYW-xNcksCTvUmrZ6IlfWlvYtsI9z2nx0P6KRzN6_GZedX6M2z2ZJKFfwKw1skLso4x2f8-lQVuoqnxJvxbrIZyPdhnLa_O0eoruxOjcJBVt0ZXArTK6d9MLm816KjsKzOtIHiW3r1A6Lw&h=VTPfs66MgxMS3cv9_DJc_lex-F779AwUGbUY0qPx33I response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -141,7 +139,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:45:59 GMT + - Fri, 22 Dec 2023 10:07:24 GMT expires: - '-1' pragma: @@ -158,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2f9475c9-1e32-482d-aa5f-fb9dbe14bee2 + - 94264292-d94c-4ddb-8044-773322c73221 status: code: 200 message: OK @@ -176,9 +174,9 @@ interactions: ParameterSetName: - --resource-group --name --address-prefixes --subnet-name --subnet-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/d8ede50a-faba-4896-b62d-ea4ba3fd2b86?api-version=2022-01-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/f60f05d6-b9a0-4ef6-a6bd-4e6145ed7f0b?api-version=2022-01-01&t=638388364443945317&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRY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QbRE_ZxpQSTp1GHDD2nrbXEzpU3O58ESJfL99UlgYO12XqeHlPy6k5_7ILX9UrUyuJwliRI56FbKhM-wCXSlPbwt-7U8FvsYyWiovfAU1KqfaDlNtt4u9ZYoKcVyjJjRkUm3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=nsnEmLHFoRCH3CyO1RXkUNViqY5V60uvXUpTHATZmZbpG4xULxrGx-Q2lFqibkk1vTao7HSgkSTzw2wVhZhXHvMjatUmvWtfsTRZhikfsTEcwb4fseEpZq4ZEv-o_0PonJYM8P6_2B-ZZigX_zO-QKAUOroRdyhCUGNuS50XNF3IZGKQoF4AZo3r8Jw_PgERXiulaHlrQYW-xNcksCTvUmrZ6IlfWlvYtsI9z2nx0P6KRzN6_GZedX6M2z2ZJKFfwKw1skLso4x2f8-lQVuoqnxJvxbrIZyPdhnLa_O0eoruxOjcJBVt0ZXArTK6d9MLm816KjsKzOtIHiW3r1A6Lw&h=VTPfs66MgxMS3cv9_DJc_lex-F779AwUGbUY0qPx33I response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -190,7 +188,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:09 GMT + - Fri, 22 Dec 2023 10:07:34 GMT expires: - '-1' pragma: @@ -207,7 +205,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ef431dfb-c4bc-4d51-8496-e89990425085 + - 717d96b4-29ea-4f68-9aa1-18fa98f03397 status: code: 200 message: OK @@ -225,19 +223,19 @@ interactions: ParameterSetName: - --resource-group --name --address-prefixes --subnet-name --subnet-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cliakstest000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002\",\r\n - \ \"etag\": \"W/\\\"a177b211-ba82-4a51-876f-45392e0bde3c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"9f7128dc-016e-415d-952c-c536c2570649\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus2\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": - \"c1bc145c-fc66-47c2-8fad-7bba5cdaf269\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"45c3230f-7042-40ba-a954-1d59a3deaf1d\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.42.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n \ {\r\n \"name\": \"aks-subnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\r\n - \ \"etag\": \"W/\\\"a177b211-ba82-4a51-876f-45392e0bde3c\\\"\",\r\n + \ \"etag\": \"W/\\\"9f7128dc-016e-415d-952c-c536c2570649\\\"\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"addressPrefix\": \"10.42.1.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": @@ -252,9 +250,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:10 GMT + - Fri, 22 Dec 2023 10:07:34 GMT etag: - - W/"a177b211-ba82-4a51-876f-45392e0bde3c" + - W/"9f7128dc-016e-415d-952c-c536c2570649" expires: - '-1' pragma: @@ -271,12 +269,14 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6fc70875-ddfe-45bb-823d-e35fa3f6a859 + - 18c2b415-8558-4472-822a-48ab8d12d01a status: code: 200 message: OK - request: - body: '{"name": "proxy-subnet", "properties": {"addressPrefix": "10.42.3.0/24"}}' + body: '{"name": "proxy-subnet", "properties": {"addressPrefix": "10.42.3.0/24", + "privateEndpointNetworkPolicies": "Disabled", "privateLinkServiceNetworkPolicies": + "Enabled"}}' headers: Accept: - application/json @@ -287,23 +287,23 @@ interactions: Connection: - keep-alive Content-Length: - - '73' + - '167' Content-Type: - application/json ParameterSetName: - --resource-group --vnet-name --name --address-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet?api-version=2023-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet?api-version=2023-09-01 response: body: - string: '{"name":"proxy-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet","etag":"W/\"75d3308d-2be0-4f6d-b312-814b219b36fc\"","properties":{"provisioningState":"Updating","addressPrefix":"10.42.3.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' + string: '{"name":"proxy-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet","etag":"W/\"eabb5553-026d-4a40-9ced-2a4fba2cd16d\"","properties":{"provisioningState":"Updating","addressPrefix":"10.42.3.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/fe7563f9-4979-4438-b10c-38ff6b863880?api-version=2023-05-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/a3d1f804-b2da-43f1-9956-5f8d4f3b106f?api-version=2023-09-01&t=638388364556015140&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1O-5fyph6Tbm3YEnesFPQdchCZcu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MedWp2wW6r1ejMGDPUYrJ5EGcEQUO0tHE8ETajfITkCLR6zCxxg&h=p7EZzaz5Fhq4sJwwTMg7ca26Dda8-txNU4bcyM0YXGc cache-control: - no-cache content-length: @@ -311,7 +311,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:10 GMT + - Fri, 22 Dec 2023 10:07:35 GMT expires: - '-1' pragma: @@ -324,12 +324,12 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 633eb6f4-61a8-4c5d-a2c3-d35e551fc2e3 + - 1b56215a-2595-4a90-914a-1bc7420e83da x-ms-ratelimit-remaining-subscription-writes: - '1199' status: code: 201 - message: '' + message: Created - request: body: null headers: @@ -344,9 +344,9 @@ interactions: ParameterSetName: - --resource-group --vnet-name --name --address-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/fe7563f9-4979-4438-b10c-38ff6b863880?api-version=2023-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/a3d1f804-b2da-43f1-9956-5f8d4f3b106f?api-version=2023-09-01&t=638388364556015140&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmd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3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=fnDjrALSjfFLru_3ZO4AkVrgIvl3xw6fMDCeE_mL9cXsT4KWJpFGV9SJXC1y2HeGxcDGL06OiHKhHBHo5tKFFqhs-Tw8jWjLpmiSxqsLcjBwnVY1YP2ujEwMOOsmAlMucHCrgw4mUSWxPjf-11NeQIsgO5rRGsw09yxZB5qFHWg-hU795limT5-a1Kf9js7lUSJkaKqX9zzu5iv-tF8vFjSp2fJn8Jv4PD7FNuwyEYbQNL7_T1UEVO_lttv0BIXvMrlJ8Nx5bNm3t00mCbSIF1sKg4asvP9CqVtMedWp2wW6r1ejMGDPUYrJ5EGcEQUO0tHE8ETajfITkCLR6zCxxg&h=p7EZzaz5Fhq4sJwwTMg7ca26Dda8-txNU4bcyM0YXGc response: body: string: '{"status":"InProgress"}' @@ -358,7 +358,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:10 GMT + - Fri, 22 Dec 2023 10:07:35 GMT expires: - '-1' pragma: @@ -375,10 +375,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e3981fe2-de58-4943-9cd2-4f612eaaa103 + - e774dc30-b89d-42f3-9033-07ef28f39c0a status: code: 200 - message: '' + message: OK - request: body: null headers: @@ -393,9 +393,9 @@ interactions: ParameterSetName: - --resource-group --vnet-name --name --address-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus2/operations/fe7563f9-4979-4438-b10c-38ff6b863880?api-version=2023-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/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YBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBALszOCwOHYrcy035-scPtqcAdZCMfIz4dO7xVe3eBVGYgiK-GRi4yks9l8jjYRWIyK-0r4Ta4DZJNEWNwDPuS9lEb7gryEmzYpKkEN1GVpkZkIUpSbalDFucJDXz2ZHvczBlfLFKipvWHWkRSUYgu-rf-3_VpAbFQbRE_ZxpQSTp1GHDD2nrbXEzpU3O58ESJfL99UlgYO12XqeHlPy6k5_7ILX9UrUyuJwliRI56FbKhM-wCXSlPbwt-7U8FvsYyWiovfAU1KqfaDlNtt4u9ZYoKcVyjJjRkUm3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=fnDjrALSjfFLru_3ZO4AkVrgIvl3xw6fMDCeE_mL9cXsT4KWJpFGV9SJXC1y2HeGxcDGL06OiHKhHBHo5tKFFqhs-Tw8jWjLpmiSxqsLcjBwnVY1YP2ujEwMOOsmAlMucHCrgw4mUSWxPjf-11NeQIsgO5rRGsw09yxZB5qFHWg-hU795limT5-a1Kf9js7lUSJkaKqX9zzu5iv-tF8vFjSp2fJn8Jv4PD7FNuwyEYbQNL7_T1UEVO_lttv0BIXvMrlJ8Nx5bNm3t00mCbSIF1sKg4asvP9CqVtMedWp2wW6r1ejMGDPUYrJ5EGcEQUO0tHE8ETajfITkCLR6zCxxg&h=p7EZzaz5Fhq4sJwwTMg7ca26Dda8-txNU4bcyM0YXGc response: body: string: '{"status":"Succeeded"}' @@ -407,7 +407,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:21 GMT + - Fri, 22 Dec 2023 10:07:45 GMT expires: - '-1' pragma: @@ -424,10 +424,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 56ae61e9-6a92-4754-be04-e235d7652d31 + - b6827556-df63-4750-b847-6be3252a790f status: code: 200 - message: '' + message: OK - request: body: null headers: @@ -442,12 +442,12 @@ interactions: ParameterSetName: - --resource-group --vnet-name --name --address-prefix User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet?api-version=2023-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet?api-version=2023-09-01 response: body: - string: '{"name":"proxy-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet","etag":"W/\"d059dcc8-26c0-433d-b474-8470a0820bfb\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.42.3.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' + string: '{"name":"proxy-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet","etag":"W/\"a772ff56-794f-42f0-b631-45847605ffe7\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.42.3.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' headers: cache-control: - no-cache @@ -456,9 +456,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:21 GMT + - Fri, 22 Dec 2023 10:07:45 GMT etag: - - W/"d059dcc8-26c0-433d-b474-8470a0820bfb" + - W/"a772ff56-794f-42f0-b631-45847605ffe7" expires: - '-1' pragma: @@ -475,10 +475,10 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8d869052-cd8c-44d3-9b78-bed9c0274f92 + - b21da384-44cc-4301-98d2-f83b11200bb2 status: code: 200 - message: '' + message: OK - request: body: null headers: @@ -493,12 +493,12 @@ interactions: ParameterSetName: - --resource-group --vnet-name --name User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet?api-version=2023-05-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet?api-version=2023-09-01 response: body: - string: '{"name":"aks-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet","etag":"W/\"d059dcc8-26c0-433d-b474-8470a0820bfb\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.42.1.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' + string: '{"name":"aks-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet","etag":"W/\"a772ff56-794f-42f0-b631-45847605ffe7\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.42.1.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' headers: cache-control: - no-cache @@ -507,9 +507,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:21 GMT + - Fri, 22 Dec 2023 10:07:46 GMT etag: - - W/"d059dcc8-26c0-433d-b474-8470a0820bfb" + - W/"a772ff56-794f-42f0-b631-45847605ffe7" expires: - '-1' pragma: @@ -526,7 +526,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 671cf6f3-9054-474a-9b9f-b932f53ee4a7 + - fea5b8bc-1f41-4bf6-be5b-5b4145ea3620 status: code: 200 message: OK @@ -545,12 +545,12 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","test":"test_aks_create_and_update_with_http_proxy_config","date":"2023-09-15T07:45:57Z","module":"aks-preview"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","test":"test_aks_create_and_update_with_http_proxy_config","date":"2023-12-22T10:07:21Z","module":"aks-preview"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -559,7 +559,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:22 GMT + - Fri, 22 Dec 2023 10:07:46 GMT expires: - '-1' pragma: @@ -588,13 +588,13 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-compute/30.0.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions?$top=1&$orderby=name%20desc&api-version=2022-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions?$top=1&$orderby=name%20desc&api-version=2023-09-01 response: body: - string: "[\r\n {\r\n \"location\": \"westus2\",\r\n \"name\": \"20.04.202308310\",\r\n - \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202308310\"\r\n + string: "[\r\n {\r\n \"location\": \"westus2\",\r\n \"name\": \"20.04.202312080\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202312080\"\r\n \ }\r\n]" headers: cache-control: @@ -604,7 +604,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:21 GMT + - Fri, 22 Dec 2023 10:07:46 GMT expires: - '-1' pragma: @@ -621,7 +621,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43999 + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43994 status: code: 200 message: OK @@ -640,9 +640,9 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-compute/30.0.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions/20.04.202308310?api-version=2022-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions/20.04.202312080?api-version=2023-09-01 response: body: string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"architecture\": @@ -656,7 +656,7 @@ interactions: \"IsHibernateSupported\",\r\n \"value\": \"True\"\r\n }\r\n ],\r\n \ \"osDiskImage\": {\r\n \"operatingSystem\": \"Linux\",\r\n \"sizeInBytes\": 32213303808\r\n },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": - \"westus2\",\r\n \"name\": \"20.04.202308310\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202308310\"\r\n}" + \"westus2\",\r\n \"name\": \"20.04.202312080\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202312080\"\r\n}" headers: cache-control: - no-cache @@ -665,7 +665,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:22 GMT + - Fri, 22 Dec 2023 10:07:47 GMT expires: - '-1' pragma: @@ -682,7 +682,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73999 + - Microsoft.Compute/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73995 status: code: 200 message: OK @@ -701,12 +701,12 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorizations":[{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},{"applicationId":"7c33bfcb-8d33-48d6-8e60-dc6404003489","roleDefinitionId":"ad6261e4-fa9a-4642-aa5f-104f1b67e9e3"},{"applicationId":"1e3e4475-288f-4018-a376-df66fd7fac5f","roleDefinitionId":"1d538b69-3d87-4e56-8ff8-25786fd48261"},{"applicationId":"a0be0c72-870e-46f0-9c49-c98333a996f7","roleDefinitionId":"7ce22727-ffce-45a9-930c-ddb2e56fa131"},{"applicationId":"486c78bf-a0f7-45f1-92fd-37215929e116","roleDefinitionId":"98a9e526-0a60-4c1f-a33a-ae46e1f8dc0d"},{"applicationId":"19947cfd-0303-466c-ac3c-fcc19a7a1570","roleDefinitionId":"d813ab6c-bfb7-413e-9462-005b21f0ce09"},{"applicationId":"341b7f3d-69b3-47f9-9ce7-5b7f4945fdbd","roleDefinitionId":"8141843c-c51c-4c1e-a5bf-0d351594b86c"},{"applicationId":"328fd23b-de6e-462c-9433-e207470a5727","roleDefinitionId":"79e29e06-4056-41e5-a6b2-959f1f47747e"},{"applicationId":"6d057c82-a784-47ae-8d12-ca7b38cf06b4","roleDefinitionId":"c27dd31e-c1e5-4ab0-93e1-a12ba34f182e","managedByRoleDefinitionId":"82e8942a-bcb6-444a-b1c4-31a3ea463a7d"},{"applicationId":"b4ca0290-4e73-4e31-ade0-c82ecfaabf6a","roleDefinitionId":"18363e25-ff21-4159-ae8d-7dfecb5bd001"},{"applicationId":"79d7fb34-4bef-4417-8184-ff713af7a679","roleDefinitionId":"1c1f11ef-abfa-4abe-a02b-226771d07fc7"},{"applicationId":"38808189-fa7a-4d8a-807f-eba01edacca6","roleDefinitionId":"7dbad3e2-b105-40d5-8fe4-4a9ff6c17ae6"},{"applicationId":"6e02f8e9-db9b-4eb5-aa5a-7c8968375f68","roleDefinitionId":"787424c7-f9d2-416b-a939-4d59deb2d259"}],"resourceTypes":[{"resourceType":"virtualNetworkGateways","locations":["West + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network","namespace":"Microsoft.Network","authorizations":[{"applicationId":"2cf9eb86-36b5-49dc-86ae-9a63135dfa8c","roleDefinitionId":"13ba9ab4-19f0-4804-adc4-14ece36cc7a1"},{"applicationId":"7c33bfcb-8d33-48d6-8e60-dc6404003489","roleDefinitionId":"ad6261e4-fa9a-4642-aa5f-104f1b67e9e3"},{"applicationId":"1e3e4475-288f-4018-a376-df66fd7fac5f","roleDefinitionId":"1d538b69-3d87-4e56-8ff8-25786fd48261"},{"applicationId":"a0be0c72-870e-46f0-9c49-c98333a996f7","roleDefinitionId":"7ce22727-ffce-45a9-930c-ddb2e56fa131"},{"applicationId":"486c78bf-a0f7-45f1-92fd-37215929e116","roleDefinitionId":"98a9e526-0a60-4c1f-a33a-ae46e1f8dc0d"},{"applicationId":"19947cfd-0303-466c-ac3c-fcc19a7a1570","roleDefinitionId":"d813ab6c-bfb7-413e-9462-005b21f0ce09"},{"applicationId":"341b7f3d-69b3-47f9-9ce7-5b7f4945fdbd","roleDefinitionId":"8141843c-c51c-4c1e-a5bf-0d351594b86c"},{"applicationId":"328fd23b-de6e-462c-9433-e207470a5727","roleDefinitionId":"79e29e06-4056-41e5-a6b2-959f1f47747e"},{"applicationId":"6d057c82-a784-47ae-8d12-ca7b38cf06b4","roleDefinitionId":"c27dd31e-c1e5-4ab0-93e1-a12ba34f182e","managedByRoleDefinitionId":"82e8942a-bcb6-444a-b1c4-31a3ea463a7d"},{"applicationId":"b4ca0290-4e73-4e31-ade0-c82ecfaabf6a","roleDefinitionId":"18363e25-ff21-4159-ae8d-7dfecb5bd001"},{"applicationId":"79d7fb34-4bef-4417-8184-ff713af7a679","roleDefinitionId":"1c1f11ef-abfa-4abe-a02b-226771d07fc7"},{"applicationId":"38808189-fa7a-4d8a-807f-eba01edacca6","roleDefinitionId":"7dbad3e2-b105-40d5-8fe4-4a9ff6c17ae6"},{"applicationId":"6e02f8e9-db9b-4eb5-aa5a-7c8968375f68","roleDefinitionId":"787424c7-f9d2-416b-a939-4d59deb2d259"},{"applicationId":"60b2e7d5-a27f-426d-a6b1-acced0846fdf","roleDefinitionId":"0edb7c43-ed90-4da9-9ca2-e9a5d1521b00"}],"resourceTypes":[{"resourceType":"virtualNetworkGateways","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -714,7 +714,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-03-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-03-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"localNetworkGateways","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -723,7 +724,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-03-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-03-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"connections","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -732,7 +734,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-03-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-03-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"applicationGateways","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -741,7 +744,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia East","zones":["3","2","1"]},{"location":"Brazil South","zones":["3","2","1"]},{"location":"Canada Central","zones":["3","2","1"]},{"location":"Central India","zones":["3","2","1"]},{"location":"Central US","zones":["3","2","1"]},{"location":"Central US EUAP","zones":["2","1"]},{"location":"East @@ -756,8 +760,9 @@ interactions: Central","zones":["3","2","1"]},{"location":"Switzerland North","zones":["3","2","1"]},{"location":"UAE North","zones":["3","2","1"]},{"location":"UK South","zones":["3","2","1"]},{"location":"West Europe","zones":["3","2","1"]},{"location":"West US","zones":[]},{"location":"West - US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Italy - North","zones":["3","2","1"]}],"capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"expressRouteCircuits","locations":["West + US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Israel + Central","zones":["3","2","1"]},{"location":"Italy North","zones":["3","2","1"]}],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"expressRouteCircuits","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -765,7 +770,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"expressRouteServiceProviders","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -774,7 +780,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableWafRuleSets","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableWafRuleSets","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -782,7 +789,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableSslOptions","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableSslOptions","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -790,7 +798,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableServerVariables","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableServerVariables","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -798,7 +807,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableRequestHeaders","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableRequestHeaders","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -806,7 +816,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableResponseHeaders","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"capabilities":"None"},{"resourceType":"applicationGatewayAvailableResponseHeaders","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -814,7 +825,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"capabilities":"None"},{"resourceType":"routeFilters","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"capabilities":"None"},{"resourceType":"routeFilters","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -822,7 +834,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"bgpServiceCommunities","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -831,7 +844,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01"],"capabilities":"None"},{"resourceType":"vpnSites","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01"],"capabilities":"None"},{"resourceType":"vpnSites","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -839,7 +853,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"vpnServerConfigurations","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -848,7 +863,7 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","South Africa North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland Central","Italy - North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"virtualHubs","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil @@ -857,7 +872,7 @@ interactions: South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland - Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Italy North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"vpnGateways","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil @@ -866,7 +881,7 @@ interactions: South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland - Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Italy North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"p2sVpnGateways","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil @@ -875,7 +890,7 @@ interactions: South","Korea Central","Korea South","France Central","Australia Central","UAE North","South Africa North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland - Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Italy North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"expressRouteGateways","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -884,7 +899,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"expressRoutePortsLocations","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -893,7 +909,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"capabilities":"None"},{"resourceType":"expressRoutePorts","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"capabilities":"None"},{"resourceType":"expressRoutePorts","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -901,7 +918,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","UAE North","South Africa North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"securityPartnerProviders","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -910,7 +928,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"azureFirewalls","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Brazil South","Australia @@ -919,7 +938,8 @@ interactions: Central","Australia Central","Japan West","Japan East","Korea Central","Korea South","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia East","zones":["3","2","1"]},{"location":"Brazil South","zones":["3","2","1"]},{"location":"Canada Central","zones":["3","2","1"]},{"location":"Central India","zones":["3","2","1"]},{"location":"Central US","zones":["3","2","1"]},{"location":"Central US EUAP","zones":["2","1"]},{"location":"East @@ -934,8 +954,9 @@ interactions: Central","zones":["3","2","1"]},{"location":"Switzerland North","zones":["3","2","1"]},{"location":"UAE North","zones":["3","2","1"]},{"location":"UK South","zones":["3","2","1"]},{"location":"West Europe","zones":["3","2","1"]},{"location":"West US","zones":[]},{"location":"West - US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Italy - North","zones":["3","2","1"]}],"capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"azureFirewallFqdnTags","locations":["West + US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Israel + Central","zones":["3","2","1"]},{"location":"Italy North","zones":["3","2","1"]}],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"azureFirewallFqdnTags","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -943,7 +964,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"capabilities":"None"},{"resourceType":"applicationGatewayWebApplicationFirewallPolicies","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"capabilities":"None"},{"resourceType":"applicationGatewayWebApplicationFirewallPolicies","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -951,7 +973,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"locations/ApplicationGatewayWafDynamicManifests","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -960,7 +983,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01"],"capabilities":"None"},{"resourceType":"virtualWans","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01"],"capabilities":"None"},{"resourceType":"virtualWans","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -968,7 +992,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"bastionHosts","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil @@ -977,7 +1002,7 @@ interactions: South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland - Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Italy North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"queryExpressRoutePortsBandwidth","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -986,70 +1011,17 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01"],"capabilities":"None"},{"resourceType":"trafficmanagerprofiles","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"trafficmanagerprofiles/heatMaps","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-09-01-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficmanagerprofiles/azureendpoints","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficmanagerprofiles/externalendpoints","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficmanagerprofiles/nestedendpoints","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"checkTrafficManagerNameAvailability","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"checkTrafficManagerNameAvailabilityV2","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01"],"defaultApiVersion":"2022-04-01","capabilities":"None"},{"resourceType":"trafficManagerUserMetricsKeys","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2017-09-01-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficManagerGeographicHierarchies","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"dnsResolvers","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsResolvers/inboundEndpoints","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsResolvers/outboundEndpoints","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsForwardingRulesets","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsForwardingRulesets/forwardingRules","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"dnsForwardingRulesets/virtualNetworkLinks","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"virtualNetworks/listDnsResolvers","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"virtualNetworks/listDnsForwardingRulesets","locations":["West - Central US","East US 2","West Europe","North Europe","Australia East","UK - South","South Central US","East US","North Central US","West US 2","West US - 3","Southeast Asia","Central India","Canada Central","Central US","France - Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden - Central","East Asia","Switzerland North","Brazil South","West US","Norway - East","UAE North","Australia Southeast","Canada East","Japan West","Qatar - Central","Poland Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"locations/dnsResolverOperationResults","locations":[],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"locations/dnsResolverOperationStatuses","locations":[],"apiVersions":["2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"privateDnsZones","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"privateDnsZones/virtualNetworkLinks","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"privateDnsOperationResults","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsOperationStatuses","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZonesInternal","locations":["global"],"apiVersions":["2020-06-01","2020-01-01"],"defaultApiVersion":"2020-01-01","capabilities":"None"},{"resourceType":"privateDnsZones/A","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/AAAA","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/CNAME","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/PTR","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/MX","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/TXT","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/SRV","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/SOA","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/all","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"virtualNetworks/privateDnsZoneLinks","locations":["global"],"apiVersions":["2020-06-01"],"defaultApiVersion":"2020-06-01","capabilities":"None"},{"resourceType":"locations/hybridEdgeZone","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01"],"capabilities":"None"},{"resourceType":"trafficmanagerprofiles","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"trafficmanagerprofiles/heatMaps","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-09-01-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficmanagerprofiles/azureendpoints","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficmanagerprofiles/externalendpoints","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficmanagerprofiles/nestedendpoints","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"checkTrafficManagerNameAvailability","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01","2015-11-01","2015-04-28-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"checkTrafficManagerNameAvailabilityV2","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01"],"defaultApiVersion":"2022-04-01","capabilities":"None"},{"resourceType":"trafficManagerUserMetricsKeys","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2017-09-01-preview"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"trafficManagerGeographicHierarchies","locations":["global"],"apiVersions":["2022-04-01-preview","2022-04-01","2018-08-01","2018-04-01","2018-03-01","2018-02-01","2017-05-01","2017-03-01"],"defaultApiVersion":"2018-08-01","capabilities":"None"},{"resourceType":"expressRouteProviderPorts","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","North + Central US","South Central US","Central US","East US 2","Japan East","Japan + West","Brazil South","Australia East","Australia Southeast","Central India","South + India","West India","Canada Central","Canada East","West Central US","West + US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia + Central","South Africa North","UAE North","Switzerland North","Germany West + Central","Norway East","West US 3","Jio India West","Sweden Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01"],"defaultApiVersion":"2020-06-01","capabilities":"None"},{"resourceType":"locations/hybridEdgeZone","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1057,7 +1029,7 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"firewallPolicies","locations":["Italy + Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"firewallPolicies","locations":["Italy North","Qatar Central","Poland Central","UAE North","Australia Central 2","UAE Central","Germany North","Central India","Korea South","Switzerland North","Switzerland West","Japan West","France South","South Africa West","West India","Canada @@ -1067,7 +1039,7 @@ interactions: West","West US","East US","North Europe","West Europe","West Central US","South Central US","Australia East","Australia Central","Australia Southeast","UK South","East US 2","West US 2","North Central US","Canada Central","France - Central","Central US","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01"],"defaultApiVersion":"2020-04-01","capabilities":"SupportsTags, + Central","Central US","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01"],"defaultApiVersion":"2020-04-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"ipGroups","locations":["Italy North","Qatar Central","Poland Central","UAE North","Australia Central 2","UAE Central","Germany North","Central India","Korea South","Switzerland North","Switzerland West","Japan @@ -1077,9 +1049,9 @@ interactions: US 3","Jio India West","Sweden Central","Japan East","UK West","West US","East US","North Europe","West Europe","South Central US","Australia East","Australia Central","Australia Southeast","UK South","East US 2","West US 2","North Central - US","Canada Central","France Central","West Central US","Central US","Central - US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01"],"defaultApiVersion":"2020-04-01","capabilities":"SupportsTags, - SupportsLocation"},{"resourceType":"azureWebCategories","locations":[],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/nfvOperations","locations":[],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"capabilities":"None"},{"resourceType":"locations/nfvOperationResults","locations":[],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"capabilities":"None"},{"resourceType":"virtualRouters","locations":["Italy + US","Canada Central","France Central","West Central US","Central US","Israel + Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01"],"defaultApiVersion":"2020-04-01","capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"azureWebCategories","locations":[],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/nfvOperations","locations":[],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"capabilities":"None"},{"resourceType":"locations/nfvOperationResults","locations":[],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"capabilities":"None"},{"resourceType":"virtualRouters","locations":["Italy North","Qatar Central","Poland Central","UAE North","Australia Central 2","UAE Central","Germany North","Central India","Korea South","Switzerland North","Switzerland West","Japan West","France South","South Africa West","West India","Canada @@ -1089,7 +1061,7 @@ interactions: West","West US","East US","North Europe","West Europe","West Central US","South Central US","Australia East","Australia Central","Australia Southeast","UK South","East US 2","West US 2","North Central US","Canada Central","France - Central","Central US","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01"],"defaultApiVersion":"2020-04-01","capabilities":"SupportsTags, + Central","Central US","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01"],"defaultApiVersion":"2020-04-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"networkVirtualAppliances","locations":["Italy North","Qatar Central","Poland Central","Brazil Southeast","West US 3","Jio India West","Sweden Central","UAE North","Australia Central 2","UAE Central","Germany @@ -1100,8 +1072,8 @@ interactions: US","East US","North Europe","West Europe","West Central US","South Central US","Australia East","Australia Central","Australia Southeast","UK South","East US 2","West US 2","North Central US","Canada Central","France Central","Central - US","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01"],"defaultApiVersion":"2020-04-01","capabilities":"SystemAssignedResourceIdentity, - SupportsTags, SupportsLocation"},{"resourceType":"networkVirtualApplianceSkus","locations":[],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"defaultApiVersion":"2020-04-01","capabilities":"None"},{"resourceType":"checkFrontdoorNameAvailability","locations":["global","Central + US","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01"],"defaultApiVersion":"2020-04-01","capabilities":"SystemAssignedResourceIdentity, + SupportsTags, SupportsLocation"},{"resourceType":"networkVirtualApplianceSkus","locations":[],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2023-01-01-preview","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"defaultApiVersion":"2020-04-01","capabilities":"None"},{"resourceType":"checkFrontdoorNameAvailability","locations":["global","Central US","East US","East US 2","North Central US","South Central US","West US","North Europe","West Europe","East Asia","Southeast Asia","Japan East","Japan West","Brazil South","Australia East","Australia Southeast"],"apiVersions":["2021-06-01","2020-07-01","2020-05-01","2020-01-01","2019-08-01","2019-05-01","2019-04-01","2018-08-01"],"defaultApiVersion":"2020-07-01","capabilities":"None"},{"resourceType":"frontdoorWebApplicationFirewallManagedRuleSets","locations":["global","Central @@ -1117,8 +1089,29 @@ interactions: 3","Central India","Korea South","Brazil Southeast","Korea Central","Southeast Asia","South Central US","Norway West","Australia East","Japan East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland Central","Italy - North","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkManagerConnections","locations":[],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"SupportsExtension"},{"resourceType":"locations/queryNetworkSecurityPerimeter","locations":["West + North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkManagerConnections","locations":[],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"SupportsExtension"},{"resourceType":"networkSecurityPerimeters","locations":["West + Central US","Jio India West","Jio India Central","North Central US","West + US","West Europe","UAE Central","Germany North","East US","West India","East + US 2","Australia Central","Australia Central 2","South Africa West","Brazil + South","UK West","North Europe","Central US","UAE North","Germany West Central","Switzerland + West","East Asia","South Africa North","UK South","South India","Australia + Southeast","France South","West US 2","Sweden Central","Japan West","Norway + East","France Central","West US 3","Central India","Korea South","Brazil Southeast","Korea + Central","Southeast Asia","South Central US","Norway West","Australia East","Japan + East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland + Central","Italy North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01-preview","2023-08-01-preview","2023-07-01-preview","2022-02-01-preview","2021-05-01-preview","2021-02-01-preview"],"defaultApiVersion":"2021-02-01-preview","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations/perimeterAssociableResourceTypes","locations":["West + Central US","Jio India West","Jio India Central","North Central US","West + US","West Europe","UAE Central","Germany North","East US","West India","East + US 2","Australia Central","Australia Central 2","South Africa West","Brazil + South","UK West","North Europe","Central US","UAE North","Germany West Central","Switzerland + West","East Asia","South Africa North","UK South","South India","Australia + Southeast","France South","West US 2","Sweden Central","Japan West","Norway + East","France Central","West US 3","Central India","Korea South","Brazil Southeast","Korea + Central","Southeast Asia","South Central US","Norway West","Australia East","Japan + East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland + Central","Italy North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01-preview","2023-08-01-preview","2023-07-01-preview","2022-02-01-preview","2021-05-01-preview","2021-02-01-preview"],"defaultApiVersion":"2021-02-01-preview","capabilities":"None"},{"resourceType":"locations/queryNetworkSecurityPerimeter","locations":["West Central US","Jio India West","North Central US","West US","West Europe","UAE Central","Germany North","East US","West India","East US 2","Australia Central","Australia Central 2","South Africa West","Brazil South","UK West","North Europe","Central @@ -1128,7 +1121,7 @@ interactions: 3","Central India","Korea South","Brazil Southeast","Korea Central","Southeast Asia","South Central US","Norway West","Australia East","Japan East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland Central","Italy - North","East US 2 EUAP","Central US EUAP"],"apiVersions":["2022-02-01-preview","2021-05-01-preview","2021-02-01-preview"],"defaultApiVersion":"2021-02-01-preview","capabilities":"None"},{"resourceType":"virtualNetworks/listNetworkManagerEffectiveConnectivityConfigurations","locations":["West + North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01-preview","2023-08-01-preview","2023-07-01-preview","2022-02-01-preview","2021-05-01-preview","2021-02-01-preview"],"defaultApiVersion":"2021-02-01-preview","capabilities":"None"},{"resourceType":"virtualNetworks/listNetworkManagerEffectiveConnectivityConfigurations","locations":["West Central US","North Central US","West US","West Europe","UAE Central","Germany North","East US","West India","East US 2","Australia Central","Australia Central 2","South Africa West","Brazil South","UK West","North Europe","Central US","UAE @@ -1138,7 +1131,7 @@ interactions: 3","Central India","Korea South","Brazil Southeast","Korea Central","Southeast Asia","South Central US","Norway West","Australia East","Japan East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland Central","Italy - North","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"None"},{"resourceType":"virtualNetworks/listNetworkManagerEffectiveSecurityAdminRules","locations":["West + North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"None"},{"resourceType":"virtualNetworks/listNetworkManagerEffectiveSecurityAdminRules","locations":["West Central US","North Central US","West US","West Europe","UAE Central","Germany North","East US","West India","East US 2","Australia Central","Australia Central 2","South Africa West","Brazil South","UK West","North Europe","Central US","UAE @@ -1148,7 +1141,7 @@ interactions: 3","Central India","Korea South","Brazil Southeast","Korea Central","Southeast Asia","South Central US","Norway West","Australia East","Japan East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland Central","Italy - North","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"None"},{"resourceType":"networkGroupMemberships","locations":["West + North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"defaultApiVersion":"2022-05-01","capabilities":"None"},{"resourceType":"networkGroupMemberships","locations":["West Central US","North Central US","West US","West Europe","UAE Central","Germany North","East US","West India","East US 2","Australia Central","Australia Central 2","South Africa West","Brazil South","UK West","North Europe","Central US","UAE @@ -1158,7 +1151,7 @@ interactions: 3","Central India","Korea South","Brazil Southeast","Korea Central","Southeast Asia","South Central US","Norway West","Australia East","Japan East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland Central","Italy - North","East US 2 EUAP","Central US EUAP"],"apiVersions":["2022-06-01-preview"],"defaultApiVersion":"2022-06-01-preview","capabilities":"SupportsExtension"},{"resourceType":"locations/commitInternalAzureNetworkManagerConfiguration","locations":["West + North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2022-06-01-preview"],"defaultApiVersion":"2022-06-01-preview","capabilities":"SupportsExtension"},{"resourceType":"locations/commitInternalAzureNetworkManagerConfiguration","locations":["West Central US","North Central US","West US","West Europe","UAE Central","Germany North","East US","West India","East US 2","Australia Central","Australia Central 2","South Africa West","Brazil South","UK West","North Europe","Central US","UAE @@ -1168,7 +1161,7 @@ interactions: 3","Central India","Korea South","Brazil Southeast","Korea Central","Southeast Asia","South Central US","Norway West","Australia East","Japan East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland Central","Italy - North","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/internalAzureVirtualNetworkManagerOperation","locations":["West + North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/internalAzureVirtualNetworkManagerOperation","locations":["West Central US","North Central US","West US","West Europe","UAE Central","Germany North","East US","West India","East US 2","Australia Central","Australia Central 2","South Africa West","Brazil South","UK West","North Europe","Central US","UAE @@ -1178,7 +1171,77 @@ interactions: 3","Central India","Korea South","Brazil Southeast","Korea Central","Southeast Asia","South Central US","Norway West","Australia East","Japan East","Canada East","Canada Central","Switzerland North","Qatar Central","Poland Central","Italy - North","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"capabilities":"None"},{"resourceType":"dnszones","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2016-04-01"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2016-04-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2016-04-01"}],"capabilities":"CrossResourceGroupResourceMove, + North","Israel Central","East US 2 EUAP","Central US EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-03-01-preview","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-06-01-preview","2022-05-01","2022-04-01-preview","2022-01-01"],"capabilities":"None"},{"resourceType":"dnsResolvers","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsResolvers/inboundEndpoints","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsResolvers/outboundEndpoints","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsForwardingRulesets","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsForwardingRulesets/forwardingRules","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"dnsForwardingRulesets/virtualNetworkLinks","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"virtualNetworks/listDnsResolvers","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"virtualNetworks/listDnsForwardingRulesets","locations":["West + Central US","East US 2","West Europe","North Europe","Australia East","UK + South","South Central US","East US","North Central US","West US 2","West US + 3","Southeast Asia","Central India","Canada Central","Central US","France + Central","Japan East","Germany West Central","South Africa North","Korea Central","Sweden + Central","East Asia","Switzerland North","Brazil South","West US","Norway + East","UAE North","Australia Southeast","Canada East","Japan West","Italy + North","Israel Central","Uk West","South India","Qatar Central","Poland Central","Central + US EUAP","East US 2 EUAP"],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"locations/dnsResolverOperationResults","locations":[],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"locations/dnsResolverOperationStatuses","locations":[],"apiVersions":["2023-07-01-preview","2023-07-01","2022-07-01","2020-04-01-preview"],"defaultApiVersion":"2020-04-01-preview","capabilities":"None"},{"resourceType":"locations/dnsResolverPolicyOperationResults","locations":[],"apiVersions":["2023-07-01-preview"],"defaultApiVersion":"2023-07-01-preview","capabilities":"None"},{"resourceType":"locations/dnsResolverPolicyOperationStatuses","locations":[],"apiVersions":["2023-07-01-preview"],"defaultApiVersion":"2023-07-01-preview","capabilities":"None"},{"resourceType":"privateDnsZones","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"privateDnsZones/virtualNetworkLinks","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"privateDnsOperationResults","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsOperationStatuses","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZonesInternal","locations":["global"],"apiVersions":["2020-06-01","2020-01-01"],"defaultApiVersion":"2020-01-01","capabilities":"None"},{"resourceType":"privateDnsZones/A","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/AAAA","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/CNAME","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/PTR","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/MX","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/TXT","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/SRV","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/SOA","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"privateDnsZones/all","locations":["global"],"apiVersions":["2020-06-01","2020-01-01","2018-09-01"],"defaultApiVersion":"2018-09-01","capabilities":"None"},{"resourceType":"virtualNetworks/privateDnsZoneLinks","locations":["global"],"apiVersions":["2020-06-01"],"defaultApiVersion":"2020-06-01","capabilities":"None"},{"resourceType":"dnszones","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2016-04-01"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2016-04-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2016-04-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dnsOperationResults","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnsOperationStatuses","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"getDnsResourceReference","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"internalNotify","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/A","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/AAAA","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/CNAME","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/PTR","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/MX","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/TXT","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/SRV","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/SOA","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/NS","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/CAA","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/DS","locations":["global"],"apiVersions":["2023-07-01-preview"],"defaultApiVersion":"2023-07-01-preview","capabilities":"None"},{"resourceType":"dnszones/TLSA","locations":["global"],"apiVersions":["2023-07-01-preview"],"defaultApiVersion":"2023-07-01-preview","capabilities":"None"},{"resourceType":"dnszones/NAPTR","locations":["global"],"apiVersions":["2023-07-01-preview"],"defaultApiVersion":"2023-07-01-preview","capabilities":"None"},{"resourceType":"dnszones/recordsets","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/all","locations":["global"],"apiVersions":["2023-07-01-preview","2018-05-01","2018-03-01-preview","2017-10-01","2017-09-15-preview","2017-09-01","2016-04-01","2015-05-04-preview"],"defaultApiVersion":"2018-05-01","capabilities":"None"},{"resourceType":"dnszones/dnssecConfigs","locations":["global"],"apiVersions":["2023-07-01-preview"],"defaultApiVersion":"2023-07-01-preview","capabilities":"None"},{"resourceType":"virtualNetworks","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1187,7 +1250,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"virtualNetworks/taggedTrafficConsumers","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1196,7 +1260,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"natGateways","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"natGateways","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1204,7 +1269,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia East","zones":["3","2","1"]},{"location":"Brazil South","zones":["3","2","1"]},{"location":"Canada Central","zones":["3","2","1"]},{"location":"Central India","zones":["3","2","1"]},{"location":"Central US","zones":["3","2","1"]},{"location":"Central US EUAP","zones":["2","1"]},{"location":"East @@ -1219,8 +1285,8 @@ interactions: Central","zones":["3","2","1"]},{"location":"Switzerland North","zones":["3","2","1"]},{"location":"UAE North","zones":["3","2","1"]},{"location":"UK South","zones":["3","2","1"]},{"location":"West Europe","zones":["3","2","1"]},{"location":"West US","zones":[]},{"location":"West - US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Italy - North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, + US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Israel + Central","zones":["3","2","1"]},{"location":"Italy North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"publicIPAddresses","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1229,7 +1295,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"zoneMappings":[{"location":"Australia + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"zoneMappings":[{"location":"Australia East","zones":["3","2","1"]},{"location":"Brazil South","zones":["3","2","1"]},{"location":"Canada Central","zones":["3","2","1"]},{"location":"Central India","zones":["3","2","1"]},{"location":"Central US","zones":["3","2","1"]},{"location":"Central US EUAP","zones":["2","1"]},{"location":"East @@ -1244,8 +1311,8 @@ interactions: Central","zones":["3","2","1"]},{"location":"Switzerland North","zones":["3","2","1"]},{"location":"UAE North","zones":["3","2","1"]},{"location":"UK South","zones":["3","2","1"]},{"location":"West Europe","zones":["3","2","1"]},{"location":"West US","zones":[]},{"location":"West - US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Italy - North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, + US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Israel + Central","zones":["3","2","1"]},{"location":"Italy North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"internalPublicIpAddresses","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1254,7 +1321,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"customIpPrefixes","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"customIpPrefixes","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1262,7 +1330,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01"],"defaultApiVersion":"2020-06-01","zoneMappings":[{"location":"Australia + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01"],"defaultApiVersion":"2020-06-01","zoneMappings":[{"location":"Australia East","zones":["3","2","1"]},{"location":"Brazil South","zones":["3","2","1"]},{"location":"Canada Central","zones":["3","2","1"]},{"location":"Central India","zones":["3","2","1"]},{"location":"Central US","zones":["3","2","1"]},{"location":"Central US EUAP","zones":["2","1"]},{"location":"East @@ -1277,8 +1346,8 @@ interactions: Central","zones":["3","2","1"]},{"location":"Switzerland North","zones":["3","2","1"]},{"location":"UAE North","zones":["3","2","1"]},{"location":"UK South","zones":["3","2","1"]},{"location":"West Europe","zones":["3","2","1"]},{"location":"West US","zones":[]},{"location":"West - US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Italy - North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, + US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Israel + Central","zones":["3","2","1"]},{"location":"Italy North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkInterfaces","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1287,7 +1356,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"dscpConfigurations","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1296,7 +1366,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01"],"defaultApiVersion":"2020-06-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01"],"defaultApiVersion":"2020-06-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"privateEndpoints","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1305,7 +1376,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"privateEndpoints/privateLinkServiceProxies","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1314,7 +1386,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"defaultApiVersion":"2020-03-01","capabilities":"None"},{"resourceType":"privateEndpointRedirectMaps","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"defaultApiVersion":"2020-03-01","capabilities":"None"},{"resourceType":"privateEndpointRedirectMaps","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1322,7 +1395,7 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland - Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Italy North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"loadBalancers","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil @@ -1331,7 +1404,7 @@ interactions: South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland - Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Italy North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkSecurityGroups","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1340,7 +1413,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"applicationSecurityGroups","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1349,7 +1423,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2017-09-01"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2017-09-01"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"serviceEndpointPolicies","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1358,7 +1433,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkIntentPolicies","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1367,7 +1443,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"routeTables","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1376,7 +1453,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"publicIPPrefixes","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1385,7 +1463,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01"],"defaultApiVersion":"2020-03-01","zoneMappings":[{"location":"Australia East","zones":["3","2","1"]},{"location":"Brazil South","zones":["3","2","1"]},{"location":"Canada Central","zones":["3","2","1"]},{"location":"Central India","zones":["3","2","1"]},{"location":"Central US","zones":["3","2","1"]},{"location":"Central US EUAP","zones":["2","1"]},{"location":"East @@ -1400,8 +1479,8 @@ interactions: Central","zones":["3","2","1"]},{"location":"Switzerland North","zones":["3","2","1"]},{"location":"UAE North","zones":["3","2","1"]},{"location":"UK South","zones":["3","2","1"]},{"location":"West Europe","zones":["3","2","1"]},{"location":"West US","zones":[]},{"location":"West - US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Italy - North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, + US 2","zones":["3","2","1"]},{"location":"West US 3","zones":["3","2","1"]},{"location":"Israel + Central","zones":["3","2","1"]},{"location":"Italy North","zones":["3","2","1"]}],"capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkWatchers","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1410,7 +1489,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkWatchers/connectionMonitors","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1419,7 +1499,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkWatchers/flowLogs","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1428,7 +1509,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"networkWatchers/pingMeshes","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1437,8 +1519,9 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/operations","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/operations","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1446,7 +1529,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/operationResults","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/operationResults","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1454,7 +1538,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/CheckDnsNameAvailability","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/CheckDnsNameAvailability","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1462,7 +1547,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"locations/setLoadBalancerFrontendPublicIpAddresses","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"locations/setLoadBalancerFrontendPublicIpAddresses","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1470,7 +1556,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01"],"capabilities":"None"},{"resourceType":"cloudServiceSlots","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01"],"capabilities":"None"},{"resourceType":"cloudServiceSlots","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1478,7 +1565,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01"],"capabilities":"SupportsExtension"},{"resourceType":"locations/usages","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01"],"capabilities":"SupportsExtension"},{"resourceType":"locations/usages","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1486,7 +1574,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/virtualNetworkAvailableEndpointServices","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2015-06-15"},{"profileVersion":"2018-03-01-hybrid","apiVersion":"2017-10-01"},{"profileVersion":"2019-03-01-hybrid","apiVersion":"2017-10-01"}],"capabilities":"None"},{"resourceType":"locations/virtualNetworkAvailableEndpointServices","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1494,7 +1583,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01"],"capabilities":"None"},{"resourceType":"locations/availableDelegations","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01"],"capabilities":"None"},{"resourceType":"locations/availableDelegations","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1502,7 +1592,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/serviceTags","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/serviceTags","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1510,7 +1601,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"capabilities":"None"},{"resourceType":"locations/availablePrivateEndpointTypes","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"capabilities":"None"},{"resourceType":"locations/availablePrivateEndpointTypes","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1518,7 +1610,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"capabilities":"None"},{"resourceType":"locations/availableServiceAliases","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01"],"capabilities":"None"},{"resourceType":"locations/availableServiceAliases","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1526,7 +1619,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01"],"capabilities":"None"},{"resourceType":"locations/checkPrivateLinkServiceVisibility","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01"],"capabilities":"None"},{"resourceType":"locations/checkPrivateLinkServiceVisibility","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1534,7 +1628,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01"],"capabilities":"None"},{"resourceType":"locations/autoApprovedPrivateLinkServices","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01"],"capabilities":"None"},{"resourceType":"locations/autoApprovedPrivateLinkServices","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1542,7 +1637,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01"],"capabilities":"None"},{"resourceType":"locations/batchValidatePrivateEndpointsForResourceMove","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01"],"capabilities":"None"},{"resourceType":"locations/batchValidatePrivateEndpointsForResourceMove","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1550,7 +1646,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/batchNotifyPrivateEndpointsForResourceMove","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/batchNotifyPrivateEndpointsForResourceMove","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1558,7 +1655,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/supportedVirtualMachineSizes","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"capabilities":"None"},{"resourceType":"locations/supportedVirtualMachineSizes","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1566,7 +1664,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/setAzureNetworkManagerConfiguration","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/setAzureNetworkManagerConfiguration","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1574,7 +1673,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01"],"capabilities":"None"},{"resourceType":"locations/publishResources","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01"],"capabilities":"None"},{"resourceType":"locations/publishResources","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1582,7 +1682,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/getAzureNetworkManagerConfiguration","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/getAzureNetworkManagerConfiguration","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1590,7 +1691,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01"],"capabilities":"None"},{"resourceType":"locations/checkAcceleratedNetworkingSupport","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01"],"capabilities":"None"},{"resourceType":"locations/checkAcceleratedNetworkingSupport","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1598,7 +1700,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/validateResourceOwnership","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/validateResourceOwnership","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1606,7 +1709,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/setResourceOwnership","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/setResourceOwnership","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1614,7 +1718,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/effectiveResourceOwnership","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"locations/effectiveResourceOwnership","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1622,7 +1727,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"operations","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01"],"capabilities":"None"},{"resourceType":"operations","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1630,7 +1736,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"virtualNetworkTaps","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01","2017-08-01","2017-06-01","2017-04-01","2017-03-01","2016-12-01","2016-11-01","2016-10-01","2016-09-01","2016-08-01","2016-07-01","2016-06-01","2016-03-30","2015-06-15","2015-05-01-preview","2014-12-01-preview"],"capabilities":"None"},{"resourceType":"virtualNetworkTaps","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1638,7 +1745,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"privateLinkServices","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1647,7 +1755,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"locations/privateLinkServices","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1656,7 +1765,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"capabilities":"None"},{"resourceType":"ddosProtectionPlans","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01"],"capabilities":"None"},{"resourceType":"ddosProtectionPlans","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1664,7 +1774,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2018-02-01"}],"capabilities":"SupportsTags, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01"],"defaultApiVersion":"2020-03-01","apiProfiles":[{"profileVersion":"2017-03-09-profile","apiVersion":"2018-02-01"}],"capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"networkProfiles","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil @@ -1673,7 +1784,7 @@ interactions: South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar Central","Poland - Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, + Central","Italy North","Israel Central","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01"],"defaultApiVersion":"2020-03-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"locations/bareMetalTenants","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1682,7 +1793,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01"],"capabilities":"None"},{"resourceType":"ipAllocations","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01"],"capabilities":"None"},{"resourceType":"ipAllocations","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1690,7 +1802,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations/serviceTagDetails","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan @@ -1699,7 +1812,53 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01"],"capabilities":"None"},{"resourceType":"locations/dataTasks","locations":["West + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01"],"capabilities":"None"},{"resourceType":"locations/dataTasks","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","North + Central US","South Central US","Central US","East US 2","Japan East","Japan + West","Brazil South","Australia East","Australia Southeast","Central India","South + India","West India","Canada Central","Canada East","West Central US","West + US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia + Central","South Africa North","UAE North","Switzerland North","Germany West + Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01"],"capabilities":"None"},{"resourceType":"locations/startPacketTagging","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","North + Central US","South Central US","Central US","East US 2","Japan East","Japan + West","Brazil South","Australia East","Australia Southeast","Central India","South + India","West India","Canada Central","Canada East","West Central US","West + US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia + Central","South Africa North","UAE North","Switzerland North","Germany West + Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/deletePacketTagging","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","North + Central US","South Central US","Central US","East US 2","Japan East","Japan + West","Brazil South","Australia East","Australia Southeast","Central India","South + India","West India","Canada Central","Canada East","West Central US","West + US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia + Central","South Africa North","UAE North","Switzerland North","Germany West + Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/getPacketTagging","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","North + Central US","South Central US","Central US","East US 2","Japan East","Japan + West","Brazil South","Australia East","Australia Southeast","Central India","South + India","West India","Canada Central","Canada East","West Central US","West + US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia + Central","South Africa North","UAE North","Switzerland North","Germany West + Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/rnmEffectiveRouteTable","locations":["West + US","East US","North Europe","West Europe","East Asia","Southeast Asia","North + Central US","South Central US","Central US","East US 2","Japan East","Japan + West","Brazil South","Australia East","Australia Southeast","Central India","South + India","West India","Canada Central","Canada East","West Central US","West + US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia + Central","South Africa North","UAE North","Switzerland North","Germany West + Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"locations/rnmEffectiveNetworkSecurityGroups","locations":["West US","East US","North Europe","West Europe","East Asia","Southeast Asia","North Central US","South Central US","Central US","East US 2","Japan East","Japan West","Brazil South","Australia East","Australia Southeast","Central India","South @@ -1707,7 +1866,8 @@ interactions: US 2","UK West","UK South","Korea Central","Korea South","France Central","Australia Central","South Africa North","UAE North","Switzerland North","Germany West Central","Norway East","West US 3","Jio India West","Sweden Central","Qatar - Central","Poland Central","Italy North","Central US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01"],"capabilities":"None"},{"resourceType":"frontdoorOperationResults","locations":["global"],"apiVersions":["2022-05-01","2021-06-01","2020-11-01","2020-07-01","2020-05-01","2020-04-01","2020-01-01","2019-11-01","2019-10-01","2019-08-01","2019-05-01","2019-04-01","2019-03-01","2018-08-01"],"defaultApiVersion":"2020-07-01","capabilities":"None"},{"resourceType":"frontdoors","locations":["Central + Central","Poland Central","Italy North","Israel Central","Central US EUAP","East + US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01"],"capabilities":"None"},{"resourceType":"frontdoorOperationResults","locations":["global"],"apiVersions":["2022-05-01","2021-06-01","2020-11-01","2020-07-01","2020-05-01","2020-04-01","2020-01-01","2019-11-01","2019-10-01","2019-08-01","2019-05-01","2019-04-01","2019-03-01","2018-08-01"],"defaultApiVersion":"2020-07-01","capabilities":"None"},{"resourceType":"frontdoors","locations":["Central US EUAP","East US 2 EUAP","global","Central US","East US","East US 2","North Central US","South Central US","West US","North Europe","West Europe","East Asia","Southeast Asia","Japan East","Japan West","Brazil South","Australia @@ -1731,17 +1891,17 @@ interactions: Europe","East Asia","Southeast Asia","Japan East","Japan West","Brazil South","Australia East","Australia Southeast"],"apiVersions":["2019-11-01"],"defaultApiVersion":"2019-11-01","capabilities":"SupportsTags, SupportsLocation"},{"resourceType":"networkWatchers/lenses","locations":["Central - US EUAP","East US 2 EUAP"],"apiVersions":["2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, + US EUAP","East US 2 EUAP"],"apiVersions":["2023-09-01","2023-06-01","2023-05-01","2023-04-01","2023-02-01","2022-11-01","2022-09-01","2022-07-01","2022-05-01","2022-01-01","2021-12-01","2021-08-01","2021-06-01","2021-05-01","2021-04-01","2021-03-01","2021-02-01","2021-01-01","2020-11-01","2020-08-01","2020-07-01","2020-06-01","2020-05-01","2020-04-01","2020-03-01","2020-01-01","2019-12-01","2019-11-01","2019-09-01","2019-08-01","2019-07-01","2019-06-01","2019-04-01","2019-02-01","2018-12-01","2018-11-01","2018-10-01","2018-08-01","2018-07-01","2018-06-01","2018-05-01","2018-04-01","2018-03-01","2018-02-01","2018-01-01","2017-11-01","2017-10-01","2017-09-01"],"defaultApiVersion":"2020-03-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '162445' + - '174807' content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:23 GMT + - Fri, 22 Dec 2023 10:07:47 GMT expires: - '-1' pragma: @@ -1770,12 +1930,12 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet?api-version=2023-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet?api-version=2023-09-01 response: body: - string: '{"name":"proxy-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet","etag":"W/\"d059dcc8-26c0-433d-b474-8470a0820bfb\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.42.3.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' + string: '{"name":"proxy-subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet","etag":"W/\"a772ff56-794f-42f0-b631-45847605ffe7\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.42.3.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}' headers: cache-control: - no-cache @@ -1784,9 +1944,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:23 GMT + - Fri, 22 Dec 2023 10:07:48 GMT etag: - - W/"d059dcc8-26c0-433d-b474-8470a0820bfb" + - W/"a772ff56-794f-42f0-b631-45847605ffe7" expires: - '-1' pragma: @@ -1803,7 +1963,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f4d6f48c-1281-47a0-93da-fd05f5bd6801 + - 4a6966e3-4888-4daa-8dc7-9e63ad06c627 status: code: 200 message: OK @@ -1822,13 +1982,13 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-compute/30.0.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions?$top=1&$orderby=name%20desc&api-version=2022-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions?$top=1&$orderby=name%20desc&api-version=2023-09-01 response: body: - string: "[\r\n {\r\n \"location\": \"westus2\",\r\n \"name\": \"20.04.202308310\",\r\n - \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202308310\"\r\n + string: "[\r\n {\r\n \"location\": \"westus2\",\r\n \"name\": \"20.04.202312080\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202312080\"\r\n \ }\r\n]" headers: cache-control: @@ -1838,7 +1998,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:23 GMT + - Fri, 22 Dec 2023 10:07:48 GMT expires: - '-1' pragma: @@ -1848,14 +2008,10 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15998,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43998 + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15998,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43993 status: code: 200 message: OK @@ -1874,9 +2030,9 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-compute/30.0.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions/20.04.202308310?api-version=2022-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions/20.04.202312080?api-version=2023-09-01 response: body: string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"architecture\": @@ -1890,7 +2046,7 @@ interactions: \"IsHibernateSupported\",\r\n \"value\": \"True\"\r\n }\r\n ],\r\n \ \"osDiskImage\": {\r\n \"operatingSystem\": \"Linux\",\r\n \"sizeInBytes\": 32213303808\r\n },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": - \"westus2\",\r\n \"name\": \"20.04.202308310\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202308310\"\r\n}" + \"westus2\",\r\n \"name\": \"20.04.202312080\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202312080\"\r\n}" headers: cache-control: - no-cache @@ -1899,7 +2055,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:24 GMT + - Fri, 22 Dec 2023 10:07:49 GMT expires: - '-1' pragma: @@ -1909,14 +2065,10 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12998,Microsoft.Compute/GetVMImageFromLocation30Min;73998 + - Microsoft.Compute/GetVMImageFromLocation3Min;12998,Microsoft.Compute/GetVMImageFromLocation30Min;73994 status: code: 200 message: OK @@ -1935,13 +2087,13 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-compute/30.0.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions?$top=1&$orderby=name%20desc&api-version=2022-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions?$top=1&$orderby=name%20desc&api-version=2023-09-01 response: body: - string: "[\r\n {\r\n \"location\": \"westus2\",\r\n \"name\": \"20.04.202308310\",\r\n - \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202308310\"\r\n + string: "[\r\n {\r\n \"location\": \"westus2\",\r\n \"name\": \"20.04.202312080\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202312080\"\r\n \ }\r\n]" headers: cache-control: @@ -1951,7 +2103,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:24 GMT + - Fri, 22 Dec 2023 10:07:50 GMT expires: - '-1' pragma: @@ -1968,7 +2120,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15997,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43997 + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15997,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43992 status: code: 200 message: OK @@ -1987,9 +2139,9 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-compute/30.0.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions/20.04.202308310?api-version=2022-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus2/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-focal/skus/20_04-lts/versions/20.04.202312080?api-version=2023-09-01 response: body: string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"architecture\": @@ -2003,7 +2155,7 @@ interactions: \"IsHibernateSupported\",\r\n \"value\": \"True\"\r\n }\r\n ],\r\n \ \"osDiskImage\": {\r\n \"operatingSystem\": \"Linux\",\r\n \"sizeInBytes\": 32213303808\r\n },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": - \"westus2\",\r\n \"name\": \"20.04.202308310\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202308310\"\r\n}" + \"westus2\",\r\n \"name\": \"20.04.202312080\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus2/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-focal/Skus/20_04-lts/Versions/20.04.202312080\"\r\n}" headers: cache-control: - no-cache @@ -2012,7 +2164,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:25 GMT + - Fri, 22 Dec 2023 10:07:49 GMT expires: - '-1' pragma: @@ -2029,7 +2181,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12997,Microsoft.Compute/GetVMImageFromLocation30Min;73997 + - Microsoft.Compute/GetVMImageFromLocation3Min;12997,Microsoft.Compute/GetVMImageFromLocation30Min;73993 status: code: 200 message: OK @@ -2047,7 +2199,7 @@ interactions: [{"name": "ipconfigcli-proxy-vm", "properties": {"privateIPAllocationMethod": "Dynamic", "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/proxy-subnet"}}}], "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG"}}}, - {"apiVersion": "2022-11-01", "type": "Microsoft.Compute/virtualMachines", "name": + {"apiVersion": "2023-09-01", "type": "Microsoft.Compute/virtualMachines", "name": "cli-proxy-vm", "location": "westus2", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic"], "properties": {"hardwareProfile": {"vmSize": "Standard_DS1_v2"}, "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic", @@ -2057,7 +2209,7 @@ interactions: "sku": "20_04-lts", "version": "latest"}}, "osProfile": {"computerName": "cli-proxy-vm", "adminUsername": "azureuser", "customData": "IyEvdXNyL2Jpbi9lbnYgYmFzaApzZXQgLXgKCmVjaG8gInNldHRpbmcgdXAiCldPUktESVI9IiR7MTotJChta3RlbXAgLWQpfSIKZWNobyAic2V0dGluZyB1cCAke1dPUktESVJ9IgoKcHVzaGQgIiRXT1JLRElSIgoKYXB0IHVwZGF0ZSAteSAmJiBhcHQgaW5zdGFs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c3RhdHVzIHNxdWlkCgojIHZhbGlkYXRpb24sIGZhaWxzIFZNIGNyZWF0aW9uIGlmIGNvbW1hbmRzIGZhaWwKY3VybCAtZnNTbCAtbyAvZGV2L251bGwgLXcgJyV7aHR0cF9jb2RlfVxuJyAteCBodHRwOi8vJHtIT1NUfTozMTI4LyAtSSBodHRwOi8vd3d3Lmdvb2dsZS5jb20KY3VybCAtZnNTbCAtbyAvZGV2L251bGwgLXcgJyV7aHR0cF9jb2RlfVxuJyAteCBodHRwOi8vJHtIT1NUfTozMTI4LyAtSSBodHRwczovL3d3dy5nb29nbGUuY29tCmN1cmwgLWZzU2wgLW8gL2Rldi9udWxsIC13ICcle2h0dHBfY29kZX1cbicgLXggaHR0cHM6Ly8ke0hPU1R9OjMxMjkvIC1JIGh0dHA6Ly93d3cuZ29vZ2xlLmNvbQpjdXJsIC1mc1NsIC1vIC9kZXYvbnVsbCAtdyAnJXtodHRwX2NvZGV9XG4nIC14IGh0dHBzOi8vJHtIT1NUfTozMTI5LyAtSSBodHRwczovL3d3dy5nb29nbGUuY29tCg==", "linuxConfiguration": {"disablePasswordAuthentication": true, "ssh": {"publicKeys": - [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 azcli_aks_live_test@example.com", "path": "/home/azureuser/.ssh/authorized_keys"}]}}}}}], "outputs": {}}, "parameters": {}, "mode": "incremental"}}' headers: @@ -2077,15 +2229,15 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_BFIIAV9qae64OlaaK6eJACeRxh0QYKWD","name":"vm_deploy_BFIIAV9qae64OlaaK6eJACeRxh0QYKWD","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13340453635184502032","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-09-15T07:46:27.6992525Z","duration":"PT0.0006458S","correlationId":"2cdbd7f6-47f1-42cb-b8ac-3b531ed4c47c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus2"]},{"resourceType":"networkInterfaces","locations":["westus2"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus2"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"cli-proxy-vmNSG"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"cli-proxy-vm"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_pTiM2VC6MbYRLyhjaYsjgTmVoGbIWsu5","name":"vm_deploy_pTiM2VC6MbYRLyhjaYsjgTmVoGbIWsu5","type":"Microsoft.Resources/deployments","properties":{"templateHash":"12849302810600682494","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-12-22T10:07:53.0745548Z","duration":"PT0.0002193S","correlationId":"205e4e9c-15dd-42df-a41d-bcc96d991424","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus2"]},{"resourceType":"networkInterfaces","locations":["westus2"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus2"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"cli-proxy-vmNSG"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"cli-proxy-vm"}]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_BFIIAV9qae64OlaaK6eJACeRxh0QYKWD/operationStatuses/08585068428991366641?api-version=2022-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_pTiM2VC6MbYRLyhjaYsjgTmVoGbIWsu5/operationStatuses/08584983672138316788?api-version=2022-09-01 cache-control: - no-cache content-length: @@ -2093,7 +2245,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:28 GMT + - Fri, 22 Dec 2023 10:07:53 GMT expires: - '-1' pragma: @@ -2122,9 +2274,9 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585068428991366641?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584983672138316788?api-version=2022-09-01 response: body: string: '{"status":"Accepted"}' @@ -2136,50 +2288,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:46:28 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: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data - --vnet-name --subnet - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585068428991366641?api-version=2022-09-01 - response: - body: - string: '{"status":"Running"}' - headers: - cache-control: - - no-cache - content-length: - - '20' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 15 Sep 2023 07:46:58 GMT + - Fri, 22 Dec 2023 10:07:53 GMT expires: - '-1' pragma: @@ -2208,9 +2317,9 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585068428991366641?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584983672138316788?api-version=2022-09-01 response: body: string: '{"status":"Succeeded"}' @@ -2222,7 +2331,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:28 GMT + - Fri, 22 Dec 2023 10:08:23 GMT expires: - '-1' pragma: @@ -2251,12 +2360,12 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_BFIIAV9qae64OlaaK6eJACeRxh0QYKWD","name":"vm_deploy_BFIIAV9qae64OlaaK6eJACeRxh0QYKWD","type":"Microsoft.Resources/deployments","properties":{"templateHash":"13340453635184502032","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-09-15T07:47:13.9005725Z","duration":"PT46.2019658S","correlationId":"2cdbd7f6-47f1-42cb-b8ac-3b531ed4c47c","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus2"]},{"resourceType":"networkInterfaces","locations":["westus2"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus2"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"cli-proxy-vmNSG"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"cli-proxy-vm"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Resources/deployments/vm_deploy_pTiM2VC6MbYRLyhjaYsjgTmVoGbIWsu5","name":"vm_deploy_pTiM2VC6MbYRLyhjaYsjgTmVoGbIWsu5","type":"Microsoft.Resources/deployments","properties":{"templateHash":"12849302810600682494","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2023-12-22T10:08:12.7672289Z","duration":"PT19.6928934S","correlationId":"205e4e9c-15dd-42df-a41d-bcc96d991424","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus2"]},{"resourceType":"networkInterfaces","locations":["westus2"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus2"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"cli-proxy-vmNSG"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"cli-proxy-vmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"cli-proxy-vm"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG"}]}}' headers: cache-control: - no-cache @@ -2265,7 +2374,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:28 GMT + - Fri, 22 Dec 2023 10:08:23 GMT expires: - '-1' pragma: @@ -2294,65 +2403,66 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-compute/30.0.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm?$expand=instanceView&api-version=2022-11-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm?$expand=instanceView&api-version=2023-09-01 response: body: string: "{\r\n \"name\": \"cli-proxy-vm\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/virtualMachines/cli-proxy-vm\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus2\",\r\n \ \"tags\": {\r\n \"azsecpack\": \"nonprod\",\r\n \"platformsettings.host_environment.service.platform_optedin_for_rootcerts\": - \"true\"\r\n },\r\n \"properties\": {\r\n \"vmId\": \"89d99da5-9ed5-4548-b2e0-a317d59d81fd\",\r\n - \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n + \"true\"\r\n },\r\n \"properties\": {\r\n \"hardwareProfile\": {\r\n + \ \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n \"provisioningState\": + \"Succeeded\",\r\n \"vmId\": \"6899a670-d79c-4091-845f-91c2debef6fa\",\r\n \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"Canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-focal\",\r\n \ \"sku\": \"20_04-lts\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"20.04.202308310\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": - \"Linux\",\r\n \"name\": \"cli-proxy-vm_OsDisk_1_6be91d8a885046ee8e84b9cf7b06f1bd\",\r\n + \"20.04.202312080\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Linux\",\r\n \"name\": \"cli-proxy-vm_disk1_f7bff9c3d9fa490e928d241d19d72870\",\r\n \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/cli-proxy-vm_OsDisk_1_6be91d8a885046ee8e84b9cf7b06f1bd\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Compute/disks/cli-proxy-vm_disk1_f7bff9c3d9fa490e928d241d19d72870\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"cli-proxy-vm\",\r\n \"adminUsername\": \"azureuser\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n \ \"path\": \"/home/azureuser/.ssh/authorized_keys\",\r\n \"keyData\": - \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 azcli_aks_live_test@example.com\"\r\n }\r\n ]\r\n },\r\n \ \"provisionVMAgent\": true,\r\n \"patchSettings\": {\r\n \"patchMode\": \"ImageDefault\",\r\n \"assessmentMode\": \"ImageDefault\"\r\n },\r\n \ \"enableVMAgentPlatformUpdates\": false\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic\"}]},\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"computerName\": - \"cli-proxy-vm\",\r\n \"osName\": \"ubuntu\",\r\n \"osVersion\": - \"20.04\",\r\n \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.9.1.1\",\r\n - \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n - \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n - \ \"message\": \"Guest Agent is running\",\r\n \"time\": - \"2023-09-15T07:47:24+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": - []\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": \"cli-proxy-vm_OsDisk_1_6be91d8a885046ee8e84b9cf7b06f1bd\",\r\n + \ \"instanceView\": {\r\n \"computerName\": \"cli-proxy-vm\",\r\n \"osName\": + \"ubuntu\",\r\n \"osVersion\": \"20.04\",\r\n \"vmAgent\": {\r\n + \ \"vmAgentVersion\": \"2.9.1.1\",\r\n \"statuses\": [\r\n {\r\n + \ \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": + \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n \"message\": + \"Guest Agent is running\",\r\n \"time\": \"2023-12-22T10:08:23+00:00\"\r\n + \ }\r\n ],\r\n \"extensionHandlers\": []\r\n },\r\n + \ \"disks\": [\r\n {\r\n \"name\": \"cli-proxy-vm_disk1_f7bff9c3d9fa490e928d241d19d72870\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2023-09-15T07:46:39.6663858+00:00\"\r\n + succeeded\",\r\n \"time\": \"2023-12-22T10:08:00.7812339+00:00\"\r\n \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": \"V1\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2023-09-15T07:47:12.0411535+00:00\"\r\n + succeeded\",\r\n \"time\": \"2023-12-22T10:08:10.671816+00:00\"\r\n \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n - \ }\r\n ]\r\n },\r\n \"timeCreated\": \"2023-09-15T07:46:34.7445836+00:00\"\r\n + \ }\r\n ]\r\n },\r\n \"timeCreated\": \"2023-12-22T10:07:58.7499931+00:00\"\r\n \ }\r\n}" headers: cache-control: - no-cache content-length: - - '4073' + - '4063' content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:28 GMT + - Fri, 22 Dec 2023 10:08:24 GMT expires: - '-1' pragma: @@ -2362,17 +2472,13 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31997 + - Microsoft.Compute/LowCostGetSubscriptionMaximum;23996,Microsoft.Compute/LowCostGetResource;32 status: code: 200 - message: OK + message: '' - request: body: null headers: @@ -2388,18 +2494,18 @@ interactions: - --resource-group --name --image --ssh-key-values --public-ip-address --custom-data --vnet-name --subnet User-Agent: - - AZURECLI/2.52.0 (AAZ) azsdk-python-core/1.26.0 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 (AAZ) azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic?api-version=2022-01-01 response: body: string: "{\r\n \"name\": \"cli-proxy-vmVMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic\",\r\n - \ \"etag\": \"W/\\\"b9ebe19b-f20f-4365-8e40-50cba99607a7\\\"\",\r\n \"tags\": + \ \"etag\": \"W/\\\"8c65ae4e-4579-44a2-8ac3-fdf55b6d5fd9\\\"\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"ea48c0fc-4231-4b2e-ac85-bbf4c7d62cc0\",\r\n \"ipConfigurations\": + \ \"resourceGuid\": \"fd2b15e4-a9d2-4f0d-813c-8d67c8bcacd8\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigcli-proxy-vm\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkInterfaces/cli-proxy-vmVMNic/ipConfigurations/ipconfigcli-proxy-vm\",\r\n - \ \"etag\": \"W/\\\"b9ebe19b-f20f-4365-8e40-50cba99607a7\\\"\",\r\n + \ \"etag\": \"W/\\\"8c65ae4e-4579-44a2-8ac3-fdf55b6d5fd9\\\"\",\r\n \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"privateIPAddress\": \"10.42.3.4\",\r\n \"privateIPAllocationMethod\": @@ -2407,8 +2513,8 @@ interactions: \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": - \"lqklzqlg5tbepd3npo3fzwxsnb.xx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": - \"00-22-48-BF-96-0A\",\r\n \"enableAcceleratedNetworking\": false,\r\n + \"b2r2grkcoc3ebkkudvm0hxvpdf.xx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"00-22-48-B8-69-7B\",\r\n \"enableAcceleratedNetworking\": false,\r\n \ \"vnetEncryptionSupported\": false,\r\n \"enableIPForwarding\": false,\r\n \ \"networkSecurityGroup\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/networkSecurityGroups/cli-proxy-vmNSG\"\r\n \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": @@ -2425,9 +2531,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:28 GMT + - Fri, 22 Dec 2023 10:08:24 GMT etag: - - W/"b9ebe19b-f20f-4365-8e40-50cba99607a7" + - W/"8c65ae4e-4579-44a2-8ac3-fdf55b6d5fd9" expires: - '-1' pragma: @@ -2437,10 +2543,14 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 32357634-4b49-413a-a075-130d7a162f2b + - d0c2e08f-8b70-4eb7-a597-ba5d2e94b775 status: code: 200 message: OK @@ -2459,8 +2569,8 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-10-02-preview response: @@ -2476,7 +2586,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:29 GMT + - Fri, 22 Dec 2023 10:08:25 GMT expires: - '-1' pragma: @@ -2505,12 +2615,12 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.8.10 (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","test":"test_aks_create_and_update_with_http_proxy_config","date":"2023-09-15T07:45:57Z","module":"aks-preview"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"product":"azurecli","cause":"automation","test":"test_aks_create_and_update_with_http_proxy_config","date":"2023-12-22T10:07:21Z","module":"aks-preview"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -2519,7 +2629,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:29 GMT + - Fri, 22 Dec 2023 10:08:24 GMT expires: - '-1' pragma: @@ -2548,8 +2658,8 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments?$filter=atScope()&api-version=2022-04-01 response: @@ -2557,16 +2667,16 @@ interactions: string: '{"value":[{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9b0f576e-fc2e-4256-9aa3-6fede171d599","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/","condition":null,"conditionVersion":null,"createdOn":"2023-07-13T16:20:06.8829118Z","updatedOn":"2023-07-13T16:20:06.8829118Z","createdBy":null,"updatedBy":null,"delegatedManagedIdentityResourceId":null,"description":"Allow AccessMonitorReader to read access details for compliance purpose"},"id":"/providers/Microsoft.Authorization/roleAssignments/fb6b898e-5323-404d-a8af-da5aafc3ecc0","type":"Microsoft.Authorization/roleAssignments","name":"fb6b898e-5323-404d-a8af-da5aafc3ecc0"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9b0f576e-fc2e-4256-9aa3-6fede171d599","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/","condition":null,"conditionVersion":null,"createdOn":"2023-07-19T22:13:56.3482970Z","updatedOn":"2023-07-19T22:13:56.3482970Z","createdBy":null,"updatedBy":null,"delegatedManagedIdentityResourceId":null,"description":"Allow AccessMonitorReader to read access details for compliance purpose"},"id":"/providers/Microsoft.Authorization/roleAssignments/3cdb16ce-2290-4f5f-bcab-5b07a458405f","type":"Microsoft.Authorization/roleAssignments","name":"3cdb16ce-2290-4f5f-bcab-5b07a458405f"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9b0f576e-fc2e-4256-9aa3-6fede171d599","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/","condition":null,"conditionVersion":null,"createdOn":"2023-07-19T22:18:24.6119781Z","updatedOn":"2023-07-19T22:18:24.6119781Z","createdBy":null,"updatedBy":null,"delegatedManagedIdentityResourceId":null,"description":"Allow - AccessMonitorReader to read access details for compliance purpose"},"id":"/providers/Microsoft.Authorization/roleAssignments/125160dd-5630-45b1-8260-4e5469d3e7b6","type":"Microsoft.Authorization/roleAssignments","name":"125160dd-5630-45b1-8260-4e5469d3e7b6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"User","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-04-26T05:33:00.7067936Z","updatedOn":"2021-04-26T05:33:00.7067936Z","createdBy":"7e9cc714-bfe4-4eea-acb2-d53ced88ab8b","updatedBy":"7e9cc714-bfe4-4eea-acb2-d53ced88ab8b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/2adf4737-6342-4f63-aeb2-5fcd3426a387","type":"Microsoft.Authorization/roleAssignments","name":"2adf4737-6342-4f63-aeb2-5fcd3426a387"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-04-26T06:09:24.5972802Z","updatedOn":"2021-04-26T06:09:24.5972802Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/c4572c05-f69f-4e5c-aac6-79afefcf0e2e","type":"Microsoft.Authorization/roleAssignments","name":"c4572c05-f69f-4e5c-aac6-79afefcf0e2e"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-06-18T05:18:40.4643436Z","updatedOn":"2021-06-18T05:18:40.4643436Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/3f926301-cc14-4a88-a3b7-c159d73d01f6","type":"Microsoft.Authorization/roleAssignments","name":"3f926301-cc14-4a88-a3b7-c159d73d01f6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:40.4541416Z","updatedOn":"2022-01-25T05:49:40.4541416Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/95e51146-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"95e51146-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:41.6466655Z","updatedOn":"2022-01-25T05:49:41.6466655Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/96d4d041-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"96d4d041-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:42.8008295Z","updatedOn":"2022-01-25T05:49:42.8008295Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/978dbc52-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"978dbc52-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:43.7159467Z","updatedOn":"2022-01-25T05:49:43.7159467Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/9808753a-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"9808753a-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:44.8535285Z","updatedOn":"2022-01-25T05:49:44.8535285Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/9895826c-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"9895826c-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:21.9669611Z","updatedOn":"2022-01-25T06:00:21.9669611Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/143cab45-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"143cab45-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:21.7844500Z","updatedOn":"2022-01-25T06:00:21.7844500Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/143a47b2-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"143a47b2-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:22.8152511Z","updatedOn":"2022-01-25T06:00:22.8152511Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/1503a122-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"1503a122-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:22.7549989Z","updatedOn":"2022-01-25T06:00:22.7549989Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/14fdfc11-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"14fdfc11-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:47.5002672Z","updatedOn":"2022-01-25T06:00:47.5002672Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/23901ba1-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"23901ba1-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/81a9662b-bebf-436f-a333-f67b29880f12","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:47.9954045Z","updatedOn":"2022-01-25T06:00:47.9954045Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/23d4b2c8-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"23d4b2c8-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/17d1049b-9a84-46fb-8f53-869881c3d3ab","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:48.0124462Z","updatedOn":"2022-01-25T06:00:48.0124462Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/23eb1c2a-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"23eb1c2a-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:49.0142818Z","updatedOn":"2022-01-25T06:00:49.0142818Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/248c7804-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"248c7804-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:49.8561822Z","updatedOn":"2022-01-25T06:00:49.8561822Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/25212cc5-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"25212cc5-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:03:00.8232622Z","updatedOn":"2022-01-25T06:03:00.8232622Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/730ae441-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"730ae441-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:03:01.6908492Z","updatedOn":"2022-01-25T06:03:01.6908492Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/73b81c51-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"73b81c51-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:27.0646115Z","updatedOn":"2022-01-25T06:05:27.0646115Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/ca436279-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"ca436279-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:27.8245772Z","updatedOn":"2022-01-25T06:05:27.8245772Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cad7146c-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cad7146c-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:28.8193427Z","updatedOn":"2022-01-25T06:05:28.8193427Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cb6be874-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cb6be874-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:30.0125029Z","updatedOn":"2022-01-25T06:05:30.0125029Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cc20f7f4-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cc20f7f4-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:31.2002633Z","updatedOn":"2022-01-25T06:05:31.2002633Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/ccd748dd-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"ccd748dd-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:32.4937030Z","updatedOn":"2022-01-25T06:05:32.4937030Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cd4bbd1a-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cd4bbd1a-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:33.6999970Z","updatedOn":"2022-01-25T06:05:33.6999970Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/ce56964e-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"ce56964e-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:35.3719606Z","updatedOn":"2022-01-25T06:05:35.3719606Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cf53c36b-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cf53c36b-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:37.0989473Z","updatedOn":"2022-01-25T06:05:37.0989473Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d0537e9f-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d0537e9f-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:37.9186616Z","updatedOn":"2022-01-25T06:05:37.9186616Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d0d7c10e-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d0d7c10e-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:39.2245796Z","updatedOn":"2022-01-25T06:05:39.2245796Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d187dc7e-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d187dc7e-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/81a9662b-bebf-436f-a333-f67b29880f12","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:41.3147495Z","updatedOn":"2022-01-25T06:05:41.3147495Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d2d190da-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d2d190da-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:42.0909979Z","updatedOn":"2022-01-25T06:05:42.0909979Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d3553305-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d3553305-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2023-02-10T04:11:40.8923959Z","updatedOn":"2023-02-10T04:11:40.8923959Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/7b9cb4b1-7e07-4127-b87e-47e7ab8ae685","type":"Microsoft.Authorization/roleAssignments","name":"7b9cb4b1-7e07-4127-b87e-47e7ab8ae685"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2023-07-04T02:50:17.7342959Z","updatedOn":"2023-07-04T02:50:17.7342959Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/620ed504-87c7-4aea-8641-c429dd227711","type":"Microsoft.Authorization/roleAssignments","name":"620ed504-87c7-4aea-8641-c429dd227711"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"Group","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-09-18T03:09:33.8702688Z","updatedOn":"2021-09-18T03:09:33.8702688Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/99d6fd13-909e-4c52-807e-77f7a5af83c8","type":"Microsoft.Authorization/roleAssignments","name":"99d6fd13-909e-4c52-807e-77f7a5af83c8"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/465fbb01-3623-f393-e42f-e19c0d2982de","condition":null,"conditionVersion":null,"createdOn":"2021-10-08T17:23:35.8382756Z","updatedOn":"2021-10-08T17:23:35.8382756Z","createdBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","updatedBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/465fbb01-3623-f393-e42f-e19c0d2982de/providers/Microsoft.Authorization/roleAssignments/ade4333c-4321-4b68-b498-d081d55e2b0c","type":"Microsoft.Authorization/roleAssignments","name":"ade4333c-4321-4b68-b498-d081d55e2b0c"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2019-03-26T22:01:02.9136073Z","updatedOn":"2019-03-26T22:01:02.9136073Z","createdBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","updatedBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/6f4de15e-9316-4714-a7c4-40c46cf8e067","type":"Microsoft.Authorization/roleAssignments","name":"6f4de15e-9316-4714-a7c4-40c46cf8e067"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:13.2137492Z","updatedOn":"2020-02-25T18:36:13.2137492Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/18fdd87e-1c01-424e-b380-32310f4940c2","type":"Microsoft.Authorization/roleAssignments","name":"18fdd87e-1c01-424e-b380-32310f4940c2"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:00.4746112Z","updatedOn":"2020-02-25T18:36:00.4746112Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/d9bcf58a-6f24-446d-bf60-20ffe5142396","type":"Microsoft.Authorization/roleAssignments","name":"d9bcf58a-6f24-446d-bf60-20ffe5142396"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:35:55.7490022Z","updatedOn":"2020-02-25T18:35:55.7490022Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/6e2b954b-42b2-48e0-997a-622601f0a4b4","type":"Microsoft.Authorization/roleAssignments","name":"6e2b954b-42b2-48e0-997a-622601f0a4b4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:35:57.9173081Z","updatedOn":"2020-02-25T18:35:57.9173081Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/8d76aaa3-fcfd-4ea5-8c7c-363d250e7ae9","type":"Microsoft.Authorization/roleAssignments","name":"8d76aaa3-fcfd-4ea5-8c7c-363d250e7ae9"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:23.0673659Z","updatedOn":"2020-02-25T18:36:23.0673659Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/d0817c57-3e5b-4363-88b7-52baadd5c362","type":"Microsoft.Authorization/roleAssignments","name":"d0817c57-3e5b-4363-88b7-52baadd5c362"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:31.2596366Z","updatedOn":"2020-02-25T18:36:31.2596366Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/0dabf212-a1c7-4af6-ba8b-be045493b368","type":"Microsoft.Authorization/roleAssignments","name":"0dabf212-a1c7-4af6-ba8b-be045493b368"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:35:52.9188704Z","updatedOn":"2020-02-25T18:35:52.9188704Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/d674b853-332e-4437-9ddb-bba8fde7ccce","type":"Microsoft.Authorization/roleAssignments","name":"d674b853-332e-4437-9ddb-bba8fde7ccce"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:38.8393742Z","updatedOn":"2020-02-25T18:36:38.8393742Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/00625383-053d-4227-a4db-b098e9bd2289","type":"Microsoft.Authorization/roleAssignments","name":"00625383-053d-4227-a4db-b098e9bd2289"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:05.0954462Z","updatedOn":"2020-02-25T18:36:05.0954462Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/3151fe9c-fcd2-45d3-a256-72fb13b86df5","type":"Microsoft.Authorization/roleAssignments","name":"3151fe9c-fcd2-45d3-a256-72fb13b86df5"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-07-06T18:51:23.0753297Z","updatedOn":"2020-07-06T18:51:23.0753297Z","createdBy":"d59f4a71-eff1-4bfa-a572-fe518f49f6c7","updatedBy":"d59f4a71-eff1-4bfa-a572-fe518f49f6c7","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/b3a9e1db-fde1-4ddd-ac1c-91913be67359","type":"Microsoft.Authorization/roleAssignments","name":"b3a9e1db-fde1-4ddd-ac1c-91913be67359"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-12-12T21:14:55.1655079Z","updatedOn":"2023-02-28T22:54:18.0450083Z","createdBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","updatedBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/6565c104-61e2-5756-96d7-663b216c8b11","type":"Microsoft.Authorization/roleAssignments","name":"6565c104-61e2-5756-96d7-663b216c8b11"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-02-17T00:30:39.4967398Z","updatedOn":"2022-02-17T00:30:39.4967398Z","createdBy":"a4319ad3-20be-4542-8952-685b66e56377","updatedBy":"a4319ad3-20be-4542-8952-685b66e56377","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/d8aedac6-3663-42b3-add4-c013b7935fb4","type":"Microsoft.Authorization/roleAssignments","name":"d8aedac6-3663-42b3-add4-c013b7935fb4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-03-02T23:53:39.1630622Z","updatedOn":"2022-03-02T23:53:39.1630622Z","createdBy":"a4319ad3-20be-4542-8952-685b66e56377","updatedBy":"a4319ad3-20be-4542-8952-685b66e56377","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/b5f0a13f-ac13-4e45-8588-15f5d9a02b20","type":"Microsoft.Authorization/roleAssignments","name":"b5f0a13f-ac13-4e45-8588-15f5d9a02b20"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fd6e57ea-fe3c-4f21-bd1e-de170a9a4971","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-03-08T00:58:05.8353141Z","updatedOn":"2022-03-08T00:58:05.8353141Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/403b97d1-ee0a-4b10-afe1-f36f368d2ced","type":"Microsoft.Authorization/roleAssignments","name":"403b97d1-ee0a-4b10-afe1-f36f368d2ced"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/94ddc4bc-25f5-4f3e-b527-c587da93cfe4","principalId":"00000000-0000-0000-0000-000000000001","principalType":"Group","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-05-16T23:08:20.8536608Z","updatedOn":"2022-05-16T23:08:20.8536608Z","createdBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","updatedBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/8b338a13-cfa6-42e6-b424-fb375ce9d07c","type":"Microsoft.Authorization/roleAssignments","name":"8b338a13-cfa6-42e6-b424-fb375ce9d07c"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-05-17T18:23:54.2264851Z","updatedOn":"2022-05-31T17:20:00.8273681Z","createdBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","updatedBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/f0576973-5014-5fe2-b3f2-cf3aace860d6","type":"Microsoft.Authorization/roleAssignments","name":"f0576973-5014-5fe2-b3f2-cf3aace860d6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-07-19T00:07:21.3325762Z","updatedOn":"2022-07-19T00:07:21.3325762Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/2697280b-812c-472d-841b-a10a9fe540a5","type":"Microsoft.Authorization/roleAssignments","name":"2697280b-812c-472d-841b-a10a9fe540a5"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fd6e57ea-fe3c-4f21-bd1e-de170a9a4971","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-07-19T00:07:23.7020980Z","updatedOn":"2022-07-19T00:07:23.7020980Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/f4254463-7a28-4d26-b331-5a18c354cbe6","type":"Microsoft.Authorization/roleAssignments","name":"f4254463-7a28-4d26-b331-5a18c354cbe6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-07-19T00:07:26.4080657Z","updatedOn":"2022-07-19T00:07:26.4080657Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/065a63ba-71cc-4c69-b92b-bc67421e7e64","type":"Microsoft.Authorization/roleAssignments","name":"065a63ba-71cc-4c69-b92b-bc67421e7e64"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2023-04-07T05:56:00.4871186Z","updatedOn":"2023-04-24T19:44:20.3477537Z","createdBy":"09a22e59-e99b-42cb-b8b7-2475f66a3007","updatedBy":"09a22e59-e99b-42cb-b8b7-2475f66a3007","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/17a093c4-e4b2-5959-95e3-5894ef6873fb","type":"Microsoft.Authorization/roleAssignments","name":"17a093c4-e4b2-5959-95e3-5894ef6873fb"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-09T18:17:33.0012805Z","updatedOn":"2021-08-09T18:17:33.0012805Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/01de8fe7-aae0-4d5c-844a-f0bdb8335252","type":"Microsoft.Authorization/roleAssignments","name":"01de8fe7-aae0-4d5c-844a-f0bdb8335252"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-09T18:17:39.9188336Z","updatedOn":"2021-08-09T18:17:39.9188336Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/ab2be506-5489-4c1f-add0-f5ed87a10439","type":"Microsoft.Authorization/roleAssignments","name":"ab2be506-5489-4c1f-add0-f5ed87a10439"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-24T19:32:18.2000692Z","updatedOn":"2021-08-24T19:32:18.2000692Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/0ce2f3fb-17ea-4193-9081-09aa4b39fec4","type":"Microsoft.Authorization/roleAssignments","name":"0ce2f3fb-17ea-4193-9081-09aa4b39fec4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-24T19:32:36.6775144Z","updatedOn":"2021-08-24T19:32:36.6775144Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/2e95b289-99bd-4e68-83de-5433f2a0428c","type":"Microsoft.Authorization/roleAssignments","name":"2e95b289-99bd-4e68-83de-5433f2a0428c"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-11-01T22:46:09.1056400Z","updatedOn":"2021-11-01T22:46:09.1056400Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/82fe7886-5c1b-42c2-9319-7b4d436d8aba","type":"Microsoft.Authorization/roleAssignments","name":"82fe7886-5c1b-42c2-9319-7b4d436d8aba"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-11-01T22:46:14.7527743Z","updatedOn":"2021-11-01T22:46:14.7527743Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/12162b26-25fb-4ef5-a6e8-651446483cb6","type":"Microsoft.Authorization/roleAssignments","name":"12162b26-25fb-4ef5-a6e8-651446483cb6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-11-01T22:46:20.6399869Z","updatedOn":"2021-11-01T22:46:20.6399869Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/105bcc1f-3ddf-4cc0-bffc-03b3d9aaf870","type":"Microsoft.Authorization/roleAssignments","name":"105bcc1f-3ddf-4cc0-bffc-03b3d9aaf870"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-01-26T20:10:13.8998989Z","updatedOn":"2021-01-26T20:10:13.8998989Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/b36517ec-61d3-468d-afdc-eceda8adb4ee","type":"Microsoft.Authorization/roleAssignments","name":"b36517ec-61d3-468d-afdc-eceda8adb4ee"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-02-06T00:13:19.1780775Z","updatedOn":"2021-02-06T00:13:19.1780775Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/5216c1ee-4f58-4d36-b379-6c04b1fbd157","type":"Microsoft.Authorization/roleAssignments","name":"5216c1ee-4f58-4d36-b379-6c04b1fbd157"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f25e0fa2-a7c8-4377-a976-54943a77a395","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-04-16T18:26:34.3109215Z","updatedOn":"2021-04-16T18:26:34.3109215Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/7464f8a3-9f55-443b-a3a5-44a31b100cad","type":"Microsoft.Authorization/roleAssignments","name":"7464f8a3-9f55-443b-a3a5-44a31b100cad"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-04-16T18:27:56.4446265Z","updatedOn":"2021-04-16T18:27:56.4446265Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/8f430c4c-4317-4495-9f01-4f3d4e1ca111","type":"Microsoft.Authorization/roleAssignments","name":"8f430c4c-4317-4495-9f01-4f3d4e1ca111"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-05-04T19:20:06.7695456Z","updatedOn":"2021-05-04T19:20:06.7695456Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/fb8bab14-7f67-4e57-8aa5-0c4b7ab5a0fa","type":"Microsoft.Authorization/roleAssignments","name":"fb8bab14-7f67-4e57-8aa5-0c4b7ab5a0fa"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2019-03-26T22:01:02.9176787Z","updatedOn":"2019-03-26T22:01:02.9176787Z","createdBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","updatedBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/4b771ea9-81de-4fc4-aa28-a3a0b9b4a320","type":"Microsoft.Authorization/roleAssignments","name":"4b771ea9-81de-4fc4-aa28-a3a0b9b4a320"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/36243c78-bf99-498c-9df9-86d9f8d28608","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2019-03-27T00:49:37.3000523Z","updatedOn":"2019-03-27T00:49:37.3000523Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/e6e1fffd-83f7-40c7-9f33-e56e2cf75b29","type":"Microsoft.Authorization/roleAssignments","name":"e6e1fffd-83f7-40c7-9f33-e56e2cf75b29"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2019-03-27T00:50:08.3039053Z","updatedOn":"2019-03-27T00:50:08.3039053Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/3d01f56e-ee3a-41ed-a775-0e067546cb12","type":"Microsoft.Authorization/roleAssignments","name":"3d01f56e-ee3a-41ed-a775-0e067546cb12"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/94ddc4bc-25f5-4f3e-b527-c587da93cfe4","principalId":"00000000-0000-0000-0000-000000000001","principalType":"Group","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2022-06-28T23:11:28.9217618Z","updatedOn":"2022-06-28T23:11:28.9217618Z","createdBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","updatedBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/869183bd-893a-46f9-bb02-45e48b13f1be","type":"Microsoft.Authorization/roleAssignments","name":"869183bd-893a-46f9-bb02-45e48b13f1be"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47","condition":null,"conditionVersion":null,"createdOn":"2020-03-12T20:43:06.5941189Z","updatedOn":"2020-03-12T20:43:06.5941189Z","createdBy":"606f48c8-d219-4875-991d-ae6befaf0756","updatedBy":"606f48c8-d219-4875-991d-ae6befaf0756","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Authorization/roleAssignments/ad9e2cd7-0ff7-4931-9b17-656c8f17934b","type":"Microsoft.Authorization/roleAssignments","name":"ad9e2cd7-0ff7-4931-9b17-656c8f17934b"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47","condition":null,"conditionVersion":null,"createdOn":"2023-02-21T22:32:46.2324804Z","updatedOn":"2023-02-21T22:32:46.2324804Z","createdBy":"7f1579a6-c648-43a1-ac1e-0c3020dd9b8e","updatedBy":"7f1579a6-c648-43a1-ac1e-0c3020dd9b8e","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Authorization/roleAssignments/df7c1e07-5c2d-4b22-b7b9-fd11a8569db3","type":"Microsoft.Authorization/roleAssignments","name":"df7c1e07-5c2d-4b22-b7b9-fd11a8569db3"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/de139f84-1756-47ae-9be6-808fbbe84772","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47","condition":null,"conditionVersion":null,"createdOn":"2023-05-04T20:23:16.3808369Z","updatedOn":"2023-05-04T20:23:16.3808369Z","createdBy":"fa00c2de-57d5-4527-9254-4d513f482d0a","updatedBy":"fa00c2de-57d5-4527-9254-4d513f482d0a","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Authorization/roleAssignments/59109645-7b2b-4278-831a-2e4627ec603d","type":"Microsoft.Authorization/roleAssignments","name":"59109645-7b2b-4278-831a-2e4627ec603d"}]}' + AccessMonitorReader to read access details for compliance purpose"},"id":"/providers/Microsoft.Authorization/roleAssignments/125160dd-5630-45b1-8260-4e5469d3e7b6","type":"Microsoft.Authorization/roleAssignments","name":"125160dd-5630-45b1-8260-4e5469d3e7b6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"User","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-04-26T05:33:00.7067936Z","updatedOn":"2021-04-26T05:33:00.7067936Z","createdBy":"7e9cc714-bfe4-4eea-acb2-d53ced88ab8b","updatedBy":"7e9cc714-bfe4-4eea-acb2-d53ced88ab8b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/2adf4737-6342-4f63-aeb2-5fcd3426a387","type":"Microsoft.Authorization/roleAssignments","name":"2adf4737-6342-4f63-aeb2-5fcd3426a387"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-04-26T06:09:24.5972802Z","updatedOn":"2021-04-26T06:09:24.5972802Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/c4572c05-f69f-4e5c-aac6-79afefcf0e2e","type":"Microsoft.Authorization/roleAssignments","name":"c4572c05-f69f-4e5c-aac6-79afefcf0e2e"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-06-18T05:18:40.4643436Z","updatedOn":"2021-06-18T05:18:40.4643436Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/3f926301-cc14-4a88-a3b7-c159d73d01f6","type":"Microsoft.Authorization/roleAssignments","name":"3f926301-cc14-4a88-a3b7-c159d73d01f6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:40.4541416Z","updatedOn":"2022-01-25T05:49:40.4541416Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/95e51146-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"95e51146-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:41.6466655Z","updatedOn":"2022-01-25T05:49:41.6466655Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/96d4d041-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"96d4d041-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:42.8008295Z","updatedOn":"2022-01-25T05:49:42.8008295Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/978dbc52-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"978dbc52-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:43.7159467Z","updatedOn":"2022-01-25T05:49:43.7159467Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/9808753a-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"9808753a-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T05:49:44.8535285Z","updatedOn":"2022-01-25T05:49:44.8535285Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/9895826c-7da2-11ec-9795-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"9895826c-7da2-11ec-9795-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:21.9669611Z","updatedOn":"2022-01-25T06:00:21.9669611Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/143cab45-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"143cab45-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:21.7844500Z","updatedOn":"2022-01-25T06:00:21.7844500Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/143a47b2-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"143a47b2-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:22.8152511Z","updatedOn":"2022-01-25T06:00:22.8152511Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/1503a122-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"1503a122-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:22.7549989Z","updatedOn":"2022-01-25T06:00:22.7549989Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/14fdfc11-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"14fdfc11-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:47.5002672Z","updatedOn":"2022-01-25T06:00:47.5002672Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/23901ba1-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"23901ba1-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/81a9662b-bebf-436f-a333-f67b29880f12","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:47.9954045Z","updatedOn":"2022-01-25T06:00:47.9954045Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/23d4b2c8-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"23d4b2c8-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/17d1049b-9a84-46fb-8f53-869881c3d3ab","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:48.0124462Z","updatedOn":"2022-01-25T06:00:48.0124462Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/23eb1c2a-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"23eb1c2a-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b7e6dc6d-f1e8-4753-8033-0f276bb0955b","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:49.0142818Z","updatedOn":"2022-01-25T06:00:49.0142818Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/248c7804-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"248c7804-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:00:49.8561822Z","updatedOn":"2022-01-25T06:00:49.8561822Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/25212cc5-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"25212cc5-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:03:00.8232622Z","updatedOn":"2022-01-25T06:03:00.8232622Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/730ae441-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"730ae441-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:03:01.6908492Z","updatedOn":"2022-01-25T06:03:01.6908492Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/73b81c51-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"73b81c51-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:27.0646115Z","updatedOn":"2022-01-25T06:05:27.0646115Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/ca436279-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"ca436279-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:27.8245772Z","updatedOn":"2022-01-25T06:05:27.8245772Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cad7146c-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cad7146c-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:28.8193427Z","updatedOn":"2022-01-25T06:05:28.8193427Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cb6be874-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cb6be874-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:30.0125029Z","updatedOn":"2022-01-25T06:05:30.0125029Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cc20f7f4-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cc20f7f4-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:31.2002633Z","updatedOn":"2022-01-25T06:05:31.2002633Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/ccd748dd-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"ccd748dd-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:32.4937030Z","updatedOn":"2022-01-25T06:05:32.4937030Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cd4bbd1a-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cd4bbd1a-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:33.6999970Z","updatedOn":"2022-01-25T06:05:33.6999970Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/ce56964e-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"ce56964e-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:35.3719606Z","updatedOn":"2022-01-25T06:05:35.3719606Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/cf53c36b-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"cf53c36b-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:37.0989473Z","updatedOn":"2022-01-25T06:05:37.0989473Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d0537e9f-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d0537e9f-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:37.9186616Z","updatedOn":"2022-01-25T06:05:37.9186616Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d0d7c10e-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d0d7c10e-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:39.2245796Z","updatedOn":"2022-01-25T06:05:39.2245796Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d187dc7e-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d187dc7e-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/81a9662b-bebf-436f-a333-f67b29880f12","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:41.3147495Z","updatedOn":"2022-01-25T06:05:41.3147495Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d2d190da-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d2d190da-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2022-01-25T06:05:42.0909979Z","updatedOn":"2022-01-25T06:05:42.0909979Z","createdBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","updatedBy":"8ff738a5-abcd-4864-a162-6c18f7c9cbd9","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/d3553305-7da4-11ec-beaa-0022487a95e4","type":"Microsoft.Authorization/roleAssignments","name":"d3553305-7da4-11ec-beaa-0022487a95e4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2023-02-10T04:11:40.8923959Z","updatedOn":"2023-02-10T04:11:40.8923959Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/7b9cb4b1-7e07-4127-b87e-47e7ab8ae685","type":"Microsoft.Authorization/roleAssignments","name":"7b9cb4b1-7e07-4127-b87e-47e7ab8ae685"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2023-07-04T02:50:17.7342959Z","updatedOn":"2023-07-04T02:50:17.7342959Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/620ed504-87c7-4aea-8641-c429dd227711","type":"Microsoft.Authorization/roleAssignments","name":"620ed504-87c7-4aea-8641-c429dd227711"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635","principalId":"00000000-0000-0000-0000-000000000001","principalType":"User","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2023-10-23T09:30:37.0588305Z","updatedOn":"2023-10-23T09:30:37.0588305Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/3cb825c4-ed75-45fd-a09d-bc9df69a0329","type":"Microsoft.Authorization/roleAssignments","name":"3cb825c4-ed75-45fd-a09d-bc9df69a0329"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"Group","scope":"/subscriptions/00000000-0000-0000-0000-000000000000","condition":null,"conditionVersion":null,"createdOn":"2021-09-18T03:09:33.8702688Z","updatedOn":"2021-09-18T03:09:33.8702688Z","createdBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","updatedBy":"6904f123-3ede-43d2-bd0e-2b2f1bbe4a4b","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleAssignments/99d6fd13-909e-4c52-807e-77f7a5af83c8","type":"Microsoft.Authorization/roleAssignments","name":"99d6fd13-909e-4c52-807e-77f7a5af83c8"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/465fbb01-3623-f393-e42f-e19c0d2982de","condition":null,"conditionVersion":null,"createdOn":"2021-10-08T17:23:35.8382756Z","updatedOn":"2021-10-08T17:23:35.8382756Z","createdBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","updatedBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/465fbb01-3623-f393-e42f-e19c0d2982de/providers/Microsoft.Authorization/roleAssignments/ade4333c-4321-4b68-b498-d081d55e2b0c","type":"Microsoft.Authorization/roleAssignments","name":"ade4333c-4321-4b68-b498-d081d55e2b0c"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2019-03-26T22:01:02.9136073Z","updatedOn":"2019-03-26T22:01:02.9136073Z","createdBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","updatedBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/6f4de15e-9316-4714-a7c4-40c46cf8e067","type":"Microsoft.Authorization/roleAssignments","name":"6f4de15e-9316-4714-a7c4-40c46cf8e067"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:13.2137492Z","updatedOn":"2020-02-25T18:36:13.2137492Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/18fdd87e-1c01-424e-b380-32310f4940c2","type":"Microsoft.Authorization/roleAssignments","name":"18fdd87e-1c01-424e-b380-32310f4940c2"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:00.4746112Z","updatedOn":"2020-02-25T18:36:00.4746112Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/d9bcf58a-6f24-446d-bf60-20ffe5142396","type":"Microsoft.Authorization/roleAssignments","name":"d9bcf58a-6f24-446d-bf60-20ffe5142396"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:35:55.7490022Z","updatedOn":"2020-02-25T18:35:55.7490022Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/6e2b954b-42b2-48e0-997a-622601f0a4b4","type":"Microsoft.Authorization/roleAssignments","name":"6e2b954b-42b2-48e0-997a-622601f0a4b4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:35:57.9173081Z","updatedOn":"2020-02-25T18:35:57.9173081Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/8d76aaa3-fcfd-4ea5-8c7c-363d250e7ae9","type":"Microsoft.Authorization/roleAssignments","name":"8d76aaa3-fcfd-4ea5-8c7c-363d250e7ae9"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:31.2596366Z","updatedOn":"2020-02-25T18:36:31.2596366Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/0dabf212-a1c7-4af6-ba8b-be045493b368","type":"Microsoft.Authorization/roleAssignments","name":"0dabf212-a1c7-4af6-ba8b-be045493b368"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:35:52.9188704Z","updatedOn":"2020-02-25T18:35:52.9188704Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/d674b853-332e-4437-9ddb-bba8fde7ccce","type":"Microsoft.Authorization/roleAssignments","name":"d674b853-332e-4437-9ddb-bba8fde7ccce"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:38.8393742Z","updatedOn":"2020-02-25T18:36:38.8393742Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/00625383-053d-4227-a4db-b098e9bd2289","type":"Microsoft.Authorization/roleAssignments","name":"00625383-053d-4227-a4db-b098e9bd2289"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-02-25T18:36:05.0954462Z","updatedOn":"2020-02-25T18:36:05.0954462Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/3151fe9c-fcd2-45d3-a256-72fb13b86df5","type":"Microsoft.Authorization/roleAssignments","name":"3151fe9c-fcd2-45d3-a256-72fb13b86df5"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2020-07-06T18:51:23.0753297Z","updatedOn":"2020-07-06T18:51:23.0753297Z","createdBy":"d59f4a71-eff1-4bfa-a572-fe518f49f6c7","updatedBy":"d59f4a71-eff1-4bfa-a572-fe518f49f6c7","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/b3a9e1db-fde1-4ddd-ac1c-91913be67359","type":"Microsoft.Authorization/roleAssignments","name":"b3a9e1db-fde1-4ddd-ac1c-91913be67359"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-12-12T21:14:55.1655079Z","updatedOn":"2023-02-28T22:54:18.0450083Z","createdBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","updatedBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/6565c104-61e2-5756-96d7-663b216c8b11","type":"Microsoft.Authorization/roleAssignments","name":"6565c104-61e2-5756-96d7-663b216c8b11"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-02-17T00:30:39.4967398Z","updatedOn":"2022-02-17T00:30:39.4967398Z","createdBy":"a4319ad3-20be-4542-8952-685b66e56377","updatedBy":"a4319ad3-20be-4542-8952-685b66e56377","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/d8aedac6-3663-42b3-add4-c013b7935fb4","type":"Microsoft.Authorization/roleAssignments","name":"d8aedac6-3663-42b3-add4-c013b7935fb4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-03-02T23:53:39.1630622Z","updatedOn":"2022-03-02T23:53:39.1630622Z","createdBy":"a4319ad3-20be-4542-8952-685b66e56377","updatedBy":"a4319ad3-20be-4542-8952-685b66e56377","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/b5f0a13f-ac13-4e45-8588-15f5d9a02b20","type":"Microsoft.Authorization/roleAssignments","name":"b5f0a13f-ac13-4e45-8588-15f5d9a02b20"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fd6e57ea-fe3c-4f21-bd1e-de170a9a4971","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-03-08T00:58:05.8353141Z","updatedOn":"2022-03-08T00:58:05.8353141Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/403b97d1-ee0a-4b10-afe1-f36f368d2ced","type":"Microsoft.Authorization/roleAssignments","name":"403b97d1-ee0a-4b10-afe1-f36f368d2ced"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/94ddc4bc-25f5-4f3e-b527-c587da93cfe4","principalId":"00000000-0000-0000-0000-000000000001","principalType":"Group","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-05-16T23:08:20.8536608Z","updatedOn":"2022-05-16T23:08:20.8536608Z","createdBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","updatedBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/8b338a13-cfa6-42e6-b424-fb375ce9d07c","type":"Microsoft.Authorization/roleAssignments","name":"8b338a13-cfa6-42e6-b424-fb375ce9d07c"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-05-17T18:23:54.2264851Z","updatedOn":"2022-05-31T17:20:00.8273681Z","createdBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","updatedBy":"393a8425-6c8d-4d4a-a700-811f0423e5aa","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/f0576973-5014-5fe2-b3f2-cf3aace860d6","type":"Microsoft.Authorization/roleAssignments","name":"f0576973-5014-5fe2-b3f2-cf3aace860d6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-07-19T00:07:21.3325762Z","updatedOn":"2022-07-19T00:07:21.3325762Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/2697280b-812c-472d-841b-a10a9fe540a5","type":"Microsoft.Authorization/roleAssignments","name":"2697280b-812c-472d-841b-a10a9fe540a5"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/fd6e57ea-fe3c-4f21-bd1e-de170a9a4971","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-07-19T00:07:23.7020980Z","updatedOn":"2022-07-19T00:07:23.7020980Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/f4254463-7a28-4d26-b331-5a18c354cbe6","type":"Microsoft.Authorization/roleAssignments","name":"f4254463-7a28-4d26-b331-5a18c354cbe6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2022-07-19T00:07:26.4080657Z","updatedOn":"2022-07-19T00:07:26.4080657Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/065a63ba-71cc-4c69-b92b-bc67421e7e64","type":"Microsoft.Authorization/roleAssignments","name":"065a63ba-71cc-4c69-b92b-bc67421e7e64"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2023-04-07T05:56:00.4871186Z","updatedOn":"2023-04-24T19:44:20.3477537Z","createdBy":"09a22e59-e99b-42cb-b8b7-2475f66a3007","updatedBy":"09a22e59-e99b-42cb-b8b7-2475f66a3007","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/17a093c4-e4b2-5959-95e3-5894ef6873fb","type":"Microsoft.Authorization/roleAssignments","name":"17a093c4-e4b2-5959-95e3-5894ef6873fb"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2023-11-26T01:37:41.9144630Z","updatedOn":"2023-12-14T19:54:58.8919979Z","createdBy":"815c7b56-317b-457c-bf99-f9c2b6a3f739","updatedBy":"815c7b56-317b-457c-bf99-f9c2b6a3f739","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/67815997-99bc-5b98-9a5d-5ad5a092d499","type":"Microsoft.Authorization/roleAssignments","name":"67815997-99bc-5b98-9a5d-5ad5a092d499"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-09T18:17:33.0012805Z","updatedOn":"2021-08-09T18:17:33.0012805Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/01de8fe7-aae0-4d5c-844a-f0bdb8335252","type":"Microsoft.Authorization/roleAssignments","name":"01de8fe7-aae0-4d5c-844a-f0bdb8335252"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-09T18:17:39.9188336Z","updatedOn":"2021-08-09T18:17:39.9188336Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/ab2be506-5489-4c1f-add0-f5ed87a10439","type":"Microsoft.Authorization/roleAssignments","name":"ab2be506-5489-4c1f-add0-f5ed87a10439"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-24T19:32:18.2000692Z","updatedOn":"2021-08-24T19:32:18.2000692Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/0ce2f3fb-17ea-4193-9081-09aa4b39fec4","type":"Microsoft.Authorization/roleAssignments","name":"0ce2f3fb-17ea-4193-9081-09aa4b39fec4"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-08-24T19:32:36.6775144Z","updatedOn":"2021-08-24T19:32:36.6775144Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/2e95b289-99bd-4e68-83de-5433f2a0428c","type":"Microsoft.Authorization/roleAssignments","name":"2e95b289-99bd-4e68-83de-5433f2a0428c"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-11-01T22:46:09.1056400Z","updatedOn":"2021-11-01T22:46:09.1056400Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/82fe7886-5c1b-42c2-9319-7b4d436d8aba","type":"Microsoft.Authorization/roleAssignments","name":"82fe7886-5c1b-42c2-9319-7b4d436d8aba"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-11-01T22:46:14.7527743Z","updatedOn":"2021-11-01T22:46:14.7527743Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/12162b26-25fb-4ef5-a6e8-651446483cb6","type":"Microsoft.Authorization/roleAssignments","name":"12162b26-25fb-4ef5-a6e8-651446483cb6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-11-01T22:46:20.6399869Z","updatedOn":"2021-11-01T22:46:20.6399869Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/105bcc1f-3ddf-4cc0-bffc-03b3d9aaf870","type":"Microsoft.Authorization/roleAssignments","name":"105bcc1f-3ddf-4cc0-bffc-03b3d9aaf870"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-01-26T20:10:13.8998989Z","updatedOn":"2021-01-26T20:10:13.8998989Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/b36517ec-61d3-468d-afdc-eceda8adb4ee","type":"Microsoft.Authorization/roleAssignments","name":"b36517ec-61d3-468d-afdc-eceda8adb4ee"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-02-06T00:13:19.1780775Z","updatedOn":"2021-02-06T00:13:19.1780775Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/5216c1ee-4f58-4d36-b379-6c04b1fbd157","type":"Microsoft.Authorization/roleAssignments","name":"5216c1ee-4f58-4d36-b379-6c04b1fbd157"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/f25e0fa2-a7c8-4377-a976-54943a77a395","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-04-16T18:26:34.3109215Z","updatedOn":"2021-04-16T18:26:34.3109215Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/7464f8a3-9f55-443b-a3a5-44a31b100cad","type":"Microsoft.Authorization/roleAssignments","name":"7464f8a3-9f55-443b-a3a5-44a31b100cad"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-04-16T18:27:56.4446265Z","updatedOn":"2021-04-16T18:27:56.4446265Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/8f430c4c-4317-4495-9f01-4f3d4e1ca111","type":"Microsoft.Authorization/roleAssignments","name":"8f430c4c-4317-4495-9f01-4f3d4e1ca111"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792","condition":null,"conditionVersion":null,"createdOn":"2021-05-04T19:20:06.7695456Z","updatedOn":"2021-05-04T19:20:06.7695456Z","createdBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","updatedBy":"2ffe2392-0a52-4093-b041-66b10ebc8317","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/48fed3a1-0814-4847-88ce-b766155f2792/providers/Microsoft.Authorization/roleAssignments/fb8bab14-7f67-4e57-8aa5-0c4b7ab5a0fa","type":"Microsoft.Authorization/roleAssignments","name":"fb8bab14-7f67-4e57-8aa5-0c4b7ab5a0fa"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2019-03-26T22:01:02.9176787Z","updatedOn":"2019-03-26T22:01:02.9176787Z","createdBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","updatedBy":"8701e34d-d7c2-459c-b2d7-f3a9c5204818","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/4b771ea9-81de-4fc4-aa28-a3a0b9b4a320","type":"Microsoft.Authorization/roleAssignments","name":"4b771ea9-81de-4fc4-aa28-a3a0b9b4a320"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/36243c78-bf99-498c-9df9-86d9f8d28608","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2019-03-27T00:49:37.3000523Z","updatedOn":"2019-03-27T00:49:37.3000523Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/e6e1fffd-83f7-40c7-9f33-e56e2cf75b29","type":"Microsoft.Authorization/roleAssignments","name":"e6e1fffd-83f7-40c7-9f33-e56e2cf75b29"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/5d58bcaf-24a5-4b20-bdb6-eed9f69fbe4c","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2019-03-27T00:50:08.3039053Z","updatedOn":"2019-03-27T00:50:08.3039053Z","createdBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","updatedBy":"820ba717-9ea7-4147-bc13-1e35af4cc27c","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/3d01f56e-ee3a-41ed-a775-0e067546cb12","type":"Microsoft.Authorization/roleAssignments","name":"3d01f56e-ee3a-41ed-a775-0e067546cb12"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/94ddc4bc-25f5-4f3e-b527-c587da93cfe4","principalId":"00000000-0000-0000-0000-000000000001","principalType":"Group","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2022-06-28T23:11:28.9217618Z","updatedOn":"2022-06-28T23:11:28.9217618Z","createdBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","updatedBy":"1c8b3602-77a2-4e8a-8c1e-f127f2af5ca2","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/869183bd-893a-46f9-bb02-45e48b13f1be","type":"Microsoft.Authorization/roleAssignments","name":"869183bd-893a-46f9-bb02-45e48b13f1be"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/94ddc4bc-25f5-4f3e-b527-c587da93cfe4","principalId":"00000000-0000-0000-0000-000000000001","principalType":"Group","scope":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod","condition":null,"conditionVersion":null,"createdOn":"2023-09-15T21:41:54.7021549Z","updatedOn":"2023-09-15T21:41:54.7021549Z","createdBy":"08958326-d36e-43ae-bcfb-349b337a4483","updatedBy":"08958326-d36e-43ae-bcfb-349b337a4483","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/CnAIOrchestrationServicePublicCorpprod/providers/Microsoft.Authorization/roleAssignments/c68e55f3-69fd-4ba8-8dfc-0c62d73e4eb6","type":"Microsoft.Authorization/roleAssignments","name":"c68e55f3-69fd-4ba8-8dfc-0c62d73e4eb6"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47","condition":null,"conditionVersion":null,"createdOn":"2020-03-12T20:43:06.5941189Z","updatedOn":"2020-03-12T20:43:06.5941189Z","createdBy":"606f48c8-d219-4875-991d-ae6befaf0756","updatedBy":"606f48c8-d219-4875-991d-ae6befaf0756","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Authorization/roleAssignments/ad9e2cd7-0ff7-4931-9b17-656c8f17934b","type":"Microsoft.Authorization/roleAssignments","name":"ad9e2cd7-0ff7-4931-9b17-656c8f17934b"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47","condition":null,"conditionVersion":null,"createdOn":"2023-02-21T22:32:46.2324804Z","updatedOn":"2023-02-21T22:32:46.2324804Z","createdBy":"7f1579a6-c648-43a1-ac1e-0c3020dd9b8e","updatedBy":"7f1579a6-c648-43a1-ac1e-0c3020dd9b8e","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Authorization/roleAssignments/df7c1e07-5c2d-4b22-b7b9-fd11a8569db3","type":"Microsoft.Authorization/roleAssignments","name":"df7c1e07-5c2d-4b22-b7b9-fd11a8569db3"},{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/de139f84-1756-47ae-9be6-808fbbe84772","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47","condition":null,"conditionVersion":null,"createdOn":"2023-05-04T20:23:16.3808369Z","updatedOn":"2023-05-04T20:23:16.3808369Z","createdBy":"fa00c2de-57d5-4527-9254-4d513f482d0a","updatedBy":"fa00c2de-57d5-4527-9254-4d513f482d0a","delegatedManagedIdentityResourceId":null,"description":null},"id":"/providers/Microsoft.Management/managementGroups/72f988bf-86f1-41af-91ab-2d7cd011db47/providers/Microsoft.Authorization/roleAssignments/59109645-7b2b-4278-831a-2e4627ec603d","type":"Microsoft.Authorization/roleAssignments","name":"59109645-7b2b-4278-831a-2e4627ec603d"}]}' headers: cache-control: - no-cache content-length: - - '70252' + - '72017' content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:30 GMT + - Fri, 22 Dec 2023 10:08:25 GMT expires: - '-1' pragma: @@ -2586,7 +2696,7 @@ interactions: message: OK - request: body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}, "properties": - {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitesttb6455nk2-79a739", + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitest72xlrhjcz-79a739", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 0, "workloadRuntime": "OCIContainer", "vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet", "osType": "Linux", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", @@ -2595,7 +2705,7 @@ interactions: "Delete", "spotMaxPrice": -1.0, "nodeTaints": [], "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": false, "networkProfile": {}, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": - [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 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", @@ -2621,8 +2731,8 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-10-02-preview response: @@ -2631,67 +2741,68 @@ interactions: \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.26.6\",\n \"currentKubernetesVersion\": \"1.26.6\",\n \"dnsPrefix\": - \"cliakstest-clitesttb6455nk2-79a739\",\n \"fqdn\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.portal.hcp.westus2.azmk8s.io\",\n + \"1.27\",\n \"currentKubernetesVersion\": \"1.27.7\",\n \"dnsPrefix\": + \"cliakstest-clitest72xlrhjcz-79a739\",\n \"fqdn\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.portal.hcp.westus2.azmk8s.io\",\n \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\n \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n \"provisioningState\": \"Creating\",\n \"powerState\": {\n - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.26.6\",\n - \ \"currentOrchestratorVersion\": \"1.26.6\",\n \"enableNodePublicIP\": - false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n - \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n - \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-2204gen2containerd-202308.22.0\",\n \"upgradeSettings\": {},\n + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.27.7\",\n + \ \"currentOrchestratorVersion\": \"1.27.7\",\n \"enableNodePublicIP\": + false,\n \"enableCustomCATrust\": false,\n \"nodeLabels\": {},\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-2204gen2containerd-202312.06.0\",\n \"upgradeSettings\": {},\n \ \"enableFIPS\": false,\n \"networkProfile\": {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": - [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 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 \"supportPlan\": \"KubernetesOfficial\",\n - \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": - \"standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": - {\n \"count\": 1\n },\n \"backendPoolType\": \"nodeIPConfiguration\"\n - \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n - \ \"dnsServiceIP\": \"10.0.0.10\",\n \"outboundType\": \"loadBalancer\",\n - \ \"podCidrs\": [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"networkPolicy\": + \"none\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"backendPoolType\": + \"nodeIPConfiguration\"\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\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 \"autoUpgradeProfile\": {\n \"nodeOSUpgradeChannel\": \"NodeImage\"\n },\n \"disableLocalAccounts\": false,\n \"httpProxyConfig\": {\n \"httpProxy\": \"http://cli-proxy-vm:3128/\",\n \"httpsProxy\": \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"127.0.0.1\",\n - \ \"konnectivity\",\n \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n - \ \"10.0.0.0/16\",\n \"168.63.129.16\",\n \"localhost\",\n \"169.254.169.254\",\n - \ \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n \"konnectivity\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\",\n \"168.63.129.16\",\n - \ \"localhost\",\n \"169.254.169.254\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZHekNDQXdPZ0F3SUJBZ0lVT1FvajhDTFpkc2Vscjk3cnZJd3g1T0xEc3V3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0Z6RVZNQk1HQTFVRUF3d01ZMnhwTFhCeWIzaDVMWFp0TUI0WERUSXlNRE13T0RFMk5EUTBOMW9YRFRNeQpNRE13TlRFMk5EUTBOMW93RnpFVk1CTUdBMVVFQXd3TVkyeHBMWEJ5YjNoNUxYWnRNSUlDSWpBTkJna3Foa2lHCjl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUEvTVB0VjVCVFB0NmNxaTRSZE1sbXIzeUlzYTJ1anpjaHh2NGgKanNDMUR0blJnb3M1UzQxUEgwcmkrM3RUU1ZYMzJ5cndzWStyRDFZUnVwbTZsbUU3R2hVNUkwR2k5b3prU0YwWgpLS2FKaTJveXBVL0ZCK1FQcXpvQ1JzTUV3R0NibUtGVmw4VnVoeW5kWEs0YjRrYmxyOWJsL2V1d2Q3TThTYnZ6CldVam5lRHJRc2lJc3J6UFQ0S0FaTHFjdHpEZTRsbFBUN1lLYTMzaGlFUE9mdldpWit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IYkE4WW85Q0lpUWdlbGZwcDF2VWgKYm5OQmhhRCtpdTZDZmlDTHdnSmIvaXc3ZW8vQ3lvWnF4K3RqWGFPMnpYdm00cC8rUUlmQU9ndEdRTEZVOGNmWgovZ1VyVHE1Z0ZxMCtQOUd5V3NBVEpGNnE3TDZXWlpqME91VHNlN2Y0Q1NpajZNbk9NTXhBK0pvYWhKejdsc1NpClRKSEl3RXA1ci9SeWhweWVwUXhGWWNVSDVKSmY5cmFoWExXWmkrOVRqeFNNMll5aHhmUlBzaVVFdUdEb2s3OFEKbS9RUGlDaTlKSmIxb2NtVGpBVjh4RFNob2NpdlhPRnlobjZMbjc3dkxqWStBYXZ0V0RoUXRocHVQeHNMdFZ6bQplMFNIMTFkRUxSdGI3NG1xWE9yTzdmdS8rSUJzM0pxTEUvVSt4dXhRdHZHOHZHMXlES0hIU1pxUzJoL1dzNGw0Ck5pQXNoSGdlaFFEUEJjWTl3WVl6ZkJnWnBPVU16ZERmNTB4K0ZTbFk0M1dPSkp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"10.0.0.0/16\",\n \"169.254.169.254\",\n \"10.42.0.0/16\",\n + \ \"10.244.0.0/16\"\n ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp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jh4RFNob2NpdlhPRnlobjZMbjc3dkxqWStBYXZ0V0RoUXRocHVQeHNMdFZ6bQplMFNIMTFkRUxSdGI3NG1xWE9yTzdmdS8rSUJzM0pxTEUvVSt4dXhRdHZHOHZHMXlES0hIU1pxUzJoL1dzNGw0Ck5pQXNoSGdlaFFEUEJjWTl3WVl6ZkJnWnBPVU16ZERmNTB4K0ZTbFk0M1dPSkp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n \ },\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n \ },\n \"workloadAutoScalerProfile\": {},\n \"metricsProfile\": {\n \"costAnalysis\": - {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"65040c18c954fd00011e5d1d\"\n - \ },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"6585601f8ac0aa0001ae7fde\",\n + \ \"controlPlanePluginProfiles\": {\n \"karpenter\": {\n \"enableV2\": + true\n }\n },\n \"nodeProvisioningProfile\": {\n \"mode\": \"Manual\"\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\": \"Base\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3a47%3a36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmtLbaTTBUk9FZi-19Fy4Hdt6NZwwmwWzATFSjhQrIKYhpwYtxlqFdMl4YECAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3J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61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJJDo9KyjKG4aDx14yKEmJ1XRvp_un1CwNEW6KgHKM-Tm9vuaH6LGfmO_idOwmXeJmwf7s6SphXwqlPgz0TJ1AizxH1ZyMtKcWUuT_z5YimmsrZTYI3meB_pNAZ1A-RrE7qhjkQuY2jtehE5y100y_IBy_NXCUns26MYl8O86cFtcEAROXCHbDZ7ZeTsKyMsIvYpLpt5oxm3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0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UlgYO12XqeHlPy6k5_7ILX9UrUyuJwliRI56FbKhM-wCXSlPbwt-7U8FvsYyWiovfAU1KqfaDlNtt4u9ZYoKcVyjJjRkUm3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=SbUFttTRYOVFK4pKaxwJkwTAeqPLpdtXunICyJwJUqkrmcOqfkVO8BUFmD7smXVVErRizmyTJTGt9l9nqQ5w7lF5E-cWAQb0KzZonSnueUYAh3RckuuXMraqiIuKuXsgaVp_eaa3tbpwvbOjk6IyoJG10dkei2n-zCLSDpLUMa3bzAlmJyl962zYF2ulEfN2BybIHNMDMUdgWog_j2R0XxdNyzbOcM6WNVTSdOmeGH5tJzo3f2iSQED6d1ROQLmd-dfawT_8_wS9Tx-1l5uruWcZ7KdOuBrsHr7BA729MBBeZI7_IdHv86lQArPtn7xn4crFaOqASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk cache-control: - no-cache content-length: - - '7042' + - '7239' content-type: - application/json date: - - Fri, 15 Sep 2023 07:47:36 GMT + - Fri, 22 Dec 2023 10:08:30 GMT expires: - '-1' pragma: @@ -2720,8 +2831,8 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-10-02-preview response: @@ -2730,75 +2841,72 @@ interactions: \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.26.6\",\n \"currentKubernetesVersion\": \"1.26.6\",\n \"dnsPrefix\": - \"cliakstest-clitesttb6455nk2-79a739\",\n \"fqdn\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.portal.hcp.westus2.azmk8s.io\",\n + \"1.27\",\n \"currentKubernetesVersion\": \"1.27.7\",\n \"dnsPrefix\": + \"cliakstest-clitest72xlrhjcz-79a739\",\n \"fqdn\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.portal.hcp.westus2.azmk8s.io\",\n \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\n \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n \"provisioningState\": \"Creating\",\n \"powerState\": {\n - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.26.6\",\n - \ \"currentOrchestratorVersion\": \"1.26.6\",\n \"enableNodePublicIP\": + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.27.7\",\n + \ \"currentOrchestratorVersion\": \"1.27.7\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-2204gen2containerd-202308.22.0\",\n \"upgradeSettings\": {},\n + \"AKSUbuntu-2204gen2containerd-202312.06.0\",\n \"upgradeSettings\": {},\n \ \"enableFIPS\": false,\n \"networkProfile\": {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": - [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 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 \"supportPlan\": \"KubernetesOfficial\",\n - \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"loadBalancerSku\": - \"standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": - {\n \"count\": 1\n },\n \"backendPoolType\": \"nodeIPConfiguration\"\n - \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n - \ \"dnsServiceIP\": \"10.0.0.10\",\n \"outboundType\": \"loadBalancer\",\n - \ \"podCidrs\": [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\": + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"networkPolicy\": + \"none\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"backendPoolType\": + \"nodeIPConfiguration\"\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\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 \"autoUpgradeProfile\": {\n \"nodeOSUpgradeChannel\": \"NodeImage\"\n },\n \"disableLocalAccounts\": false,\n \"httpProxyConfig\": {\n \"httpProxy\": \"http://cli-proxy-vm:3128/\",\n \"httpsProxy\": \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"127.0.0.1\",\n - \ \"konnectivity\",\n \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n - \ \"10.0.0.0/16\",\n \"168.63.129.16\",\n \"localhost\",\n \"169.254.169.254\",\n - \ \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n \"konnectivity\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\",\n \"168.63.129.16\",\n - \ \"localhost\",\n \"169.254.169.254\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZHekNDQXdPZ0F3SUJBZ0lVT1FvajhDTFpkc2Vscjk3cnZJd3g1T0xEc3V3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0Z6RVZNQk1HQTFVRUF3d01ZMnhwTFhCeWIzaDVMWFp0TUI0WERUSXlNRE13T0RFMk5EUTBOMW9YRFRNeQpNRE13TlRFMk5EUTBOMW93RnpFVk1CTUdBMVVFQXd3TVkyeHBMWEJ5YjNoNUxYWnRNSUlDSWpBTkJna3Foa2lHCjl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUEvTVB0VjVCVFB0NmNxaTRSZE1sbXIzeUlzYTJ1anpjaHh2NGgKanNDMUR0blJnb3M1UzQxUEgwcmkrM3RUU1ZYMzJ5cndzWStyRDFZUnVwbTZsbUU3R2hVNUkwR2k5b3prU0YwWgpLS2FKaTJveXBVL0ZCK1FQcXpvQ1JzTUV3R0NibUtGVmw4VnVoeW5kWEs0YjRrYmxyOWJsL2V1d2Q3TThTYnZ6CldVam5lRHJRc2lJc3J6UFQ0S0FaTHFjdHpEZTRsbFBUN1lLYTMzaGlFUE9mdldpWitkcWthUUE5UDY0eFhTeW4KZkhYOHVWQUozdUJWSmVHeEQwcGtOSjdqT3J5YVV1SEh1Y1U4UzltSWpuS2pBQjVhUGpMSDV4QXM2bG1iMzEyMgp5K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ZVOGNmWgovZ1VyVHE1Z0ZxMCtQOUd5V3NBVEpGNnE3TDZXWlpqME91VHNlN2Y0Q1NpajZNbk9NTXhBK0pvYWhKejdsc1NpClRKSEl3RXA1ci9SeWhweWVwUXhGWWNVSDVKSmY5cmFoWExXWmkrOVRqeFNNMll5aHhmUlBzaVVFdUdEb2s3OFEKbS9RUGlDaTlKSmIxb2NtVGpBVjh4RFNob2NpdlhPRnlobjZMbjc3dkxqWStBYXZ0V0RoUXRocHVQeHNMdFZ6bQplMFNIMTFkRUxSdGI3NG1xWE9yTzdmdS8rSUJzM0pxTEUvVSt4dXhRdHZHOHZHMXlES0hIU1pxUzJoL1dzNGw0Ck5pQXNoSGdlaFFEUEJjWTl3WVl6ZkJnWnBPVU16ZERmNTB4K0ZTbFk0M1dPSkp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"10.0.0.0/16\",\n \"169.254.169.254\",\n \"10.42.0.0/16\",\n + \ \"10.244.0.0/16\"\n ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"10.0.0.0/16\",\n \"169.254.169.254\",\n \"10.42.0.0/16\",\n + \ \"10.244.0.0/16\"\n ],\n \"trustedCa\": \"LS0tLS1CRUdJT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dXhRdHZHOHZHMXlES0hIU1pxUzJoL1dzNGw0Ck5pQXNoSGdlaFFEUEJjWTl3WVl6ZkJnWnBPVU16ZERmNTB4K0ZTbFk0M1dPSkp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n \ },\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n \ },\n \"workloadAutoScalerProfile\": {},\n \"metricsProfile\": {\n \"costAnalysis\": - {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"65040c18c954fd00011e5d1d\"\n - \ },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"6585601f8ac0aa0001ae7fde\",\n + \ \"controlPlanePluginProfiles\": {\n \"karpenter\": {\n \"enableV2\": + true\n }\n },\n \"nodeProvisioningProfile\": {\n \"mode\": \"Manual\"\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\": \"Base\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '7042' + - '7216' content-type: - application/json date: - - Fri, 15 Sep 2023 07:47:37 GMT + - Fri, 22 Dec 2023 10:08:31 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff status: @@ -2819,8 +2927,8 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Network%20Contributor%27&api-version=2022-05-01-preview response: @@ -2835,7 +2943,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:36 GMT + - Fri, 22 Dec 2023 10:08:31 GMT expires: - '-1' pragma: @@ -2875,27 +2983,22 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/7e048e79-fd6d-4917-b574-f673fdcd43c1?api-version=2022-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/6a395fa1-4c09-46e5-921a-6847e7d64cd3?api-version=2022-04-01 response: body: - string: '{"error":{"code":"PrincipalNotFound","message":"Principal 05f1c957878b4aba9c3ba9f44a39c6f3 - does not exist in the directory 72f988bf-86f1-41af-91ab-2d7cd011db47. Check - that you have the correct principal ID. If you are creating this principal - and then immediately assigning a role, this error might be related to a replication - delay. In this case, set the role assignment principalType property to a value, - such as ServicePrincipal, User, or Group. See https://aka.ms/docs-principaltype"}}' + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet","condition":null,"conditionVersion":null,"createdOn":"2023-12-22T10:08:32.3303175Z","updatedOn":"2023-12-22T10:08:32.6923254Z","createdBy":null,"updatedBy":"119e1aeb-4592-42d6-9507-c66df857924f","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/6a395fa1-4c09-46e5-921a-6847e7d64cd3","type":"Microsoft.Authorization/roleAssignments","name":"6a395fa1-4c09-46e5-921a-6847e7d64cd3"}' headers: cache-control: - no-cache content-length: - - '489' + - '1041' content-type: - application/json; charset=utf-8 date: - - Fri, 15 Sep 2023 07:47:37 GMT + - Fri, 22 Dec 2023 10:08:36 GMT expires: - '-1' pragma: @@ -2907,13 +3010,13 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '1199' status: - code: 400 - message: Bad Request + code: 201 + message: Created - request: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -2924,83 +3027,66 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Network%20Contributor%27&api-version=2022-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKO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MUdgWog_j2R0XxdNyzbOcM6WNVTSdOmeGH5tJzo3f2iSQED6d1ROQLmd-dfawT_8_wS9Tx-1l5uruWcZ7KdOuBrsHr7BA729MBBeZI7_IdHv86lQArPtn7xn4crFaOqASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk response: body: - string: '{"value":[{"properties":{"roleName":"Network Contributor","type":"BuiltInRole","description":"Lets - you manage networks, but not access to them.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Insights/alertRules/*","Microsoft.Network/*","Microsoft.ResourceHealth/availabilityStatuses/read","Microsoft.Resources/deployments/*","Microsoft.Resources/subscriptions/resourceGroups/read","Microsoft.Support/*"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-06-02T00:18:27.3542698Z","updatedOn":"2021-11-11T20:13:44.6328966Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","type":"Microsoft.Authorization/roleDefinitions","name":"4d97b98b-1d4f-4787-a291-c67834d212e7"}]}' + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache content-length: - - '873' + - '126' content-type: - - application/json; charset=utf-8 + - application/json date: - - Fri, 15 Sep 2023 07:47:39 GMT + - Fri, 22 Dec 2023 10:09:01 GMT expires: - '-1' pragma: - no-cache - set-cookie: - - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly 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: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7", - "principalId":"00000000-0000-0000-0000-000000000001"}}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: - aks create Connection: - keep-alive - Content-Length: - - '232' - Content-Type: - - application/json - Cookie: - - x-ms-gateway-slice=Production ParameterSetName: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/2a2d5647-2756-43b0-8cba-4d1e269e5d33?api-version=2022-04-01 + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar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ueUYAh3RckuuXMraqiIuKuXsgaVp_eaa3tbpwvbOjk6IyoJG10dkei2n-zCLSDpLUMa3bzAlmJyl962zYF2ulEfN2BybIHNMDMUdgWog_j2R0XxdNyzbOcM6WNVTSdOmeGH5tJzo3f2iSQED6d1ROQLmd-dfawT_8_wS9Tx-1l5uruWcZ7KdOuBrsHr7BA729MBBeZI7_IdHv86lQArPtn7xn4crFaOqASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk response: body: - string: '{"error":{"code":"PrincipalNotFound","message":"Principal 05f1c957878b4aba9c3ba9f44a39c6f3 - does not exist in the directory 72f988bf-86f1-41af-91ab-2d7cd011db47. Check - that you have the correct principal ID. If you are creating this principal - and then immediately assigning a role, this error might be related to a replication - delay. In this case, set the role assignment principalType property to a value, - such as ServicePrincipal, User, or Group. See https://aka.ms/docs-principaltype"}}' + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache content-length: - - '489' + - '126' content-type: - - application/json; charset=utf-8 + - application/json date: - - Fri, 15 Sep 2023 07:47:39 GMT + - Fri, 22 Dec 2023 10:09:31 GMT expires: - '-1' pragma: @@ -3009,16 +3095,14 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' status: - code: 400 - message: Bad Request + code: 200 + message: OK - request: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -3029,184 +3113,29 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Network%20Contributor%27&api-version=2022-05-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1O-5fyph6Tbm3YEnesFPQdchCZcuvlSKfwrlNSNNioLx0atlHNVRkvgMQ_eJNVF3com1NrZ34BY9K_A-e0yc19LrOgBOup-IPk3J5HeNPPECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJK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3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBALszOCwOHYrcy035-scPtqcAdZCMfIz4dO7xVe3eBVGYgiK-GRi4yks9l8jjYRWIyK-0r4Ta4DZJNEWNwDPuS9lEb7gryEmzYpKkEN1GVpkZkIUpSbalDFucJDXz2ZHvczBlfLFKipvWHWkRSUYgu-rf-3_VpAbFQbRE_ZxpQSTp1GHDD2nrbXEzpU3O58ESJfL99UlgYO12XqeHlPy6k5_7ILX9UrUyuJwliRI56FbKhM-wCXSlPbwt-7U8FvsYyWiovfAU1KqfaDlNtt4u9ZYoKcVyjJjRkUm3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=SbUFttTRYOVFK4pKaxwJkwTAeqPLpdtXunICyJwJUqkrmcOqfkVO8BUFmD7smXVVErRizmyTJTGt9l9nqQ5w7lF5E-cWAQb0KzZonSnueUYAh3RckuuXMraqiIuKuXsgaVp_eaa3tbpwvbOjk6IyoJG10dkei2n-zCLSDpLUMa3bzAlmJyl962zYF2ulEfN2BybIHNMDMUdgWog_j2R0XxdNyzbOcM6WNVTSdOmeGH5tJzo3f2iSQED6d1ROQLmd-dfawT_8_wS9Tx-1l5uruWcZ7KdOuBrsHr7BA729MBBeZI7_IdHv86lQArPtn7xn4crFaOqASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk response: body: - string: '{"value":[{"properties":{"roleName":"Network Contributor","type":"BuiltInRole","description":"Lets - you manage networks, but not access to them.","assignableScopes":["/"],"permissions":[{"actions":["Microsoft.Authorization/*/read","Microsoft.Insights/alertRules/*","Microsoft.Network/*","Microsoft.ResourceHealth/availabilityStatuses/read","Microsoft.Resources/deployments/*","Microsoft.Resources/subscriptions/resourceGroups/read","Microsoft.Support/*"],"notActions":[],"dataActions":[],"notDataActions":[]}],"createdOn":"2015-06-02T00:18:27.3542698Z","updatedOn":"2021-11-11T20:13:44.6328966Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","type":"Microsoft.Authorization/roleDefinitions","name":"4d97b98b-1d4f-4787-a291-c67834d212e7"}]}' + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache content-length: - - '873' + - '126' content-type: - - application/json; charset=utf-8 + - application/json date: - - Fri, 15 Sep 2023 07:47:44 GMT + - Fri, 22 Dec 2023 10:10:02 GMT expires: - '-1' pragma: - no-cache - set-cookie: - - x-ms-gateway-slice=Production; path=/; secure; samesite=none; httponly 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: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7", - "principalId":"00000000-0000-0000-0000-000000000001"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - Content-Length: - - '232' - Content-Type: - - application/json - Cookie: - - x-ms-gateway-slice=Production - ParameterSetName: - - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity - --yes --vnet-subnet-id -o - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-authorization/4.0.0 Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/dec5cbc7-8c7a-43e1-9615-5d9f1525f4ba?api-version=2022-04-01 - response: - body: - string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/4d97b98b-1d4f-4787-a291-c67834d212e7","principalId":"00000000-0000-0000-0000-000000000001","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet","condition":null,"conditionVersion":null,"createdOn":"2023-09-15T07:47:44.8221377Z","updatedOn":"2023-09-15T07:47:45.2751506Z","createdBy":null,"updatedBy":"119e1aeb-4592-42d6-9507-c66df857924f","delegatedManagedIdentityResourceId":null,"description":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet/providers/Microsoft.Authorization/roleAssignments/dec5cbc7-8c7a-43e1-9615-5d9f1525f4ba","type":"Microsoft.Authorization/roleAssignments","name":"dec5cbc7-8c7a-43e1-9615-5d9f1525f4ba"}' - headers: - cache-control: - - no-cache - content-length: - - '1041' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 15 Sep 2023 07:47:46 GMT - expires: - - '-1' - pragma: - - no-cache - 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: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks create - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity - --yes --vnet-subnet-id -o - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmtLbaTTBUk9FZi-19Fy4Hdt6NZwwmwWzATFSjhQrIKYhpwYtxlqFdMl4YECAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAW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UyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJJDo9KyjKG4aDx14yKEmJ1XRvp_un1CwNEW6KgHKM-Tm9vuaH6LGfmO_idOwmXeJmwf7s6SphXwqlPgz0TJ1AizxH1ZyMtKcWUuT_z5YimmsrZTYI3meB_pNAZ1A-RrE7qhjkQuY2jtehE5y100y_IBy_NXCUns26MYl8O86cFtcEAROXCHbDZ7ZeTsKyMsIvYpLpt5oxm3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE - response: - body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Fri, 15 Sep 2023 07:48:08 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 --http-proxy-config --ssh-key-value --enable-managed-identity - --yes --vnet-subnet-id -o - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmtLbaTTBUk9FZi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B0reE - response: - body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Fri, 15 Sep 2023 07:48:38 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: @@ -3227,14 +3156,14 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW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kVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1O-5fyph6Tbm3YEnesFPQdchCZcuvlSKfwrlNSNNioLx0atlHNVRkvgMQ_eJNVF3com1NrZ34BY9K_A-e0yc19LrOgBOup-IPk3J5HeNPPECAwEAAaOCBAswggQHMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKw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- \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache @@ -3243,19 +3172,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:49:08 GMT + - Fri, 22 Dec 2023 10:10:32 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: @@ -3276,14 +3199,14 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9Sz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wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1O-5fyph6Tbm3YEnesFPQdchCZcuvlSKfwrlNSNNioLx0atlHNVRkvgMQ_eJNVF3com1NrZ34BY9K_A-e0yc19LrOgBOup-IPk3J5HeNPPECAwEA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Ek response: body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache @@ -3292,19 +3215,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:49:38 GMT + - Fri, 22 Dec 2023 10:11:02 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: @@ -3325,14 +3242,14 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTC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175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1O-5fyph6Tbm3YEnesFPQdchCZcuvlSKfwrlNSNNioLx0atlHNVR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qASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk response: body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache @@ -3341,19 +3258,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:50:08 GMT + - Fri, 22 Dec 2023 10:11:32 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: @@ -3374,14 +3285,14 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvb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7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSy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S9Tx-1l5uruWcZ7KdOuBrsHr7BA729MBBeZI7_IdHv86lQArPtn7xn4crFaOqASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk response: body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache @@ -3390,19 +3301,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:50:39 GMT + - Fri, 22 Dec 2023 10:12:02 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: @@ -3423,14 +3328,14 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQ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scKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3R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j2R0XxdNyzbOcM6WNVTSdOmeGH5tJzo3f2iSQED6d1ROQLmd-dfawT_8_wS9Tx-1l5uruWcZ7KdOuBrsHr7BA729MBBeZI7_IdHv86lQArPtn7xn4crFaOqASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk response: body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\"\n }" headers: cache-control: - no-cache @@ -3439,19 +3344,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:51:10 GMT + - Fri, 22 Dec 2023 10:12:33 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: @@ -3472,35 +3371,30 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1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3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/971929e6-6932-4981-82ef-49f8ecf062ad?api-version=2016-03-30&t=638388365113557623&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDv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IyoJG10dkei2n-zCLSDpLUMa3bzAlmJyl962zYF2ulEfN2BybIHNMDMUdgWog_j2R0XxdNyzbOcM6WNVTSdOmeGH5tJzo3f2iSQED6d1ROQLmd-dfawT_8_wS9Tx-1l5uruWcZ7KdOuBrsHr7BA729MBBeZI7_IdHv86lQArPtn7xn4crFaOqASko_QuzZpQX1Sg&h=SdDI5JczI8TIGkqhkzgyftw1WS-IRXJuugS3IOR2wEk response: body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" + string: "{\n \"name\": \"971929e6-6932-4981-82ef-49f8ecf062ad\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2023-12-22T10:08:31.0936537Z\",\n \"endTime\": + \"2023-12-22T10:12:50.722256Z\"\n }" headers: cache-control: - no-cache content-length: - - '126' + - '169' content-type: - application/json date: - - Fri, 15 Sep 2023 07:51:40 GMT + - Fri, 22 Dec 2023 10:13:03 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: @@ -3521,156 +3415,8 @@ interactions: - --resource-group --name --http-proxy-config --ssh-key-value --enable-managed-identity --yes --vnet-subnet-id -o User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1F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JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE - response: - body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Fri, 15 Sep 2023 07:52:10 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 --http-proxy-config --ssh-key-value --enable-managed-identity - --yes --vnet-subnet-id -o - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmtLbaTTBUk9FZi-19Fy4Hdt6NZwwmwWzATFSjhQrIKYhpwYtxlqFdMl4YECAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5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9KyjKG4aDx14yKEmJ1XRvp_un1CwNEW6KgHKM-Tm9vuaH6LGfmO_idOwmXeJmwf7s6SphXwqlPgz0TJ1AizxH1ZyMtKcWUuT_z5YimmsrZTYI3meB_pNAZ1A-RrE7qhjkQuY2jtehE5y100y_IBy_NXCUns26MYl8O86cFtcEAROXCHbDZ7ZeTsKyMsIvYpLpt5oxm3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE - response: - body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '126' - content-type: - - application/json - date: - - Fri, 15 Sep 2023 07:52:40 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 --http-proxy-config --ssh-key-value --enable-managed-identity - --yes --vnet-subnet-id -o - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/ffd617e8-ef71-46ae-8562-bd7c02a1a889?api-version=2016-03-30&t=2023-09-15T07%3A47%3A36&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmtLbaTTBUk9FZi-19Fy4Hdt6NZwwmwWzATFSjhQrIKYhpwYtxlqFdMl4YECAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYT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NC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJJDo9KyjKG4aDx14yKEmJ1XRvp_un1CwNEW6KgHKM-Tm9vuaH6LGfmO_idOwmXeJmwf7s6SphXwqlPgz0TJ1AizxH1ZyMtKcWUuT_z5YimmsrZTYI3meB_pNAZ1A-RrE7qhjkQuY2jtehE5y100y_IBy_NXCUns26MYl8O86cFtcEAROXCHbDZ7ZeTsKyMsIvYpLpt5oxm3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=ozC1I1S49YWK13fXrFhPrWoWyMtZkg4gI2osgrt-175xod0PIKJUtBMXWo691p3I6n29fKK7SKphEjDgOK1OYe8OO4-khwBvQpHtscl8__wUSmEJ16euGpAUwW7jonlIUUPMP53zpYpBhS5YZFfE9mZ8Jif8X9tHLYxCkVzv66fYTzv3tpXbssqe9mcOsnHMjRMalxjdsEwolBCwdw0owQOze8n8orCCp-EdwozhHytX7q9DvQ_EvbDsc7MAL10MCCwiaChpafUV2ds8i2Wjry3j9uXv42yEyypgJUHC3jSBjGMZULfUWGQ7ESB5wCxH8puT5xWjcc95lWKUVgK6Tw&h=7OKU_7ImXysDa4RBx9X6jQh9a8xDDiq_9QywkfB0reE - response: - body: - string: "{\n \"name\": \"e817d6ff-71ef-ae46-8562-bd7c02a1a889\",\n \"status\": - \"Succeeded\",\n \"startTime\": \"2023-09-15T07:47:36.2332158Z\",\n \"endTime\": - \"2023-09-15T07:53:06.2882797Z\"\n }" - headers: - cache-control: - - no-cache - content-length: - - '170' - content-type: - - application/json - date: - - Fri, 15 Sep 2023 07:53:10 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 --http-proxy-config --ssh-key-value --enable-managed-identity - --yes --vnet-subnet-id -o - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-10-02-preview response: @@ -3679,33 +3425,33 @@ interactions: \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.26.6\",\n \"currentKubernetesVersion\": \"1.26.6\",\n \"dnsPrefix\": - \"cliakstest-clitesttb6455nk2-79a739\",\n \"fqdn\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.portal.hcp.westus2.azmk8s.io\",\n + \"1.27\",\n \"currentKubernetesVersion\": \"1.27.7\",\n \"dnsPrefix\": + \"cliakstest-clitest72xlrhjcz-79a739\",\n \"fqdn\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.portal.hcp.westus2.azmk8s.io\",\n \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\n \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.26.6\",\n - \ \"currentOrchestratorVersion\": \"1.26.6\",\n \"enableNodePublicIP\": + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.27.7\",\n + \ \"currentOrchestratorVersion\": \"1.27.7\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-2204gen2containerd-202308.22.0\",\n \"upgradeSettings\": {},\n + \"AKSUbuntu-2204gen2containerd-202312.06.0\",\n \"upgradeSettings\": {},\n \ \"enableFIPS\": false,\n \"networkProfile\": {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": - [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 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 \"supportPlan\": \"KubernetesOfficial\",\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/9692a162-e2b3-40cb-96db-274e14be7628\"\n + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"networkPolicy\": + \"none\",\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/64d152a3-6c7c-4082-9bee-dac77d37ee3a\"\n \ }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n },\n \ \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \ \"dnsServiceIP\": \"10.0.0.10\",\n \"outboundType\": \"loadBalancer\",\n @@ -3718,41 +3464,38 @@ interactions: \"NodeImage\"\n },\n \"disableLocalAccounts\": false,\n \"httpProxyConfig\": {\n \"httpProxy\": \"http://cli-proxy-vm:3128/\",\n \"httpsProxy\": \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"127.0.0.1\",\n - \ \"konnectivity\",\n \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n - \ \"10.0.0.0/16\",\n \"168.63.129.16\",\n \"localhost\",\n \"169.254.169.254\",\n - \ \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n \"konnectivity\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\",\n \"168.63.129.16\",\n - \ \"localhost\",\n \"169.254.169.254\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZHekNDQXdPZ0F3SUJBZ0lVT1FvajhDTFpkc2Vscjk3cnZJd3g1T0xEc3V3d0RRWUpLb1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Skp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"10.0.0.0/16\",\n \"169.254.169.254\",\n \"10.42.0.0/16\",\n + \ \"10.244.0.0/16\"\n ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"10.0.0.0/16\",\n \"169.254.169.254\",\n \"10.42.0.0/16\",\n + \ \"10.244.0.0/16\"\n ],\n \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZHekNDQXdPZ0F3SUJBZ0lVT1FvajhDTFpkc2Vscjk3cnZJd3g1T0xEc3V3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0Z6RVZNQk1HQTFVRUF3d01ZMnhwTFhCeWIzaDVMWFp0TUI0WERUSXlNRE13T0RFMk5EUTBOMW9YRFRNeQpNRE13TlRFMk5EUTBOMW93RnpFVk1CTUdBMVVFQXd3TVkyeHBMWEJ5YjNoNUxYWnRNSUlDSWpBTkJna3Foa2lHCjl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUEvTVB0VjVCVFB0NmNxaTRSZE1sbXIzeUlzYTJ1anpjaHh2NGgKanNDMUR0blJnb3M1UzQxUEgwcmkrM3RUU1ZYMz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version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n \ },\n \"workloadAutoScalerProfile\": {},\n \"metricsProfile\": {\n \"costAnalysis\": - {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"65040c18c954fd00011e5d1d\"\n - \ },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"6585601f8ac0aa0001ae7fde\",\n + \ \"controlPlanePluginProfiles\": {\n \"karpenter\": {\n \"enableV2\": + true\n }\n },\n \"nodeProvisioningProfile\": {\n \"mode\": \"Manual\"\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\": \"Base\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '7695' + - '7869' content-type: - application/json date: - - Fri, 15 Sep 2023 07:53:11 GMT + - Fri, 22 Dec 2023 10:13:04 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff status: @@ -3772,8 +3515,8 @@ interactions: ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-10-02-preview response: @@ -3782,33 +3525,33 @@ interactions: \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.26.6\",\n \"currentKubernetesVersion\": \"1.26.6\",\n \"dnsPrefix\": - \"cliakstest-clitesttb6455nk2-79a739\",\n \"fqdn\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.portal.hcp.westus2.azmk8s.io\",\n + \"1.27\",\n \"currentKubernetesVersion\": \"1.27.7\",\n \"dnsPrefix\": + \"cliakstest-clitest72xlrhjcz-79a739\",\n \"fqdn\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.portal.hcp.westus2.azmk8s.io\",\n \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\n \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.26.6\",\n - \ \"currentOrchestratorVersion\": \"1.26.6\",\n \"enableNodePublicIP\": + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.27.7\",\n + \ \"currentOrchestratorVersion\": \"1.27.7\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-2204gen2containerd-202308.22.0\",\n \"upgradeSettings\": {},\n + \"AKSUbuntu-2204gen2containerd-202312.06.0\",\n \"upgradeSettings\": {},\n \ \"enableFIPS\": false,\n \"networkProfile\": {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": - [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 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 \"supportPlan\": \"KubernetesOfficial\",\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/9692a162-e2b3-40cb-96db-274e14be7628\"\n + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"networkPolicy\": + \"none\",\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/64d152a3-6c7c-4082-9bee-dac77d37ee3a\"\n \ }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n },\n \ \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \ \"dnsServiceIP\": \"10.0.0.10\",\n \"outboundType\": \"loadBalancer\",\n @@ -3821,41 +3564,38 @@ interactions: \"NodeImage\"\n },\n \"disableLocalAccounts\": false,\n \"httpProxyConfig\": {\n \"httpProxy\": \"http://cli-proxy-vm:3128/\",\n \"httpsProxy\": \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"127.0.0.1\",\n - \ \"konnectivity\",\n \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n - \ \"10.0.0.0/16\",\n \"168.63.129.16\",\n \"localhost\",\n \"169.254.169.254\",\n - \ \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n \"konnectivity\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\",\n \"168.63.129.16\",\n - \ \"localhost\",\n \"169.254.169.254\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\"\n - \ ],\n \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZHekNDQXdPZ0F3SUJBZ0lVT1FvajhDTFpkc2Vscjk3cnZJd3g1T0xEc3V3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0Z6RVZNQk1HQTFVRUF3d01ZMnhwTFhCeWIzaDVMWFp0TUI0WERUSXlNRE13T0RFMk5EUTBOMW9YRFRNeQpNRE13TlRFMk5EUTBOMW93RnpFVk1CTUdBMVVFQXd3TVkyeHBMWEJ5YjNoNUxYWnRNSUlDSWpBTkJna3Foa2lHCjl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUEvTVB0VjVCVFB0NmNxaTRSZE1sbXIzeUlzYTJ1anpjaHh2NGgKanNDMUR0blJnb3M1UzQxUEgwcmkrM3RUU1ZYMzJ5cndzWStyRDFZUnVwbTZsbUU3R2hVNUkwR2k5b3prU0YwWgpLS2FKaTJveXBVL0ZCK1FQcXpvQ1JzTUV3R0NibUtGVmw4VnVoeW5kWEs0YjRrYmxyOWJsL2V1d2Q3TThTYnZ6CldVam5lRHJRc2lJc3J6UFQ0S0FaTHFjdHpEZTRsbFBUN1lLYTMzaGlFUE9mdldpWitkcWthUUE5UDY0eFhTeW4KZkhYOHVWQUozdU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QmhhRCtpdTZDZmlDTHdnSmIvaXc3ZW8vQ3lvWnF4K3RqWGFPMnpYdm00cC8rUUlmQU9ndEdRTEZVOGNmWgovZ1VyVHE1Z0ZxMCtQOUd5V3NBVEpGNnE3TDZXWlpqME91VHNlN2Y0Q1NpajZNbk9NTXhBK0pvYWhKejdsc1NpClRKSEl3RXA1ci9SeWhweWVwUXhGWWNVSDVKSmY5cmFoWExXWmkrOVRqeFNNMll5aHhmUlBzaVVFdUdEb2s3OFEKbS9RUGlDaTlKSmIxb2NtVGpBVjh4RFNob2NpdlhPRnlobjZMbjc3dkxqWStBYXZ0V0RoUXRocHVQeHNMdFZ6bQplMFNIMTFkRUxSdGI3NG1xWE9yTzdmdS8rSUJzM0pxTEUvVSt4dXhRdHZHOHZHMXlES0hIU1pxUzJoL1dzNGw0Ck5pQXNoSGdlaFFEUEJjWTl3WVl6ZkJnWnBPVU16ZERmNTB4K0ZTbFk0M1dPSkp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"10.0.0.0/16\",\n \"169.254.169.254\",\n \"10.42.0.0/16\",\n + \ \"10.244.0.0/16\"\n ],\n \"effectiveNoProxy\": [\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"konnectivity\",\n \"localhost\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"10.0.0.0/16\",\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XZ0V0RoUXRocHVQeHNMdFZ6bQplMFNIMTFkRUxSdGI3NG1xWE9yTzdmdS8rSUJzM0pxTEUvVSt4dXhRdHZHOHZHMXlES0hIU1pxUzJoL1dzNGw0Ck5pQXNoSGdlaFFEUEJjWTl3WVl6ZkJnWnBPVU16ZERmNTB4K0ZTbFk0M1dPSkp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n \ },\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n \ },\n \"workloadAutoScalerProfile\": {},\n \"metricsProfile\": {\n \"costAnalysis\": - {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"65040c18c954fd00011e5d1d\"\n - \ },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"6585601f8ac0aa0001ae7fde\",\n + \ \"controlPlanePluginProfiles\": {\n \"karpenter\": {\n \"enableV2\": + true\n }\n },\n \"nodeProvisioningProfile\": {\n \"mode\": \"Manual\"\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\": \"Base\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '7695' + - '7869' content-type: - application/json date: - - Fri, 15 Sep 2023 07:53:13 GMT + - Fri, 22 Dec 2023 10:13:04 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff status: @@ -3863,24 +3603,24 @@ interactions: message: OK - request: body: '{"location": "westus2", "sku": {"name": "Base", "tier": "Free"}, "identity": - {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "1.26.6", "dnsPrefix": - "cliakstest-clitesttb6455nk2-79a739", "agentPoolProfiles": [{"count": 3, "vmSize": + {"type": "SystemAssigned"}, "properties": {"kubernetesVersion": "1.27", "dnsPrefix": + "cliakstest-clitest72xlrhjcz-79a739", "agentPoolProfiles": [{"count": 3, "vmSize": "Standard_DS2_v2", "osDiskSizeGB": 128, "osDiskType": "Managed", "kubeletDiskType": "OS", "workloadRuntime": "OCIContainer", "vnetSubnetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet", "maxPods": 110, "osType": "Linux", "osSKU": "Ubuntu", "enableAutoScaling": false, "type": "VirtualMachineScaleSets", "mode": "System", "orchestratorVersion": - "1.26.6", "upgradeSettings": {}, "powerState": {"code": "Running"}, "enableNodePublicIP": + "1.27.7", "upgradeSettings": {}, "powerState": {"code": "Running"}, "enableNodePublicIP": false, "enableCustomCATrust": false, "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": false, "networkProfile": {}, "securityProfile": {"sshAccess": "LocalUser"}, "name": "nodepool1"}], "linuxProfile": {"adminUsername": "azureuser", - "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 azcli_aks_live_test@example.com\n"}]}}, "servicePrincipalProfile": {"clientId":"00000000-0000-0000-0000-000000000001"}, "oidcIssuerProfile": {"enabled": false}, "nodeResourceGroup": "MC_clitest000001_cliakstest000002_westus2", - "enableRBAC": true, "enablePodSecurityPolicy": false, "networkProfile": {"networkPlugin": - "kubenet", "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": - "10.0.0.10", "outboundType": "loadBalancer", "loadBalancerSku": "Standard", - "loadBalancerProfile": {"managedOutboundIPs": {"count": 1}, "effectiveOutboundIPs": - [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/9692a162-e2b3-40cb-96db-274e14be7628"}], + "enableRBAC": true, "supportPlan": "KubernetesOfficial", "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "networkPolicy": "none", + "podCidr": "10.244.0.0/16", "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", + "outboundType": "loadBalancer", "loadBalancerSku": "Standard", "loadBalancerProfile": + {"managedOutboundIPs": {"count": 1}, "effectiveOutboundIPs": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.Network/publicIPAddresses/64d152a3-6c7c-4082-9bee-dac77d37ee3a"}], "backendPoolType": "nodeIPConfiguration"}, "podCidrs": ["10.244.0.0/16"], "serviceCidrs": ["10.0.0.0/16"], "ipFamilies": ["IPv4"]}, "autoUpgradeProfile": {"nodeOSUpgradeChannel": "NodeImage"}, "identityProfile": {"kubeletidentity": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_westus2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool", @@ -3889,7 +3629,8 @@ interactions: "httpsProxy": "https://cli-proxy-vm:3129/", "noProxy": ["localhost", "127.0.0.1"], "trustedCa": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZERENDQXZTZ0F3SUJBZ0lVQlJ3cGs1eTh5ckdrNmtYTjhkSHlMRUNvaHBrd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0VqRVFNQTRHQTFVRUF3d0habTl2TFdKaGNqQWVGdzB5TVRFd01UTXdNekU1TlRoYUZ3MHpNVEV3TVRFdwpNekU1TlRoYU1CSXhFREFPQmdOVkJBTU1CMlp2YnkxaVlYSXdnZ0lpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElDCkR3QXdnZ0lLQW9JQ0FRRFcwRE9sVC9yci9xUEZIUU9lNndBNDkyVGh3VWxZaDhCQkszTW9VWVZLNjEvL2xXekEKeFkrYzlmazlvckUrZXhMSVpwdUg1Vn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3RlpTdUw4NTM3aHpUTXhSUWJjcWdEU2F4RUd0ZDJaNTVCcnVWQVloagpxQjR6STd1UVZ2SkNpeXdmQm5BNnZmejh2UDBzdGJJbkVtajh1dS9CSS81NzZqR0tWUWRQSDhqMnQvN1NQWjFKClhBWk9wc1hoVll2RmtpQlhVeW1RMnAvRjFqb2ZRRE1JQ0htdHhRUSthakJQNjBpcnFnVnpsRi95NlQySUgzOHYKbGordndIam52WW5vVmhGNEY0TlE5amp6S3Y1NUhVTk0xUEJKZkFaOTJqeXovczdPMmN2cjhNWlNkT2s5QVk1RQp5RXRlQjBTSjdLS0tUZklBVmVMQzdrRnBHR3FsRkRBNzhPSS9YakNZViswRjk4MHdNOVkxTEVUa3ZMamVSMEFyCnVzZDNIS1Vtd2EwTVEwUTNZNGxma0ZtNjJTclhvcjJURC9WZHpFZWNOTnVmV1VJTVNuaEJDNTVHWjBOTVYvR0QKRXhGZTVWQkhUZEZVNlIwb3JCOVFjVll1Mzk0MEt5NXhkbHNaUHZlMmRJNS9WOXhzY0Zad3cxWWs4K21RK3NVeQp2UVBoL2ZmK0tTQjdVVkdvTVNXUlg3YjFFMGVzZSs4QzZlaVV2OXpDR0VRbkVCcnFIQWxSUDJ2ZzQ0bXFJSnRzCjN2NUt1NW0ySmJoeWNsQVR3VUNQZkN3a2tLRTg0MzZGRitDK0ZUVTJ1OWVpL2t5QTAxYi9zRFl2cWdsS2FWK3MKbEVHRkhjd05Ea2VrS1BFUEZxNkpnZ3R0WlNidE5SMnFadzl3cExIbDVuVlVXdnBGa2hvcW1KVkphK0VBSTQ1LwpqRkh4VG9PMHp1NlBxc1p5SnM2TC84Z3BhbTcwMDV6b0VETVRjcFltMlduMFBKcEg3NE9zUHJVRDVJWVA5ZEt5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K"}, "securityProfile": {}, "storageProfile": {}, "workloadAutoScalerProfile": {}, - "metricsProfile": {"costAnalysis": {"enabled": false}}}}' + "metricsProfile": {"costAnalysis": {"enabled": false}}, "nodeProvisioningProfile": + {"mode": "Manual"}}}' headers: Accept: - application/json @@ -3900,14 +3641,14 @@ interactions: Connection: - keep-alive Content-Length: - - '5528' + - '5635' Content-Type: - application/json ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-10-02-preview response: @@ -3916,33 +3657,33 @@ interactions: \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.26.6\",\n \"currentKubernetesVersion\": \"1.26.6\",\n \"dnsPrefix\": - \"cliakstest-clitesttb6455nk2-79a739\",\n \"fqdn\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.portal.hcp.westus2.azmk8s.io\",\n + \"1.27\",\n \"currentKubernetesVersion\": \"1.27.7\",\n \"dnsPrefix\": + \"cliakstest-clitest72xlrhjcz-79a739\",\n \"fqdn\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.portal.hcp.westus2.azmk8s.io\",\n \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\n \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.26.6\",\n - \ \"currentOrchestratorVersion\": \"1.26.6\",\n \"enableNodePublicIP\": - false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n - \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n - \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-2204gen2containerd-202308.22.0\",\n \"upgradeSettings\": {},\n + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.27.7\",\n + \ \"currentOrchestratorVersion\": \"1.27.7\",\n \"enableNodePublicIP\": + false,\n \"enableCustomCATrust\": false,\n \"nodeLabels\": {},\n \"mode\": + \"System\",\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": + false,\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-2204gen2containerd-202312.06.0\",\n \"upgradeSettings\": {},\n \ \"enableFIPS\": false,\n \"networkProfile\": {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": - [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 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 \"supportPlan\": \"KubernetesOfficial\",\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/9692a162-e2b3-40cb-96db-274e14be7628\"\n + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"networkPolicy\": + \"none\",\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/64d152a3-6c7c-4082-9bee-dac77d37ee3a\"\n \ }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n },\n \ \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \ \"dnsServiceIP\": \"10.0.0.10\",\n \"outboundType\": \"loadBalancer\",\n @@ -3954,44 +3695,41 @@ interactions: \ }\n },\n \"autoUpgradeProfile\": {\n \"nodeOSUpgradeChannel\": \"NodeImage\"\n },\n \"disableLocalAccounts\": false,\n \"httpProxyConfig\": {\n \"httpProxy\": \"http://cli-proxy-vm:3128/\",\n \"httpsProxy\": - \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"localhost\",\n - \ \"127.0.0.1\",\n \"168.63.129.16\",\n \"169.254.169.254\",\n - \ \"konnectivity\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\"\n ],\n - \ \"effectiveNoProxy\": [\n \"localhost\",\n \"127.0.0.1\",\n \"168.63.129.16\",\n - \ \"169.254.169.254\",\n \"konnectivity\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\"\n ],\n - \ \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZERENDQXZTZ0F3SUJBZ0lVQlJ3cGs1eTh5ckdrNm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WVpL2t5QTAxYi9zRFl2cWdsS2FWK3MKbEVHRkhjd05Ea2VrS1BFUEZxNkpnZ3R0WlNidE5SMnFadzl3cExIbDVuVlVXdnBGa2hvcW1KVkphK0VBSTQ1LwpqRkh4VG9PMHp1NlBxc1p5SnM2TC84Z3BhbTcwMDV6b0VETVRjcFltMlduMFBKcEg3NE9zUHJVRDVJWVA5ZEt5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n + \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"169.254.169.254\",\n + \ \"10.244.0.0/16\",\n \"konnectivity\",\n \"10.0.0.0/16\",\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"10.42.0.0/16\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"localhost\"\n ],\n \"effectiveNoProxy\": [\n \"169.254.169.254\",\n + \ \"10.244.0.0/16\",\n \"konnectivity\",\n \"10.0.0.0/16\",\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"10.42.0.0/16\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"localhost\"\n ],\n \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZERENDQXZTZ0F3SUJBZ0lVQlJ3cGs1eTh5ckdrNmtYTjhkSHlMRUNvaHBrd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0VqRVFNQTRHQTFVRUF3d0habTl2TFdKaGNqQWVGdzB5TVRFd01UTXdNekU1TlRoYUZ3MHpNVEV3TVRFdwpNekU1TlRoYU1CSXhFREFPQmdOVkJBTU1CMlp2YnkxaVlYSXdnZ0lpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElDCkR3QXdnZ0lLQW9JQ0FRRFcwRE9sVC9yci9xUEZIUU9lNndBNDkyVGh3VWxZaDhCQkszTW9VWVZLNjEvL2xXekEKeFkrYzlmazlvck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},\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n \ },\n \"workloadAutoScalerProfile\": {},\n \"metricsProfile\": {\n \"costAnalysis\": - {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"65040c18c954fd00011e5d1d\"\n - \ },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"6585601f8ac0aa0001ae7fde\",\n + \ \"controlPlanePluginProfiles\": {\n \"karpenter\": {\n \"enableV2\": + true\n }\n },\n \"nodeProvisioningProfile\": {\n \"mode\": \"Manual\"\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\": \"Base\",\n \"tier\": \"Free\"\n }\n }" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fa72acd7-1907-4e88-98a3-755fbbf1859b?api-version=2016-03-30&t=2023-09-15T07%3a53%3a21&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSi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-mWjqzDMi-QOhYcehoyLRLJtpucyfYdZynIAehiGMz67UAMSuKAxld8bAIkUGTDUo1K6_lOEjEgW4frSckk_u0rBEoPJx_9BlqsSAa3ASmlb0aTLYw_pRbd6Pe2FEumlh4hQH7ernWaJAROUJ96yQNoOpK9alT1glKHQsukQGFfM2-7DyCkHY_CmchEy-ZgzddhVB7QFoOzcb3DqN9My0MqJNCQ&h=GBPMqPT9qfymcYPw2KeVJDmOG0Jiy9XehFrelmPKk28 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a02af078-3546-4213-846a-cd530a38efe3?api-version=2016-03-30&t=638388367891448400&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1O-5fyph6Tbm3YEnesFPQdchCZcuvlSKfwrlNSNNioLx0atlHNVRkvgMQ_eJNVF3com1NrZ34BY9K_A-e0yc19LrOgBOup-IPk3J5HeNPPECAwEAAaOCBAswggQHMCcGCSsG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ache content-length: - - '7665' + - '7862' content-type: - application/json date: - - Fri, 15 Sep 2023 07:53:20 GMT + - Fri, 22 Dec 2023 10:13:08 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: @@ -4013,66 +3751,14 @@ interactions: ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fa72acd7-1907-4e88-98a3-755fbbf1859b?api-version=2016-03-30&t=2023-09-15T07%3A53%3A21&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmt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eVJDmOG0Jiy9XehFrelmPKk28 - response: - body: - string: "{\n \"name\": \"d7ac72fa-0719-884e-98a3-755fbbf1859b\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:53:19.6460463Z\",\n \"error\": - {\n \"code\": \"NotLatestOperation\",\n \"message\": \"Cannot proceed - with the operation. Either the operation has been preempted by another one, - or the information needed by the operation failed to be saved (or hasn't been - saved yet).\"\n }\n }" - headers: - cache-control: - - no-cache - content-length: - - '374' - content-type: - - application/json - date: - - Fri, 15 Sep 2023 07:53: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: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - aks update - Connection: - - keep-alive - ParameterSetName: - - --resource-group --name --http-proxy-config - User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fa72acd7-1907-4e88-98a3-755fbbf1859b?api-version=2016-03-30&t=2023-09-15T07%3A53%3A21&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ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s&s=WJ95EaMXq_cyAnCZItVGjihpECiwIi3pmCuuZXQ7vnL2czT3US2KUQO5YuDH7-vgMcp4h8rs46lpzWc8mFW2to-TAUrdRdJenCk2kJC5BBQ9U4dRScnwmwyatkb-mWjqzDMi-QOhYcehoyLRLJtpucyfYdZynIAehiGMz67UAMSuKAxld8bAIkUGTDUo1K6_lOEjEgW4frSckk_u0rBEoPJx_9BlqsSAa3ASmlb0aTLYw_pRbd6Pe2FEumlh4hQH7ernWaJAROUJ96yQNoOpK9alT1glKHQsukQGFfM2-7DyCkHY_CmchEy-ZgzddhVB7QFoOzcb3DqN9My0MqJNCQ&h=GBPMqPT9qfymcYPw2KeVJDmOG0Jiy9XehFrelmPKk28 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a02af078-3546-4213-846a-cd530a38efe3?api-version=2016-03-30&t=638388367891448400&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b2mCQybEZh8xYvc5QKAxQZxZUwJ7z2I6NhYBAwKOnexT6W3RpOHjR0DOunQlnnJBRaXTzoMRu9y_MMSS14WLxt9jMq2FxivtpAP4tYZNqSyp6tbuYoN1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Qckme2akbBC3-phtDisjHMP6opQ1Vuo2vJCzh4JaZbrnmbCtqNDv-UpKeGpN4GaDEDdCZw&h=vWG06xhZi4_H5pmOCHQRF9DbDbSAfrjDyY8LQDpFBsQ response: body: - string: "{\n \"name\": \"d7ac72fa-0719-884e-98a3-755fbbf1859b\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:53:19.6460463Z\",\n \"error\": + string: "{\n \"name\": \"a02af078-3546-4213-846a-cd530a38efe3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:13:08.9114111Z\",\n \"error\": {\n \"code\": \"NotLatestOperation\",\n \"message\": \"Cannot proceed with the operation. Either the operation has been preempted by another one, or the information needed by the operation failed to be saved (or hasn't been @@ -4085,19 +3771,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:53:52 GMT + - Fri, 22 Dec 2023 10:13:08 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: @@ -4117,14 +3797,14 @@ interactions: ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fa72acd7-1907-4e88-98a3-755fbbf1859b?api-version=2016-03-30&t=2023-09-15T07%3A53%3A21&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9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ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=WJ95EaMXq_cyAnCZItVGjihpECiwIi3pmCuuZXQ7vnL2czT3US2KUQO5YuDH7-vgMcp4h8rs46lpzWc8mFW2to-TAUrdRdJenCk2kJC5BBQ9U4dRScnwmwyatkb-mWjqzDMi-QOhYcehoyLRLJtpucyfYdZynIAehiGMz67UAMSuKAxld8bAIkUGTDUo1K6_lOEjEgW4frSckk_u0rBEoPJx_9BlqsSAa3ASmlb0aTLYw_pRbd6Pe2FEumlh4hQH7ernWaJAROUJ96yQNoOpK9alT1glKHQsukQGFfM2-7DyCkHY_CmchEy-ZgzddhVB7QFoOzcb3DqN9My0MqJNCQ&h=GBPMqPT9qfymcYPw2KeVJDmOG0Jiy9XehFrelmPKk28 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a02af078-3546-4213-846a-cd530a38efe3?api-version=2016-03-30&t=638388367891448400&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibMEzENtdXD_9bnRFedXnHGYU2WVoSNV1T8o5EJpU1WPqMGp0-Te7u-pOZ18zukWdKhar_J0Q8cPTu3ERTvdGhQijltdB6E_J0wNDTwsi6NNDvaxwn4ZT8b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WPdUP6ueXLiKPnITbJzoLIlxEud6YQMefrNwzt_8Risim3Ts5Y9c0YMKGnAvWDDpMMN82dkuNrwvT6wJBnGPPdouEMa-vesemcuivfR55AepK-YOHfqMr1R4xQckme2akbBC3-phtDisjHMP6opQ1Vuo2vJCzh4JaZbrnmbCtqNDv-UpKeGpN4GaDEDdCZw&h=vWG06xhZi4_H5pmOCHQRF9DbDbSAfrjDyY8LQDpFBsQ response: body: - string: "{\n \"name\": \"d7ac72fa-0719-884e-98a3-755fbbf1859b\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:53:19.6460463Z\",\n \"error\": + string: "{\n \"name\": \"a02af078-3546-4213-846a-cd530a38efe3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:13:08.9114111Z\",\n \"error\": {\n \"code\": \"NotLatestOperation\",\n \"message\": \"Cannot proceed with the operation. Either the operation has been preempted by another one, or the information needed by the operation failed to be saved (or hasn't been @@ -4137,19 +3817,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:54:21 GMT + - Fri, 22 Dec 2023 10:13:39 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: @@ -4169,14 +3843,14 @@ interactions: ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fa72acd7-1907-4e88-98a3-755fbbf1859b?api-version=2016-03-30&t=2023-09-15T07%3A53%3A21&c=MIIHADCCBeigAwIBAgIT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z5YimmsrZTYI3meB_pNAZ1A-RrE7qhjkQuY2jtehE5y100y_IBy_NXCUns26MYl8O86cFtcEAROXCHbDZ7ZeTsKyMsIvYpLpt5oxm3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=WJ95EaMXq_cyAnCZItVGjihpECiwIi3pmCuuZXQ7vnL2czT3US2KUQO5YuDH7-vgMcp4h8rs46lpzWc8mFW2to-TAUrdRdJenCk2kJC5BBQ9U4dRScnwmwyatkb-mWjqzDMi-QOhYcehoyLRLJtpucyfYdZynIAehiGMz67UAMSuKAxld8bAIkUGTDUo1K6_lOEjEgW4frSckk_u0rBEoPJx_9BlqsSAa3ASmlb0aTLYw_pRbd6Pe2FEumlh4hQH7ernWaJAROUJ96yQNoOpK9alT1glKHQsukQGFfM2-7DyCkHY_CmchEy-ZgzddhVB7QFoOzcb3DqN9My0MqJNCQ&h=GBPMqPT9qfymcYPw2KeVJDmOG0Jiy9XehFrelmPKk28 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a02af078-3546-4213-846a-cd530a38efe3?api-version=2016-03-30&t=638388367891448400&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMAibME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7qmMHU8dv6Mqth0Nyyt3NiabIyFd00JfjoYXMFghokVhJGFuHzy3tXo4y1-U6hdFellwLX0YHbJ6Aeq-JnkDFgQK2XEyj7kPpfR-zJgke1rxtGo5STjKWPdUP6ueXLiKPnITbJzoLIlxEud6YQMefrNwzt_8Risim3Ts5Y9c0YMKGnAvWDDpMMN82dkuNrwvT6wJBnGPPdouEMa-vesemcuivfR55AepK-YOHfqMr1R4xQckme2akbBC3-phtDisjHMP6opQ1Vuo2vJCzh4JaZbrnmbCtqNDv-UpKeGpN4GaDEDdCZw&h=vWG06xhZi4_H5pmOCHQRF9DbDbSAfrjDyY8LQDpFBsQ response: body: - string: "{\n \"name\": \"d7ac72fa-0719-884e-98a3-755fbbf1859b\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:53:19.6460463Z\",\n \"error\": + string: "{\n \"name\": \"a02af078-3546-4213-846a-cd530a38efe3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:13:08.9114111Z\",\n \"error\": {\n \"code\": \"NotLatestOperation\",\n \"message\": \"Cannot proceed with the operation. Either the operation has been preempted by another one, or the information needed by the operation failed to be saved (or hasn't been @@ -4189,19 +3863,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:54:52 GMT + - Fri, 22 Dec 2023 10:14:09 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: @@ -4221,14 +3889,14 @@ interactions: ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fa72acd7-1907-4e88-98a3-755fbbf1859b?api-version=2016-03-30&t=2023-09-15T07%3A53%3A21&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmtLbaTTBUk9FZi-19Fy4Hdt6NZwwmwWzATFSjhQrIKYhpwYtxlqFdMl4YECAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJ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NAQELBQADggEBAJJDo9KyjKG4aDx14yKEmJ1XRvp_un1CwNEW6KgHKM-Tm9vuaH6LGfmO_idOwmXeJmwf7s6SphXwqlPgz0TJ1AizxH1ZyMtKcWUuT_z5YimmsrZTYI3meB_pNAZ1A-RrE7qhjkQuY2jtehE5y100y_IBy_NXCUns26MYl8O86cFtcEAROXCHbDZ7ZeTsKyMsIvYpLpt5oxm3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=WJ95EaMXq_cyAnCZItVGjihpECiwIi3pmCuuZXQ7vnL2czT3US2KUQO5YuDH7-vgMcp4h8rs46lpzWc8mFW2to-TAUrdRdJenCk2kJC5BBQ9U4dRScnwmwyatkb-mWjqzDMi-QOhYcehoyLRLJtpucyfYdZynIAehiGMz67UAMSuKAxld8bAIkUGTDUo1K6_lOEjEgW4frSckk_u0rBEoPJx_9BlqsSAa3ASmlb0aTLYw_pRbd6Pe2FEumlh4hQH7ernWaJAROUJ96yQNoOpK9alT1glKHQsukQGFfM2-7DyCkHY_CmchEy-ZgzddhVB7QFoOzcb3DqN9My0MqJNCQ&h=GBPMqPT9qfymcYPw2KeVJDmOG0Jiy9XehFrelmPKk28 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a02af078-3546-4213-846a-cd530a38efe3?api-version=2016-03-30&t=638388367891448400&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjMxMTAxMDk0NjIyWhcNMjQxMDI2MDk0NjIyWjBAMT4wPAYDVQQDEzVhc3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DlNtt4u9ZYoKcVyjJjRkUm3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=ELHSXdKkA_BrHnzqqs9dTfuA3-YPlDNCrDQ7qmMHU8dv6Mqth0Nyyt3NiabIyFd00JfjoYXMFghokVhJGFuHzy3tXo4y1-U6hdFellwLX0YHbJ6Aeq-JnkDFgQK2XEyj7kPpfR-zJgke1rxtGo5STjKWPdUP6ueXLiKPnITbJzoLIlxEud6YQMefrNwzt_8Risim3Ts5Y9c0YMKGnAvWDDpMMN82dkuNrwvT6wJBnGPPdouEMa-vesemcuivfR55AepK-YOHfqMr1R4xQckme2akbBC3-phtDisjHMP6opQ1Vuo2vJCzh4JaZbrnmbCtqNDv-UpKeGpN4GaDEDdCZw&h=vWG06xhZi4_H5pmOCHQRF9DbDbSAfrjDyY8LQDpFBsQ response: body: - string: "{\n \"name\": \"d7ac72fa-0719-884e-98a3-755fbbf1859b\",\n \"status\": - \"InProgress\",\n \"startTime\": \"2023-09-15T07:53:19.6460463Z\",\n \"error\": + string: "{\n \"name\": \"a02af078-3546-4213-846a-cd530a38efe3\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2023-12-22T10:13:08.9114111Z\",\n \"error\": {\n \"code\": \"NotLatestOperation\",\n \"message\": \"Cannot proceed with the operation. Either the operation has been preempted by another one, or the information needed by the operation failed to be saved (or hasn't been @@ -4241,19 +3909,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:55:23 GMT + - Fri, 22 Dec 2023 10:14:39 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: @@ -4273,15 +3935,15 @@ interactions: ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/fa72acd7-1907-4e88-98a3-755fbbf1859b?api-version=2016-03-30&t=2023-09-15T07%3A53%3A21&c=MIIHADCCBeigAwIBAgITfAOt9JON98CjYPdc9QAAA630kzANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjMwODAzMDE0MDQxWhcNMjQwNzI4MDE0MDQxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKipopHvwrhlzUyEj8K9SzP-KaE4JxtdBJXyUTvKIkSiKKo5ed4nZoS8_lU5seMfZyXygEoF28j21995G21eW8pECHtdlucHibosuXyLYB0uLggka2khgGgRwjX1fj-Y2QE-kRjtmHLfZd9dBTNi8RumIZ_O_0rK4iFT8JtFu3uo6ug9fiLfTQoRJGf_2H9oXDvu9pToaiwHOD9iIn7hyTp074WUEfQEGPxJcSOLBMSnRwwjd8oj1jEuxP8e78qyh5inv9jbf8KLHT76QL8_Ih-I2hUoqmtLbaTTBUk9FZi-19Fy4Hdt6NZwwmwWzATFSjhQrIKYhpwYtxlqFdMl4YECAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MG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wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJJDo9KyjKG4aDx14yKEmJ1XRvp_un1CwNEW6KgHKM-Tm9vuaH6LGfmO_idOwmXeJmwf7s6SphXwqlPgz0TJ1AizxH1ZyMtKcWUuT_z5YimmsrZTYI3meB_pNAZ1A-RrE7qhjkQuY2jtehE5y100y_IBy_NXCUns26MYl8O86cFtcEAROXCHbDZ7ZeTsKyMsIvYpLpt5oxm3JjrSdn6__RTe91cku07ep_oU01UxjWPZO4ikfSlZX2VsLr7ve1KKttmvg0QUWscKlRMiX8wz5vFh8scKWq84WRESj2e89n6oNVvtb2Pxy8hu_9U2FgU1euzED-f7Y4omjwQ6gGGouEs&s=WJ95EaMXq_cyAnCZItVGjihpECiwIi3pmCuuZXQ7vnL2czT3US2KUQO5YuDH7-vgMcp4h8rs46lpzWc8mFW2to-TAUrdRdJenCk2kJC5BBQ9U4dRScnwmwyatkb-mWjqzDMi-QOhYcehoyLRLJtpucyfYdZynIAehiGMz67UAMSuKAxld8bAIkUGTDUo1K6_lOEjEgW4frSckk_u0rBEoPJx_9BlqsSAa3ASmlb0aTLYw_pRbd6Pe2FEumlh4hQH7ernWaJAROUJ96yQNoOpK9alT1glKHQsukQGFfM2-7DyCkHY_CmchEy-ZgzddhVB7QFoOzcb3DqN9My0MqJNCQ&h=GBPMqPT9qfymcYPw2KeVJDmOG0Jiy9XehFrelmPKk28 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus2/operations/a02af078-3546-4213-846a-cd530a38efe3?api-version=2016-03-30&t=638388367891448400&c=MIIHHjCCBgagAwIBAgITOgI8r7Mf_biwA5ZedQAEAjyvszANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPy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3_VpAbFQbRE_ZxpQSTp1GHDD2nrbXEzpU3O58ESJfL99UlgYO12XqeHlPy6k5_7ILX9UrUyuJwliRI56FbKhM-wCXSlPbwt-7U8FvsYyWiovfAU1KqfaDlNtt4u9ZYoKcVyjJjRkUm3ZpTfNoY9qTWSM0iEcRya-U2MImx3c0qvgUsWji-plEv_LL9WkKc&s=ELHSXdKkA_BrHnzqqs9dTfuA3-YPlDNCrDQ7qmMHU8dv6Mqth0Nyyt3NiabIyFd00JfjoYXMFghokVhJGFuHzy3tXo4y1-U6hdFellwLX0YHbJ6Aeq-JnkDFgQK2XEyj7kPpfR-zJgke1rxtGo5STjKWPdUP6ueXLiKPnITbJzoLIlxEud6YQMefrNwzt_8Risim3Ts5Y9c0YMKGnAvWDDpMMN82dkuNrwvT6wJBnGPPdouEMa-vesemcuivfR55AepK-YOHfqMr1R4xQckme2akbBC3-phtDisjHMP6opQ1Vuo2vJCzh4JaZbrnmbCtqNDv-UpKeGpN4GaDEDdCZw&h=vWG06xhZi4_H5pmOCHQRF9DbDbSAfrjDyY8LQDpFBsQ response: body: - string: "{\n \"name\": \"d7ac72fa-0719-884e-98a3-755fbbf1859b\",\n \"status\": - \"Succeeded\",\n \"startTime\": \"2023-09-15T07:53:19.6460463Z\",\n \"endTime\": - \"2023-09-15T07:55:40.5362424Z\",\n \"error\": {\n \"code\": \"NotLatestOperation\",\n + string: "{\n \"name\": \"a02af078-3546-4213-846a-cd530a38efe3\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2023-12-22T10:13:08.9114111Z\",\n \"endTime\": + \"2023-12-22T10:15:02.2198374Z\",\n \"error\": {\n \"code\": \"NotLatestOperation\",\n \ \"message\": \"Cannot proceed with the operation. Either the operation has been preempted by another one, or the information needed by the operation failed to be saved (or hasn't been saved yet).\"\n }\n }" @@ -4293,19 +3955,13 @@ interactions: content-type: - application/json date: - - Fri, 15 Sep 2023 07:55:54 GMT + - Fri, 22 Dec 2023 10:15:09 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: @@ -4325,8 +3981,8 @@ interactions: ParameterSetName: - --resource-group --name --http-proxy-config User-Agent: - - AZURECLI/2.52.0 azsdk-python-azure-mgmt-containerservice/25.0.0b Python/3.8.10 - (Linux-6.2.0-1011-azure-x86_64-with-glibc2.29) + - AZURECLI/2.55.0 azsdk-python-azure-mgmt-containerservice/28.0.0b Python/3.8.10 + (Linux-6.2.0-1016-azure-x86_64-with-glibc2.29) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-10-02-preview response: @@ -4335,33 +3991,33 @@ interactions: \ \"location\": \"westus2\",\n \"name\": \"cliakstest000002\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": - \"1.26.6\",\n \"currentKubernetesVersion\": \"1.26.6\",\n \"dnsPrefix\": - \"cliakstest-clitesttb6455nk2-79a739\",\n \"fqdn\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"azurePortalFQDN\": \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.portal.hcp.westus2.azmk8s.io\",\n + \"1.27\",\n \"currentKubernetesVersion\": \"1.27.7\",\n \"dnsPrefix\": + \"cliakstest-clitest72xlrhjcz-79a739\",\n \"fqdn\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"azurePortalFQDN\": \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.portal.hcp.westus2.azmk8s.io\",\n \ \"agentPoolProfiles\": [\n {\n \"name\": \"nodepool1\",\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"vnetSubnetID\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.Network/virtualNetworks/cliakstest000002/subnets/aks-subnet\",\n \ \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n \"enableAutoScaling\": false,\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n - \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.26.6\",\n - \ \"currentOrchestratorVersion\": \"1.26.6\",\n \"enableNodePublicIP\": + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.27.7\",\n + \ \"currentOrchestratorVersion\": \"1.27.7\",\n \"enableNodePublicIP\": false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\",\n \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": - \"AKSUbuntu-2204gen2containerd-202308.22.0\",\n \"upgradeSettings\": {},\n + \"AKSUbuntu-2204gen2containerd-202312.06.0\",\n \"upgradeSettings\": {},\n \ \"enableFIPS\": false,\n \"networkProfile\": {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": - [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDoxQy8U1ArW8QpfBE5S5k6L1bS9zeHm2SJYVzQCAL2ffeY8YpjyiqFpVbnPX7tgd3E2XFMg28mI1tAEQj0QgwCXSMVNE+0El8FpWoYVJHBGquD/UIXvhPDUaspk0uwPz5sp8htkSRph134csoJYoXnI5Vq0vspf/ARYOPfoSMHM4oqh+30uk5rh/QgE0r0JWZxC33xl5Aw0mmPmC7fZob++LIOyH9cHLUlc43Xe5LNpeEty3purz0MtSaBtL5tgYxrTyRT/lhfJLIVFl7fToKQZhye/5ZYa5CNiKZb6oMEIekb/E/KaFEkd721+y9egIlW7nuNiqW+RCykA6gomy3r + [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/314l8NE/rEfJ10S8oDI4rM7uTS3rCTxNGL5cHu0oPScMbSei3ynXjnKX0wRvuc/BSAzgkvkP4HYApcFus3wzidm6g5BSRdH0rkPCH52XTNZd1V3xRBWGf3z19Av0FC1c9RSePHy44CsvaT5EJIGKqc06Ayd69eRSlndt0aH2LSxqo2nTKxXzxeiZfowe7g24v69krskFOE9sNt+g0Pnyv50zP/VByG/Wt/iCNIdtlghVZa7DFyzgHFvnk2e4LOSQTrONhK3WVSBY58Qr1uHPNljumfhwdwxP73jiweozPSjl05IOfzmRpxcbmp/UYF6U4sh7l9+9iY4LzsE8ftq9 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 \"supportPlan\": \"KubernetesOfficial\",\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/9692a162-e2b3-40cb-96db-274e14be7628\"\n + \ \"networkProfile\": {\n \"networkPlugin\": \"kubenet\",\n \"networkPolicy\": + \"none\",\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/64d152a3-6c7c-4082-9bee-dac77d37ee3a\"\n \ }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n },\n \ \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \ \"dnsServiceIP\": \"10.0.0.10\",\n \"outboundType\": \"loadBalancer\",\n @@ -4373,42 +4029,39 @@ interactions: \ }\n },\n \"autoUpgradeProfile\": {\n \"nodeOSUpgradeChannel\": \"NodeImage\"\n },\n \"disableLocalAccounts\": false,\n \"httpProxyConfig\": {\n \"httpProxy\": \"http://cli-proxy-vm:3128/\",\n \"httpsProxy\": - \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"localhost\",\n - \ \"127.0.0.1\",\n \"168.63.129.16\",\n \"169.254.169.254\",\n - \ \"konnectivity\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\"\n ],\n - \ \"effectiveNoProxy\": [\n \"localhost\",\n \"127.0.0.1\",\n \"168.63.129.16\",\n - \ \"169.254.169.254\",\n \"konnectivity\",\n \"cliakstest-clitesttb6455nk2-79a739-8ywlk5ru.hcp.westus2.azmk8s.io\",\n - \ \"10.42.0.0/16\",\n \"10.244.0.0/16\",\n \"10.0.0.0/16\"\n ],\n - \ \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZERENDQXZTZ0F3SUJBZ0lVQlJ3cGs1eTh5ckdrNmtYTjhkSHlMRUNvaHBrd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0VqRVFNQTRHQTFVRUF3d0habTl2TFdKaGNqQWVGdzB5TVRFd01UTXdNekU1TlRoYUZ3MHpNVEV3TVRFdwpNekU1TlRoYU1CSX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2TC84Z3BhbTcwMDV6b0VETVRjcFltMlduMFBKcEg3NE9zUHJVRDVJWVA5ZEt5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n + \"https://cli-proxy-vm:3129/\",\n \"noProxy\": [\n \"169.254.169.254\",\n + \ \"10.244.0.0/16\",\n \"konnectivity\",\n \"10.0.0.0/16\",\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"10.42.0.0/16\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"localhost\"\n ],\n \"effectiveNoProxy\": [\n \"169.254.169.254\",\n + \ \"10.244.0.0/16\",\n \"konnectivity\",\n \"10.0.0.0/16\",\n \"127.0.0.1\",\n + \ \"168.63.129.16\",\n \"10.42.0.0/16\",\n \"cliakstest-clitest72xlrhjcz-79a739-rwy9orqh.hcp.westus2.azmk8s.io\",\n + \ \"localhost\"\n ],\n \"trustedCa\": \"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZERENDQXZTZ0F3SUJBZ0lVQlJ3cGs1eTh5ckdrNmtYTjhkSHlMRUNvaHBrd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0VqRVFNQTRHQTFVRUF3d0habTl2TFdKaGNqQWVGdzB5TVRFd01UTXdNekU1TlRoYUZ3MHpNVEV3TVRFdwpNekU1TlRoYU1CSXhFREFPQmdOVkJBTU1CMlp2YnkxaVlYSXdnZ0lpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElDCkR3QXdnZ0lLQW9JQ0FRRFcwRE9sVC9yci9xUEZIUU9lNndBNDkyVGh3VWxZaDhCQkszTW9VWVZLNjEvL2xXekEKeFkrYzlmazlvckUrZXhMSVpwdUg1VnNZR21MNUFyc05sVmNBMkU4MWgwSlBPYUo1eEpiZG40YldpZG9vdXRVVwpXeDNhYUJLSEt0RWdZbUNmTjliWXlZMlNWRWQvNS9HeGh0akVabHJ1aEtRdkZVa3hwR0xKK1JR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qMnQvN1NQWjFKClhBWk9wc1hoVll2RmtpQlhVeW1RMnAvRjFqb2ZRRE1JQ0htdHhRUSthakJQNjBpcnFnVnpsRi95NlQySUgzOHYKbGordndIam52WW5vVmhGNEY0TlE5amp6S3Y1NUhVTk0xUEJKZkFaOTJqeXovczdPMmN2cjhNWlNkT2s5QVk1RQp5RXRlQjBTSjdLS0tUZklBVmVMQzdrRnBHR3FsRkRBNzhPSS9YakNZViswRjk4MHdNOVkxTEVUa3ZMamVSMEFyCnVzZDNIS1Vtd2EwTVEwUTNZNGxma0ZtNjJTclhvcjJURC9WZHpFZWNOTnVmV1VJTVNuaEJDNTVHWjBOTVYvR0QKRXhGZTVWQkhUZEZVNlIwb3JCOVFjVll1Mzk0MEt5NXhkbHNaUHZlMmRJNS9WOXhzY0Zad3cxWWs4K21RK3NVeQp2UVBoL2ZmK0tTQjdVVkdvTVNXUlg3YjFFMGVzZSs4QzZlaVV2OXpDR0VRbkVCcnFIQWxSUDJ2ZzQ0bXFJSnRzCjN2NUt1NW0ySmJoeWNsQVR3VUNQZkN3a2tLRTg0MzZGRitDK0ZUVTJ1OWVpL2t5QTAxYi9zRFl2cWdsS2FWK3MKbEVHRkhjd05Ea2VrS1BFUEZxNkpnZ3R0WlNidE5SMnFadzl3cExIbDVuVlVXdnBGa2hvcW1KVkphK0VBSTQ1LwpqRkh4VG9PMHp1NlBxc1p5SnM2TC84Z3BhbTcwMDV6b0VETVRjcFltMlduMFBKcEg3NE9zUHJVRDVJWVA5ZEt5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\"\n \ },\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n \ },\n \"workloadAutoScalerProfile\": {},\n \"metricsProfile\": {\n \"costAnalysis\": - {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"65040c18c954fd00011e5d1d\"\n - \ },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + {\n \"enabled\": false\n }\n },\n \"resourceUID\": \"6585601f8ac0aa0001ae7fde\",\n + \ \"controlPlanePluginProfiles\": {\n \"karpenter\": {\n \"enableV2\": + true\n }\n },\n \"nodeProvisioningProfile\": {\n \"mode\": \"Manual\"\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\": \"Base\",\n \"tier\": \"Free\"\n }\n }" headers: cache-control: - no-cache content-length: - - '7667' + - '7841' content-type: - application/json date: - - Fri, 15 Sep 2023 07:55:55 GMT + - Fri, 22 Dec 2023 10:15:10 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff status: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py index 471390b86ed..401769ee56c 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py @@ -27,15 +27,27 @@ DecoratorMode, ) from azure.cli.command_modules.acs.agentpool_decorator import AKSAgentPoolParamDict -from azure.cli.command_modules.acs.tests.latest.mocks import MockCLI, MockClient, MockCmd -from azure.cli.core.azclierror import CLIInternalError, InvalidArgumentValueError, MutuallyExclusiveArgumentError +from azure.cli.command_modules.acs.tests.latest.mocks import ( + MockCLI, + MockClient, + MockCmd, +) +from azure.cli.core.azclierror import ( + CLIInternalError, + InvalidArgumentValueError, + MutuallyExclusiveArgumentError, +) class AKSPreviewAgentPoolContextCommonTestCase(unittest.TestCase): def _remove_defaults_in_agentpool(self, agentpool): self.defaults_in_agentpool = {} for attr_name, attr_value in vars(agentpool).items(): - if not attr_name.startswith("_") and attr_name != "name" and attr_value is not None: + if ( + not attr_name.startswith("_") + and attr_name != "name" + and attr_value is not None + ): self.defaults_in_agentpool[attr_name] = attr_value setattr(agentpool, attr_name, None) return agentpool @@ -47,7 +59,11 @@ def _restore_defaults_in_agentpool(self, agentpool): return agentpool def create_initialized_agentpool_instance( - self, nodepool_name="nodepool1", remove_defaults=True, restore_defaults=True, **kwargs + self, + nodepool_name="nodepool1", + remove_defaults=True, + restore_defaults=True, + **kwargs ): """Helper function to create a properly initialized agentpool instance. @@ -91,7 +107,9 @@ def common_get_zones(self): # custom value ctx_2 = AKSPreviewAgentPoolContext( self.cmd, - AKSAgentPoolParamDict({"zones": "test_zones", "node_zones": "test_node_zones"}), + AKSAgentPoolParamDict( + {"zones": "test_zones", "node_zones": "test_node_zones"} + ), self.models, DecoratorMode.CREATE, self.agentpool_decorator_mode, @@ -124,14 +142,18 @@ def common_get_message_of_the_day(self): self.agentpool_decorator_mode, ) self.assertEqual(ctx_1.get_message_of_the_day(), None) - agentpool_1 = self.create_initialized_agentpool_instance(message_of_the_day="test_message_of_the_day") + agentpool_1 = self.create_initialized_agentpool_instance( + message_of_the_day="test_message_of_the_day" + ) ctx_1.attach_agentpool(agentpool_1) self.assertEqual(ctx_1.get_message_of_the_day(), "test_message_of_the_day") # custom ctx_2 = AKSPreviewAgentPoolContext( self.cmd, - AKSAgentPoolParamDict({"message_of_the_day": get_test_data_file_path("motd.txt")}), + AKSAgentPoolParamDict( + {"message_of_the_day": get_test_data_file_path("motd.txt")} + ), self.models, DecoratorMode.CREATE, self.agentpool_decorator_mode, @@ -162,7 +184,9 @@ def common_get_gpu_instance_profile(self): self.agentpool_decorator_mode, ) self.assertEqual(ctx_1.get_gpu_instance_profile(), None) - agentpool_1 = self.create_initialized_agentpool_instance(gpu_instance_profile="test_gpu_instance_profile") + agentpool_1 = self.create_initialized_agentpool_instance( + gpu_instance_profile="test_gpu_instance_profile" + ) ctx_1.attach_agentpool(agentpool_1) self.assertEqual(ctx_1.get_gpu_instance_profile(), "test_gpu_instance_profile") @@ -175,8 +199,12 @@ def common_get_workload_runtime(self): DecoratorMode.CREATE, self.agentpool_decorator_mode, ) - self.assertEqual(ctx_1.get_workload_runtime(), CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) - agentpool_1 = self.create_initialized_agentpool_instance(workload_runtime="test_workload_runtime") + self.assertEqual( + ctx_1.get_workload_runtime(), CONST_WORKLOAD_RUNTIME_OCI_CONTAINER + ) + agentpool_1 = self.create_initialized_agentpool_instance( + workload_runtime="test_workload_runtime" + ) ctx_1.attach_agentpool(agentpool_1) self.assertEqual(ctx_1.get_workload_runtime(), "test_workload_runtime") @@ -190,7 +218,9 @@ def common_get_enable_custom_ca_trust(self): self.agentpool_decorator_mode, ) self.assertEqual(ctx_1.get_enable_custom_ca_trust(), True) - agentpool_1 = self.create_initialized_agentpool_instance(enable_custom_ca_trust=False) + agentpool_1 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=False + ) ctx_1.attach_agentpool(agentpool_1) self.assertEqual(ctx_1.get_enable_custom_ca_trust(), False) @@ -203,14 +233,18 @@ def common_get_enable_custom_ca_trust(self): self.agentpool_decorator_mode, ) self.assertEqual(ctx_2.get_enable_custom_ca_trust(), True) - agentpool_2 = self.create_initialized_agentpool_instance(enable_custom_ca_trust=False) + agentpool_2 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=False + ) ctx_2.attach_agentpool(agentpool_2) self.assertEqual(ctx_2.get_enable_custom_ca_trust(), True) # custom ctx_3 = AKSPreviewAgentPoolContext( self.cmd, - AKSAgentPoolParamDict({"enable_custom_ca_trust": True, "disable_custom_ca_trust": True}), + AKSAgentPoolParamDict( + {"enable_custom_ca_trust": True, "disable_custom_ca_trust": True} + ), self.models, DecoratorMode.UPDATE, self.agentpool_decorator_mode, @@ -228,14 +262,18 @@ def common_get_disable_custom_ca_trust(self): self.agentpool_decorator_mode, ) self.assertEqual(ctx_1.get_disable_custom_ca_trust(), True) - agentpool_1 = self.create_initialized_agentpool_instance(enable_custom_ca_trust=True) + agentpool_1 = self.create_initialized_agentpool_instance( + enable_custom_ca_trust=True + ) ctx_1.attach_agentpool(agentpool_1) self.assertEqual(ctx_1.get_disable_custom_ca_trust(), True) # custom ctx_2 = AKSPreviewAgentPoolContext( self.cmd, - AKSAgentPoolParamDict({"enable_custom_ca_trust": True, "disable_custom_ca_trust": True}), + AKSAgentPoolParamDict( + {"enable_custom_ca_trust": True, "disable_custom_ca_trust": True} + ), self.models, DecoratorMode.UPDATE, self.agentpool_decorator_mode, @@ -355,7 +393,10 @@ def common_get_os_sku(self): ctx_5.attach_agentpool(agentpool_5) self.assertEqual(ctx_5.get_os_sku(), None) -class AKSPreviewAgentPoolContextStandaloneModeTestCase(AKSPreviewAgentPoolContextCommonTestCase): + +class AKSPreviewAgentPoolContextStandaloneModeTestCase( + AKSPreviewAgentPoolContextCommonTestCase +): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW register_aks_preview_resource_type() @@ -363,7 +404,9 @@ def setUp(self): self.cmd = MockCmd(self.cli_ctx) self.resource_type = CUSTOM_MGMT_AKS_PREVIEW self.agentpool_decorator_mode = AgentPoolDecoratorMode.STANDALONE - self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) + self.models = AKSPreviewAgentPoolModels( + self.cmd, self.resource_type, self.agentpool_decorator_mode + ) def test_get_zones(self): self.common_get_zones() @@ -392,7 +435,10 @@ def test_get_enable_artifact_streaming(self): def test_get_os_sku(self): self.common_get_os_sku() -class AKSPreviewAgentPoolContextManagedClusterModeTestCase(AKSPreviewAgentPoolContextCommonTestCase): + +class AKSPreviewAgentPoolContextManagedClusterModeTestCase( + AKSPreviewAgentPoolContextCommonTestCase +): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW register_aks_preview_resource_type() @@ -400,7 +446,9 @@ def setUp(self): self.cmd = MockCmd(self.cli_ctx) self.resource_type = CUSTOM_MGMT_AKS_PREVIEW self.agentpool_decorator_mode = AgentPoolDecoratorMode.MANAGED_CLUSTER - self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) + self.models = AKSPreviewAgentPoolModels( + self.cmd, self.resource_type, self.agentpool_decorator_mode + ) def test_get_zones(self): self.common_get_zones() @@ -429,11 +477,16 @@ def test_get_enable_artifact_streaming(self): def test_get_os_sku(self): self.common_get_os_sku() + class AKSPreviewAgentPoolAddDecoratorCommonTestCase(unittest.TestCase): def _remove_defaults_in_agentpool(self, agentpool): self.defaults_in_agentpool = {} for attr_name, attr_value in vars(agentpool).items(): - if not attr_name.startswith("_") and attr_name != "name" and attr_value is not None: + if ( + not attr_name.startswith("_") + and attr_name != "name" + and attr_value is not None + ): self.defaults_in_agentpool[attr_name] = attr_value setattr(agentpool, attr_name, None) return agentpool @@ -445,7 +498,11 @@ def _restore_defaults_in_agentpool(self, agentpool): return agentpool def create_initialized_agentpool_instance( - self, nodepool_name="nodepool1", remove_defaults=True, restore_defaults=True, **kwargs + self, + nodepool_name="nodepool1", + remove_defaults=True, + restore_defaults=True, + **kwargs ): """Helper function to create a properly initialized agentpool instance. @@ -514,7 +571,10 @@ def common_set_up_gpu_propertes(self): dec_1 = AKSPreviewAgentPoolAddDecorator( self.cmd, self.client, - {"gpu_instance_profile": "test_gpu_instance_profile", "workload_runtime": "test_workload_runtime"}, + { + "gpu_instance_profile": "test_gpu_instance_profile", + "workload_runtime": "test_workload_runtime", + }, self.resource_type, self.agentpool_decorator_mode, ) @@ -573,7 +633,10 @@ def common_set_up_artifact_streaming(self): ) self.assertEqual(dec_agentpool_1, ground_truth_agentpool_1) -class AKSPreviewAgentPoolAddDecoratorStandaloneModeTestCase(AKSPreviewAgentPoolAddDecoratorCommonTestCase): + +class AKSPreviewAgentPoolAddDecoratorStandaloneModeTestCase( + AKSPreviewAgentPoolAddDecoratorCommonTestCase +): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW register_aks_preview_resource_type() @@ -581,7 +644,9 @@ def setUp(self): self.cmd = MockCmd(self.cli_ctx) self.resource_type = CUSTOM_MGMT_AKS_PREVIEW self.agentpool_decorator_mode = AgentPoolDecoratorMode.STANDALONE - self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) + self.models = AKSPreviewAgentPoolModels( + self.cmd, self.resource_type, self.agentpool_decorator_mode + ) self.client = MockClient() def test_set_up_preview_vm_properties(self): @@ -669,7 +734,9 @@ def test_construct_agentpool_profile_preview(self): dec_1.context.raw_param.print_usage_statistics() -class AKSPreviewAgentPoolAddDecoratorManagedClusterModeTestCase(AKSPreviewAgentPoolAddDecoratorCommonTestCase): +class AKSPreviewAgentPoolAddDecoratorManagedClusterModeTestCase( + AKSPreviewAgentPoolAddDecoratorCommonTestCase +): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW register_aks_preview_resource_type() @@ -677,7 +744,9 @@ def setUp(self): self.cmd = MockCmd(self.cli_ctx) self.resource_type = CUSTOM_MGMT_AKS_PREVIEW self.agentpool_decorator_mode = AgentPoolDecoratorMode.MANAGED_CLUSTER - self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) + self.models = AKSPreviewAgentPoolModels( + self.cmd, self.resource_type, self.agentpool_decorator_mode + ) self.client = MockClient() def test_set_up_preview_vm_properties(self): @@ -769,7 +838,11 @@ class AKSPreviewAgentPoolUpdateDecoratorCommonTestCase(unittest.TestCase): def _remove_defaults_in_agentpool(self, agentpool): self.defaults_in_agentpool = {} for attr_name, attr_value in vars(agentpool).items(): - if not attr_name.startswith("_") and attr_name != "name" and attr_value is not None: + if ( + not attr_name.startswith("_") + and attr_name != "name" + and attr_value is not None + ): self.defaults_in_agentpool[attr_name] = attr_value setattr(agentpool, attr_name, None) return agentpool @@ -781,7 +854,11 @@ def _restore_defaults_in_agentpool(self, agentpool): return agentpool def create_initialized_agentpool_instance( - self, nodepool_name="nodepool1", remove_defaults=True, restore_defaults=True, **kwargs + self, + nodepool_name="nodepool1", + remove_defaults=True, + restore_defaults=True, + **kwargs ): """Helper function to create a properly initialized agentpool instance. @@ -893,7 +970,9 @@ def common_update_artifact_streaming(self): self.assertEqual(dec_agentpool_2, grond_truth_agentpool_2) -class AKSPreviewAgentPoolUpdateDecoratorStandaloneModeTestCase(AKSPreviewAgentPoolUpdateDecoratorCommonTestCase): +class AKSPreviewAgentPoolUpdateDecoratorStandaloneModeTestCase( + AKSPreviewAgentPoolUpdateDecoratorCommonTestCase +): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW register_aks_preview_resource_type() @@ -901,7 +980,9 @@ def setUp(self): self.cmd = MockCmd(self.cli_ctx) self.resource_type = CUSTOM_MGMT_AKS_PREVIEW self.agentpool_decorator_mode = AgentPoolDecoratorMode.STANDALONE - self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) + self.models = AKSPreviewAgentPoolModels( + self.cmd, self.resource_type, self.agentpool_decorator_mode + ) self.client = MockClient() def test_update_custom_ca_trust(self): @@ -948,7 +1029,9 @@ def test_update_agentpool_profile_preview(self): self.agentpool_decorator_mode, ) self.client.get = Mock( - return_value=self.create_initialized_agentpool_instance(nodepool_name="test_nodepool_name") + return_value=self.create_initialized_agentpool_instance( + nodepool_name="test_nodepool_name" + ) ) dec_agentpool_1 = dec_1.update_agentpool_profile_preview() ground_truth_agentpool_1 = self.create_initialized_agentpool_instance( @@ -959,7 +1042,9 @@ def test_update_agentpool_profile_preview(self): dec_1.context.raw_param.print_usage_statistics() -class AKSPreviewAgentPoolUpdateDecoratorManagedClusterModeTestCase(AKSPreviewAgentPoolUpdateDecoratorCommonTestCase): +class AKSPreviewAgentPoolUpdateDecoratorManagedClusterModeTestCase( + AKSPreviewAgentPoolUpdateDecoratorCommonTestCase +): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW register_aks_preview_resource_type() @@ -967,7 +1052,9 @@ def setUp(self): self.cmd = MockCmd(self.cli_ctx) self.resource_type = CUSTOM_MGMT_AKS_PREVIEW self.agentpool_decorator_mode = AgentPoolDecoratorMode.MANAGED_CLUSTER - self.models = AKSPreviewAgentPoolModels(self.cmd, self.resource_type, self.agentpool_decorator_mode) + self.models = AKSPreviewAgentPoolModels( + self.cmd, self.resource_type, self.agentpool_decorator_mode + ) self.client = MockClient() def test_update_custom_ca_trust(self): 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 d614fbd33ce..a81c18c19b1 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 @@ -8,28 +8,23 @@ import subprocess import tempfile import time -import unittest +from azext_aks_preview._consts import CONST_CUSTOM_CA_TEST_CERT +from azext_aks_preview._format import aks_machine_list_table_format from azext_aks_preview.tests.latest.custom_preparers import ( AKSCustomResourceGroupPreparer, ) -from azext_aks_preview._format import aks_machine_list_table_format - -from azext_aks_preview._consts import ( - CONST_CUSTOM_CA_TEST_CERT, -) from azext_aks_preview.tests.latest.recording_processors import KeyReplacer from azure.cli.command_modules.acs._format import version_to_tuple -from azure.cli.core.azclierror import AzureInternalError, BadRequestError, ClientRequestError +from azure.cli.core.azclierror import ClientRequestError from azure.cli.testsdk import CliTestError, ScenarioTest, live_only from azure.cli.testsdk.scenario_tests import AllowLargeResponse -from azure.core.exceptions import HttpResponseError from knack.util import CLIError def _get_test_data_file(filename): curr_dir = os.path.dirname(os.path.realpath(__file__)) - return os.path.join(curr_dir, 'data', filename) + return os.path.join(curr_dir, "data", filename) class AzureKubernetesServiceScenarioTest(ScenarioTest): @@ -41,19 +36,27 @@ def __init__(self, method_name): def _get_versions(self, location): """Return the previous and current Kubernetes minor release versions, such as ("1.11.6", "1.12.4").""" versions = self.cmd( - "az aks get-versions -l {} --query 'values[*].patchVersions.keys(@)[]'".format(location)).get_output_in_json() + "az aks get-versions -l {} --query 'values[*].patchVersions.keys(@)[]'".format( + location + ) + ).get_output_in_json() # sort by semantic version, from newest to oldest versions = sorted(versions, key=version_to_tuple, reverse=True) upgrade_version = versions[0] # find the first version that doesn't start with the latest major.minor. - prefix = upgrade_version[:upgrade_version.rfind('.')] + prefix = upgrade_version[: upgrade_version.rfind(".")] create_version = next(x for x in versions if not x.startswith(prefix)) return create_version, upgrade_version - def _get_version_in_range(self, location: str, min_version: str, max_version: str) -> str: + def _get_version_in_range( + self, location: str, min_version: str, max_version: str + ) -> str: """Return the version which is greater than min_version and less than max_version.""" versions = self.cmd( - "az aks get-versions -l {} --query 'values[*].patchVersions.keys(@)[]'".format(location)).get_output_in_json() + "az aks get-versions -l {} --query 'values[*].patchVersions.keys(@)[]'".format( + location + ) + ).get_output_in_json() versions = sorted(versions, key=version_to_tuple, reverse=True) for version in versions: if version > min_version and version < max_version: @@ -74,1228 +77,1884 @@ def generate_ssh_keys(cls): acs_base_dir = os.getenv("ACS_BASE_DIR", None) if acs_base_dir: pre_generated_ssh_key_path = os.path.join( - acs_base_dir, "tests/latest/data/.ssh/id_rsa.pub") + acs_base_dir, "tests/latest/data/.ssh/id_rsa.pub" + ) if os.path.exists(pre_generated_ssh_key_path): - return pre_generated_ssh_key_path.replace('\\', '\\\\') + return pre_generated_ssh_key_path.replace("\\", "\\\\") # In the CLI check-in pipeline scenario, the following fake ssh-key will be used. Each test case will read the ssh-key from # a different temporary file during execution, so there will be no race conditions caused by concurrent reading and # writing/creating of the same file. TEST_SSH_KEY_PUB = "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" # pylint: disable=line-too-long _, pathname = tempfile.mkstemp() - with open(pathname, 'w') as key_file: + with open(pathname, "w") as key_file: key_file.write(TEST_SSH_KEY_PUB) - return pathname.replace('\\', '\\\\') + return pathname.replace("\\", "\\\\") @AllowLargeResponse() def test_get_version(self): - versions_cmd = 'aks get-versions -l westus2' + versions_cmd = "aks get-versions -l westus2" versions = self.cmd(versions_cmd).get_output_in_json() assert len(versions["values"]) > 0 @AllowLargeResponse() def test_get_os_options(self): - osOptions_cmd = 'aks get-os-options -l westus2' - self.cmd(osOptions_cmd, checks=[ - self.check( - 'type', 'Microsoft.ContainerService/locations/osOptions') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_create_and_update_with_managed_nat_gateway_outbound(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--outbound-type=managedNATGateway ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.outboundType', 'managedNATGateway'), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--nat-gateway-managed-outbound-ip-count 2 ' \ - '--nat-gateway-idle-timeout 30 ' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.outboundType', 'managedNATGateway'), - self.check( - 'networkProfile.natGatewayProfile.idleTimeoutInMinutes', 30), - self.check( - 'networkProfile.natGatewayProfile.managedOutboundIpProfile.count', 2), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_update_outbound_from_slb_to_natgateway(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--outbound-type=loadbalancer --load-balancer-managed-outbound-ip-count 2 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.outboundType', 'loadBalancer'), - self.check('networkProfile.loadBalancerProfile.managedOutboundIPs.count', 2), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--nat-gateway-managed-outbound-ip-count 2 ' \ - '--nat-gateway-idle-timeout 30 ' \ - '--outbound-type managedNATGateway ' \ - '--aks-custom-header AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-OutBoundTypeMigrationPreview' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.outboundType', 'managedNATGateway'), - self.check('networkProfile.natGatewayProfile.idleTimeoutInMinutes', 30), - self.check('networkProfile.natGatewayProfile.managedOutboundIpProfile.count', 2), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_with_managed_aad(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.managed', True), - self.check( - 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000002 ' \ - '--aad-tenant-id 00000000-0000-0000-0000-000000000003 -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.managed', True), - self.check( - 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000002'), - self.check('aadProfile.tenantId', - '00000000-0000-0000-0000-000000000003') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='canadacentral') - def test_aks_create_aadv1_and_update_with_managed_aad(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--aad-server-app-id 00000000-0000-0000-0000-000000000001 ' \ - '--aad-server-app-secret fake-secret ' \ - '--aad-client-app-id 00000000-0000-0000-0000-000000000002 ' \ - '--aad-tenant-id d5b55040-0c14-48cc-a028-91457fc190d9 ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AADv1AllowCreate ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.managed', None), - self.check('aadProfile.serverAppId', - '00000000-0000-0000-0000-000000000001'), - self.check('aadProfile.clientAppId', - '00000000-0000-0000-0000-000000000002'), - self.check('aadProfile.tenantId', - 'd5b55040-0c14-48cc-a028-91457fc190d9') - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-aad ' \ - '--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000003 ' \ - '--aad-tenant-id 00000000-0000-0000-0000-000000000004 -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.managed', True), - self.check( - 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000003'), - self.check('aadProfile.tenantId', - '00000000-0000-0000-0000-000000000004') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='canadacentral') - def test_aks_create_nonaad_and_update_with_managed_aad(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets --node-count=1 ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile', None) - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-aad ' \ - '--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ - '--aad-tenant-id 00000000-0000-0000-0000-000000000002 -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.managed', True), - self.check( - 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001'), - self.check('aadProfile.tenantId', - '00000000-0000-0000-0000-000000000002') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_with_managed_aad_enable_azure_rbac(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.managed', True), - self.check( - 'aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001') - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-azure-rbac -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.enableAzureRbac', True) - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--disable-azure-rbac -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.enableAzureRbac', False) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_with_node_restriction(self, resource_group, resource_group_location): - specific_version = self._get_version_in_range(resource_group_location, "1.22.0", "1.24.0") - if specific_version == "": - # supported versions do not meet test requirements, skip - return - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'k8s_version': specific_version - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '-k {k8s_version} --enable-node-restriction ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.nodeRestriction.enabled', True), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--disable-node-restriction -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.nodeRestriction.enabled', False) - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-node-restriction -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.nodeRestriction.enabled', True) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_with_vpa(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - _, create_version = self._get_versions(resource_group_location) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'k8s_version': create_version - }) - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--enable-vpa ' \ - '--kubernetes-version={k8s_version} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-VPAPreview ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('workloadAutoScalerProfile.verticalPodAutoscaler.enabled', True), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-VPAPreview ' \ - '--disable-vpa -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('workloadAutoScalerProfile.verticalPodAutoscaler.enabled', False) - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-VPAPreview ' \ - '--enable-vpa -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('workloadAutoScalerProfile.verticalPodAutoscaler.enabled', True) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_ingress_appgw_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '-a ingress-appgw --appgw-subnet-cidr 10.232.0.0/16 ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ingressApplicationGateway.enabled', True), - self.check( - 'addonProfiles.ingressApplicationGateway.config.subnetCIDR', "10.232.0.0/16") - ]) + osOptions_cmd = "aks get-os-options -l westus2" + self.cmd( + osOptions_cmd, + checks=[ + self.check("type", "Microsoft.ContainerService/locations/osOptions") + ], + ) - @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_byo_subnet_with_ingress_appgw_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - vnet_name = self.create_random_name('cliakstest', 16) - appgw_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'vnet_name': vnet_name, - 'appgw_name': appgw_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_create_and_update_with_managed_nat_gateway_outbound( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - # create virtual network - create_vnet = 'network vnet create --resource-group={resource_group} --name={vnet_name} ' \ - '--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json' - vnet = self.cmd(create_vnet, checks=[ - self.check('newVNet.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_subnet = 'network vnet subnet create -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' \ - '--address-prefixes 11.0.1.0/24 -o json' - self.cmd(create_subnet, checks=[ - self.check('provisioningState', 'Succeeded') - ]) - - vnet_id = vnet['newVNet']["id"] - assert vnet_id is not None - self.kwargs.update({ - 'vnet_id': vnet_id, - }) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--outbound-type=managedNATGateway " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.outboundType", "managedNATGateway"), + ], + ) - # create aks cluster - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity ' \ - '--vnet-subnet-id {vnet_id}/subnets/aks-subnet -a ingress-appgw ' \ - '--appgw-name gateway --appgw-subnet-id {vnet_id}/subnets/appgw-subnet ' \ - '--yes --ssh-key-value={ssh_key_value} -o json' - aks_cluster = self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ingressApplicationGateway.enabled', True), - self.check( - 'addonProfiles.ingressApplicationGateway.config.applicationGatewayName', "gateway"), - self.check('addonProfiles.ingressApplicationGateway.config.subnetId', - vnet_id + '/subnets/appgw-subnet') - ]).get_output_in_json() - - addon_client_id = aks_cluster["addonProfiles"]["ingressApplicationGateway"]["identity"]["clientId"] - - self.kwargs.update({ - 'addon_client_id': addon_client_id, - }) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--nat-gateway-managed-outbound-ip-count 2 " + "--nat-gateway-idle-timeout 30 " + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.outboundType", "managedNATGateway"), + self.check("networkProfile.natGatewayProfile.idleTimeoutInMinutes", 30), + self.check( + "networkProfile.natGatewayProfile.managedOutboundIpProfile.count", 2 + ), + ], + ) - @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_byo_appgw_with_ingress_appgw_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - vnet_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'vnet_name': vnet_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - # create virtual network - create_vnet = 'network vnet create --resource-group={resource_group} --name={vnet_name} ' \ - '--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json' - vnet = self.cmd(create_vnet, checks=[ - self.check('newVNet.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_subnet = 'network vnet subnet create -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' \ - '--address-prefixes 11.0.1.0/24 -o json' - self.cmd(create_subnet, checks=[ - self.check('provisioningState', 'Succeeded') - ]) - - show_subnet = 'network vnet subnet show -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' - subnet_details = self.cmd(show_subnet).get_output_in_json() - if subnet_details.get("networkSecurityGroup"): - # clean up nsg set by policy, otherwise would block creating appgw - update_subnet = 'network vnet subnet update -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' \ - '--nsg ""' - self.cmd(update_subnet, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkSecurityGroup', None), - ]) - - vnet_id = vnet['newVNet']["id"] - assert vnet_id is not None - self.kwargs.update({ - 'vnet_id': vnet_id, - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_update_outbound_from_slb_to_natgateway( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - # create public ip for app gateway - create_pip = 'network public-ip create -n appgw-ip -g {resource_group} ' \ - '--allocation-method Static --sku Standard -o json' - self.cmd(create_pip, checks=[ - self.check('publicIp.provisioningState', 'Succeeded') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--outbound-type=loadbalancer --load-balancer-managed-outbound-ip-count 2 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.outboundType", "loadBalancer"), + self.check( + "networkProfile.loadBalancerProfile.managedOutboundIPs.count", 2 + ), + ], + ) - # create app gateway - # add priority since this is a mandatory parameter since 2021-08-01 API version for network operations - create_appgw = 'network application-gateway create -n appgw -g {resource_group} ' \ - '--sku Standard_v2 --public-ip-address appgw-ip --subnet {vnet_id}/subnets/appgw-subnet --priority 1001' - self.cmd(create_appgw) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--nat-gateway-managed-outbound-ip-count 2 " + "--nat-gateway-idle-timeout 30 " + "--outbound-type managedNATGateway " + "--aks-custom-header AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-OutBoundTypeMigrationPreview" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.outboundType", "managedNATGateway"), + self.check("networkProfile.natGatewayProfile.idleTimeoutInMinutes", 30), + self.check( + "networkProfile.natGatewayProfile.managedOutboundIpProfile.count", 2 + ), + ], + ) - # construct group id - from msrestazure.tools import parse_resource_id, resource_id - parsed_vnet_id = parse_resource_id(vnet_id) - group_id = resource_id(subscription=parsed_vnet_id["subscription"], - resource_group=parsed_vnet_id["resource_group"]) - appgw_id = group_id + "/providers/Microsoft.Network/applicationGateways/appgw" + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_with_managed_aad( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - self.kwargs.update({ - 'appgw_id': appgw_id, - 'appgw_group_id': group_id - }) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.managed", True), + self.check( + "aadProfile.adminGroupObjectIDs[0]", + "00000000-0000-0000-0000-000000000001", + ), + ], + ) - # create aks cluster - create_cmd = 'aks create -n {aks_name} -g {resource_group} --enable-managed-identity ' \ - '--vnet-subnet-id {vnet_id}/subnets/aks-subnet ' \ - '-a ingress-appgw --appgw-id {appgw_id} --yes ' \ - '--ssh-key-value={ssh_key_value} -o json' - aks_cluster = self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ingressApplicationGateway.enabled', True), - self.check( - 'addonProfiles.ingressApplicationGateway.config.applicationGatewayId', appgw_id) - ]).get_output_in_json() - - addon_client_id = aks_cluster["addonProfiles"]["ingressApplicationGateway"]["identity"]["clientId"] - - self.kwargs.update({ - 'addon_client_id': addon_client_id, - }) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_openservicemesh_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-OpenServiceMesh ' \ - '-a open-service-mesh --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', True), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000002 " + "--aad-tenant-id 00000000-0000-0000-0000-000000000003 -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.managed", True), + self.check( + "aadProfile.adminGroupObjectIDs[0]", + "00000000-0000-0000-0000-000000000002", + ), + self.check( + "aadProfile.tenantId", "00000000-0000-0000-0000-000000000003" + ), + ], + ) - @live_only() # live only is required for test environment setup like `az login` @AllowLargeResponse() - def test_aks_addon_list_available(self): - list_available_cmd = 'aks addon list-available -o json' - addon_list = self.cmd(list_available_cmd).get_output_in_json() - assert len(addon_list) == 11 - assert addon_list[0]['name'] == "http_application_routing" - assert addon_list[1]['name'] == "monitoring" - assert addon_list[2]['name'] == "virtual-node" - assert addon_list[3]['name'] == "kube-dashboard" - assert addon_list[4]['name'] == "azure-policy" - assert addon_list[5]['name'] == "ingress-appgw" - assert addon_list[6]['name'] == "confcom" - assert addon_list[7]['name'] == "open-service-mesh" - assert addon_list[8]['name'] == "azure-keyvault-secrets-provider" - assert addon_list[9]['name'] == "gitops" - assert addon_list[10]['name'] == "web_application_routing" - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_list_all_disabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh', None), - ]) - - list_cmd = 'aks addon list --resource-group={resource_group} --name={name} -o json' - addon_list = self.cmd(list_cmd).get_output_in_json() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="canadacentral" + ) + def test_aks_create_aadv1_and_update_with_managed_aad( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - assert len(addon_list) > 0 + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--aad-server-app-id 00000000-0000-0000-0000-000000000001 " + "--aad-server-app-secret fake-secret " + "--aad-client-app-id 00000000-0000-0000-0000-000000000002 " + "--aad-tenant-id d5b55040-0c14-48cc-a028-91457fc190d9 " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AADv1AllowCreate " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.managed", None), + self.check( + "aadProfile.serverAppId", "00000000-0000-0000-0000-000000000001" + ), + self.check( + "aadProfile.clientAppId", "00000000-0000-0000-0000-000000000002" + ), + self.check( + "aadProfile.tenantId", "d5b55040-0c14-48cc-a028-91457fc190d9" + ), + ], + ) - for addon in addon_list: - assert not addon["enabled"] + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-aad " + "--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000003 " + "--aad-tenant-id 00000000-0000-0000-0000-000000000004 -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.managed", True), + self.check( + "aadProfile.adminGroupObjectIDs[0]", + "00000000-0000-0000-0000-000000000003", + ), + self.check( + "aadProfile.tenantId", "00000000-0000-0000-0000-000000000004" + ), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_list_confcom_enabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-a confcom -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - list_cmd = 'aks addon list --resource-group={resource_group} --name={name} -o json' - addon_list = self.cmd(list_cmd).get_output_in_json() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="canadacentral" + ) + def test_aks_create_nonaad_and_update_with_managed_aad( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - assert len(addon_list) > 0 + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets --node-count=1 " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile", None), + ], + ) - for addon in addon_list: - if addon["name"] == "confcom": - assert addon["enabled"] - else: - assert not addon["enabled"] + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-aad " + "--aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 " + "--aad-tenant-id 00000000-0000-0000-0000-000000000002 -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.managed", True), + self.check( + "aadProfile.adminGroupObjectIDs[0]", + "00000000-0000-0000-0000-000000000001", + ), + self.check( + "aadProfile.tenantId", "00000000-0000-0000-0000-000000000002" + ), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_list_openservicemesh_enabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-a open-service-mesh -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', True), - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_with_managed_aad_enable_azure_rbac( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - list_cmd = 'aks addon list --resource-group={resource_group} --name={name} -o json' - addon_list = self.cmd(list_cmd).get_output_in_json() + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.managed", True), + self.check( + "aadProfile.adminGroupObjectIDs[0]", + "00000000-0000-0000-0000-000000000001", + ), + ], + ) - assert len(addon_list) > 0 + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-azure-rbac -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.enableAzureRbac", True), + ], + ) - for addon in addon_list: - if addon["name"] == "open-service-mesh": - assert addon["enabled"] - else: - assert not addon["enabled"] + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--disable-azure-rbac -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.enableAzureRbac", False), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_show_all_disabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh', None), - ]) - - show_cmd = 'aks addon show --resource-group={resource_group} --name={name} ' \ - '-a open-service-mesh -o json' - - with self.assertRaisesRegexp(CLIError, 'Addon "open-service-mesh" is not enabled in this cluster.'): - self.cmd(show_cmd) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_with_node_restriction( + self, resource_group, resource_group_location + ): + specific_version = self._get_version_in_range( + resource_group_location, "1.22.0", "1.24.0" + ) + if specific_version == "": + # supported versions do not meet test requirements, skip + return + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "k8s_version": specific_version, + } + ) - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_show_confcom_enabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-a confcom -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - show_cmd = 'aks addon show --resource-group={resource_group} --name={name} ' \ - '-a confcom -o json' - - self.cmd(show_cmd, checks=[ - self.check("api_key", "ACCSGXDevicePlugin"), - self.check("name", "confcom"), - self.exists('config') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_show_openservicemesh_enabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-a open-service-mesh -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', True), - ]) - - show_cmd = 'aks addon show --resource-group={resource_group} --name={name} ' \ - '-a open-service-mesh -o json' - - self.cmd(show_cmd, checks=[ - self.check("api_key", "openServiceMesh"), - self.check("name", "open-service-mesh"), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_enable_with_openservicemesh(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh', None), - ]) - - enable_cmd = 'aks addon enable --addon open-service-mesh --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', True), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_disable_openservicemesh(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-a open-service-mesh -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', True), - ]) - - disable_cmd = 'aks addon disable --addon open-service-mesh --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', False), - self.check('addonProfiles.openServiceMesh.config', None) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_enable_with_azurekeyvaultsecretsprovider(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.azureKeyvaultSecretsProvider', None) - ]) - - enable_cmd = 'aks addon enable --addon azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "false") - ]) - - disable_cmd = 'aks addon disable --addon azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', False), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config', None) - ]) - - enable_with_secret_rotation_cmd = 'aks addon enable --addon azure-keyvault-secrets-provider --enable-secret-rotation --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_with_secret_rotation_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "true") - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "-k {k8s_version} --enable-node-restriction " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.nodeRestriction.enabled", True), + ], + ) - # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_enable_confcom_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin', None) - ]) - - enable_cmd = 'aks addon enable --addon confcom --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_disable_confcom_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-a confcom -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - disable_cmd = 'aks addon disable --addon confcom --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', False), - self.check('addonProfiles.ACCSGXDevicePlugin.config', None) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_update_all_disabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} ' \ - '-o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin', None) - ]) - - update_cmd = 'aks addon update --addon confcom --resource-group={resource_group} --name={name} -o json' - with self.assertRaisesRegexp(CLIError, 'Addon "confcom" is not enabled in this cluster.'): - self.cmd(update_cmd) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--disable-node-restriction -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.nodeRestriction.enabled", False), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-node-restriction -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.nodeRestriction.enabled", True), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_update_with_confcom(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin', None) - ]) - - enable_cmd = 'aks addon enable --addon confcom --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - update_cmd = 'aks addon update --resource-group={resource_group} --name={name} ' \ - '-a confcom --enable-sgxquotehelper -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "true") - ]) - - delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(delete_cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_update_with_azurekeyvaultsecretsprovider(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.azureKeyvaultSecretsProvider', None) - ]) - - enable_cmd = 'aks addon enable --addon azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "false") - ]) - - update_with_secret_rotation_cmd = 'aks addon update --addon azure-keyvault-secrets-provider --enable-secret-rotation --resource-group={resource_group} --name={name} -o json' - self.cmd(update_with_secret_rotation_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "true") - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_with_vpa( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + _, create_version = self._get_versions(resource_group_location) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "k8s_version": create_version, + } + ) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--enable-vpa " + "--kubernetes-version={k8s_version} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-VPAPreview " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "workloadAutoScalerProfile.verticalPodAutoscaler.enabled", True + ), + ], + ) - # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_enable_addon_with_openservicemesh(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh', None), - ]) - - enable_cmd = 'aks enable-addons --addons open-service-mesh --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', True), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_disable_addon_openservicemesh(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '-a open-service-mesh --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', True), - ]) - - disable_cmd = 'aks disable-addons --addons open-service-mesh --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh.enabled', False), - self.check('addonProfiles.openServiceMesh.config', None) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_azurekeyvaultsecretsprovider_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '-a azure-keyvault-secrets-provider --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "false"), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval', "2m") - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-VPAPreview " + "--disable-vpa -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "workloadAutoScalerProfile.verticalPodAutoscaler.enabled", False + ), + ], + ) - # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '-a azure-keyvault-secrets-provider --enable-secret-rotation --rotation-poll-interval 30m ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "true"), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval', "30m") - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-VPAPreview " + "--enable-vpa -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "workloadAutoScalerProfile.verticalPodAutoscaler.enabled", True + ), + ], + ) - # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_enable_addon_with_azurekeyvaultsecretsprovider(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.azureKeyvaultSecretsProvider', None) - ]) - - enable_cmd = 'aks enable-addons --addons azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "false") - ]) - - update_enable_cmd = 'aks update --resource-group={resource_group} --name={name} --enable-secret-rotation --rotation-poll-interval 120s -o json' - self.cmd(update_enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "true"), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval', "120s") - ]) - - update_disable_cmd = 'aks update --resource-group={resource_group} --name={name} --disable-secret-rotation -o json' - self.cmd(update_disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "false"), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval', "120s") - ]) - - disable_cmd = 'aks disable-addons --addons azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', False), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config', None) - ]) - - enable_with_secret_rotation_cmd = 'aks enable-addons --addons azure-keyvault-secrets-provider --enable-secret-rotation --rotation-poll-interval 1h --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_with_secret_rotation_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "true"), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval', "1h") - ]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_ingress_appgw_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_confcom_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '-a confcom --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_confcom_addon_helper_enabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '-a confcom --enable-sgxquotehelper --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "true") - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_enable_addons_confcom_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin', None) - ]) - - enable_cmd = 'aks enable-addons --addons confcom --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_disable_addons_confcom_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '-a confcom --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', True), - self.check( - 'addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled', "false") - ]) - - disable_cmd = 'aks disable-addons --addons confcom --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.ACCSGXDevicePlugin.enabled', False), - self.check('addonProfiles.ACCSGXDevicePlugin.config', None) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "-a ingress-appgw --appgw-subnet-cidr 10.232.0.0/16 " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ingressApplicationGateway.enabled", True), + self.check( + "addonProfiles.ingressApplicationGateway.config.subnetCIDR", + "10.232.0.0/16", + ), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_virtual_node_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - vnet_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'vnet_name': vnet_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_byo_subnet_with_ingress_appgw_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + vnet_name = self.create_random_name("cliakstest", 16) + appgw_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "vnet_name": vnet_name, + "appgw_name": appgw_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create virtual network - create_vnet = 'network vnet create --resource-group={resource_group} --name={vnet_name} ' \ - '--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json' - vnet = self.cmd(create_vnet, checks=[ - self.check('newVNet.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_subnet = 'network vnet subnet create -n aci-subnet --resource-group={resource_group} --vnet-name {vnet_name} ' \ - '--address-prefixes 11.0.1.0/24 -o json' - self.cmd(create_subnet, checks=[ - self.check('provisioningState', 'Succeeded') - ]) - - vnet_id = vnet['newVNet']["id"] + create_vnet = ( + "network vnet create --resource-group={resource_group} --name={vnet_name} " + "--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json" + ) + vnet = self.cmd( + create_vnet, checks=[self.check("newVNet.provisioningState", "Succeeded")] + ).get_output_in_json() + + create_subnet = ( + "network vnet subnet create -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} " + "--address-prefixes 11.0.1.0/24 -o json" + ) + self.cmd(create_subnet, checks=[self.check("provisioningState", "Succeeded")]) + + vnet_id = vnet["newVNet"]["id"] assert vnet_id is not None - self.kwargs.update({ - 'vnet_id': vnet_id, - }) + self.kwargs.update( + { + "vnet_id": vnet_id, + } + ) # create aks cluster - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity ' \ - '--vnet-subnet-id {vnet_id}/subnets/aks-subnet --network-plugin azure ' \ - '-a virtual-node --aci-subnet-name aci-subnet --yes ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.aciConnectorLinux.enabled', True), - self.check( - 'addonProfiles.aciConnectorLinux.config.SubnetName', "aci-subnet") - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity " + "--vnet-subnet-id {vnet_id}/subnets/aks-subnet -a ingress-appgw " + "--appgw-name gateway --appgw-subnet-id {vnet_id}/subnets/appgw-subnet " + "--yes --ssh-key-value={ssh_key_value} -o json" + ) + aks_cluster = self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ingressApplicationGateway.enabled", True), + self.check( + "addonProfiles.ingressApplicationGateway.config.applicationGatewayName", + "gateway", + ), + self.check( + "addonProfiles.ingressApplicationGateway.config.subnetId", + vnet_id + "/subnets/appgw-subnet", + ), + ], + ).get_output_in_json() - # list addons - list_cmd = 'aks addon list --resource-group={resource_group} --name={aks_name} -o json' - addon_list = self.cmd(list_cmd).get_output_in_json() + addon_client_id = aks_cluster["addonProfiles"]["ingressApplicationGateway"][ + "identity" + ]["clientId"] - # check virtual node addon - assert len(addon_list) > 0 + self.kwargs.update( + { + "addon_client_id": addon_client_id, + } + ) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_byo_appgw_with_ingress_appgw_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + vnet_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "vnet_name": vnet_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + # create virtual network + create_vnet = ( + "network vnet create --resource-group={resource_group} --name={vnet_name} " + "--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json" + ) + vnet = self.cmd( + create_vnet, checks=[self.check("newVNet.provisioningState", "Succeeded")] + ).get_output_in_json() + + create_subnet = ( + "network vnet subnet create -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} " + "--address-prefixes 11.0.1.0/24 -o json" + ) + self.cmd(create_subnet, checks=[self.check("provisioningState", "Succeeded")]) + + show_subnet = "network vnet subnet show -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} " + subnet_details = self.cmd(show_subnet).get_output_in_json() + if subnet_details.get("networkSecurityGroup"): + # clean up nsg set by policy, otherwise would block creating appgw + update_subnet = ( + "network vnet subnet update -n appgw-subnet --resource-group={resource_group} --vnet-name {vnet_name} " + '--nsg ""' + ) + self.cmd( + update_subnet, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkSecurityGroup", None), + ], + ) + + vnet_id = vnet["newVNet"]["id"] + assert vnet_id is not None + self.kwargs.update( + { + "vnet_id": vnet_id, + } + ) + + # create public ip for app gateway + create_pip = ( + "network public-ip create -n appgw-ip -g {resource_group} " + "--allocation-method Static --sku Standard -o json" + ) + self.cmd( + create_pip, checks=[self.check("publicIp.provisioningState", "Succeeded")] + ) + + # create app gateway + # add priority since this is a mandatory parameter since 2021-08-01 API version for network operations + create_appgw = ( + "network application-gateway create -n appgw -g {resource_group} " + "--sku Standard_v2 --public-ip-address appgw-ip --subnet {vnet_id}/subnets/appgw-subnet --priority 1001" + ) + self.cmd(create_appgw) + + # construct group id + from msrestazure.tools import parse_resource_id, resource_id + + parsed_vnet_id = parse_resource_id(vnet_id) + group_id = resource_id( + subscription=parsed_vnet_id["subscription"], + resource_group=parsed_vnet_id["resource_group"], + ) + appgw_id = group_id + "/providers/Microsoft.Network/applicationGateways/appgw" + + self.kwargs.update({"appgw_id": appgw_id, "appgw_group_id": group_id}) + + # create aks cluster + create_cmd = ( + "aks create -n {aks_name} -g {resource_group} --enable-managed-identity " + "--vnet-subnet-id {vnet_id}/subnets/aks-subnet " + "-a ingress-appgw --appgw-id {appgw_id} --yes " + "--ssh-key-value={ssh_key_value} -o json" + ) + aks_cluster = self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ingressApplicationGateway.enabled", True), + self.check( + "addonProfiles.ingressApplicationGateway.config.applicationGatewayId", + appgw_id, + ), + ], + ).get_output_in_json() + + addon_client_id = aks_cluster["addonProfiles"]["ingressApplicationGateway"][ + "identity" + ]["clientId"] + + self.kwargs.update( + { + "addon_client_id": addon_client_id, + } + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_openservicemesh_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-OpenServiceMesh " + "-a open-service-mesh --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", True), + ], + ) + + @live_only() # live only is required for test environment setup like `az login` + @AllowLargeResponse() + def test_aks_addon_list_available(self): + list_available_cmd = "aks addon list-available -o json" + addon_list = self.cmd(list_available_cmd).get_output_in_json() + assert len(addon_list) == 11 + assert addon_list[0]["name"] == "http_application_routing" + assert addon_list[1]["name"] == "monitoring" + assert addon_list[2]["name"] == "virtual-node" + assert addon_list[3]["name"] == "kube-dashboard" + assert addon_list[4]["name"] == "azure-policy" + assert addon_list[5]["name"] == "ingress-appgw" + assert addon_list[6]["name"] == "confcom" + assert addon_list[7]["name"] == "open-service-mesh" + assert addon_list[8]["name"] == "azure-keyvault-secrets-provider" + assert addon_list[9]["name"] == "gitops" + assert addon_list[10]["name"] == "web_application_routing" + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_list_all_disabled(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} -o json" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh", None), + ], + ) + + list_cmd = ( + "aks addon list --resource-group={resource_group} --name={name} -o json" + ) + addon_list = self.cmd(list_cmd).get_output_in_json() + + assert len(addon_list) > 0 + + for addon in addon_list: + assert not addon["enabled"] + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_list_confcom_enabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-a confcom -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + list_cmd = ( + "aks addon list --resource-group={resource_group} --name={name} -o json" + ) + addon_list = self.cmd(list_cmd).get_output_in_json() + + assert len(addon_list) > 0 + + for addon in addon_list: + if addon["name"] == "confcom": + assert addon["enabled"] + else: + assert not addon["enabled"] + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_list_openservicemesh_enabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-a open-service-mesh -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", True), + ], + ) + + list_cmd = ( + "aks addon list --resource-group={resource_group} --name={name} -o json" + ) + addon_list = self.cmd(list_cmd).get_output_in_json() + + assert len(addon_list) > 0 + + for addon in addon_list: + if addon["name"] == "open-service-mesh": + assert addon["enabled"] + else: + assert not addon["enabled"] + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_show_all_disabled(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} -o json" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh", None), + ], + ) + + show_cmd = ( + "aks addon show --resource-group={resource_group} --name={name} " + "-a open-service-mesh -o json" + ) + + with self.assertRaisesRegexp( + CLIError, 'Addon "open-service-mesh" is not enabled in this cluster.' + ): + self.cmd(show_cmd) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_show_confcom_enabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-a confcom -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + show_cmd = ( + "aks addon show --resource-group={resource_group} --name={name} " + "-a confcom -o json" + ) + + self.cmd( + show_cmd, + checks=[ + self.check("api_key", "ACCSGXDevicePlugin"), + self.check("name", "confcom"), + self.exists("config"), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_show_openservicemesh_enabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-a open-service-mesh -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", True), + ], + ) + + show_cmd = ( + "aks addon show --resource-group={resource_group} --name={name} " + "-a open-service-mesh -o json" + ) + + self.cmd( + show_cmd, + checks=[ + self.check("api_key", "openServiceMesh"), + self.check("name", "open-service-mesh"), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_enable_with_openservicemesh( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} -o json" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh", None), + ], + ) + + enable_cmd = "aks addon enable --addon open-service-mesh --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_disable_openservicemesh( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-a open-service-mesh -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", True), + ], + ) + + disable_cmd = "aks addon disable --addon open-service-mesh --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", False), + self.check("addonProfiles.openServiceMesh.config", None), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_enable_with_azurekeyvaultsecretsprovider( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider", None), + ], + ) + + enable_cmd = "aks addon enable --addon azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "false", + ), + ], + ) + + disable_cmd = "aks addon disable --addon azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", False), + self.check("addonProfiles.azureKeyvaultSecretsProvider.config", None), + ], + ) + + enable_with_secret_rotation_cmd = "aks addon enable --addon azure-keyvault-secrets-provider --enable-secret-rotation --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_with_secret_rotation_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "true", + ), + ], + ) + + # delete + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_enable_confcom_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin", None), + ], + ) + + enable_cmd = "aks addon enable --addon confcom --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_disable_confcom_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-a confcom -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + disable_cmd = "aks addon disable --addon confcom --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", False), + self.check("addonProfiles.ACCSGXDevicePlugin.config", None), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_update_all_disabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity --ssh-key-value={ssh_key_value} " + "-o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin", None), + ], + ) + + update_cmd = "aks addon update --addon confcom --resource-group={resource_group} --name={name} -o json" + with self.assertRaisesRegexp( + CLIError, 'Addon "confcom" is not enabled in this cluster.' + ): + self.cmd(update_cmd) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_update_with_confcom( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin", None), + ], + ) + + enable_cmd = "aks addon enable --addon confcom --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + update_cmd = ( + "aks addon update --resource-group={resource_group} --name={name} " + "-a confcom --enable-sgxquotehelper -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "true", + ), + ], + ) + + delete_cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + delete_cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_update_with_azurekeyvaultsecretsprovider( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider", None), + ], + ) + + enable_cmd = "aks addon enable --addon azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "false", + ), + ], + ) + + update_with_secret_rotation_cmd = "aks addon update --addon azure-keyvault-secrets-provider --enable-secret-rotation --resource-group={resource_group} --name={name} -o json" + self.cmd( + update_with_secret_rotation_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "true", + ), + ], + ) + + # delete + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_enable_addon_with_openservicemesh( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh", None), + ], + ) + + enable_cmd = "aks enable-addons --addons open-service-mesh --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_disable_addon_openservicemesh( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "-a open-service-mesh --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", True), + ], + ) + + disable_cmd = "aks disable-addons --addons open-service-mesh --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh.enabled", False), + self.check("addonProfiles.openServiceMesh.config", None), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_azurekeyvaultsecretsprovider_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "-a azure-keyvault-secrets-provider --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "false", + ), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval", + "2m", + ), + ], + ) + + # delete + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "-a azure-keyvault-secrets-provider --enable-secret-rotation --rotation-poll-interval 30m " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "true", + ), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval", + "30m", + ), + ], + ) + + # delete + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_enable_addon_with_azurekeyvaultsecretsprovider( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider", None), + ], + ) + + enable_cmd = "aks enable-addons --addons azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "false", + ), + ], + ) + + update_enable_cmd = "aks update --resource-group={resource_group} --name={name} --enable-secret-rotation --rotation-poll-interval 120s -o json" + self.cmd( + update_enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "true", + ), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval", + "120s", + ), + ], + ) + + update_disable_cmd = "aks update --resource-group={resource_group} --name={name} --disable-secret-rotation -o json" + self.cmd( + update_disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "false", + ), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval", + "120s", + ), + ], + ) + + disable_cmd = "aks disable-addons --addons azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", False), + self.check("addonProfiles.azureKeyvaultSecretsProvider.config", None), + ], + ) + + enable_with_secret_rotation_cmd = "aks enable-addons --addons azure-keyvault-secrets-provider --enable-secret-rotation --rotation-poll-interval 1h --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_with_secret_rotation_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "true", + ), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.rotationPollInterval", + "1h", + ), + ], + ) + + # delete + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_confcom_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "-a confcom --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_confcom_addon_helper_enabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "-a confcom --enable-sgxquotehelper --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "true", + ), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_enable_addons_confcom_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin", None), + ], + ) + + enable_cmd = "aks enable-addons --addons confcom --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_disable_addons_confcom_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "-a confcom --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", True), + self.check( + "addonProfiles.ACCSGXDevicePlugin.config.ACCSGXQuoteHelperEnabled", + "false", + ), + ], + ) + + disable_cmd = "aks disable-addons --addons confcom --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.ACCSGXDevicePlugin.enabled", False), + self.check("addonProfiles.ACCSGXDevicePlugin.config", None), + ], + ) + + @live_only() + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_virtual_node_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + vnet_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "vnet_name": vnet_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + # create virtual network + create_vnet = ( + "network vnet create --resource-group={resource_group} --name={vnet_name} " + "--address-prefix 11.0.0.0/16 --subnet-name aks-subnet --subnet-prefix 11.0.0.0/24 -o json" + ) + vnet = self.cmd( + create_vnet, checks=[self.check("newVNet.provisioningState", "Succeeded")] + ).get_output_in_json() + + create_subnet = ( + "network vnet subnet create -n aci-subnet --resource-group={resource_group} --vnet-name {vnet_name} " + "--address-prefixes 11.0.1.0/24 -o json" + ) + self.cmd(create_subnet, checks=[self.check("provisioningState", "Succeeded")]) + + vnet_id = vnet["newVNet"]["id"] + assert vnet_id is not None + self.kwargs.update( + { + "vnet_id": vnet_id, + } + ) + + # create aks cluster + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --enable-managed-identity " + "--vnet-subnet-id {vnet_id}/subnets/aks-subnet --network-plugin azure " + "-a virtual-node --aci-subnet-name aci-subnet --yes " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.aciConnectorLinux.enabled", True), + self.check( + "addonProfiles.aciConnectorLinux.config.SubnetName", "aci-subnet" + ), + ], + ) + + # list addons + list_cmd = ( + "aks addon list --resource-group={resource_group} --name={aks_name} -o json" + ) + addon_list = self.cmd(list_cmd).get_output_in_json() + + # check virtual node addon + assert len(addon_list) > 0 for addon in addon_list: if addon["name"] == "virtual-node": assert addon["enabled"] @@ -1303,899 +1962,1250 @@ def test_aks_create_with_virtual_node_addon(self, resource_group, resource_group assert not addon["enabled"] # delete - cmd = 'aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = "aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait" + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_stop_and_start(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - stop_cmd = 'aks stop --resource-group={resource_group} --name={name}' + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + stop_cmd = "aks stop --resource-group={resource_group} --name={name}" self.cmd(stop_cmd) - start_cmd = 'aks start --resource-group={resource_group} --name={name}' + start_cmd = "aks start --resource-group={resource_group} --name={name}" self.cmd(start_cmd) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_stop_and_start_private_cluster(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_stop_and_start_private_cluster( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} --enable-private-cluster' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} --enable-private-cluster" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) - stop_cmd = 'aks stop --resource-group={resource_group} --name={name}' + stop_cmd = "aks stop --resource-group={resource_group} --name={name}" self.cmd(stop_cmd) - start_cmd = 'aks start --resource-group={resource_group} --name={name}' + start_cmd = "aks start --resource-group={resource_group} --name={name}" self.cmd(start_cmd) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) def test_aks_abort(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} --no-wait' + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} --no-wait" self.cmd(create_cmd) - abort_cmd = 'aks operation-abort --resource-group={resource_group} --name={name}' + abort_cmd = ( + "aks operation-abort --resource-group={resource_group} --name={name}" + ) self.cmd(abort_cmd, checks=[self.is_empty()]) time.sleep(10) - show_cmd = 'aks show --resource-group={resource_group} --name={name}' - self.cmd(show_cmd, checks=[self.check('provisioningState', 'Canceled')]) + show_cmd = "aks show --resource-group={resource_group} --name={name}" + self.cmd(show_cmd, checks=[self.check("provisioningState", "Canceled")]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_nodepool_abort(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets --node-count=1 ' \ - '--ssh-key-value={ssh_key_value} ' \ - '-o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets --node-count=1 " + "--ssh-key-value={ssh_key_value} " + "-o json" + ) + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # add nodepool - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={node_pool_name} --node-count=2', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={node_pool_name} --node-count=2", + checks=[self.check("provisioningState", "Succeeded")], + ) # stop nodepool - self.cmd('aks nodepool stop --no-wait --resource-group={resource_group} --cluster-name={name} --nodepool-name={node_pool_name} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/PreviewStartStopAgentPool') + self.cmd( + "aks nodepool stop --no-wait --resource-group={resource_group} --cluster-name={name} --nodepool-name={node_pool_name} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/PreviewStartStopAgentPool" + ) - abort_cmd = 'aks nodepool operation-abort --resource-group={resource_group} --cluster-name={name} --nodepool-name={node_pool_name}' + abort_cmd = "aks nodepool operation-abort --resource-group={resource_group} --cluster-name={name} --nodepool-name={node_pool_name}" self.cmd(abort_cmd, checks=[self.is_empty()]) time.sleep(10) - get_nodepool_cmd = 'aks nodepool show ' \ - '--resource-group={resource_group} ' \ - '--cluster-name={name} ' \ - '-n {node_pool_name} ' - self.cmd(get_nodepool_cmd, checks=[ - self.check('provisioningState', 'Canceled'), - self.check('powerState.code', 'Running') - ]) + get_nodepool_cmd = ( + "aks nodepool show " + "--resource-group={resource_group} " + "--cluster-name={name} " + "-n {node_pool_name} " + ) + self.cmd( + get_nodepool_cmd, + checks=[ + self.check("provisioningState", "Canceled"), + self.check("powerState.code", "Running"), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_machine_cmds(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-managed-identity ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.openServiceMesh', None), - ]) - - node_pool_name = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-managed-identity " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.openServiceMesh", None), + ], + ) + + node_pool_name = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # add nodepool - self.cmd('aks nodepool add ' \ - ' --resource-group={resource_group} ' \ - ' --cluster-name={name} ' \ - ' --name={node_pool_name} --node-count=2', checks=[ - self.check('provisioningState', 'Succeeded') - ]) - - list_cmd = 'aks machine list ' \ - ' --resource-group={resource_group} ' \ - ' --cluster-name={name} --nodepool-name={node_pool_name} -o json' + self.cmd( + "aks nodepool add " + " --resource-group={resource_group} " + " --cluster-name={name} " + " --name={node_pool_name} --node-count=2", + checks=[self.check("provisioningState", "Succeeded")], + ) + + list_cmd = ( + "aks machine list " + " --resource-group={resource_group} " + " --cluster-name={name} --nodepool-name={node_pool_name} -o json" + ) machine_list = self.cmd(list_cmd).get_output_in_json() assert len(machine_list) == 2 aks_machine_list_table_format(machine_list) machine_name = machine_list[0]["name"] - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'machine_name': machine_name, - }) - show_cmd = 'aks machine show '\ - '--resource-group={resource_group} --cluster-name={name} ' \ - '--nodepool-name={node_pool_name} --machine-name={machine_name} -o json' + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "ssh_key_value": self.generate_ssh_keys(), + "machine_name": machine_name, + } + ) + show_cmd = ( + "aks machine show " + "--resource-group={resource_group} --cluster-name={name} " + "--nodepool-name={node_pool_name} --machine-name={machine_name} -o json" + ) machine_show = self.cmd(show_cmd).get_output_in_json() assert machine_show["name"] == machine_name - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_with_guardrails(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--guardrails-level Warning --guardrails-version "v1.0.0" ' \ - '--enable-addons azure-policy --ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/GuardrailsPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('guardrailsProfile.level', 'Warning'), - self.check('guardrailsProfile.version','v1.0.0') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + '--guardrails-level Warning --guardrails-version "v1.0.0" ' + "--enable-addons azure-policy --ssh-key-value={ssh_key_value} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/GuardrailsPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("guardrailsProfile.level", "Warning"), + self.check("guardrailsProfile.version", "v1.0.0"), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_update_with_guardrails(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} ' \ - '--enable-addons azure-policy ' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--guardrails-level Warning --guardrails-version "v1.0.0" ' \ - '--guardrails-excluded-ns test-ns1 ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/GuardrailsPreview' - - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('guardrailsProfile.level', 'Warning'), - self.check('guardrailsProfile.version','v1.0.0'), - self.check('guardrailsProfile.excludedNamespaces[0]','test-ns1') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_managed_disk(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--node-osdisk-type=Managed ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].osDiskType', 'Managed'), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_ephemeral_disk(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--node-osdisk-type=Ephemeral --node-osdisk-size 60 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].osDiskType', 'Ephemeral'), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} " + "--enable-addons azure-policy " + ) + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + '--guardrails-level Warning --guardrails-version "v1.0.0" ' + "--guardrails-excluded-ns test-ns1 " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/GuardrailsPreview" + ) + + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("guardrailsProfile.level", "Warning"), + self.check("guardrailsProfile.version", "v1.0.0"), + self.check("guardrailsProfile.excludedNamespaces[0]", "test-ns1"), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_managed_disk( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--node-osdisk-type=Managed " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].osDiskType", "Managed"), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_ephemeral_disk( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--node-osdisk-type=Ephemeral --node-osdisk-size 60 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].osDiskType", "Ephemeral"), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) def test_aks_create_with_ossku(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--os-sku CBLMariner ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].osSku', 'CBLMariner'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--os-sku CBLMariner " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].osSku", "CBLMariner"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_nodepool_add_with_workload_runtime(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name_second} ' - '--workload-runtime WasmWasi', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('workloadRuntime', 'WasmWasi'), - ]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_nodepool_add_with_workload_runtime( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name_second} " + "--workload-runtime WasmWasi", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("workloadRuntime", "WasmWasi"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) def test_aks_nodepool_add_with_ossku(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool get-upgrades - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name_second} ' - '--os-sku CBLMariner', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('osSku', 'CBLMariner'), - ]) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name_second} " + "--os-sku CBLMariner", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("osSku", "CBLMariner"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_nodepool_add_with_ossku_windows2022(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_nodepool_add_with_ossku_windows2022( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) + aks_name = self.create_random_name("cliakstest", 16) _, create_version = self._get_versions(resource_group_location) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': 'replace-Password1234$', - 'windows_nodepool_name': 'npwin', - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys() - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": "replace-Password1234$", + "windows_nodepool_name": "npwin", + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ - '--ssh-key-value={ssh_key_value} --kubernetes-version={k8s_version}' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure " + "--ssh-key-value={ssh_key_value} --kubernetes-version={k8s_version}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + ], + ) # add Windows2022 nodepool - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={windows_nodepool_name} ' - '--node-count=1 ' - '--os-type Windows ' - '--os-sku Windows2022 ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSWindows2022Preview', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('osSku', 'Windows2022'), - ]) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={windows_nodepool_name} " + "--node-count=1 " + "--os-type Windows " + "--os-sku Windows2022 " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSWindows2022Preview", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("osSku", "Windows2022"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_nodepool_add_with_disable_windows_outbound_nat(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_nodepool_add_with_disable_windows_outbound_nat( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) + aks_name = self.create_random_name("cliakstest", 16) _, create_version = self._get_versions(resource_group_location) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': 'replace-Password1234$', - 'windows_nodepool_name': 'npwin', - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys() - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": "replace-Password1234$", + "windows_nodepool_name": "npwin", + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ - '--ssh-key-value={ssh_key_value} --kubernetes-version={k8s_version} ' \ - '--outbound-type=managedNATGateway ' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure " + "--ssh-key-value={ssh_key_value} --kubernetes-version={k8s_version} " + "--outbound-type=managedNATGateway " + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + ], + ) # add Windows2019 nodepool # Windows2022 does not support this feature yet - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={windows_nodepool_name} ' - '--node-count=1 ' - '--os-type Windows ' - '--os-sku Windows2019 ' - '--disable-windows-outbound-nat ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/DisableWindowsOutboundNATPreview', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.disableOutboundNat', True), - ]) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={windows_nodepool_name} " + "--node-count=1 " + "--os-type Windows " + "--os-sku Windows2019 " + "--disable-windows-outbound-nat " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/DisableWindowsOutboundNATPreview", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.disableOutboundNat", True), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_create_add_nodepool_with_motd(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'ssh_key_value': self.generate_ssh_keys(), - 'message_of_the_day': _get_test_data_file("motd.txt") - }) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_create_add_nodepool_with_motd( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "ssh_key_value": self.generate_ssh_keys(), + "message_of_the_day": _get_test_data_file("motd.txt"), + } + ) # 1. create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--message-of-the-day={message_of_the_day}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].messageOfTheDay', 'VU5BVVRIT1JJWkVEIEFDQ0VTUyBUTyBUSElTIERFVklDRSBJUyBQUk9ISUJJVEVECgpZb3UgbXVzdCBoYXZlIGV4cGxpY2l0LCBhdXRob3JpemVkIHBlcm1pc3Npb24gdG8gYWNjZXNzIG9yIGNvbmZpZ3VyZSB0aGlzIGRldmljZS4gVW5hdXRob3JpemVkIGF0dGVtcHRzIGFuZCBhY3Rpb25zIHRvIGFjY2VzcyBvciB1c2UgdGhpcyBzeXN0ZW0gbWF5IHJlc3VsdCBpbiBjaXZpbCBhbmQvb3IgY3JpbWluYWwgcGVuYWx0aWVzLiBBbGwgYWN0aXZpdGllcyBwZXJmb3JtZWQgb24gdGhpcyBkZXZpY2UgYXJlIGxvZ2dlZCBhbmQgbW9uaXRvcmVkLgo=') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value} " + "--message-of-the-day={message_of_the_day}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[0].messageOfTheDay", + "VU5BVVRIT1JJWkVEIEFDQ0VTUyBUTyBUSElTIERFVklDRSBJUyBQUk9ISUJJVEVECgpZb3UgbXVzdCBoYXZlIGV4cGxpY2l0LCBhdXRob3JpemVkIHBlcm1pc3Npb24gdG8gYWNjZXNzIG9yIGNvbmZpZ3VyZSB0aGlzIGRldmljZS4gVW5hdXRob3JpemVkIGF0dGVtcHRzIGFuZCBhY3Rpb25zIHRvIGFjY2VzcyBvciB1c2UgdGhpcyBzeXN0ZW0gbWF5IHJlc3VsdCBpbiBjaXZpbCBhbmQvb3IgY3JpbWluYWwgcGVuYWx0aWVzLiBBbGwgYWN0aXZpdGllcyBwZXJmb3JtZWQgb24gdGhpcyBkZXZpY2UgYXJlIGxvZ2dlZCBhbmQgbW9uaXRvcmVkLgo=", + ), + ], + ) # nodepool get-upgrades - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name_second} ' - '--message-of-the-day={message_of_the_day}', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('messageOfTheDay', 'VU5BVVRIT1JJWkVEIEFDQ0VTUyBUTyBUSElTIERFVklDRSBJUyBQUk9ISUJJVEVECgpZb3UgbXVzdCBoYXZlIGV4cGxpY2l0LCBhdXRob3JpemVkIHBlcm1pc3Npb24gdG8gYWNjZXNzIG9yIGNvbmZpZ3VyZSB0aGlzIGRldmljZS4gVW5hdXRob3JpemVkIGF0dGVtcHRzIGFuZCBhY3Rpb25zIHRvIGFjY2VzcyBvciB1c2UgdGhpcyBzeXN0ZW0gbWF5IHJlc3VsdCBpbiBjaXZpbCBhbmQvb3IgY3JpbWluYWwgcGVuYWx0aWVzLiBBbGwgYWN0aXZpdGllcyBwZXJmb3JtZWQgb24gdGhpcyBkZXZpY2UgYXJlIGxvZ2dlZCBhbmQgbW9uaXRvcmVkLgo=') - ]) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name_second} " + "--message-of-the-day={message_of_the_day}", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "messageOfTheDay", + "VU5BVVRIT1JJWkVEIEFDQ0VTUyBUTyBUSElTIERFVklDRSBJUyBQUk9ISUJJVEVECgpZb3UgbXVzdCBoYXZlIGV4cGxpY2l0LCBhdXRob3JpemVkIHBlcm1pc3Npb24gdG8gYWNjZXNzIG9yIGNvbmZpZ3VyZSB0aGlzIGRldmljZS4gVW5hdXRob3JpemVkIGF0dGVtcHRzIGFuZCBhY3Rpb25zIHRvIGFjY2VzcyBvciB1c2UgdGhpcyBzeXN0ZW0gbWF5IHJlc3VsdCBpbiBjaXZpbCBhbmQvb3IgY3JpbWluYWwgcGVuYWx0aWVzLiBBbGwgYWN0aXZpdGllcyBwZXJmb3JtZWQgb24gdGhpcyBkZXZpY2UgYXJlIGxvZ2dlZCBhbmQgbW9uaXRvcmVkLgo=", + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) def test_aks_custom_ca_trust_flow(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # 1. create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--enable-custom-ca-trust' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].enableCustomCaTrust', 'True') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value} " + "--enable-custom-ca-trust" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].enableCustomCaTrust", "True"), + ], + ) # 2. add nodepool - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name_second} ' - '--os-type Linux ' - '--enable-custom-ca-trust', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('enableCustomCaTrust', 'True'), - ]) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name_second} " + "--os-type Linux " + "--enable-custom-ca-trust", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("enableCustomCaTrust", "True"), + ], + ) # delete - self.cmd('aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_create_add_nodepool_with_custom_ca_trust_certificates(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'ssh_key_value': self.generate_ssh_keys(), - 'custom_ca_trust_certificates': _get_test_data_file("certs.txt") - }) + self.cmd( + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_create_add_nodepool_with_custom_ca_trust_certificates( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "ssh_key_value": self.generate_ssh_keys(), + "custom_ca_trust_certificates": _get_test_data_file("certs.txt"), + } + ) # 1. create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomCATrustPreview ' \ - '--custom-ca-trust-certificates={custom_ca_trust_certificates}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.customCaTrustCertificates', [CONST_CUSTOM_CA_TEST_CERT for _ in range(2)]), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomCATrustPreview " + "--custom-ca-trust-certificates={custom_ca_trust_certificates}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "securityProfile.customCaTrustCertificates", + [CONST_CUSTOM_CA_TEST_CERT for _ in range(2)], + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_nodepool_drain_timeout(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - np_name = self.create_random_name('clinp', 12) - self.kwargs.update({ - 'name': aks_name, - 'resource_group': resource_group, - 'nodepool_name': np_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + np_name = self.create_random_name("clinp", 12) + self.kwargs.update( + { + "name": aks_name, + "resource_group": resource_group, + "nodepool_name": np_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--ssh-key-value={ssh_key_value} -c 1' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - add_nodepool_cmd = 'aks nodepool add -g {resource_group} --cluster-name {name} -n {nodepool_name} ' \ - '--mode user --drain-timeout 10' - self.cmd(add_nodepool_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('upgradeSettings.drainTimeoutInMinutes', 10), - ]) - - update_nodepool_cmd = 'aks nodepool update -g {resource_group} --cluster-name {name} -n {nodepool_name} ' \ - '--drain-timeout 60' - self.cmd(update_nodepool_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('upgradeSettings.drainTimeoutInMinutes', 60), - ]) - - #actually running an upgrade is too expensive for these tests. + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--ssh-key-value={ssh_key_value} -c 1" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + add_nodepool_cmd = ( + "aks nodepool add -g {resource_group} --cluster-name {name} -n {nodepool_name} " + "--mode user --drain-timeout 10" + ) + self.cmd( + add_nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("upgradeSettings.drainTimeoutInMinutes", 10), + ], + ) + + update_nodepool_cmd = ( + "aks nodepool update -g {resource_group} --cluster-name {name} -n {nodepool_name} " + "--drain-timeout 60" + ) + self.cmd( + update_nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("upgradeSettings.drainTimeoutInMinutes", 60), + ], + ) + + # actually running an upgrade is too expensive for these tests. # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_nodepool_node_soak_duration(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - np_name = self.create_random_name('clinp', 12) - self.kwargs.update({ - 'name': aks_name, - 'resource_group': resource_group, - 'nodepool_name': np_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_nodepool_node_soak_duration( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + np_name = self.create_random_name("clinp", 12) + self.kwargs.update( + { + "name": aks_name, + "resource_group": resource_group, + "nodepool_name": np_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--ssh-key-value={ssh_key_value} -c 1' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - add_nodepool_cmd = 'aks nodepool add -g {resource_group} --cluster-name {name} -n {nodepool_name} ' \ - '--mode user --node-soak-duration 5' - self.cmd(add_nodepool_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('upgradeSettings.nodeSoakDurationInMinutes', 5), - ]) - - update_nodepool_cmd = 'aks nodepool update -g {resource_group} --cluster-name {name} -n {nodepool_name} ' \ - '--node-soak-duration 10' - self.cmd(update_nodepool_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('upgradeSettings.nodeSoakDurationInMinutes', 10), - ]) - - #actually running an upgrade is too expensive for these tests. + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--ssh-key-value={ssh_key_value} -c 1" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + add_nodepool_cmd = ( + "aks nodepool add -g {resource_group} --cluster-name {name} -n {nodepool_name} " + "--mode user --node-soak-duration 5" + ) + self.cmd( + add_nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("upgradeSettings.nodeSoakDurationInMinutes", 5), + ], + ) + + update_nodepool_cmd = ( + "aks nodepool update -g {resource_group} --cluster-name {name} -n {nodepool_name} " + "--node-soak-duration 10" + ) + self.cmd( + update_nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("upgradeSettings.nodeSoakDurationInMinutes", 10), + ], + ) + + # actually running an upgrade is too expensive for these tests. # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) def test_aks_nodepool_stop_and_start(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'nodepool_name': nodepool_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "nodepool_name": nodepool_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create aks cluster - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # add nodepool - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool_name} --node-count=2', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool_name} --node-count=2", + checks=[self.check("provisioningState", "Succeeded")], + ) # stop nodepool - self.cmd('aks nodepool stop --resource-group={resource_group} --cluster-name={name} --nodepool-name={nodepool_name} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/PreviewStartStopAgentPool', checks=[ - self.check('powerState.code', 'Stopped') - ]) + self.cmd( + "aks nodepool stop --resource-group={resource_group} --cluster-name={name} --nodepool-name={nodepool_name} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/PreviewStartStopAgentPool", + checks=[self.check("powerState.code", "Stopped")], + ) # start nodepool - self.cmd('aks nodepool start --resource-group={resource_group} --cluster-name={name} --nodepool-name={nodepool_name} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/PreviewStartStopAgentPool', checks=[ - self.check('powerState.code', 'Running') - ]) + self.cmd( + "aks nodepool start --resource-group={resource_group} --cluster-name={name} --nodepool-name={nodepool_name} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/PreviewStartStopAgentPool", + checks=[self.check("powerState.code", "Running")], + ) # delete AKS cluster self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_nodepool_add_with_gpu_instance_profile(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_nodepool_add_with_gpu_instance_profile( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool get-upgrades - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name_second} ' - '--gpu-instance-profile=MIG3g ' - '-c 1 ' - '--aks-custom-headers UseGPUDedicatedVHD=true ' - '--node-vm-size=standard_nd96asr_v4', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('gpuInstanceProfile', 'MIG3g'), - ]) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name_second} " + "--gpu-instance-profile=MIG3g " + "-c 1 " + "--aks-custom-headers UseGPUDedicatedVHD=true " + "--node-vm-size=standard_nd96asr_v4", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("gpuInstanceProfile", "MIG3g"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_nodepool_get_upgrades(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool get-upgrades - self.cmd('aks nodepool get-upgrades ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--nodepool-name={node_pool_name}', - checks=[ - # if rerun the recording, please update latestNodeImageVersion to the latest value - self.check_pattern('latestNodeImageVersion', - 'AKSUbuntu-(\d{{2}})04gen2containerd-202([0-9])(0[1-9]|1[012]).(0[1-9]|[12]\d|3[01]).(\d)'), - self.check( - 'type', "Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles") - ]) + self.cmd( + "aks nodepool get-upgrades " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--nodepool-name={node_pool_name}", + checks=[ + self.exists("latestNodeImageVersion"), + self.check( + "type", + "Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles", + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2') - def test_aks_nodepool_delete_with_ignore_pod_disruption_budget(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - node_pool_name_third = self.create_random_name('c', 6) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'node_pool_name_third': node_pool_name_third, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '-c 1 ' - '--name={node_pool_name_second}', - checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '-c 1 ' - '--name={node_pool_name_third}', - checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus2" + ) + def test_aks_nodepool_delete_with_ignore_pod_disruption_budget( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + node_pool_name_third = self.create_random_name("c", 6) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "node_pool_name_third": node_pool_name_third, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--nodepool-name {node_pool_name} -c 1 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "-c 1 " + "--name={node_pool_name_second}", + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "-c 1 " + "--name={node_pool_name_third}", + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool delete the third self.cmd( - 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={node_pool_name_third} --ignore-pod-disruption-budget=false --no-wait', checks=[self.is_empty()]) + "aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={node_pool_name_third} --ignore-pod-disruption-budget=false --no-wait", + checks=[self.is_empty()], + ) # nodepool delete the second self.cmd( - 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={node_pool_name_second} --ignore-pod-disruption-budget=true', checks=[self.is_empty()]) - + "aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={node_pool_name_second} --ignore-pod-disruption-budget=true", + checks=[self.is_empty()], + ) # delete the cluster self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_nodepool_snapshot(self, resource_group, resource_group_location): - create_version, upgrade_version = self._get_versions( - resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - aks_name2 = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('c', 6) - nodepool_name2 = self.create_random_name('c', 6) - snapshot_name = self.create_random_name('s', 16) + create_version, upgrade_version = self._get_versions(resource_group_location) + aks_name = self.create_random_name("cliakstest", 16) + aks_name2 = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("c", 6) + nodepool_name2 = self.create_random_name("c", 6) + snapshot_name = self.create_random_name("s", 16) tagVar = "test" tagVal = "value" - tags = tagVar+"="+tagVal - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'aks_name2': aks_name2, - 'location': resource_group_location, - 'nodepool_name': nodepool_name, - 'nodepool_name2': nodepool_name2, - 'snapshot_name': snapshot_name, - 'k8s_version': create_version, - 'upgrade_k8s_version': upgrade_version, - 'ssh_key_value': self.generate_ssh_keys(), - 'tags': tags - }) + tags = tagVar + "=" + tagVal + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "aks_name2": aks_name2, + "location": resource_group_location, + "nodepool_name": nodepool_name, + "nodepool_name2": nodepool_name2, + "snapshot_name": snapshot_name, + "k8s_version": create_version, + "upgrade_k8s_version": upgrade_version, + "ssh_key_value": self.generate_ssh_keys(), + "tags": tags, + } + ) # create an aks cluster not using snapshot - create_cmd = 'aks create --resource-group {resource_group} --name {name} --location {location} ' \ - '--nodepool-name {nodepool_name} ' \ - '--node-count 1 ' \ - '--ssh-key-value={ssh_key_value} -o json' - response = self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]).get_output_in_json() + create_cmd = ( + "aks create --resource-group {resource_group} --name {name} --location {location} " + "--nodepool-name {nodepool_name} " + "--node-count 1 " + "--ssh-key-value={ssh_key_value} -o json" + ) + response = self.cmd( + create_cmd, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() cluster_resource_id = response["id"] assert cluster_resource_id is not None nodepool_resource_id = cluster_resource_id + "/agentPools/" + nodepool_name - self.kwargs.update({ - 'nodepool_resource_id': nodepool_resource_id, - }) + self.kwargs.update( + { + "nodepool_resource_id": nodepool_resource_id, + } + ) print("The nodepool resource id %s " % nodepool_resource_id) # create snapshot from the nodepool - create_snapshot_cmd = 'aks nodepool snapshot create --resource-group {resource_group} --name {snapshot_name} --location {location} ' \ - '--nodepool-id {nodepool_resource_id} -o json' - response = self.cmd(create_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', nodepool_resource_id) - ]).get_output_in_json() + create_snapshot_cmd = ( + "aks nodepool snapshot create --resource-group {resource_group} --name {snapshot_name} --location {location} " + "--nodepool-id {nodepool_resource_id} -o json" + ) + response = self.cmd( + create_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", nodepool_resource_id)], + ).get_output_in_json() snapshot_resource_id = response["id"] assert snapshot_resource_id is not None - self.kwargs.update({ - 'snapshot_resource_id': snapshot_resource_id, - }) + self.kwargs.update( + { + "snapshot_resource_id": snapshot_resource_id, + } + ) print("The snapshot resource id %s " % snapshot_resource_id) # update tags on nodepool snapshot - update_snapshot_cmd = 'aks nodepool snapshot update --resource-group {resource_group} --name {snapshot_name} --tags {tags} -o json' - response = self.cmd(update_snapshot_cmd, checks=[ - self.check('tags', {tagVar: tagVal}) - ]).get_output_in_json() + update_snapshot_cmd = "aks nodepool snapshot update --resource-group {resource_group} --name {snapshot_name} --tags {tags} -o json" + response = self.cmd( + update_snapshot_cmd, checks=[self.check("tags", {tagVar: tagVal})] + ).get_output_in_json() # delete the original AKS cluster self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # show the snapshot - show_snapshot_cmd = 'aks nodepool snapshot show --resource-group {resource_group} --name {snapshot_name} -o json' - response = self.cmd(show_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', nodepool_resource_id) - ]).get_output_in_json() + show_snapshot_cmd = "aks nodepool snapshot show --resource-group {resource_group} --name {snapshot_name} -o json" + response = self.cmd( + show_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", nodepool_resource_id)], + ).get_output_in_json() # list the snapshots - list_snapshot_cmd = 'aks nodepool snapshot list --resource-group {resource_group} -o json' + list_snapshot_cmd = ( + "aks nodepool snapshot list --resource-group {resource_group} -o json" + ) 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 --snapshot-id {snapshot_resource_id} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'agentPoolProfiles[0].creationData.sourceResourceId', snapshot_resource_id) - ]).get_output_in_json() + create_cmd = ( + "aks create --resource-group {resource_group} --name {aks_name2} --location {location} " + "--nodepool-name {nodepool_name} " + "--node-count 1 --snapshot-id {snapshot_resource_id} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[0].creationData.sourceResourceId", + snapshot_resource_id, + ), + ], + ).get_output_in_json() # add a new nodepool to this cluster using this snapshot - add_nodepool_cmd = 'aks nodepool add --resource-group={resource_group} --cluster-name={aks_name2} --name={nodepool_name2} --node-count 1 ' \ - '--snapshot-id {snapshot_resource_id} -o json' - self.cmd(add_nodepool_cmd, - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('creationData.sourceResourceId', - snapshot_resource_id) - ]) + add_nodepool_cmd = ( + "aks nodepool add --resource-group={resource_group} --cluster-name={aks_name2} --name={nodepool_name2} --node-count 1 " + "--snapshot-id {snapshot_resource_id} -o json" + ) + self.cmd( + add_nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("creationData.sourceResourceId", snapshot_resource_id), + ], + ) # upgrade the nodepool2 using this snapshot again # upgrade_node_image_only_nodepool_cmd = 'aks nodepool upgrade ' \ @@ -2217,315 +3227,393 @@ def test_aks_nodepool_snapshot(self, resource_group, resource_group_location): # delete the 2nd AKS cluster self.cmd( - 'aks delete -g {resource_group} -n {aks_name2} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {aks_name2} --yes --no-wait", + checks=[self.is_empty()], + ) # delete the snapshot - delete_snapshot_cmd = 'aks nodepool snapshot delete --resource-group {resource_group} --name {snapshot_name} --yes --no-wait' - self.cmd(delete_snapshot_cmd, checks=[ - self.is_empty() - ]) + delete_snapshot_cmd = "aks nodepool snapshot delete --resource-group {resource_group} --name {snapshot_name} --yes --no-wait" + self.cmd(delete_snapshot_cmd, checks=[self.is_empty()]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) def test_aks_snapshot(self, resource_group, resource_group_location): print(resource_group_location) - create_version, upgrade_version = self._get_versions( - resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - aks_name2 = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('c', 6) - snapshot_name = self.create_random_name('s', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'aks_name2': aks_name2, - 'location': resource_group_location, - 'nodepool_name': nodepool_name, - 'snapshot_name': snapshot_name, - 'k8s_version': create_version, - 'upgrade_k8s_version': upgrade_version, - 'ssh_key_value': self.generate_ssh_keys() - }) + create_version, upgrade_version = self._get_versions(resource_group_location) + aks_name = self.create_random_name("cliakstest", 16) + aks_name2 = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("c", 6) + snapshot_name = self.create_random_name("s", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "aks_name2": aks_name2, + "location": resource_group_location, + "nodepool_name": nodepool_name, + "snapshot_name": snapshot_name, + "k8s_version": create_version, + "upgrade_k8s_version": upgrade_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create an aks cluster not using snapshot - 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') - ]).get_output_in_json() + 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")] + ).get_output_in_json() cluster_resource_id = response["id"] assert cluster_resource_id is not None - self.kwargs.update({ - 'cluster_resource_id': cluster_resource_id, - }) + self.kwargs.update( + { + "cluster_resource_id": cluster_resource_id, + } + ) 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 ' \ - '--cluster-id {cluster_resource_id} -o json' - response = self.cmd(create_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', cluster_resource_id) - ]).get_output_in_json() + create_snapshot_cmd = ( + "aks snapshot create --resource-group {resource_group} --name {snapshot_name} --location {location} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview " + "--cluster-id {cluster_resource_id} -o json" + ) + response = self.cmd( + create_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", cluster_resource_id)], + ).get_output_in_json() snapshot_resource_id = response["id"] assert snapshot_resource_id is not None - self.kwargs.update({ - 'snapshot_resource_id': snapshot_resource_id, - }) + self.kwargs.update( + { + "snapshot_resource_id": snapshot_resource_id, + } + ) print("The snapshot resource id %s " % snapshot_resource_id) # delete the original AKS cluster self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # show the snapshot - show_snapshot_cmd = 'aks snapshot show --resource-group {resource_group} --name {snapshot_name} -o json' - response = self.cmd(show_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', cluster_resource_id) - ]).get_output_in_json() + show_snapshot_cmd = "aks snapshot show --resource-group {resource_group} --name {snapshot_name} -o json" + response = self.cmd( + show_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", cluster_resource_id)], + ).get_output_in_json() # list the snapshots - list_snapshot_cmd = 'aks snapshot list --resource-group {resource_group} -o json' + list_snapshot_cmd = ( + "aks snapshot list --resource-group {resource_group} -o json" + ) 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() + 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()]) + "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=[ - self.is_empty() - ]) + delete_snapshot_cmd = "aks snapshot delete --resource-group {resource_group} --name {snapshot_name} --yes --no-wait" + self.cmd(delete_snapshot_cmd, checks=[self.is_empty()]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) def test_aks_snapshot_upgrade(self, resource_group, resource_group_location): print(resource_group_location) - create_version, upgrade_version = self._get_versions( - resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - aks_name2 = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('c', 6) - snapshot_name = self.create_random_name('s', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'aks_name2': aks_name2, - 'location': resource_group_location, - 'nodepool_name': nodepool_name, - 'snapshot_name': snapshot_name, - 'k8s_version': create_version, - 'upgrade_k8s_version': upgrade_version, - 'ssh_key_value': self.generate_ssh_keys() - }) + create_version, upgrade_version = self._get_versions(resource_group_location) + aks_name = self.create_random_name("cliakstest", 16) + aks_name2 = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("c", 6) + snapshot_name = self.create_random_name("s", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "aks_name2": aks_name2, + "location": resource_group_location, + "nodepool_name": nodepool_name, + "snapshot_name": snapshot_name, + "k8s_version": create_version, + "upgrade_k8s_version": upgrade_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create an aks cluster not using snapshot - 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') - ]).get_output_in_json() + 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")] + ).get_output_in_json() cluster_resource_id = response["id"] assert cluster_resource_id is not None - self.kwargs.update({ - 'cluster_resource_id': cluster_resource_id, - }) + self.kwargs.update( + { + "cluster_resource_id": cluster_resource_id, + } + ) 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 ' \ - '--cluster-id {cluster_resource_id} -o json' - response = self.cmd(create_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', cluster_resource_id) - ]).get_output_in_json() + create_snapshot_cmd = ( + "aks snapshot create --resource-group {resource_group} --name {snapshot_name} --location {location} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview " + "--cluster-id {cluster_resource_id} -o json" + ) + response = self.cmd( + create_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", cluster_resource_id)], + ).get_output_in_json() snapshot_resource_id = response["id"] assert snapshot_resource_id is not None - self.kwargs.update({ - 'snapshot_resource_id': snapshot_resource_id, - }) + self.kwargs.update( + { + "snapshot_resource_id": snapshot_resource_id, + } + ) print("The snapshot resource id %s " % snapshot_resource_id) # delete the original AKS cluster self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # show the snapshot - show_snapshot_cmd = 'aks snapshot show --resource-group {resource_group} --name {snapshot_name} -o json' - response = self.cmd(show_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', cluster_resource_id) - ]).get_output_in_json() + show_snapshot_cmd = "aks snapshot show --resource-group {resource_group} --name {snapshot_name} -o json" + response = self.cmd( + show_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", cluster_resource_id)], + ).get_output_in_json() # list the snapshots - list_snapshot_cmd = 'aks snapshot list --resource-group {resource_group} -o json' + list_snapshot_cmd = ( + "aks snapshot list --resource-group {resource_group} -o json" + ) response = self.cmd(list_snapshot_cmd, checks=[]).get_output_in_json() assert len(response) > 0 # create another aks cluster not using snapshot - create_cmd = 'aks create --resource-group {resource_group} --name {aks_name2} --location {location} ' \ - '--nodepool-name {nodepool_name} ' \ - '--node-count 1 ' \ - '-k {k8s_version} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'kubernetesVersion', create_version) - ]).get_output_in_json() + create_cmd = ( + "aks create --resource-group {resource_group} --name {aks_name2} --location {location} " + "--nodepool-name {nodepool_name} " + "--node-count 1 " + "-k {k8s_version} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("kubernetesVersion", create_version), + ], + ).get_output_in_json() # upgrade the second aks cluster using this snapshot - upgrade_cmd = 'aks upgrade --resource-group {resource_group} --name {aks_name2} ' \ - '--cluster-snapshot-id {snapshot_resource_id} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview --yes -o json' - self.cmd(upgrade_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'creationData.sourceResourceId', snapshot_resource_id), - self.check( - 'kubernetesVersion', upgrade_version) - ]).get_output_in_json() + upgrade_cmd = ( + "aks upgrade --resource-group {resource_group} --name {aks_name2} " + "--cluster-snapshot-id {snapshot_resource_id} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview --yes -o json" + ) + self.cmd( + upgrade_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()]) + "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=[ - self.is_empty() - ]) + delete_snapshot_cmd = "aks snapshot delete --resource-group {resource_group} --name {snapshot_name} --yes --no-wait" + self.cmd(delete_snapshot_cmd, checks=[self.is_empty()]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) def test_aks_snapshot_update(self, resource_group, resource_group_location): print(resource_group_location) - create_version, upgrade_version = self._get_versions( - resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - aks_name2 = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('c', 6) - snapshot_name = self.create_random_name('s', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'aks_name2': aks_name2, - 'location': resource_group_location, - 'nodepool_name': nodepool_name, - 'snapshot_name': snapshot_name, - 'k8s_version': upgrade_version, - 'ssh_key_value': self.generate_ssh_keys() - }) + create_version, upgrade_version = self._get_versions(resource_group_location) + aks_name = self.create_random_name("cliakstest", 16) + aks_name2 = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("c", 6) + snapshot_name = self.create_random_name("s", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "aks_name2": aks_name2, + "location": resource_group_location, + "nodepool_name": nodepool_name, + "snapshot_name": snapshot_name, + "k8s_version": upgrade_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create an aks cluster not using snapshot - create_cmd = 'aks create --resource-group {resource_group} --name {name} --location {location} ' \ - '--nodepool-name {nodepool_name} ' \ - '--node-count 1 ' \ - '-k {k8s_version} ' \ - '--ssh-key-value={ssh_key_value} -o json' - response = self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]).get_output_in_json() + create_cmd = ( + "aks create --resource-group {resource_group} --name {name} --location {location} " + "--nodepool-name {nodepool_name} " + "--node-count 1 " + "-k {k8s_version} " + "--ssh-key-value={ssh_key_value} -o json" + ) + response = self.cmd( + create_cmd, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() cluster_resource_id = response["id"] assert cluster_resource_id is not None - self.kwargs.update({ - 'cluster_resource_id': cluster_resource_id, - }) + self.kwargs.update( + { + "cluster_resource_id": cluster_resource_id, + } + ) 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 ' \ - '--cluster-id {cluster_resource_id} -o json' - response = self.cmd(create_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', cluster_resource_id) - ]).get_output_in_json() + create_snapshot_cmd = ( + "aks snapshot create --resource-group {resource_group} --name {snapshot_name} --location {location} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview " + "--cluster-id {cluster_resource_id} -o json" + ) + response = self.cmd( + create_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", cluster_resource_id)], + ).get_output_in_json() snapshot_resource_id = response["id"] assert snapshot_resource_id is not None - self.kwargs.update({ - 'snapshot_resource_id': snapshot_resource_id, - }) + self.kwargs.update( + { + "snapshot_resource_id": snapshot_resource_id, + } + ) print("The snapshot resource id %s " % snapshot_resource_id) # delete the original AKS cluster self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # show the snapshot - show_snapshot_cmd = 'aks snapshot show --resource-group {resource_group} --name {snapshot_name} -o json' - response = self.cmd(show_snapshot_cmd, checks=[ - self.check('creationData.sourceResourceId', cluster_resource_id) - ]).get_output_in_json() + show_snapshot_cmd = "aks snapshot show --resource-group {resource_group} --name {snapshot_name} -o json" + response = self.cmd( + show_snapshot_cmd, + checks=[self.check("creationData.sourceResourceId", cluster_resource_id)], + ).get_output_in_json() # list the snapshots - list_snapshot_cmd = 'aks snapshot list --resource-group {resource_group} -o json' + list_snapshot_cmd = ( + "aks snapshot list --resource-group {resource_group} -o json" + ) response = self.cmd(list_snapshot_cmd, checks=[]).get_output_in_json() assert len(response) > 0 # create another aks cluster not using snapshot - create_cmd = 'aks create --resource-group {resource_group} --name {aks_name2} --location {location} ' \ - '--nodepool-name {nodepool_name} ' \ - '--node-count 1 ' \ - '-k {k8s_version} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'kubernetesVersion', upgrade_version) - ]).get_output_in_json() + create_cmd = ( + "aks create --resource-group {resource_group} --name {aks_name2} --location {location} " + "--nodepool-name {nodepool_name} " + "--node-count 1 " + "-k {k8s_version} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("kubernetesVersion", upgrade_version), + ], + ).get_output_in_json() # update the second aks cluster using this snapshot - update_cmd = 'aks update --resource-group {resource_group} --name {aks_name2} ' \ - '--cluster-snapshot-id {snapshot_resource_id} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'creationData.sourceResourceId', snapshot_resource_id), - ]).get_output_in_json() + update_cmd = ( + "aks update --resource-group {resource_group} --name {aks_name2} " + "--cluster-snapshot-id {snapshot_resource_id} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ManagedClusterSnapshotPreview -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("creationData.sourceResourceId", snapshot_resource_id), + ], + ).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()]) + "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=[ - self.is_empty() - ]) + delete_snapshot_cmd = "aks snapshot delete --resource-group {resource_group} --name {snapshot_name} --yes --no-wait" + self.cmd(delete_snapshot_cmd, checks=[self.is_empty()]) # @AllowLargeResponse() # @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') # def test_aks_upgrade_node_image_only_cluster(self, resource_group, resource_group_location): - # kwargs for string formatting + # kwargs for string formatting # aks_name = self.create_random_name('cliakstest', 16) # node_pool_name = self.create_random_name('c', 6) # self.kwargs.update({ @@ -2556,7 +3644,7 @@ def test_aks_snapshot_update(self, resource_group, resource_group_location): # @AllowLargeResponse() # @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') # def test_aks_upgrade_node_image_only_nodepool(self, resource_group, resource_group_location): - # kwargs for string formatting + # kwargs for string formatting # aks_name = self.create_random_name('cliakstest', 16) # node_pool_name = self.create_random_name('c', 6) # self.kwargs.update({ @@ -2591,176 +3679,231 @@ def test_aks_snapshot_update(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="westus2" + ) def test_aks_upgrade_nodepool(self, resource_group, resource_group_location): - create_version, upgrade_version = self._get_versions( - resource_group_location) + create_version, upgrade_version = self._get_versions(resource_group_location) # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': 'replace-Password1234$', - 'nodepool2_name': 'npwin', - 'k8s_version': create_version, - 'upgrade_k8s_version': upgrade_version, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": "replace-Password1234$", + "nodepool2_name": "npwin", + "k8s_version": create_version, + "upgrade_k8s_version": upgrade_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create AKS cluster - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ - '--kubernetes-version={k8s_version} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure " + "--kubernetes-version={k8s_version} --ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + ], + ) # add Windows nodepool - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1", + checks=[self.check("provisioningState", "Succeeded")], + ) # upgrade cluster control plane only - self.cmd('aks upgrade --resource-group={resource_group} --name={name} --kubernetes-version={upgrade_k8s_version} --yes', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks upgrade --resource-group={resource_group} --name={name} --kubernetes-version={upgrade_k8s_version} --yes", + checks=[self.check("provisioningState", "Succeeded")], + ) # upgrade Windows nodepool - self.cmd('aks nodepool upgrade --resource-group={resource_group} --cluster-name={name} ' - '--name={nodepool2_name} --kubernetes-version={upgrade_k8s_version} ' - '--aks-custom-headers WindowsContainerRuntime=containerd --yes', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool upgrade --resource-group={resource_group} --cluster-name={name} " + "--name={nodepool2_name} --kubernetes-version={upgrade_k8s_version} " + "--aks-custom-headers WindowsContainerRuntime=containerd --yes", + checks=[self.check("provisioningState", "Succeeded")], + ) # delete AKS cluster self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_with_windows(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': 'replace-Password1234$', - 'nodepool2_name': 'npwin', - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": "replace-Password1234$", + "nodepool2_name": "npwin", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + ], + ) # nodepool add - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1", + checks=[self.check("provisioningState", "Succeeded")], + ) # update Windows license type - self.cmd('aks update --resource-group={resource_group} --name={name} --enable-ahub', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.licenseType', 'Windows_Server') - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --enable-ahub", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.licenseType", "Windows_Server"), + ], + ) # nodepool delete self.cmd( - 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + "aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait", + checks=[self.is_empty()], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) def test_aks_create_with_fips(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'nodepool2_name': 'np2', - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "nodepool2_name": "np2", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-fips-image ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].enableFips', True) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-fips-image " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].enableFips", True), + ], + ) # nodepool add - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --enable-fips-image', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('enableFips', True) - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --enable-fips-image", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("enableFips", True), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # the availability of features is controlled by a toggle and cannot be fully tested yet, # however, existing test results show that the client side works as expected, so exclude it at this moment @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_nodepool_add_with_artifact_streaming(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_nodepool_add_with_artifact_streaming( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'nodepool2_name': 'np2', - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "nodepool2_name": "np2", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/ArtifactStreamingPreview ' + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/ArtifactStreamingPreview " + ) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool add self.cmd( @@ -2776,234 +3919,385 @@ def test_aks_nodepool_add_with_artifact_streaming(self, resource_group, resource # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_with_ahub(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': 'replace-Password1234$', - 'nodepool2_name': 'npwin', - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": "replace-Password1234$", + "nodepool2_name": "npwin", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure --enable-ahub ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1'), - self.check('windowsProfile.licenseType', 'Windows_Server') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure --enable-ahub " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + self.check("windowsProfile.licenseType", "Windows_Server"), + ], + ) # nodepool add - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1", + checks=[self.check("provisioningState", "Succeeded")], + ) # update Windows license type - self.cmd('aks update --resource-group={resource_group} --name={name} --disable-ahub', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.licenseType', 'None') - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --disable-ahub", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.licenseType", "None"), + ], + ) # nodepool delete self.cmd( - 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + "aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait", + checks=[self.is_empty()], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westeurope') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westeurope" + ) def test_aks_update_to_msi_cluster(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # update to MSI cluster - self.cmd('aks update --resource-group={resource_group} --name={name} --enable-managed-identity --yes', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('identity.type', 'SystemAssigned') - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --enable-managed-identity --yes", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("identity.type", "SystemAssigned"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_create_with_gitops_addon(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} -a gitops ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.gitops.enabled', True), - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_create_with_gitops_addon( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} -a gitops " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.gitops.enabled", True), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_enable_addon_with_gitops(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.gitops', None), - ]) - - enable_cmd = 'aks enable-addons --addons gitops --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.gitops.enabled', True), - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_enable_addon_with_gitops( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.gitops", None), + ], + ) + + enable_cmd = "aks enable-addons --addons gitops --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.gitops.enabled", True), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) def test_aks_disable_addon_gitops(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} -a gitops ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.gitops.enabled', True), - ]) - - disable_cmd = 'aks disable-addons --addons gitops --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('addonProfiles.gitops.enabled', False), - self.check('addonProfiles.gitops.config', None) - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} -a gitops " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.gitops.enabled", True), + ], + ) + + disable_cmd = "aks disable-addons --addons gitops --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.gitops.enabled", False), + self.check("addonProfiles.gitops.config", None), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westeurope') - def test_aks_update_to_msi_cluster_with_addons(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-addons monitoring ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westeurope" + ) + def test_aks_update_to_msi_cluster_with_addons( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-addons monitoring " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # update to MSI cluster - self.cmd('aks update --resource-group={resource_group} --name={name} --enable-managed-identity --yes', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('identity.type', 'SystemAssigned') - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --enable-managed-identity --yes", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("identity.type", "SystemAssigned"), + ], + ) # check egress endpoints = self.cmd( - 'aks egress-endpoints list --resource-group={resource_group} --name={name}').get_output_in_json() + "aks egress-endpoints list --resource-group={resource_group} --name={name}" + ).get_output_in_json() categories = [e["category"] for e in endpoints] assert "addon-monitoring" in categories # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_monitoring_aad_auth_msi(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_monitoring_aad_auth_msi( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.create_new_cluster_with_monitoring_aad_auth( - resource_group, resource_group_location, aks_name, user_assigned_identity=False) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=False, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_monitoring_aad_auth_uai(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_monitoring_aad_auth_uai( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.create_new_cluster_with_monitoring_aad_auth( - resource_group, resource_group_location, aks_name, user_assigned_identity=True) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=True, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_monitoring_aad_auth_msi_with_syslog(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_monitoring_aad_auth_msi_with_syslog( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.create_new_cluster_with_monitoring_aad_auth( - resource_group, resource_group_location, aks_name, user_assigned_identity=False, syslog_enabled=True) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=False, + syslog_enabled=True, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_monitoring_aad_auth_msi_with_datacollectionsettings(self, resource_group, resource_group_location,): - aks_name = self.create_random_name('cliakstest', 16) - self.create_new_cluster_with_monitoring_aad_auth(resource_group, resource_group_location, aks_name, user_assigned_identity=False, syslog_enabled=False, data_collection_settings=_get_test_data_file('datacollectionsettings.json')) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_monitoring_aad_auth_msi_with_datacollectionsettings( + self, + resource_group, + resource_group_location, + ): + aks_name = self.create_random_name("cliakstest", 16) + self.create_new_cluster_with_monitoring_aad_auth( + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=False, + syslog_enabled=False, + data_collection_settings=_get_test_data_file("datacollectionsettings.json"), + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_monitoring_aad_auth_uai_with_syslog(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_monitoring_aad_auth_uai_with_syslog( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.create_new_cluster_with_monitoring_aad_auth( - resource_group, resource_group_location, aks_name, user_assigned_identity=True, syslog_enabled=True) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=True, + syslog_enabled=True, + ) - def create_new_cluster_with_monitoring_aad_auth(self, resource_group, resource_group_location, aks_name, user_assigned_identity=False, syslog_enabled=False, data_collection_settings=None): - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + def create_new_cluster_with_monitoring_aad_auth( + self, + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=False, + syslog_enabled=False, + data_collection_settings=None, + ): + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) if user_assigned_identity: - uai_cmd = f'identity create -g {resource_group} -n {aks_name}_uai' + uai_cmd = f"identity create -g {resource_group} -n {aks_name}_uai" resp = self.cmd(uai_cmd).get_output_in_json() identity_id = resp["id"] print("********************") @@ -3011,126 +4305,240 @@ def create_new_cluster_with_monitoring_aad_auth(self, resource_group, resource_g print("********************") # create - create_cmd = f'aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} ' \ - '--enable-managed-identity ' \ - '--enable-addons monitoring ' \ - '--node-count 1 ' \ - '--ssh-key-value={ssh_key_value} ' - create_cmd += f'--assign-identity {identity_id} ' if user_assigned_identity else '' - create_cmd += f'--enable-syslog ' if syslog_enabled else '' - create_cmd += f'--data-collection-settings {data_collection_settings} ' if data_collection_settings else '' - - response = self.cmd(create_cmd, checks=[ - self.check('addonProfiles.omsagent.enabled', True), - self.check('addonProfiles.omsagent.config.useAADAuth', 'true') - ]).get_output_in_json() + create_cmd = ( + f"aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} " + "--enable-managed-identity " + "--enable-addons monitoring " + "--node-count 1 " + "--ssh-key-value={ssh_key_value} " + ) + create_cmd += ( + f"--assign-identity {identity_id} " if user_assigned_identity else "" + ) + create_cmd += "--enable-syslog " if syslog_enabled else "" + create_cmd += ( + f"--data-collection-settings {data_collection_settings} " + if data_collection_settings + else "" + ) + + response = self.cmd( + create_cmd, + checks=[ + self.check("addonProfiles.omsagent.enabled", True), + self.check("addonProfiles.omsagent.config.useAADAuth", "true"), + ], + ).get_output_in_json() cluster_resource_id = response["id"] subscription = cluster_resource_id.split("/")[2] - workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] - workspace_name = workspace_resource_id.split("/")[-1] - workspace_resource_group = workspace_resource_id.split("/")[4] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"][ + "logAnalyticsWorkspaceResourceID" + ] # check that the DCR was created location = resource_group_location dataCollectionRuleName = f"MSCI-{location}-{aks_name}" dataCollectionRuleName = dataCollectionRuleName[0:64] dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" - get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2022-06-01' - self.cmd(get_cmd, checks=[ - self.check( - 'properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') - ]) + get_cmd = f"rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2022-06-01" + self.cmd( + get_cmd, + checks=[ + self.check( + "properties.destinations.logAnalytics[0].workspaceResourceId", + f"{workspace_resource_id}", + ) + ], + ) if syslog_enabled: - self.cmd(get_cmd, checks=[ - self.check('properties.dataSources.syslog[0].streams[0]', f'Microsoft-Syslog') - ]) + self.cmd( + get_cmd, + checks=[ + self.check( + "properties.dataSources.syslog[0].streams[0]", + "Microsoft-Syslog", + ) + ], + ) if data_collection_settings: - self.cmd(get_cmd, checks=[ - self.check('properties.dataSources.extensions[0].name', f'ContainerInsightsExtension'), - self.check('properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.interval', f'1m'), - self.check('properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.namespaceFilteringMode', f'Include'), - self.check('properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.namespaces[0]', f'kube-system'), - self.check('properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.streams[0]', f'Microsoft-ContainerLogV2'), - self.check('properties.dataFlows[0].streams[0]', f'Microsoft-ContainerLogV2'), - self.check('properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.enableContainerLogV2', True) - ]) + self.cmd( + get_cmd, + checks=[ + self.check( + "properties.dataSources.extensions[0].name", + "ContainerInsightsExtension", + ), + self.check( + "properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.interval", + "1m", + ), + self.check( + "properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.namespaceFilteringMode", + "Include", + ), + self.check( + "properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.namespaces[0]", + "kube-system", + ), + self.check( + "properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.streams[0]", + "Microsoft-ContainerLogV2", + ), + self.check( + "properties.dataFlows[0].streams[0]", + "Microsoft-ContainerLogV2", + ), + self.check( + "properties.dataSources.extensions[0].extensionSettings.dataCollectionSettings.enableContainerLogV2", + True, + ), + ], + ) # check that the DCR-A was created dcra_resource_id = f"{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/ContainerInsightsExtension" - get_cmd = f'rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2022-06-01' - self.cmd(get_cmd, checks=[ - self.check('properties.dataCollectionRuleId', f'{dcr_resource_id}') - ]) + get_cmd = f"rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2022-06-01" + self.cmd( + get_cmd, + checks=[ + self.check("properties.dataCollectionRuleId", f"{dcr_resource_id}") + ], + ) # make sure monitoring can be smoothly disabled - self.cmd( - f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + self.cmd(f"aks disable-addons -a monitoring -g={resource_group} -n={aks_name}") # delete self.cmd( - f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + f"aks delete -g {resource_group} -n {aks_name} --yes --no-wait", + checks=[self.is_empty()], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_enable_monitoring_with_aad_auth_msi(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_enable_monitoring_with_aad_auth_msi( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.enable_monitoring_existing_cluster_aad_atuh( - resource_group, resource_group_location, aks_name, user_assigned_identity=False) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=False, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_enable_monitoring_with_aad_auth_uai(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_enable_monitoring_with_aad_auth_uai( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.enable_monitoring_existing_cluster_aad_atuh( - resource_group, resource_group_location, aks_name, user_assigned_identity=True) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=True, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_enable_monitoring_with_aad_auth_msi_with_syslog(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_enable_monitoring_with_aad_auth_msi_with_syslog( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.enable_monitoring_existing_cluster_aad_atuh( - resource_group, resource_group_location, aks_name, user_assigned_identity=False, syslog_enabled=True) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=False, + syslog_enabled=True, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_enable_monitoring_with_aad_auth_uai_with_syslog(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_enable_monitoring_with_aad_auth_uai_with_syslog( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.enable_monitoring_existing_cluster_aad_atuh( - resource_group, resource_group_location, aks_name, user_assigned_identity=True, syslog_enabled=True) + resource_group, + resource_group_location, + aks_name, + user_assigned_identity=True, + syslog_enabled=True, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_enable_monitoring_with_aad_auth_msi_with_syslog(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_enable_monitoring_with_aad_auth_msi_with_syslog( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.enable_monitoring_existing_cluster_aad_atuh( - resource_group, resource_group_location, aks_name, new_addon_cmd=True, user_assigned_identity=False, syslog_enabled=True) + resource_group, + resource_group_location, + aks_name, + new_addon_cmd=True, + user_assigned_identity=False, + syslog_enabled=True, + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_addon_enable_monitoring_with_aad_auth_uai_with_syslog(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_addon_enable_monitoring_with_aad_auth_uai_with_syslog( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) self.enable_monitoring_existing_cluster_aad_atuh( - resource_group, resource_group_location, aks_name, new_addon_cmd=True, user_assigned_identity=True, syslog_enabled=True) + resource_group, + resource_group_location, + aks_name, + new_addon_cmd=True, + user_assigned_identity=True, + syslog_enabled=True, + ) - def enable_monitoring_existing_cluster_aad_atuh(self, resource_group, resource_group_location, aks_name, new_addon_cmd=False, user_assigned_identity=False, syslog_enabled=False): - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + def enable_monitoring_existing_cluster_aad_atuh( + self, + resource_group, + resource_group_location, + aks_name, + new_addon_cmd=False, + user_assigned_identity=False, + syslog_enabled=False, + ): + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) if user_assigned_identity: - uai_cmd = f'identity create -g {resource_group} -n {aks_name}_uai' + uai_cmd = f"identity create -g {resource_group} -n {aks_name}_uai" resp = self.cmd(uai_cmd).get_output_in_json() identity_id = resp["id"] print("********************") @@ -3138,93 +4546,128 @@ def enable_monitoring_existing_cluster_aad_atuh(self, resource_group, resource_g print("********************") # create - create_cmd = f'aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} ' \ - '--enable-managed-identity ' \ - '--node-count 1 ' \ - '--ssh-key-value={ssh_key_value} ' - create_cmd += f'--assign-identity {identity_id}' if user_assigned_identity else '' + create_cmd = ( + f"aks create --resource-group={resource_group} --name={aks_name} --location={resource_group_location} " + "--enable-managed-identity " + "--node-count 1 " + "--ssh-key-value={ssh_key_value} " + ) + create_cmd += ( + f"--assign-identity {identity_id}" if user_assigned_identity else "" + ) self.cmd(create_cmd) if new_addon_cmd: - enable_monitoring_cmd = 'aks addon enable -a monitoring ' + enable_monitoring_cmd = "aks addon enable -a monitoring " else: - enable_monitoring_cmd = 'aks enable-addons -a monitoring ' - enable_monitoring_cmd += f'--resource-group={resource_group} --name={aks_name} ' + enable_monitoring_cmd = "aks enable-addons -a monitoring " + enable_monitoring_cmd += f"--resource-group={resource_group} --name={aks_name} " if syslog_enabled: - enable_monitoring_cmd += f'--enable-syslog ' + enable_monitoring_cmd += "--enable-syslog " - response = self.cmd(enable_monitoring_cmd, checks=[ - self.check('addonProfiles.omsagent.enabled', True), - self.check('addonProfiles.omsagent.config.useAADAuth', 'true') - ]).get_output_in_json() + response = self.cmd( + enable_monitoring_cmd, + checks=[ + self.check("addonProfiles.omsagent.enabled", True), + self.check("addonProfiles.omsagent.config.useAADAuth", "true"), + ], + ).get_output_in_json() cluster_resource_id = response["id"] subscription = cluster_resource_id.split("/")[2] - workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] - workspace_name = workspace_resource_id.split("/")[-1] - workspace_resource_group = workspace_resource_id.split("/")[4] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"][ + "logAnalyticsWorkspaceResourceID" + ] # check that the DCR was created location = resource_group_location dataCollectionRuleName = f"MSCI-{location}-{aks_name}" dataCollectionRuleName = dataCollectionRuleName[0:64] dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" - get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2022-06-01' - self.cmd(get_cmd, checks=[ - self.check( - 'properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') - ]) + get_cmd = f"rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2022-06-01" + self.cmd( + get_cmd, + checks=[ + self.check( + "properties.destinations.logAnalytics[0].workspaceResourceId", + f"{workspace_resource_id}", + ) + ], + ) if syslog_enabled: - self.cmd(get_cmd, checks=[ - self.check('properties.dataSources.syslog[0].streams[0]', f'Microsoft-Syslog') - ]) + self.cmd( + get_cmd, + checks=[ + self.check( + "properties.dataSources.syslog[0].streams[0]", + "Microsoft-Syslog", + ) + ], + ) # check that the DCR-A was created dcra_resource_id = f"{cluster_resource_id}/providers/Microsoft.Insights/dataCollectionRuleAssociations/ContainerInsightsExtension" - get_cmd = f'rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2022-06-01' - self.cmd(get_cmd, checks=[ - self.check('properties.dataCollectionRuleId', f'{dcr_resource_id}') - ]) + get_cmd = f"rest --method get --url https://management.azure.com{dcra_resource_id}?api-version=2022-06-01" + self.cmd( + get_cmd, + checks=[ + self.check("properties.dataCollectionRuleId", f"{dcr_resource_id}") + ], + ) # make sure monitoring can be smoothly disabled - self.cmd( - f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + self.cmd(f"aks disable-addons -a monitoring -g={resource_group} -n={aks_name}") # delete self.cmd( - f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + f"aks delete -g {resource_group} -n {aks_name} --yes --no-wait", + checks=[self.is_empty()], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_monitoring_legacy_auth(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_monitoring_legacy_auth( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--enable-addons monitoring ' \ - '--node-count 1 ' \ - '--ssh-key-value={ssh_key_value} ' - response = self.cmd(create_cmd, checks=[ - self.check('addonProfiles.omsagent.enabled', True), - self.exists( - 'addonProfiles.omsagent.config.logAnalyticsWorkspaceResourceID') - ]).get_output_in_json() + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--enable-addons monitoring " + "--node-count 1 " + "--ssh-key-value={ssh_key_value} " + ) + response = self.cmd( + create_cmd, + checks=[ + self.check("addonProfiles.omsagent.enabled", True), + self.exists( + "addonProfiles.omsagent.config.logAnalyticsWorkspaceResourceID" + ), + ], + ).get_output_in_json() # make sure a DCR was not created cluster_resource_id = response["id"] subscription = cluster_resource_id.split("/")[2] - workspace_resource_id = response["addonProfiles"]["omsagent"]["config"]["logAnalyticsWorkspaceResourceID"] - workspace_resource_group = workspace_resource_id.split("/")[4] + workspace_resource_id = response["addonProfiles"]["omsagent"]["config"][ + "logAnalyticsWorkspaceResourceID" + ] try: # check that the DCR was created @@ -3232,229 +4675,325 @@ def test_aks_create_with_monitoring_legacy_auth(self, resource_group, resource_g dataCollectionRuleName = f"MSCI-{location}-{aks_name}" dataCollectionRuleName = dataCollectionRuleName[0:64] dcr_resource_id = f"/subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}" - get_cmd = f'rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2022-06-01' - self.cmd(get_cmd, checks=[ - self.check( - 'properties.destinations.logAnalytics[0].workspaceResourceId', f'{workspace_resource_id}') - ]) + get_cmd = f"rest --method get --url https://management.azure.com{dcr_resource_id}?api-version=2022-06-01" + self.cmd( + get_cmd, + checks=[ + self.check( + "properties.destinations.logAnalytics[0].workspaceResourceId", + f"{workspace_resource_id}", + ) + ], + ) assert False - except Exception as err: + except Exception: pass # this is expected # make sure monitoring can be smoothly disabled - self.cmd( - f'aks disable-addons -a monitoring -g={resource_group} -n={aks_name}') + self.cmd(f"aks disable-addons -a monitoring -g={resource_group} -n={aks_name}") # delete self.cmd( - f'aks delete -g {resource_group} -n {aks_name} --yes --no-wait', checks=[self.is_empty()]) + f"aks delete -g {resource_group} -n {aks_name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_auto_upgrade_channel(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_auto_upgrade_channel( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--auto-upgrade-channel rapid ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('autoUpgradeProfile.upgradeChannel', 'rapid') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--auto-upgrade-channel rapid " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("autoUpgradeProfile.upgradeChannel", "rapid"), + ], + ) # update upgrade channel - self.cmd('aks update --resource-group={resource_group} --name={name} --auto-upgrade-channel stable', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('autoUpgradeProfile.upgradeChannel', 'stable') - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --auto-upgrade-channel stable", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("autoUpgradeProfile.upgradeChannel", "stable"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_node_os_upgrade_channel(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_node_os_upgrade_channel( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--node-os-upgrade-channel NodeImage ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('autoUpgradeProfile.nodeOsUpgradeChannel', 'NodeImage') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--node-os-upgrade-channel NodeImage " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("autoUpgradeProfile.nodeOsUpgradeChannel", "NodeImage"), + ], + ) # update node os upgrade channel - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--node-os-upgrade-channel None ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('autoUpgradeProfile.nodeOsUpgradeChannel', 'None') - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--node-os-upgrade-channel None " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("autoUpgradeProfile.nodeOsUpgradeChannel", "None"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_auto_upgrade_channel_and_node_os_upgrade_channel(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_auto_upgrade_channel_and_node_os_upgrade_channel( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--auto-upgrade-channel rapid ' \ - '--node-os-upgrade-channel NodeImage ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('autoUpgradeProfile.upgradeChannel', 'rapid'), - self.check('autoUpgradeProfile.nodeOsUpgradeChannel', 'NodeImage') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--auto-upgrade-channel rapid " + "--node-os-upgrade-channel NodeImage " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("autoUpgradeProfile.upgradeChannel", "rapid"), + self.check("autoUpgradeProfile.nodeOsUpgradeChannel", "NodeImage"), + ], + ) # update auto upgrade channel and node os upgrade channel - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--auto-upgrade-channel stable --node-os-upgrade-channel None ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('autoUpgradeProfile.upgradeChannel', 'stable'), - self.check('autoUpgradeProfile.nodeOsUpgradeChannel', 'None') - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--auto-upgrade-channel stable --node-os-upgrade-channel None " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodeOSUpgradeChannelPreview" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("autoUpgradeProfile.upgradeChannel", "stable"), + self.check("autoUpgradeProfile.nodeOsUpgradeChannel", "None"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_with_nrg_restriction_level(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_with_nrg_restriction_level( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--nrg-lockdown-restriction-level ReadOnly ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NRGLockdownPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('nodeResourceGroupProfile.restrictionLevel', 'ReadOnly') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--nrg-lockdown-restriction-level ReadOnly " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NRGLockdownPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("nodeResourceGroupProfile.restrictionLevel", "ReadOnly"), + ], + ) # update the nrg restriction level - self.cmd('aks update --resource-group={resource_group} --name={name} --nrg-lockdown-restriction-level Unrestricted --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NRGLockdownPreview', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('nodeResourceGroupProfile.restrictionLevel', 'Unrestricted') - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --nrg-lockdown-restriction-level Unrestricted --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NRGLockdownPreview", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("nodeResourceGroupProfile.restrictionLevel", "Unrestricted"), + ], + ) + + # delete + self.cmd( + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_node_config(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kc_path": _get_test_data_file("kubeletconfig.json"), + "oc_path": _get_test_data_file("linuxosconfig.json"), + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + # use custom feature so it does not require subscription to regiter the feature + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--kubelet-config={kc_path} --linux-os-config={oc_path} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[0].kubeletConfig.cpuManagerPolicy", "static" + ), + self.check( + "agentPoolProfiles[0].kubeletConfig.containerLogMaxSizeMb", 20 + ), + self.check("agentPoolProfiles[0].linuxOsConfig.swapFileSizeMb", 1500), + self.check( + "agentPoolProfiles[0].linuxOsConfig.sysctls.netIpv4TcpTwReuse", True + ), + ], + ) - # delete + # nodepool add + nodepool_cmd = ( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name=nodepool2 --node-count=1 " + "--kubelet-config={kc_path} --linux-os-config={oc_path} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview" + ) self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("kubeletConfig.cpuCfsQuotaPeriod", "200ms"), + self.check("kubeletConfig.podMaxPids", 120), + self.check("kubeletConfig.containerLogMaxSizeMb", 20), + self.check("linuxOsConfig.sysctls.netCoreSomaxconn", 163849), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_node_config(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'kc_path': _get_test_data_file('kubeletconfig.json'), - 'oc_path': _get_test_data_file('linuxosconfig.json'), - 'ssh_key_value': self.generate_ssh_keys() - }) - - # use custom feature so it does not require subscription to regiter the feature - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--kubelet-config={kc_path} --linux-os-config={oc_path} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'agentPoolProfiles[0].kubeletConfig.cpuManagerPolicy', 'static'), - self.check( - 'agentPoolProfiles[0].kubeletConfig.containerLogMaxSizeMb', 20), - self.check( - 'agentPoolProfiles[0].linuxOsConfig.swapFileSizeMb', 1500), - self.check( - 'agentPoolProfiles[0].linuxOsConfig.sysctls.netIpv4TcpTwReuse', True) - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_with_http_proxy_config( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "http_proxy_path": _get_test_data_file("httpproxyconfig.json"), + "custom_data_path": _get_test_data_file("setup_proxy.sh"), + "ssh_key_value": self.generate_ssh_keys(), + } + ) - # nodepool add - nodepool_cmd = 'aks nodepool add --resource-group={resource_group} --cluster-name={name} --name=nodepool2 --node-count=1 ' \ - '--kubelet-config={kc_path} --linux-os-config={oc_path} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview' - self.cmd(nodepool_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('kubeletConfig.cpuCfsQuotaPeriod', '200ms'), - self.check('kubeletConfig.podMaxPids', 120), - self.check('kubeletConfig.containerLogMaxSizeMb', 20), - self.check('linuxOsConfig.sysctls.netCoreSomaxconn', 163849) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_with_http_proxy_config(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'http_proxy_path': _get_test_data_file('httpproxyconfig.json'), - 'custom_data_path': _get_test_data_file('setup_proxy.sh'), - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_vnet_cmd = 'network vnet create \ + create_vnet_cmd = "network vnet create \ --resource-group={resource_group} \ --name={name} \ --address-prefixes 10.42.0.0/16 \ --subnet-name aks-subnet \ - --subnet-prefix 10.42.1.0/24' + --subnet-prefix 10.42.1.0/24" - create_subnet_cmd = 'network vnet subnet create \ + create_subnet_cmd = "network vnet subnet create \ --resource-group={resource_group} \ --vnet-name={name} \ --name proxy-subnet \ - --address-prefix 10.42.3.0/24' + --address-prefix 10.42.3.0/24" - show_subnet_cmd = 'network vnet subnet show \ + show_subnet_cmd = "network vnet subnet show \ --resource-group={resource_group} \ --vnet-name={name} \ - --name aks-subnet' + --name aks-subnet" # name below MUST match the name used in testcerts for httpproxyconfig.json. # otherwise the VM will not present a cert with correct hostname @@ -3469,13 +5008,14 @@ def test_aks_create_and_update_with_http_proxy_config(self, resource_group, reso --vnet-name {name} \ --subnet proxy-subnet' - self.cmd(create_vnet_cmd, checks=[ - self.check('newVNet.provisioningState', 'Succeeded') - ]) + self.cmd( + create_vnet_cmd, + checks=[self.check("newVNet.provisioningState", "Succeeded")], + ) - self.cmd(create_subnet_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + create_subnet_cmd, checks=[self.check("provisioningState", "Succeeded")] + ) subnet_output = self.cmd(show_subnet_cmd).get_output_in_json() subnet_id = subnet_output["id"] @@ -3483,3275 +5023,4750 @@ def test_aks_create_and_update_with_http_proxy_config(self, resource_group, reso self.cmd(create_vm_cmd) - self.kwargs.update({ - 'vnet_subnet_id': subnet_id, - }) + self.kwargs.update( + { + "vnet_subnet_id": subnet_id, + } + ) # use custom feature so it does not require subscription to regiter the feature - create_cmd = 'aks create --resource-group={resource_group} --name={name} --http-proxy-config={http_proxy_path} ' \ - '--ssh-key-value={ssh_key_value} --enable-managed-identity --yes --vnet-subnet-id {vnet_subnet_id} -o json' - - self.cmd(create_cmd, checks=[ - self.check('httpProxyConfig.httpProxy', - 'http://cli-proxy-vm:3128/'), - self.check('httpProxyConfig.httpsProxy', - 'https://cli-proxy-vm:3129/'), - self.check('httpProxyConfig.trustedCa', 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZHekNDQXdPZ0F3SUJBZ0lVT1FvajhDTFpkc2Vscjk3cnZJd3g1T0xEc3V3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd0Z6RVZNQk1HQTFVRUF3d01ZMnhwTFhCeWIzaDVMWFp0TUI0WERUSXlNRE13T0RFMk5EUTBOMW9YRFRNeQpNRE13TlRFMk5EUTBOMW93RnpFVk1CTUdBMVVFQXd3TVkyeHBMWEJ5YjNoNUxYWnRNSUl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ThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K') - ]) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'http_proxy_path': _get_test_data_file('httpproxyconfig_update.json'), - }) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} --http-proxy-config={http_proxy_path}' - - self.cmd(update_cmd, checks=[ - self.check('httpProxyConfig.httpProxy', - 'http://cli-proxy-vm:3128/'), - self.check('httpProxyConfig.httpsProxy', - 'https://cli-proxy-vm:3129/'), - self.check('httpProxyConfig.trustedCa', 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZERENDQXZTZ0F3SUJBZ0lVQlJ3cGs1eTh5ckdrNmtYTjhkSHlMRUNvaHBrd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0VqRVFNQTRHQTFVRUF3d0habTl2TFdKaGNqQWVGdzB5TVRFd01UTXdNekU1TlRoYUZ3MHpNVEV3TVRFdwpNekU1TlRoYU1CSXhFREFPQmdOVkJBTU1CMlp2YnkxaVlYSXdnZ0lpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElDCkR3QXdnZ0lLQW9JQ0FRRFcwRE9sVC9yci9xUEZIUU9lNndBNDkyVGh3VWxZaDhCQkszTW9VWVZLNjEvL2xXekEKeFkrYzlmazlvckUrZXhMSVpwdUg1VnNZR21MNUFyc05sVmNBMkU4MWgwSlBPYUo1eEpiZG40YldpZG9vdXRVVwpXeDNhYUJLSEt0RWdZbUNmTjliWXlZMlNWRWQvNS9HeGh0akVabHJ1aEtRdkZVa3hwR0xKK1JRQ25oNklZakQwCnNpQ0YyTjJhVUJ4RE5KaUdmeHlHSVIrY2p4Vlcrd01md05CQ0l6QVkxMnY4WmpzUXdmUWlhOE5oWEx3M0tuRm0KdzUrcHN2bU1HL1FFUUtZMXNOTnk2dS9DZkI3cmIxQ0EwcjdNNnFsNFMrWHJjZUVRcX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2s5QVk1RQp5RXRlQjBTSjdLS0tUZklBVmVMQzdrRnBHR3FsRkRBNzhPSS9YakNZViswRjk4MHdNOVkxTEVUa3ZMamVSMEFyCnVzZDNIS1Vtd2EwTVEwUTNZNGxma0ZtNjJTclhvcjJURC9WZHpFZWNOTnVmV1VJTVNuaEJDNTVHWjBOTVYvR0QKRXhGZTVWQkhUZEZVNlIwb3JCOVFjVll1Mzk0MEt5NXhkbHNaUHZlMmRJNS9WOXhzY0Zad3cxWWs4K21RK3NVeQp2UVBoL2ZmK0tTQjdVVkdvTVNXUlg3YjFFMGVzZSs4QzZlaVV2OXpDR0VRbkVCcnFIQWxSUDJ2ZzQ0bXFJSnRzCjN2NUt1NW0ySmJoeWNsQVR3VUNQZkN3a2tLRTg0MzZGRitDK0ZUVTJ1OWVpL2t5QTAxYi9zRFl2cWdsS2FWK3MKbEVHRkhjd05Ea2VrS1BFUEZxNkpnZ3R0WlNidE5SMnFadzl3cExIbDVuVlVXdnBGa2hvcW1KVkphK0VBSTQ1LwpqRkh4VG9PMHp1NlBxc1p5SnM2TC84Z3BhbTcwMDV6b0VETVRjcFltMlduMFBKcEg3NE9zUHJVRDVJWVA5ZEt5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K') - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_none_private_dns_zone(self, resource_group, resource_group_location): + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --http-proxy-config={http_proxy_path} " + "--ssh-key-value={ssh_key_value} --enable-managed-identity --yes --vnet-subnet-id {vnet_subnet_id} -o json" + ) + + self.cmd( + create_cmd, + checks=[ + self.check("httpProxyConfig.httpProxy", "http://cli-proxy-vm:3128/"), + self.check("httpProxyConfig.httpsProxy", "https://cli-proxy-vm:3129/"), + self.check( + "httpProxyConfig.trustedCa", + "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZHekNDQXdPZ0F3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oSGdlaFFEUEJjWTl3WVl6ZkJnWnBPVU16ZERmNTB4K0ZTbFk0M1dPSkp6U3VRaDR5WjArM2t5Z3VDRjgKcm5NTFNjZXlTNGNpNExtSi9LQ1N1R2RmNlhWWXo4QkU5Z2pqanBDUDZxeTBVbFJlZldzL2lnL3djSysyYkYxVApuL1l2KzZnWGVDVEhKNzVxRElQbHA3RFJVVWswZmJNajRiSWthb2dXV2s0emYydThteFpMYTBsZVBLTktaTi9tCkdDdkZ3cjNlaSt1LzhjenA1RjdUCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K", + ), + ], + ) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "http_proxy_path": _get_test_data_file("httpproxyconfig_update.json"), + } + ) + + update_cmd = "aks update --resource-group={resource_group} --name={name} --http-proxy-config={http_proxy_path}" + + self.cmd( + update_cmd, + checks=[ + self.check("httpProxyConfig.httpProxy", "http://cli-proxy-vm:3128/"), + self.check("httpProxyConfig.httpsProxy", "https://cli-proxy-vm:3129/"), + self.check( + "httpProxyConfig.trustedCa", + "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZERENDQXZTZ0F3SUJBZ0lVQlJ3cGs1eTh5ckdrNmtYTjhkSHlMRUNvaHBrd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0VqRVFNQTRHQTFVRUF3d0habTl2TFdKaGNqQWVGdzB5TVRFd01UTXdNekU1TlRoYUZ3MHpNVEV3TVRFdwpNekU1TlRoYU1CSXhFREFPQmdOVkJBTU1CMlp2YnkxaVlYSXdnZ0lpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElDCkR3QXdnZ0lLQW9JQ0FRRFcwRE9sVC9yci9xUEZIUU9lNndBNDkyVGh3VWxZaDhCQkszTW9VWVZLNjEvL2xXekEKeFkrYzlmazlvckUrZXhMSVpwdUg1VnNZR21MNUFyc05sVmNBMkU4MWgwSlBPYUo1eEpiZG40YldpZG9vdXRVVwpXeDNhYUJLSEt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Z2SkNpeXdmQm5BNnZmejh2UDBzdGJJbkVtajh1dS9CSS81NzZqR0tWUWRQSDhqMnQvN1NQWjFKClhBWk9wc1hoVll2RmtpQlhVeW1RMnAvRjFqb2ZRRE1JQ0htdHhRUSthakJQNjBpcnFnVnpsRi95NlQySUgzOHYKbGordndIam52WW5vVmhGNEY0TlE5amp6S3Y1NUhVTk0xUEJKZkFaOTJqeXovczdPMmN2cjhNWlNkT2s5QVk1RQp5RXRlQjBTSjdLS0tUZklBVmVMQzdrRnBHR3FsRkRBNzhPSS9YakNZViswRjk4MHdNOVkxTEVUa3ZMamVSMEFyCnVzZDNIS1Vtd2EwTVEwUTNZNGxma0ZtNjJTclhvcjJURC9WZHpFZWNOTnVmV1VJTVNuaEJDNTVHWjBOTVYvR0QKRXhGZTVWQkhUZEZVNlIwb3JCOVFjVll1Mzk0MEt5NXhkbHNaUHZlMmRJNS9WOXhzY0Zad3cxWWs4K21RK3NVeQp2UVBoL2ZmK0tTQjdVVkdvTVNXUlg3YjFFMGVzZSs4QzZlaVV2OXpDR0VRbkVCcnFIQWxSUDJ2ZzQ0bXFJSnRzCjN2NUt1NW0ySmJoeWNsQVR3VUNQZkN3a2tLRTg0MzZGRitDK0ZUVTJ1OWVpL2t5QTAxYi9zRFl2cWdsS2FWK3MKbEVHRkhjd05Ea2VrS1BFUEZxNkpnZ3R0WlNidE5SMnFadzl3cExIbDVuVlVXdnBGa2hvcW1KVkphK0VBSTQ1LwpqRkh4VG9PMHp1NlBxc1p5SnM2TC84Z3BhbTcwMDV6b0VETVRjcFltMlduMFBKcEg3NE9zUHJVRDVJWVA5ZEt5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K", + ), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_none_private_dns_zone( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--node-count=1 --load-balancer-sku=standard ' \ - '--enable-private-cluster --private-dns-zone none ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('privateFqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('apiServerAccessProfile.privateDNSZone', 'None'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--node-count=1 --load-balancer-sku=standard " + "--enable-private-cluster --private-dns-zone none " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("privateFqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("apiServerAccessProfile.privateDNSZone", "None"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_private_cluster_public_fqdn(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_private_cluster_public_fqdn( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--enable-private-cluster --node-count=1 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('privateFqdn'), - self.exists('fqdn'), - self.check('provisioningState', 'Succeeded'), - self.check( - 'apiServerAccessProfile.enablePrivateClusterPublicFqdn', True), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--enable-private-cluster --node-count=1 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("privateFqdn"), + self.exists("fqdn"), + self.check("provisioningState", "Succeeded"), + self.check( + "apiServerAccessProfile.enablePrivateClusterPublicFqdn", True + ), + ], + ) # update - update_cmd = 'aks update --resource-group={resource_group} --name={name} --disable-public-fqdn' - self.cmd(update_cmd, checks=[ - self.exists('privateFqdn'), - self.check('fqdn', None), - self.check('provisioningState', 'Succeeded'), - self.check( - 'apiServerAccessProfile.enablePrivateClusterPublicFqdn', False), - ]) + update_cmd = "aks update --resource-group={resource_group} --name={name} --disable-public-fqdn" + self.cmd( + update_cmd, + checks=[ + self.exists("privateFqdn"), + self.check("fqdn", None), + self.check("provisioningState", "Succeeded"), + self.check( + "apiServerAccessProfile.enablePrivateClusterPublicFqdn", False + ), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_fqdn_subdomain(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - identity_name = self.create_random_name('cliakstest', 16) - subdomain_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'identity_name': identity_name, - 'subdomain_name': subdomain_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + identity_name = self.create_random_name("cliakstest", 16) + subdomain_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "identity_name": identity_name, + "subdomain_name": subdomain_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create private dns zone create_private_dns_zone = 'network private-dns zone create --resource-group={resource_group} --name="privatelink.{location}.azmk8s.io"' - zone = self.cmd(create_private_dns_zone, checks=[ - self.check('provisioningState', 'Succeeded') - ]).get_output_in_json() + zone = self.cmd( + create_private_dns_zone, + checks=[self.check("provisioningState", "Succeeded")], + ).get_output_in_json() zone_id = zone["id"] assert zone_id is not None - self.kwargs.update({ - 'zone_id': zone_id, - }) + self.kwargs.update( + { + "zone_id": zone_id, + } + ) # create identity - create_identity = 'identity create --resource-group={resource_group} --name={identity_name}' - identity = self.cmd(create_identity, checks=[ - self.check('name', identity_name) - ]).get_output_in_json() + create_identity = ( + "identity create --resource-group={resource_group} --name={identity_name}" + ) + identity = self.cmd( + create_identity, checks=[self.check("name", identity_name)] + ).get_output_in_json() identity_id = identity["principalId"] identity_resource_id = identity["id"] assert identity_id is not None - self.kwargs.update({ - 'identity_id': identity_id, - 'identity_resource_id': identity_resource_id, - }) + self.kwargs.update( + { + "identity_id": identity_id, + "identity_resource_id": identity_resource_id, + } + ) # assign from unittest import mock - with mock.patch('azure.cli.command_modules.role.custom._gen_guid', side_effect=self.create_guid): + + with mock.patch( + "azure.cli.command_modules.role.custom._gen_guid", + side_effect=self.create_guid, + ): assignment = self.cmd( - 'role assignment create --assignee-object-id={identity_id} --role "Private DNS Zone Contributor" --scope={zone_id} --assignee-principal-type ServicePrincipal').get_output_in_json() + 'role assignment create --assignee-object-id={identity_id} --role "Private DNS Zone Contributor" --scope={zone_id} --assignee-principal-type ServicePrincipal' + ).get_output_in_json() assert assignment["roleDefinitionId"] is not None # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--node-count=1 --fqdn-subdomain={subdomain_name} --load-balancer-sku=standard ' \ - '--enable-private-cluster --private-dns-zone={zone_id} --enable-managed-identity --assign-identity {identity_resource_id} ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('privateFqdn'), - self.exists('fqdnSubdomain'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('apiServerAccessProfile.privateDnsZone', zone_id), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--node-count=1 --fqdn-subdomain={subdomain_name} --load-balancer-sku=standard " + "--enable-private-cluster --private-dns-zone={zone_id} --enable-managed-identity --assign-identity {identity_resource_id} " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("privateFqdn"), + self.exists("fqdnSubdomain"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("apiServerAccessProfile.privateDnsZone", zone_id), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_pod_identity_enabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_pod_identity_enabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--enable-pod-identity --enable-pod-identity-with-kubenet ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check('podIdentityProfile.allowNetworkPluginKubenet', True) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--enable-pod-identity --enable-pod-identity-with-kubenet " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check("podIdentityProfile.allowNetworkPluginKubenet", True), + ], + ) # update: disable - cmd = 'aks update --resource-group={resource_group} --name={name} --disable-pod-identity ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview' - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', None) - ]) + cmd = ( + "aks update --resource-group={resource_group} --name={name} --disable-pod-identity " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", None), + ], + ) # update: enable - cmd = 'aks update --resource-group={resource_group} --name={name} --enable-pod-identity --enable-pod-identity-with-kubenet ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview' - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check('podIdentityProfile.allowNetworkPluginKubenet', True) - ]) + cmd = ( + "aks update --resource-group={resource_group} --name={name} --enable-pod-identity --enable-pod-identity-with-kubenet " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check("podIdentityProfile.allowNetworkPluginKubenet", True), + ], + ) # pod identity exception: add - cmd = ('aks pod-identity exception add --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name --pod-labels foo=bar ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].name', 'test-name'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].namespace', 'test-namespace'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo', 'bar'), - ]) + cmd = ( + "aks pod-identity exception add --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name --pod-labels foo=bar " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].name", + "test-name", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].namespace", + "test-namespace", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo", + "bar", + ), + ], + ) # pod identity exception: update - cmd = ('aks pod-identity exception update --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name --pod-labels foo=bar a=b ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].name', 'test-name'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].namespace', 'test-namespace'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo', 'bar'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.a', 'b'), - ]) + cmd = ( + "aks pod-identity exception update --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name --pod-labels foo=bar a=b " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].name", + "test-name", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].namespace", + "test-namespace", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo", + "bar", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.a", + "b", + ), + ], + ) # pod identity exception: delete - cmd = ('aks pod-identity exception delete --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions', None), - ]) + cmd = ( + "aks pod-identity exception delete --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check("podIdentityProfile.userAssignedIdentityExceptions", None), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_using_azurecni_with_pod_identity_enabled(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys() - }) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_using_azurecni_with_pod_identity_enabled( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--enable-pod-identity --network-plugin azure ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--enable-pod-identity --network-plugin azure " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + ], + ) # update: disable - cmd = 'aks update --resource-group={resource_group} --name={name} --disable-pod-identity ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview' - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', None) - ]) + cmd = ( + "aks update --resource-group={resource_group} --name={name} --disable-pod-identity " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", None), + ], + ) # update: enable - cmd = 'aks update --resource-group={resource_group} --name={name} --enable-pod-identity ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview' - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True) - ]) + cmd = ( + "aks update --resource-group={resource_group} --name={name} --enable-pod-identity " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + ], + ) # pod identity exception: add - cmd = ('aks pod-identity exception add --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name --pod-labels foo=bar ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].name', 'test-name'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].namespace', 'test-namespace'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo', 'bar'), - ]) + cmd = ( + "aks pod-identity exception add --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name --pod-labels foo=bar " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].name", + "test-name", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].namespace", + "test-namespace", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo", + "bar", + ), + ], + ) # pod identity exception: update - cmd = ('aks pod-identity exception update --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name --pod-labels foo=bar a=b ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].name', 'test-name'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].namespace', 'test-namespace'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo', 'bar'), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.a', 'b'), - ]) + cmd = ( + "aks pod-identity exception update --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name --pod-labels foo=bar a=b " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].name", + "test-name", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].namespace", + "test-namespace", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.foo", + "bar", + ), + self.check( + "podIdentityProfile.userAssignedIdentityExceptions[0].podLabels.a", + "b", + ), + ], + ) # pod identity exception: delete - cmd = ('aks pod-identity exception delete --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentityExceptions', None), - ]) + cmd = ( + "aks pod-identity exception delete --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check("podIdentityProfile.userAssignedIdentityExceptions", None), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) # the pod identity add command creates role assignment with random uuid # for this case we cannot use recording to capture the fixture, therefore we need to mark it as live_only @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_pod_identity_usage(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - identity_name = self.create_random_name('id', 6) - binding_selector_name = 'binding_test' - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'identity_name': identity_name, - 'binding_selector': binding_selector_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + identity_name = self.create_random_name("id", 6) + binding_selector_name = "binding_test" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "identity_name": identity_name, + "binding_selector": binding_selector_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create identity - cmd = 'identity create --resource-group={resource_group} --name={identity_name} --location={location}' - application_identity = self.cmd(cmd, checks=[ - self.check('name', identity_name) - ]).get_output_in_json() - self.kwargs.update({ - 'application_identity_id': application_identity['id'], - }) + cmd = "identity create --resource-group={resource_group} --name={identity_name} --location={location}" + application_identity = self.cmd( + cmd, checks=[self.check("name", identity_name)] + ).get_output_in_json() + self.kwargs.update( + { + "application_identity_id": application_identity["id"], + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--enable-pod-identity --enable-pod-identity-with-kubenet ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--enable-pod-identity --enable-pod-identity-with-kubenet " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + ], + ) # pod identity: add - cmd = ('aks pod-identity add --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name --identity-resource-id={application_identity_id} ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].name', 'test-name'), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].namespace', 'test-namespace'), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].provisioningState', 'Assigned'), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].identity.clientId', application_identity['clientId']), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].identity.objectId', application_identity['principalId']), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].identity.resourceId', application_identity['id']), - ]) + cmd = ( + "aks pod-identity add --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name --identity-resource-id={application_identity_id} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check( + "podIdentityProfile.userAssignedIdentities[0].name", "test-name" + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].namespace", + "test-namespace", + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].provisioningState", + "Assigned", + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].identity.clientId", + application_identity["clientId"], + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].identity.objectId", + application_identity["principalId"], + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].identity.resourceId", + application_identity["id"], + ), + ], + ) # pod identity: delete - cmd = ('aks pod-identity delete --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace --name test-name ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check('podIdentityProfile.userAssignedIdentities', None), - ]) + cmd = ( + "aks pod-identity delete --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace --name test-name " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check("podIdentityProfile.userAssignedIdentities", None), + ], + ) # pod identity: add with binding selector - cmd = ('aks pod-identity add --cluster-name={name} --resource-group={resource_group} ' - '--namespace test-namespace-binding-selector --name test-name-binding-selector ' - '--identity-resource-id={application_identity_id} --binding-selector={binding_selector} ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview') - self.cmd(cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('podIdentityProfile.enabled', True), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].name', 'test-name-binding-selector'), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].namespace', 'test-namespace-binding-selector'), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].provisioningState', 'Assigned'), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].bindingSelector', binding_selector_name), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].identity.clientId', application_identity['clientId']), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].identity.objectId', application_identity['principalId']), - self.check( - 'podIdentityProfile.userAssignedIdentities[0].identity.resourceId', application_identity['id']), - ]) + cmd = ( + "aks pod-identity add --cluster-name={name} --resource-group={resource_group} " + "--namespace test-namespace-binding-selector --name test-name-binding-selector " + "--identity-resource-id={application_identity_id} --binding-selector={binding_selector} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnablePodIdentityPreview" + ) + self.cmd( + cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("podIdentityProfile.enabled", True), + self.check( + "podIdentityProfile.userAssignedIdentities[0].name", + "test-name-binding-selector", + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].namespace", + "test-namespace-binding-selector", + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].provisioningState", + "Assigned", + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].bindingSelector", + binding_selector_name, + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].identity.clientId", + application_identity["clientId"], + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].identity.objectId", + application_identity["principalId"], + ), + self.check( + "podIdentityProfile.userAssignedIdentities[0].identity.resourceId", + application_identity["id"], + ), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_update_with_windows_password(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_update_with_windows_password( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': self.create_random_name('p@0A', 16), - 'nodepool2_name': 'npwin', - 'new_windows_admin_password': self.create_random_name('n!C3', 16), - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": self.create_random_name("p@0A", 16), + "nodepool2_name": "npwin", + "new_windows_admin_password": self.create_random_name("n!C3", 16), + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + ], + ) # nodepool add - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1", + checks=[self.check("provisioningState", "Succeeded")], + ) # update Windows password - self.cmd('aks update --resource-group={resource_group} --name={name} --windows-admin-password {new_windows_admin_password}', checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --windows-admin-password {new_windows_admin_password}", + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool delete self.cmd( - 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + "aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait", + checks=[self.is_empty()], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) def test_aks_custom_kubelet_identity(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - control_plane_identity_name = self.create_random_name('cliakstest', 16) - kubelet_identity_name = self.create_random_name('cliakstest', 16) - new_kubelet_identity_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'control_plane_identity_name': control_plane_identity_name, - 'kubelet_identity_name': kubelet_identity_name, - "new_kubelet_identity_name": new_kubelet_identity_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + control_plane_identity_name = self.create_random_name("cliakstest", 16) + kubelet_identity_name = self.create_random_name("cliakstest", 16) + new_kubelet_identity_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "control_plane_identity_name": control_plane_identity_name, + "kubelet_identity_name": kubelet_identity_name, + "new_kubelet_identity_name": new_kubelet_identity_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create control plane identity - control_plane_identity = 'identity create --resource-group={resource_group} --name={control_plane_identity_name}' - c_identity = self.cmd(control_plane_identity, checks=[ - self.check('name', control_plane_identity_name) - ]).get_output_in_json() + control_plane_identity = "identity create --resource-group={resource_group} --name={control_plane_identity_name}" + c_identity = self.cmd( + control_plane_identity, + checks=[self.check("name", control_plane_identity_name)], + ).get_output_in_json() control_plane_identity_resource_id = c_identity["id"] assert control_plane_identity_resource_id is not None - self.kwargs.update({ - 'control_plane_identity_resource_id': control_plane_identity_resource_id, - }) + self.kwargs.update( + { + "control_plane_identity_resource_id": control_plane_identity_resource_id, + } + ) # create kubelet identity - kubelet_identity = 'identity create --resource-group={resource_group} --name={kubelet_identity_name}' - k_identity = self.cmd(kubelet_identity, checks=[ - self.check('name', kubelet_identity_name) - ]).get_output_in_json() + kubelet_identity = "identity create --resource-group={resource_group} --name={kubelet_identity_name}" + k_identity = self.cmd( + kubelet_identity, checks=[self.check("name", kubelet_identity_name)] + ).get_output_in_json() kubelet_identity_resource_id = k_identity["id"] assert kubelet_identity_resource_id is not None - self.kwargs.update({ - 'kubelet_identity_resource_id': kubelet_identity_resource_id, - }) + self.kwargs.update( + { + "kubelet_identity_resource_id": kubelet_identity_resource_id, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--node-count=1 --enable-managed-identity ' \ - '--assign-identity {control_plane_identity_resource_id} --assign-kubelet-identity {kubelet_identity_resource_id} ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('identity'), - self.exists('identityProfile'), - self.check('provisioningState', 'Succeeded'), - self.check('identityProfile.kubeletidentity.resourceId', - kubelet_identity_resource_id), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--node-count=1 --enable-managed-identity " + "--assign-identity {control_plane_identity_resource_id} --assign-kubelet-identity {kubelet_identity_resource_id} " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("identity"), + self.exists("identityProfile"), + self.check("provisioningState", "Succeeded"), + self.check( + "identityProfile.kubeletidentity.resourceId", + kubelet_identity_resource_id, + ), + ], + ) # create new kubelet identity - new_kubelet_identity = 'identity create --resource-group={resource_group} --name={new_kubelet_identity_name}' - new_identity = self.cmd(new_kubelet_identity, checks=[ - self.check('name', new_kubelet_identity_name) - ]).get_output_in_json() + new_kubelet_identity = "identity create --resource-group={resource_group} --name={new_kubelet_identity_name}" + new_identity = self.cmd( + new_kubelet_identity, checks=[self.check("name", new_kubelet_identity_name)] + ).get_output_in_json() new_kubelet_identity_resource_id = new_identity["id"] assert new_kubelet_identity_resource_id is not None - self.kwargs.update({ - 'new_kubelet_identity_resource_id': new_kubelet_identity_resource_id, - }) + self.kwargs.update( + { + "new_kubelet_identity_resource_id": new_kubelet_identity_resource_id, + } + ) # update to new kubelet identity - self.cmd('aks update --resource-group={resource_group} --name={name} --assign-kubelet-identity {new_kubelet_identity_resource_id} --yes', checks=[ - self.exists('identity'), - self.exists('identityProfile'), - self.check('provisioningState', 'Succeeded'), - self.check('identityProfile.kubeletidentity.resourceId', - new_kubelet_identity_resource_id), - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --assign-kubelet-identity {new_kubelet_identity_resource_id} --yes", + checks=[ + self.exists("identity"), + self.exists("identityProfile"), + self.check("provisioningState", "Succeeded"), + self.check( + "identityProfile.kubeletidentity.resourceId", + new_kubelet_identity_resource_id, + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_disable_local_accounts(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ - '--disable-local-accounts --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('disableLocalAccounts', True) - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 " + "--disable-local-accounts --ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("disableLocalAccounts", True), + ], + ) # update to enable local accounts - self.cmd('aks update --resource-group={resource_group} --name={name} --enable-local-accounts', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('disableLocalAccounts', False) - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --enable-local-accounts", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("disableLocalAccounts", False), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) def test_aks_enable_utlra_ssd(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--node-vm-size Standard_D2s_v3 --zones 1 2 3 --enable-ultra-ssd ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--node-vm-size Standard_D2s_v3 --zones 1 2 3 --enable-ultra-ssd " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_maintenancewindow(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'mc_path': _get_test_data_file('maintenancewindow.json'), - 'auto_upgrade_config_name': 'aksManagedAutoUpgradeSchedule', - 'node_os_upgrade_config_name': 'aksManagedNodeOSUpgradeSchedule', - 'ssh_key_value': self.generate_ssh_keys(), - 'future_date': "2123-01-01" - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "mc_path": _get_test_data_file("maintenancewindow.json"), + "auto_upgrade_config_name": "aksManagedAutoUpgradeSchedule", + "node_os_upgrade_config_name": "aksManagedNodeOSUpgradeSchedule", + "ssh_key_value": self.generate_ssh_keys(), + "future_date": "2123-01-01", + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # add dedicated maintenanceconfiguration for cluster autoupgrade - maintenance_configuration_add_cmd = 'aks maintenanceconfiguration add ' \ - '-g {resource_group} --cluster-name {name} ' \ - '-n {auto_upgrade_config_name} ' \ - '--schedule-type Weekly ' \ - '--day-of-week Friday ' \ - '--interval-weeks 3 ' \ - '--duration 8 ' \ - '--utc-offset +05:30 ' \ - '--start-date {future_date} ' \ - '--start-time 00:00 ' - - self.cmd( - maintenance_configuration_add_cmd, checks=[ - self.exists('maintenanceWindow.schedule.weekly'), - self.check('maintenanceWindow.schedule.weekly.dayOfWeek', 'Friday'), - self.check('maintenanceWindow.schedule.weekly.intervalWeeks', 3), - self.check('maintenanceWindow.durationHours', 8), - self.check('maintenanceWindow.utcOffset', '+05:30'), - self.check('maintenanceWindow.startDate', '{future_date}'), - self.check('maintenanceWindow.startTime', '00:00')] + maintenance_configuration_add_cmd = ( + "aks maintenanceconfiguration add " + "-g {resource_group} --cluster-name {name} " + "-n {auto_upgrade_config_name} " + "--schedule-type Weekly " + "--day-of-week Friday " + "--interval-weeks 3 " + "--duration 8 " + "--utc-offset +05:30 " + "--start-date {future_date} " + "--start-time 00:00 " + ) + + self.cmd( + maintenance_configuration_add_cmd, + checks=[ + self.exists("maintenanceWindow.schedule.weekly"), + self.check("maintenanceWindow.schedule.weekly.dayOfWeek", "Friday"), + self.check("maintenanceWindow.schedule.weekly.intervalWeeks", 3), + self.check("maintenanceWindow.durationHours", 8), + self.check("maintenanceWindow.utcOffset", "+05:30"), + self.check("maintenanceWindow.startDate", "{future_date}"), + self.check("maintenanceWindow.startTime", "00:00"), + ], ) # add dedicated maintenanceconfiguration for node os autoupgrade - maintenance_configuration_add_cmd = 'aks maintenanceconfiguration add ' \ - '-g {resource_group} --cluster-name {name} ' \ - '-n {node_os_upgrade_config_name} ' \ - '--schedule-type RelativeMonthly ' \ - '--day-of-week Tuesday ' \ - '--week-index Last ' \ - '--interval-months 1 ' \ - '--duration 12 ' \ - '--start-time 09:00 ' \ - '--utc-offset=-08:00 ' \ - '--start-date {future_date} ' - - self.cmd( - maintenance_configuration_add_cmd, checks=[ - self.exists('maintenanceWindow.schedule.relativeMonthly'), - self.check('maintenanceWindow.schedule.relativeMonthly.dayOfWeek', 'Tuesday'), - self.check('maintenanceWindow.schedule.relativeMonthly.intervalMonths', 1), - self.check('maintenanceWindow.durationHours', 12), - self.check('maintenanceWindow.utcOffset', '-08:00'), - self.check('maintenanceWindow.startDate', '{future_date}'), - self.check('maintenanceWindow.startTime', '09:00')] + maintenance_configuration_add_cmd = ( + "aks maintenanceconfiguration add " + "-g {resource_group} --cluster-name {name} " + "-n {node_os_upgrade_config_name} " + "--schedule-type RelativeMonthly " + "--day-of-week Tuesday " + "--week-index Last " + "--interval-months 1 " + "--duration 12 " + "--start-time 09:00 " + "--utc-offset=-08:00 " + "--start-date {future_date} " + ) + + self.cmd( + maintenance_configuration_add_cmd, + checks=[ + self.exists("maintenanceWindow.schedule.relativeMonthly"), + self.check( + "maintenanceWindow.schedule.relativeMonthly.dayOfWeek", "Tuesday" + ), + self.check( + "maintenanceWindow.schedule.relativeMonthly.intervalMonths", 1 + ), + self.check("maintenanceWindow.durationHours", 12), + self.check("maintenanceWindow.utcOffset", "-08:00"), + self.check("maintenanceWindow.startDate", "{future_date}"), + self.check("maintenanceWindow.startTime", "09:00"), + ], ) # maintenanceconfiguration list - maintenance_configuration_list_cmd = 'aks maintenanceconfiguration list ' \ - '-g {resource_group} --cluster-name {name}' - self.cmd(maintenance_configuration_list_cmd, checks=[self.check('length(@)', 2)]) + maintenance_configuration_list_cmd = ( + "aks maintenanceconfiguration list " + "-g {resource_group} --cluster-name {name}" + ) + self.cmd( + maintenance_configuration_list_cmd, checks=[self.check("length(@)", 2)] + ) # update maintenanceconfiguration from config file - maintenance_configuration_update_cmd = 'aks maintenanceconfiguration update ' \ - '-g {resource_group} --cluster-name {name} ' \ - '-n {auto_upgrade_config_name} ' \ - '--config-file {mc_path}' + maintenance_configuration_update_cmd = ( + "aks maintenanceconfiguration update " + "-g {resource_group} --cluster-name {name} " + "-n {auto_upgrade_config_name} " + "--config-file {mc_path}" + ) self.cmd( - maintenance_configuration_update_cmd, checks=[ - self.exists('maintenanceWindow.schedule.absoluteMonthly'), - self.check('maintenanceWindow.schedule.absoluteMonthly.dayOfMonth', 1), - self.check('maintenanceWindow.schedule.absoluteMonthly.intervalMonths', 3), - self.check('maintenanceWindow.durationHours', 4), - self.check('maintenanceWindow.utcOffset', '-08:00'), - self.check('maintenanceWindow.startTime', '09:00'), - self.check('maintenanceWindow.notAllowedDates | length(@)', 2)] + maintenance_configuration_update_cmd, + checks=[ + self.exists("maintenanceWindow.schedule.absoluteMonthly"), + self.check("maintenanceWindow.schedule.absoluteMonthly.dayOfMonth", 1), + self.check( + "maintenanceWindow.schedule.absoluteMonthly.intervalMonths", 3 + ), + self.check("maintenanceWindow.durationHours", 4), + self.check("maintenanceWindow.utcOffset", "-08:00"), + self.check("maintenanceWindow.startTime", "09:00"), + self.check("maintenanceWindow.notAllowedDates | length(@)", 2), + ], ) # maintenanceconfiguration show - maintenance_configuration_show_cmd = 'aks maintenanceconfiguration show ' \ - '-g {resource_group} --cluster-name {name} ' \ - '-n {auto_upgrade_config_name}' + maintenance_configuration_show_cmd = ( + "aks maintenanceconfiguration show " + "-g {resource_group} --cluster-name {name} " + "-n {auto_upgrade_config_name}" + ) self.cmd( - maintenance_configuration_show_cmd, checks=[ - self.check("name == '{auto_upgrade_config_name}'", True)] + maintenance_configuration_show_cmd, + checks=[self.check("name == '{auto_upgrade_config_name}'", True)], ) # maintenanceconfiguration delete - maintenance_configuration_delete_cmd = 'aks maintenanceconfiguration delete ' \ - '-g {resource_group} --cluster-name {name} ' \ - '-n {auto_upgrade_config_name}' + maintenance_configuration_delete_cmd = ( + "aks maintenanceconfiguration delete " + "-g {resource_group} --cluster-name {name} " + "-n {auto_upgrade_config_name}" + ) self.cmd(maintenance_configuration_delete_cmd, checks=[self.is_empty()]) - maintenance_configuration_delete_cmd = 'aks maintenanceconfiguration delete ' \ - '-g {resource_group} --cluster-name {name} ' \ - '-n {node_os_upgrade_config_name}' + maintenance_configuration_delete_cmd = ( + "aks maintenanceconfiguration delete " + "-g {resource_group} --cluster-name {name} " + "-n {node_os_upgrade_config_name}" + ) self.cmd(maintenance_configuration_delete_cmd, checks=[self.is_empty()]) # maintenanceconfiguration list - maintenance_configuration_list_cmd = 'aks maintenanceconfiguration list ' \ - '-g {resource_group} --cluster-name {name}' + maintenance_configuration_list_cmd = ( + "aks maintenanceconfiguration list " + "-g {resource_group} --cluster-name {name}" + ) self.cmd(maintenance_configuration_list_cmd, checks=[self.is_empty()]) # delete - self.cmd('aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + self.cmd( + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_maintenanceconfiguration(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'mc_path': _get_test_data_file('maintenanceconfig.json'), - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_maintenanceconfiguration( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "mc_path": _get_test_data_file("maintenanceconfig.json"), + "ssh_key_value": self.generate_ssh_keys(), + } + ) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # maintenanceconfiguration add - maintenance_configuration_add_cmd = 'aks maintenanceconfiguration add -g {resource_group} --cluster-name {name} -n default --weekday Monday --start-hour 1' + maintenance_configuration_add_cmd = "aks maintenanceconfiguration add -g {resource_group} --cluster-name {name} -n default --weekday Monday --start-hour 1" self.cmd( - maintenance_configuration_add_cmd, checks=[ - self.check('timeInWeek[0].day', 'Monday'), - self.check('timeInWeek[0].day', 'Monday'), - self.check('timeInWeek[0].hourSlots | contains(@, `1`)', True)] + maintenance_configuration_add_cmd, + checks=[ + self.check("timeInWeek[0].day", "Monday"), + self.check("timeInWeek[0].day", "Monday"), + self.check("timeInWeek[0].hourSlots | contains(@, `1`)", True), + ], ) # maintenanceconfiguration update (from config file) - maintenance_configuration_update_cmd = 'aks maintenanceconfiguration update -g {resource_group} --cluster-name {name} -n default --config-file {mc_path}' + maintenance_configuration_update_cmd = "aks maintenanceconfiguration update -g {resource_group} --cluster-name {name} -n default --config-file {mc_path}" self.cmd( - maintenance_configuration_update_cmd, checks=[ + maintenance_configuration_update_cmd, + checks=[ self.check( - "timeInWeek[*].day | contains(@, 'Tuesday') && contains(@, 'Wednesday')", True), + "timeInWeek[*].day | contains(@, 'Tuesday') && contains(@, 'Wednesday')", + True, + ), self.check( - "timeInWeek[*].hourSlots[*] | contains([0], `2`) && contains([1], `6`)", True), - self.check("notAllowedTime | length(@) == `2`", True)] + "timeInWeek[*].hourSlots[*] | contains([0], `2`) && contains([1], `6`)", + True, + ), + self.check("notAllowedTime | length(@) == `2`", True), + ], ) # maintenanceconfiguration show - maintenance_configuration_show_cmd = 'aks maintenanceconfiguration show -g {resource_group} --cluster-name {name} -n default' + maintenance_configuration_show_cmd = "aks maintenanceconfiguration show -g {resource_group} --cluster-name {name} -n default" self.cmd( - maintenance_configuration_show_cmd, checks=[ - self.check("name == 'default'", True)] + maintenance_configuration_show_cmd, + checks=[self.check("name == 'default'", True)], ) # maintenanceconfiguration delete - maintenance_configuration_delete_cmd = 'aks maintenanceconfiguration delete -g {resource_group} --cluster-name {name} -n default' - self.cmd( - maintenance_configuration_delete_cmd, checks=[self.is_empty()]) + maintenance_configuration_delete_cmd = "aks maintenanceconfiguration delete -g {resource_group} --cluster-name {name} -n default" + self.cmd(maintenance_configuration_delete_cmd, checks=[self.is_empty()]) # maintenanceconfiguration list - maintenance_configuration_list_cmd = 'aks maintenanceconfiguration list -g {resource_group} --cluster-name {name}' - self.cmd( - maintenance_configuration_list_cmd, checks=[self.is_empty()]) + maintenance_configuration_list_cmd = "aks maintenanceconfiguration list -g {resource_group} --cluster-name {name}" + self.cmd(maintenance_configuration_list_cmd, checks=[self.is_empty()]) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_create_with_windows_gmsa(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_create_with_windows_gmsa( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': 'replace-Password1234$', - 'nodepool2_name': 'npwin', - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": "replace-Password1234$", + "nodepool2_name": "npwin", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ - '--ssh-key-value={ssh_key_value} --enable-windows-gmsa --yes ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSWindowsGmsaPreview' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1'), - self.check('windowsProfile.gmsaProfile.enabled', 'True') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure " + "--ssh-key-value={ssh_key_value} --enable-windows-gmsa --yes " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSWindowsGmsaPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + self.check("windowsProfile.gmsaProfile.enabled", "True"), + ], + ) # nodepool add - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1", + checks=[self.check("provisioningState", "Succeeded")], + ) # nodepool delete self.cmd( - 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + "aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait", + checks=[self.is_empty()], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_with_overlay_network_plugin_mode(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_with_overlay_network_plugin_mode( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--network-plugin azure --network-plugin-mode overlay --ssh-key-value={ssh_key_value} ' \ - '--pod-cidr 10.244.0.0/16 --node-count 1 ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.podCidr', '10.244.0.0/16'), - self.check('networkProfile.networkPluginMode', 'overlay'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--network-plugin azure --network-plugin-mode overlay --ssh-key-value={ssh_key_value} " + "--pod-cidr 10.244.0.0/16 --node-count 1 " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.podCidr", "10.244.0.0/16"), + self.check("networkProfile.networkPluginMode", "overlay"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_create_with_network_dataplane_cilium(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_create_with_network_dataplane_cilium( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--network-plugin azure --network-plugin-mode overlay --ssh-key-value={ssh_key_value} ' \ - '--pod-cidr 10.244.0.0/16 --node-count 1 ' \ - '--network-dataplane=cilium ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CiliumDataplanePreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.podCidr', '10.244.0.0/16'), - self.check('networkProfile.networkPlugin', 'azure'), - self.check('networkProfile.networkPluginMode', 'overlay'), - self.check('networkProfile.networkPolicy', 'cilium'), - self.check('networkProfile.networkDataplane', 'cilium'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--network-plugin azure --network-plugin-mode overlay --ssh-key-value={ssh_key_value} " + "--pod-cidr 10.244.0.0/16 --node-count 1 " + "--network-dataplane=cilium " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CiliumDataplanePreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.podCidr", "10.244.0.0/16"), + self.check("networkProfile.networkPlugin", "azure"), + self.check("networkProfile.networkPluginMode", "overlay"), + self.check("networkProfile.networkPolicy", "cilium"), + self.check("networkProfile.networkDataplane", "cilium"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_with_enable_cilium_dataplane(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_with_enable_cilium_dataplane( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--network-plugin azure --network-plugin-mode overlay --ssh-key-value={ssh_key_value} ' \ - '--pod-cidr 10.244.0.0/16 --node-count 1 ' \ - '--enable-cilium-dataplane ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CiliumDataplanePreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.podCidr', '10.244.0.0/16'), - self.check('networkProfile.networkPluginMode', 'overlay'), - self.check('networkProfile.networkDataplane', 'cilium'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--network-plugin azure --network-plugin-mode overlay --ssh-key-value={ssh_key_value} " + "--pod-cidr 10.244.0.0/16 --node-count 1 " + "--enable-cilium-dataplane " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CiliumDataplanePreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.podCidr", "10.244.0.0/16"), + self.check("networkProfile.networkPluginMode", "overlay"), + self.check("networkProfile.networkDataplane", "cilium"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_dualstack_with_default_network(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_dualstack_with_default_network( + self, resource_group, resource_group_location + ): _, create_version = self._get_versions(resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ip-families IPv4,IPv6 --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-EnableDualStack' + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ip-families IPv4,IPv6 --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-EnableDualStack" + ) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.podCidrs[] | length(@)', 2), - self.check('networkProfile.serviceCidrs[] | length(@)', 2), - self.check('networkProfile.ipFamilies', ['IPv4', 'IPv6']) - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.podCidrs[] | length(@)", 2), + self.check("networkProfile.serviceCidrs[] | length(@)", 2), + self.check("networkProfile.ipFamilies", ["IPv4", "IPv6"]), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_default_network(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_default_network( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--pod-cidr 172.126.0.0/16 --service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 ' \ - '--pod-cidrs 172.126.0.0/16 --service-cidrs 172.56.0.0/16 --ip-families IPv4 ' \ - '--network-plugin kubenet --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.podCidr', '172.126.0.0/16'), - self.check('networkProfile.podCidrs', ['172.126.0.0/16']), - self.check('networkProfile.serviceCidr', '172.56.0.0/16'), - self.check('networkProfile.serviceCidrs', ['172.56.0.0/16']), - self.check('networkProfile.ipFamilies', ['IPv4']) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--pod-cidr 172.126.0.0/16 --service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 " + "--pod-cidrs 172.126.0.0/16 --service-cidrs 172.56.0.0/16 --ip-families IPv4 " + "--network-plugin kubenet --ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.podCidr", "172.126.0.0/16"), + self.check("networkProfile.podCidrs", ["172.126.0.0/16"]), + self.check("networkProfile.serviceCidr", "172.56.0.0/16"), + self.check("networkProfile.serviceCidrs", ["172.56.0.0/16"]), + self.check("networkProfile.ipFamilies", ["IPv4"]), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_outbound_ips(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_outbound_ips( + self, resource_group, resource_group_location + ): # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - init_pip_name = self.create_random_name('cliakstest', 16) - update_pip_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'init_pip_name': init_pip_name, - 'update_pip_name': update_pip_name, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_init_pip = 'network public-ip create -g {resource_group} -n {init_pip_name} --sku Standard' + aks_name = self.create_random_name("cliakstest", 16) + init_pip_name = self.create_random_name("cliakstest", 16) + update_pip_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "init_pip_name": init_pip_name, + "update_pip_name": update_pip_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_init_pip = "network public-ip create -g {resource_group} -n {init_pip_name} --sku Standard" # workaround for replay failure in CI self.cmd(create_init_pip) - get_init_pip = 'network public-ip show -g {resource_group} -n {init_pip_name}' - init_pip = self.cmd(get_init_pip, checks=[ - self.check('provisioningState', 'Succeeded') - ]).get_output_in_json() + get_init_pip = "network public-ip show -g {resource_group} -n {init_pip_name}" + init_pip = self.cmd( + get_init_pip, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() - create_update_pip = 'network public-ip create -g {resource_group} -n {update_pip_name} --sku Standard' + create_update_pip = "network public-ip create -g {resource_group} -n {update_pip_name} --sku Standard" # workaround for replay failure in CI self.cmd(create_update_pip) - get_update_pip = 'network public-ip show -g {resource_group} -n {update_pip_name}' - update_pip = self.cmd(get_update_pip, checks=[ - self.check('provisioningState', 'Succeeded') - ]).get_output_in_json() + get_update_pip = ( + "network public-ip show -g {resource_group} -n {update_pip_name}" + ) + update_pip = self.cmd( + get_update_pip, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() - init_pip_id = init_pip['id'] - update_pip_id = update_pip['id'] + init_pip_id = init_pip["id"] + update_pip_id = update_pip["id"] assert init_pip_id is not None assert update_pip_id is not None - self.kwargs.update({ - 'init_pip_id': init_pip_id, - 'update_pip_id': update_pip_id, - }) + self.kwargs.update( + { + "init_pip_id": init_pip_id, + "update_pip_id": update_pip_id, + } + ) # create cluster - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --load-balancer-outbound-ips {init_pip_id}' + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --load-balancer-outbound-ips {init_pip_id}" + ) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)', 1), - self.check( - 'networkProfile.loadBalancerProfile.effectiveOutboundIPs[0].id', init_pip_id) - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)", + 1, + ), + self.check( + "networkProfile.loadBalancerProfile.effectiveOutboundIPs[0].id", + init_pip_id, + ), + ], + ) # update cluster - update_cmd = 'aks update -g {resource_group} -n {name} --load-balancer-outbound-ips {update_pip_id}' + update_cmd = "aks update -g {resource_group} -n {name} --load-balancer-outbound-ips {update_pip_id}" - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)', 1), - self.check( - 'networkProfile.loadBalancerProfile.effectiveOutboundIPs[0].id', update_pip_id) - ]) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)", + 1, + ), + self.check( + "networkProfile.loadBalancerProfile.effectiveOutboundIPs[0].id", + update_pip_id, + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_and_update_ipv6_count(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_and_update_ipv6_count( + self, resource_group, resource_group_location + ): _, create_version = self._get_versions(resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--pod-cidr 172.126.0.0/16 --service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 ' \ - '--pod-cidrs 172.126.0.0/16,2001:abcd:1234::/64 --service-cidrs 172.56.0.0/16,2001:ffff::/108 ' \ - '--ip-families IPv4,IPv6 --load-balancer-managed-outbound-ipv6-count 2 ' \ - '--network-plugin kubenet --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-EnableDualStack' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.podCidr', '172.126.0.0/16'), - self.check('networkProfile.podCidrs', [ - '172.126.0.0/16', '2001:abcd:1234::/64']), - self.check('networkProfile.serviceCidr', '172.56.0.0/16'), - self.check('networkProfile.serviceCidrs', [ - '172.56.0.0/16', '2001:ffff::/108']), - self.check('networkProfile.ipFamilies', ['IPv4', 'IPv6']), - self.check( - 'networkProfile.loadBalancerProfile.managedOutboundIPs.countIpv6', 2), - self.check( - 'networkProfile.loadBalancerProfile.managedOutboundIPs.count', 1), - self.check( - 'networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)', 3) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--pod-cidr 172.126.0.0/16 --service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 " + "--pod-cidrs 172.126.0.0/16,2001:abcd:1234::/64 --service-cidrs 172.56.0.0/16,2001:ffff::/108 " + "--ip-families IPv4,IPv6 --load-balancer-managed-outbound-ipv6-count 2 " + "--network-plugin kubenet --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-EnableDualStack" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.podCidr", "172.126.0.0/16"), + self.check( + "networkProfile.podCidrs", ["172.126.0.0/16", "2001:abcd:1234::/64"] + ), + self.check("networkProfile.serviceCidr", "172.56.0.0/16"), + self.check( + "networkProfile.serviceCidrs", ["172.56.0.0/16", "2001:ffff::/108"] + ), + self.check("networkProfile.ipFamilies", ["IPv4", "IPv6"]), + self.check( + "networkProfile.loadBalancerProfile.managedOutboundIPs.countIpv6", 2 + ), + self.check( + "networkProfile.loadBalancerProfile.managedOutboundIPs.count", 1 + ), + self.check( + "networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)", + 3, + ), + ], + ) # update - update_cmd = 'aks update -g {resource_group} -n {name} --load-balancer-managed-outbound-ipv6-count 4' - - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.podCidr', '172.126.0.0/16'), - self.check('networkProfile.podCidrs', [ - '172.126.0.0/16', '2001:abcd:1234::/64']), - self.check('networkProfile.serviceCidr', '172.56.0.0/16'), - self.check('networkProfile.serviceCidrs', [ - '172.56.0.0/16', '2001:ffff::/108']), - self.check('networkProfile.ipFamilies', ['IPv4', 'IPv6']), - self.check( - 'networkProfile.loadBalancerProfile.managedOutboundIPs.countIpv6', 4), - self.check( - 'networkProfile.loadBalancerProfile.managedOutboundIPs.count', 1), - self.check( - 'networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)', 5) - ]) + update_cmd = "aks update -g {resource_group} -n {name} --load-balancer-managed-outbound-ipv6-count 4" + + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.podCidr", "172.126.0.0/16"), + self.check( + "networkProfile.podCidrs", ["172.126.0.0/16", "2001:abcd:1234::/64"] + ), + self.check("networkProfile.serviceCidr", "172.56.0.0/16"), + self.check( + "networkProfile.serviceCidrs", ["172.56.0.0/16", "2001:ffff::/108"] + ), + self.check("networkProfile.ipFamilies", ["IPv4", "IPv6"]), + self.check( + "networkProfile.loadBalancerProfile.managedOutboundIPs.countIpv6", 4 + ), + self.check( + "networkProfile.loadBalancerProfile.managedOutboundIPs.count", 1 + ), + self.check( + "networkProfile.loadBalancerProfile.effectiveOutboundIPs[] | length(@)", + 5, + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', preserve_default_location=True) - def test_aks_azure_cni_overlay_migration(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) + def test_aks_azure_cni_overlay_migration( + self, resource_group, resource_group_location + ): _, create_version = self._get_versions(resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--network-plugin azure --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} ' \ - '--service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.networkPlugin', 'azure'), - self.check('networkProfile.networkPluginMode', None), - self.check('networkProfile.podCidr', None), - self.check('networkProfile.serviceCidr', '172.56.0.0/16'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--network-plugin azure --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} " + "--service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.networkPlugin", "azure"), + self.check("networkProfile.networkPluginMode", None), + self.check("networkProfile.podCidr", None), + self.check("networkProfile.serviceCidr", "172.56.0.0/16"), + ], + ) # update - update_cmd = 'aks update -g {resource_group} -n {name} --network-plugin-mode overlay --pod-cidr 100.64.0.0/10 ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview' + update_cmd = ( + "aks update -g {resource_group} -n {name} --network-plugin-mode overlay --pod-cidr 100.64.0.0/10 " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview" + ) - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.networkPlugin', 'azure'), - self.check('networkProfile.networkPluginMode', 'overlay'), - self.check('networkProfile.podCidr', '100.64.0.0/10'), - self.check('networkProfile.serviceCidr', '172.56.0.0/16'), - ]) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.networkPlugin", "azure"), + self.check("networkProfile.networkPluginMode", "overlay"), + self.check("networkProfile.podCidr", "100.64.0.0/10"), + self.check("networkProfile.serviceCidr", "172.56.0.0/16"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_azure_cni_overlay_migration_from_kubenet(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_azure_cni_overlay_migration_from_kubenet( + self, resource_group, resource_group_location + ): _, create_version = self._get_versions(resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--network-plugin kubenet --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} ' \ - '--service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 --pod-cidr 100.64.0.0/16 -c 1' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.networkPlugin', 'kubenet'), - self.check('networkProfile.networkPluginMode', None), - self.check('networkProfile.podCidr', '100.64.0.0/16'), - self.check('networkProfile.serviceCidr', '172.56.0.0/16'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--network-plugin kubenet --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} " + "--service-cidr 172.56.0.0/16 --dns-service-ip 172.56.0.10 --pod-cidr 100.64.0.0/16 -c 1" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.networkPlugin", "kubenet"), + self.check("networkProfile.networkPluginMode", None), + self.check("networkProfile.podCidr", "100.64.0.0/16"), + self.check("networkProfile.serviceCidr", "172.56.0.0/16"), + ], + ) # update - update_cmd = 'aks update -g {resource_group} -n {name} --network-plugin azure --network-plugin-mode overlay ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview' + update_cmd = ( + "aks update -g {resource_group} -n {name} --network-plugin azure --network-plugin-mode overlay " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureOverlayPreview" + ) - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.networkPlugin', 'azure'), - self.check('networkProfile.networkPluginMode', 'overlay'), - self.check('networkProfile.podCidr', '100.64.0.0/16'), - self.check('networkProfile.serviceCidr', '172.56.0.0/16'), - ]) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.networkPlugin", "azure"), + self.check("networkProfile.networkPluginMode", "overlay"), + self.check("networkProfile.podCidr", "100.64.0.0/16"), + self.check("networkProfile.serviceCidr", "172.56.0.0/16"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_migrate_cluster_to_cilium_dataplane(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_migrate_cluster_to_cilium_dataplane( + self, resource_group, resource_group_location + ): _, create_version = self._get_versions(resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create with Azure CNI overlay - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--network-plugin azure --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} ' \ - '--network-plugin-mode=overlay' + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--network-plugin azure --ssh-key-value={ssh_key_value} --kubernetes-version {k8s_version} " + "--network-plugin-mode=overlay" + ) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.networkPlugin', 'azure'), - self.check('networkProfile.networkPluginMode', 'overlay'), - self.check('networkProfile.networkDataplane', 'azure'), - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.networkPlugin", "azure"), + self.check("networkProfile.networkPluginMode", "overlay"), + self.check("networkProfile.networkDataplane", "azure"), + ], + ) # update to enable cilium dataplane - update_cmd = 'aks update -g {resource_group} -n {name} --network-dataplane=cilium --network-policy=cilium' + update_cmd = "aks update -g {resource_group} -n {name} --network-dataplane=cilium --network-policy=cilium" - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.networkPlugin', 'azure'), - self.check('networkProfile.networkPluginMode', 'overlay'), - self.check('networkProfile.networkDataplane', 'cilium'), - self.check('networkProfile.networkPolicy', 'cilium'), - ]) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.networkPlugin", "azure"), + self.check("networkProfile.networkPluginMode", "overlay"), + self.check("networkProfile.networkDataplane", "cilium"), + self.check("networkProfile.networkPolicy", "cilium"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_or_update_with_load_balancer_backend_pool_type(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_or_update_with_load_balancer_backend_pool_type( + self, resource_group, resource_group_location + ): _, create_version = self._get_versions(resource_group_location) - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'k8s_version': create_version, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "k8s_version": create_version, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--kubernetes-version={k8s_version} ' \ - '--load-balancer-backend-pool-type=nodeIP ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/IPBasedLoadBalancerPreview' - self.cmd(create_cmd, checks=[ - self.check('networkProfile.loadBalancerProfile.backendPoolType', 'nodeIP'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} " + "--kubernetes-version={k8s_version} " + "--load-balancer-backend-pool-type=nodeIP " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/IPBasedLoadBalancerPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check( + "networkProfile.loadBalancerProfile.backendPoolType", "nodeIP" + ), + ], + ) # update - update_cmd = 'aks update -g {resource_group} -n {name} --load-balancer-backend-pool-type=nodeIP ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/IPBasedLoadBalancerPreview' - self.cmd(update_cmd, checks=[ - self.check('networkProfile.loadBalancerProfile.backendPoolType', 'nodeIP'), - ]) + update_cmd = ( + "aks update -g {resource_group} -n {name} --load-balancer-backend-pool-type=nodeIP " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/IPBasedLoadBalancerPreview" + ) + self.cmd( + update_cmd, + checks=[ + self.check( + "networkProfile.loadBalancerProfile.backendPoolType", "nodeIP" + ), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_update_with_windows_gmsa(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_update_with_windows_gmsa( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'windows_admin_username': 'azureuser1', - 'windows_admin_password': 'replace-Password1234$', - 'nodepool2_name': 'npwin', - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "windows_admin_username": "azureuser1", + "windows_admin_password": "replace-Password1234$", + "nodepool2_name": "npwin", + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 ' \ - '--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} ' \ - '--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.adminUsername', 'azureuser1'), - self.not_exists('windowsProfile.gmsaProfile') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 " + "--windows-admin-username={windows_admin_username} --windows-admin-password={windows_admin_password} " + "--load-balancer-sku=standard --vm-set-type=virtualmachinescalesets --network-plugin=azure " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.adminUsername", "azureuser1"), + self.not_exists("windowsProfile.gmsaProfile"), + ], + ) # nodepool add - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1', checks=[ - self.check('provisioningState', 'Succeeded') - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --os-type Windows --node-count=1", + checks=[self.check("provisioningState", "Succeeded")], + ) # update Windows gmsa - update_cmd = "aks update --resource-group={resource_group} --name={name} --enable-windows-gmsa --yes " \ - "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSWindowsGmsaPreview" - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('windowsProfile.gmsaProfile.enabled', 'True') - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --enable-windows-gmsa --yes " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSWindowsGmsaPreview" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("windowsProfile.gmsaProfile.enabled", "True"), + ], + ) # nodepool delete self.cmd( - 'aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait', checks=[self.is_empty()]) + "aks nodepool delete --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --no-wait", + checks=[self.is_empty()], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_nodepool_update_taints_msi(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_nodepool_update_taints_msi( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) + aks_name = self.create_random_name("cliakstest", 16) nodepool1_name = "nodepool1" taints = "key1=value1:PreferNoSchedule" - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'taints': taints, - 'nodepool1_name': nodepool1_name, - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "taints": taints, + "nodepool1_name": nodepool1_name, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} " + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + ], + ) # show - self.cmd('aks show -g {resource_group} -n {name}', checks=[ - self.check('type', '{resource_type}'), - self.check('name', '{name}'), - self.exists('nodeResourceGroup'), - self.check('resourceGroup', '{resource_group}'), - self.check('agentPoolProfiles[0].count', 1), - self.check('agentPoolProfiles[0].osType', 'Linux'), - self.check('agentPoolProfiles[0].vmSize', 'Standard_DS2_v2'), - self.check('agentPoolProfiles[0].mode', 'System'), - self.check('dnsPrefix', '{dns_name_prefix}'), - self.exists('kubernetesVersion') - ]) + self.cmd( + "aks show -g {resource_group} -n {name}", + checks=[ + self.check("type", "{resource_type}"), + self.check("name", "{name}"), + self.exists("nodeResourceGroup"), + self.check("resourceGroup", "{resource_group}"), + self.check("agentPoolProfiles[0].count", 1), + self.check("agentPoolProfiles[0].osType", "Linux"), + self.check("agentPoolProfiles[0].vmSize", "Standard_DS2_v2"), + self.check("agentPoolProfiles[0].mode", "System"), + self.check("dnsPrefix", "{dns_name_prefix}"), + self.exists("kubernetesVersion"), + ], + ) # get-credentials fd, temp_path = tempfile.mkstemp() - self.kwargs.update({'file': temp_path}) + self.kwargs.update({"file": temp_path}) try: self.cmd( - 'aks get-credentials -g {resource_group} -n {name} --file "{file}"') + 'aks get-credentials -g {resource_group} -n {name} --file "{file}"' + ) self.assertGreater(os.path.getsize(temp_path), 0) finally: os.close(fd) os.remove(temp_path) # nodepool update nodepool1 taints - self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints {taints}', checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + self.cmd( + "aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints {taints}", + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool list - self.cmd('aks nodepool list --resource-group={resource_group} --cluster-name={name}', checks=[ - self.check('[0].mode', 'System'), - self.check('[0].nodeTaints[0]', 'key1=value1:PreferNoSchedule'), - ]) + self.cmd( + "aks nodepool list --resource-group={resource_group} --cluster-name={name}", + checks=[ + self.check("[0].mode", "System"), + self.check("[0].nodeTaints[0]", "key1=value1:PreferNoSchedule"), + ], + ) # nodepool delete nodepool1 label self.cmd( - 'aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints "" ') + 'aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --node-taints "" ' + ) # nodepool show - self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} -o json', checks=[ - self.check('nodeTaints', None) - ]) + self.cmd( + "aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} -o json", + checks=[self.check("nodeTaints", None)], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_nodepool_update_label_msi(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_nodepool_update_label_msi( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) + aks_name = self.create_random_name("cliakstest", 16) nodepool1_name = "nodepool1" nodepool2_name = "nodepool2" tags = "key1=value1" new_tags = "key2=value2" labels = "label1=value1" - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'tags': tags, - 'new_tags': new_tags, - 'labels': labels, - 'nodepool1_name': nodepool1_name, - 'nodepool2_name': nodepool2_name, - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "tags": tags, + "new_tags": new_tags, + "labels": labels, + "nodepool1_name": nodepool1_name, + "nodepool2_name": nodepool2_name, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} " + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + ], + ) # show - self.cmd('aks show -g {resource_group} -n {name}', checks=[ - self.check('type', '{resource_type}'), - self.check('name', '{name}'), - self.exists('nodeResourceGroup'), - self.check('resourceGroup', '{resource_group}'), - self.check('agentPoolProfiles[0].count', 1), - self.check('agentPoolProfiles[0].osType', 'Linux'), - self.check('agentPoolProfiles[0].vmSize', 'Standard_DS2_v2'), - self.check('agentPoolProfiles[0].mode', 'System'), - self.check('dnsPrefix', '{dns_name_prefix}'), - self.exists('kubernetesVersion') - ]) + self.cmd( + "aks show -g {resource_group} -n {name}", + checks=[ + self.check("type", "{resource_type}"), + self.check("name", "{name}"), + self.exists("nodeResourceGroup"), + self.check("resourceGroup", "{resource_group}"), + self.check("agentPoolProfiles[0].count", 1), + self.check("agentPoolProfiles[0].osType", "Linux"), + self.check("agentPoolProfiles[0].vmSize", "Standard_DS2_v2"), + self.check("agentPoolProfiles[0].mode", "System"), + self.check("dnsPrefix", "{dns_name_prefix}"), + self.exists("kubernetesVersion"), + ], + ) # get-credentials fd, temp_path = tempfile.mkstemp() - self.kwargs.update({'file': temp_path}) + self.kwargs.update({"file": temp_path}) try: self.cmd( - 'aks get-credentials -g {resource_group} -n {name} --file "{file}"') + 'aks get-credentials -g {resource_group} -n {name} --file "{file}"' + ) self.assertGreater(os.path.getsize(temp_path), 0) finally: os.close(fd) os.remove(temp_path) # nodepool update nodepool1 label - self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels {labels}', checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + self.cmd( + "aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels {labels}", + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool list - self.cmd('aks nodepool list --resource-group={resource_group} --cluster-name={name}', checks=[ - self.check('[0].mode', 'System'), - self.check('[0].nodeLabels.label1', 'value1'), - ]) + self.cmd( + "aks nodepool list --resource-group={resource_group} --cluster-name={name}", + checks=[ + self.check("[0].mode", "System"), + self.check("[0].nodeLabels.label1", "value1"), + ], + ) # nodepool delete nodepool1 label - self.cmd('aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels ', checks=[ - self.check('nodeLabels.label1', None) - ]) + self.cmd( + "aks nodepool update --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name} --labels ", + checks=[self.check("nodeLabels.label1", None)], + ) # nodepool show - self.cmd('aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name}', checks=[ - self.check('nodeLabels.label1', None) - ]) + self.cmd( + "aks nodepool show --resource-group={resource_group} --cluster-name={name} --name={nodepool1_name}", + checks=[self.check("nodeLabels.label1", None)], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_update_label_msi(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) + aks_name = self.create_random_name("cliakstest", 16) nodepool1_name = "nodepool1" nodepool2_name = "nodepool2" tags = "key1=value1" new_tags = "key2=value2" nodepool_labels = "label1=value1 label2=value2" - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'tags': tags, - 'new_tags': new_tags, - 'nodepool1_name': nodepool1_name, - 'nodepool2_name': nodepool2_name, - 'nodepool_labels': nodepool_labels, - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "tags": tags, + "new_tags": new_tags, + "nodepool1_name": nodepool1_name, + "nodepool2_name": nodepool2_name, + "nodepool_labels": nodepool_labels, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded') - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--nodepool-labels {nodepool_labels}' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].nodeLabels.label1', 'value1'), - self.check('agentPoolProfiles[0].nodeLabels.label2', 'value2'), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--nodepool-labels ' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].nodeLabels.label1', None), - self.check('agentPoolProfiles[0].nodeLabels.label2', None), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} " + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--nodepool-labels {nodepool_labels}" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].nodeLabels.label1", "value1"), + self.check("agentPoolProfiles[0].nodeLabels.label2", "value2"), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--nodepool-labels " + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].nodeLabels.label1", None), + self.check("agentPoolProfiles[0].nodeLabels.label2", None), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_update_taint_msi(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) + aks_name = self.create_random_name("cliakstest", 16) nodepool1_name = "nodepool1" nodepool2_name = "nodepool2" tags = "key1=value1" new_tags = "key2=value2" - nodepool_taints = "taint1=value1:PreferNoSchedule,taint2=value2:PreferNoSchedule" + nodepool_taints = ( + "taint1=value1:PreferNoSchedule,taint2=value2:PreferNoSchedule" + ) nodepool_taints2 = "taint1=value2:PreferNoSchedule" - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_name_prefix': self.create_random_name('cliaksdns', 16), - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'tags': tags, - 'new_tags': new_tags, - 'nodepool1_name': nodepool1_name, - 'nodepool2_name': nodepool2_name, - 'nodepool_taints': nodepool_taints, - 'nodepool_taints2': nodepool_taints2, - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_name_prefix": self.create_random_name("cliaksdns", 16), + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "tags": tags, + "new_tags": new_tags, + "nodepool1_name": nodepool1_name, + "nodepool2_name": nodepool2_name, + "nodepool_taints": nodepool_taints, + "nodepool_taints2": nodepool_taints2, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} --nodepool-taints {nodepool_taints} ' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].nodeTaints[0]', 'taint1=value1:PreferNoSchedule'), - self.check('agentPoolProfiles[0].nodeTaints[1]', 'taint2=value2:PreferNoSchedule'), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--nodepool-taints {nodepool_taints2}' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].nodeTaints[0]', 'taint1=value2:PreferNoSchedule'), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--nodepool-taints ""' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].nodeTaints', None), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_create_with_oidc_issuer_enabled(self, resource_group, resource_group_location): + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} --nodepool-taints {nodepool_taints} " + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[0].nodeTaints[0]", + "taint1=value1:PreferNoSchedule", + ), + self.check( + "agentPoolProfiles[0].nodeTaints[1]", + "taint2=value2:PreferNoSchedule", + ), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--nodepool-taints {nodepool_taints2}" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[0].nodeTaints[0]", + "taint1=value2:PreferNoSchedule", + ), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + '--nodepool-taints ""' + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].nodeTaints", None), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_create_with_oidc_issuer_enabled( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--enable-oidc-issuer ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('oidcIssuerProfile.enabled', True), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_update_with_oidc_issuer_enabled(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--enable-oidc-issuer " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("oidcIssuerProfile.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_update_with_oidc_issuer_enabled( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview ' \ - '--enable-oidc-issuer' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('oidcIssuerProfile.enabled', True), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_create_with_workload_identity_enabled(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview " + "--enable-oidc-issuer" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("oidcIssuerProfile.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_create_with_workload_identity_enabled( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--enable-managed-identity', '--enable-oidc-issuer', '--enable-workload-identity', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview', - ]) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('oidcIssuerProfile.enabled', True), - self.check('securityProfile.workloadIdentity.enabled', True), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_update_with_workload_identity(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--enable-managed-identity", + "--enable-oidc-issuer", + "--enable-workload-identity", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview", + ] + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("oidcIssuerProfile.enabled", True), + self.check("securityProfile.workloadIdentity.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_update_with_workload_identity( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--enable-managed-identity', '--enable-oidc-issuer', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview', - ]) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - enable_cmd = ' '.join([ - 'aks', 'update', '--resource-group={resource_group}', '--name={name}', - '--enable-workload-identity', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview', - ]) - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.workloadIdentity.enabled', True), - ]) - - disable_cmd = ' '.join([ - 'aks', 'update', '--resource-group={resource_group}', '--name={name}', - '--disable-workload-identity', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview', - ]) - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.workloadIdentity.enabled', False), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_image_cleaner_enabled_with_default_interval_hours(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--enable-managed-identity", + "--enable-oidc-issuer", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview", + ] + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + enable_cmd = " ".join( + [ + "aks", + "update", + "--resource-group={resource_group}", + "--name={name}", + "--enable-workload-identity", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview", + ] + ) + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.workloadIdentity.enabled", True), + ], + ) + + disable_cmd = " ".join( + [ + "aks", + "update", + "--resource-group={resource_group}", + "--name={name}", + "--disable-workload-identity", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableWorkloadIdentityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableOIDCIssuerPreview", + ] + ) + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.workloadIdentity.enabled", False), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_image_cleaner_enabled_with_default_interval_hours( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'vm_size': 'Standard_D4s_v3', - 'node_count': 1, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--node-vm-size {vm_size}', - '--node-count {node_count}', - '--enable-image-cleaner', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview', - ]) - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageCleaner.enabled', True), - self.check('securityProfile.imageCleaner.intervalHours', 7*24), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_image_cleaner_enabled_with_interval_hours(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "vm_size": "Standard_D4s_v3", + "node_count": 1, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--node-vm-size {vm_size}", + "--node-count {node_count}", + "--enable-image-cleaner", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview", + ] + ) + + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageCleaner.enabled", True), + self.check("securityProfile.imageCleaner.intervalHours", 7 * 24), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_image_cleaner_enabled_with_interval_hours( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'vm_size': 'Standard_D4s_v3', - 'node_count': 1, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--node-vm-size {vm_size}', - '--node-count {node_count}', - '--enable-image-cleaner', - '--image-cleaner-interval-hours 24', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview', - ]) - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageCleaner.enabled', True), - self.check('securityProfile.imageCleaner.intervalHours', 24), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_update_with_image_cleaner(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "vm_size": "Standard_D4s_v3", + "node_count": 1, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--node-vm-size {vm_size}", + "--node-count {node_count}", + "--enable-image-cleaner", + "--image-cleaner-interval-hours 24", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview", + ] + ) + + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageCleaner.enabled", True), + self.check("securityProfile.imageCleaner.intervalHours", 24), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_update_with_image_cleaner( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'vm_size': 'Standard_D4s_v3', - 'node_count': 1, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--node-vm-size {vm_size}', - '--node-count {node_count}', - '--enable-image-cleaner', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview', - ]) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageCleaner.enabled', True), - self.check('securityProfile.imageCleaner.intervalHours', 7*24), - ]) - - update_interval_cmd = ' '.join([ - 'aks', 'update', '--resource-group={resource_group}', '--name={name}', - '--image-cleaner-interval-hours 24', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview', - ]) - self.cmd(update_interval_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageCleaner.enabled', True), - self.check('securityProfile.imageCleaner.intervalHours', 24), - ]) - - disable_cmd = ' '.join([ - 'aks', 'update', '--resource-group={resource_group}', '--name={name}', - '--disable-image-cleaner', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview', - ]) - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageCleaner.enabled', False), - self.check('securityProfile.imageCleaner.intervalHours', 24), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_image_integrity_enabled(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "vm_size": "Standard_D4s_v3", + "node_count": 1, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--node-vm-size {vm_size}", + "--node-count {node_count}", + "--enable-image-cleaner", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview", + ] + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageCleaner.enabled", True), + self.check("securityProfile.imageCleaner.intervalHours", 7 * 24), + ], + ) + + update_interval_cmd = " ".join( + [ + "aks", + "update", + "--resource-group={resource_group}", + "--name={name}", + "--image-cleaner-interval-hours 24", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview", + ] + ) + self.cmd( + update_interval_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageCleaner.enabled", True), + self.check("securityProfile.imageCleaner.intervalHours", 24), + ], + ) + + disable_cmd = " ".join( + [ + "aks", + "update", + "--resource-group={resource_group}", + "--name={name}", + "--disable-image-cleaner", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageCleanerPreview", + ] + ) + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageCleaner.enabled", False), + self.check("securityProfile.imageCleaner.intervalHours", 24), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_image_integrity_enabled( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'vm_size': 'Standard_D4s_v3', - 'node_count': 1, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--node-vm-size {vm_size}', - '--node-count {node_count}', - '--enable-image-integrity', - '-a azure-policy', - '--enable-oidc-issuer', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageIntegrityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-AzurePolicyExternalData', - ]) - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageIntegrity.enabled', True), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_update_with_image_integrity(self, resource_group, resource_group_location): + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "vm_size": "Standard_D4s_v3", + "node_count": 1, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--node-vm-size {vm_size}", + "--node-count {node_count}", + "--enable-image-integrity", + "-a azure-policy", + "--enable-oidc-issuer", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageIntegrityPreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-AzurePolicyExternalData", + ] + ) + + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageIntegrity.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_update_with_image_integrity( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - request_body = '{\"type\": \"Microsoft.ContainerService/managedClusters\", \"name\": \"'+ aks_name +'\", \"location\": \"' + resource_group_location + '\", \"properties\": {\"securityProfile\": {\"imageIntegrity\": {\"enabled\": true}}}}' - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'vm_size': 'Standard_D4s_v3', - 'node_count': 1, - 'ssh_key_value': self.generate_ssh_keys(), - 'request_body': request_body, - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--node-vm-size {vm_size}', - '--node-count {node_count}', - '-a azure-policy', - '--enable-oidc-issuer', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-AzurePolicyExternalData', - ]) - response=self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]).get_output_in_json() + aks_name = self.create_random_name("cliakstest", 16) + request_body = ( + '{"type": "Microsoft.ContainerService/managedClusters", "name": "' + + aks_name + + '", "location": "' + + resource_group_location + + '", "properties": {"securityProfile": {"imageIntegrity": {"enabled": true}}}}' + ) - cluster_resource_id = response["id"] - subscription = cluster_resource_id.split("/")[2] + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "vm_size": "Standard_D4s_v3", + "node_count": 1, + "ssh_key_value": self.generate_ssh_keys(), + "request_body": request_body, + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--node-vm-size {vm_size}", + "--node-count {node_count}", + "-a azure-policy", + "--enable-oidc-issuer", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-AzurePolicyExternalData", + ] + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + enable_cmd = " ".join( + [ + "aks", + "update", + "--resource-group={resource_group}", + "--name={name}", + "--enable-image-integrity", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageIntegrityPreview", + ] + ) + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageIntegrity.enabled", True), + ], + ) - from azure.cli.core.profiles._shared import AZURE_API_PROFILES - from azext_aks_preview._client_factory import CUSTOM_MGMT_AKS_PREVIEW - sdk_profile = AZURE_API_PROFILES["latest"][CUSTOM_MGMT_AKS_PREVIEW] - api_version = sdk_profile.default_api_version - - enable_cmd = ' '.join([ - 'aks', 'update', '--resource-group={resource_group}', '--name={name}', - '--enable-image-integrity', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableImageIntegrityPreview', - ]) - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageIntegrity.enabled', True), - ]) - - disable_cmd = ' '.join([ - 'aks', 'update', '--resource-group={resource_group}', '--name={name}', - '--disable-image-integrity', - ]) - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.imageIntegrity.enabled', False), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + disable_cmd = " ".join( + [ + "aks", + "update", + "--resource-group={resource_group}", + "--name={name}", + "--disable-image-integrity", + ] + ) + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.imageIntegrity.enabled", False), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_with_crg_id(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - node_pool_name = self.create_random_name('c', 6) - node_pool_name_second = self.create_random_name('c', 6) - crg_id = '/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/STAGING-CRG-RG/providers' \ - '/Microsoft.Compute/capacityReservationGroups/crg-3' - vm_size = 'Standard_D4s_v3' + aks_name = self.create_random_name("cliakstest", 16) + node_pool_name = self.create_random_name("c", 6) + node_pool_name_second = self.create_random_name("c", 6) + crg_id = ( + "/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/STAGING-CRG-RG/providers" + "/Microsoft.Compute/capacityReservationGroups/crg-3" + ) + vm_size = "Standard_D4s_v3" count = 1 - identity = '/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/staging-crg-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/crg-rg-id' - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'count': count, - 'location': resource_group_location, - 'crg_id': crg_id, - 'vm_size': vm_size, - 'identity': identity, - 'node_pool_name': node_pool_name, - 'node_pool_name_second': node_pool_name_second, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--node-vm-size {vm_size} ' \ - '--nodepool-name {node_pool_name} -c 1 ' \ - '--enable-managed-identity ' \ - '--assign-identity {identity} ' \ - '--crg-id={crg_id} ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + identity = "/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/staging-crg-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/crg-rg-id" + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "count": count, + "location": resource_group_location, + "crg_id": crg_id, + "vm_size": vm_size, + "identity": identity, + "node_pool_name": node_pool_name, + "node_pool_name_second": node_pool_name_second, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--node-vm-size {vm_size} " + "--nodepool-name {node_pool_name} -c 1 " + "--enable-managed-identity " + "--assign-identity {identity} " + "--crg-id={crg_id} " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # nodepool get-upgrades - self.cmd('aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name_second} ' - '--node-vm-size {vm_size} ' - '--crg-id={crg_id} ' - '-c 1 ', - checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name_second} " + "--node-vm-size {vm_size} " + "--crg-id={crg_id} " + "-c 1 ", + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_network_plugin_none(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_network_plugin_none( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --network-plugin=none ' \ - '--location={location} --ssh-key-value={ssh_key_value} -o json' + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --network-plugin=none " + "--location={location} --ssh-key-value={ssh_key_value} -o json" + ) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.networkPlugin', 'none'), - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.networkPlugin", "none"), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_create_with_azurekeyvaultkms_public_key_vault(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - kv_name = self.create_random_name('cliakstestkv', 16) - identity_name = self.create_random_name('cliakstestidentity', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - "kv_name": kv_name, - "identity_name": identity_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_create_with_azurekeyvaultkms_public_key_vault( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + kv_name = self.create_random_name("cliakstestkv", 16) + identity_name = self.create_random_name("cliakstestidentity", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kv_name": kv_name, + "identity_name": identity_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create user-assigned identity - create_identity = 'identity create --resource-group={resource_group} --name={identity_name} -o json' + create_identity = "identity create --resource-group={resource_group} --name={identity_name} -o json" identity = self.cmd(create_identity).get_output_in_json() - identity_id = identity['id'] - identity_object_id = identity['principalId'] + identity_id = identity["id"] + identity_object_id = identity["principalId"] assert identity_id is not None assert identity_object_id is not None - self.kwargs.update({ - 'identity_id': identity_id, - 'identity_object_id': identity_object_id, - }) + self.kwargs.update( + { + "identity_id": identity_id, + "identity_object_id": identity_object_id, + } + ) # create key vault and key - create_keyvault = 'keyvault create --resource-group={resource_group} --name={kv_name} -o json' - kv = self.cmd(create_keyvault, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_key = 'keyvault key create -n kms --vault-name {kv_name} -o json' - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id_0 = key['key']['kid'] + create_keyvault = ( + "keyvault create --resource-group={resource_group} --name={kv_name} -o json" + ) + self.cmd( + create_keyvault, + checks=[self.check("properties.provisioningState", "Succeeded")], + ) + + create_key = "keyvault key create -n kms --vault-name {kv_name} -o json" + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id_0 = key["key"]["kid"] assert key_id_0 is not None - self.kwargs.update({ - 'key_id': key_id_0, - }) + self.kwargs.update( + { + "key_id": key_id_0, + } + ) # assign access policy - set_policy = 'keyvault set-policy --resource-group={resource_group} --name={kv_name} ' \ - '--object-id {identity_object_id} --key-permissions encrypt decrypt -o json' - policy = self.cmd(set_policy, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--assign-identity {identity_id} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id_0), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', 'Public') - ]) - - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id_1 = key['key']['kid'] + set_policy = ( + "keyvault set-policy --resource-group={resource_group} --name={kv_name} " + "--object-id {identity_object_id} --key-permissions encrypt decrypt -o json" + ) + self.cmd( + set_policy, checks=[self.check("properties.provisioningState", "Succeeded")] + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--assign-identity {identity_id} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id_0), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Public" + ), + ], + ) + + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id_1 = key["key"]["kid"] assert key_id_1 is not None - self.kwargs.update({ - 'key_id': key_id_1, - }) + self.kwargs.update( + { + "key_id": key_id_1, + } + ) # Rotate key - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public ' \ - '-o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id_1), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', 'Public') - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public " + "-o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id_1), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Public" + ), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_update_with_azurekeyvaultkms_public_key_vault(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - kv_name = self.create_random_name('cliakstestkv', 16) - identity_name = self.create_random_name('cliakstestidentity', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - "kv_name": kv_name, - "identity_name": identity_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_update_with_azurekeyvaultkms_public_key_vault( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + kv_name = self.create_random_name("cliakstestkv", 16) + identity_name = self.create_random_name("cliakstestidentity", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kv_name": kv_name, + "identity_name": identity_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create user-assigned identity - create_identity = 'identity create --resource-group={resource_group} --name={identity_name} -o json' + create_identity = "identity create --resource-group={resource_group} --name={identity_name} -o json" identity = self.cmd(create_identity).get_output_in_json() - identity_id = identity['id'] - identity_object_id = identity['principalId'] + identity_id = identity["id"] + identity_object_id = identity["principalId"] assert identity_id is not None assert identity_object_id is not None - self.kwargs.update({ - 'identity_id': identity_id, - 'identity_object_id': identity_object_id, - }) + self.kwargs.update( + { + "identity_id": identity_id, + "identity_object_id": identity_object_id, + } + ) # create key vault and key - create_keyvault = 'keyvault create --resource-group={resource_group} --name={kv_name} -o json' - kv = self.cmd(create_keyvault, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_key = 'keyvault key create -n kms --vault-name {kv_name} -o json' - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id = key['key']['kid'] + create_keyvault = ( + "keyvault create --resource-group={resource_group} --name={kv_name} -o json" + ) + self.cmd( + create_keyvault, + checks=[self.check("properties.provisioningState", "Succeeded")], + ) + + create_key = "keyvault key create -n kms --vault-name {kv_name} -o json" + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id = key["key"]["kid"] assert key_id is not None - self.kwargs.update({ - 'key_id': key_id, - }) + self.kwargs.update( + { + "key_id": key_id, + } + ) # assign access policy - set_policy = 'keyvault set-policy --resource-group={resource_group} --name={kv_name} ' \ - '--object-id {identity_object_id} --key-permissions encrypt decrypt -o json' - policy = self.cmd(set_policy, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--assign-identity {identity_id} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.not_exists('securityProfile.azureKeyVaultKms') - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public ' \ - '-o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', 'Public') - ]) + set_policy = ( + "keyvault set-policy --resource-group={resource_group} --name={kv_name} " + "--object-id {identity_object_id} --key-permissions encrypt decrypt -o json" + ) + self.cmd( + set_policy, checks=[self.check("properties.provisioningState", "Succeeded")] + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--assign-identity {identity_id} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.not_exists("securityProfile.azureKeyVaultKms"), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public " + "-o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Public" + ), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_with_azurekeyvaultkms_private_key_vault(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - kv_name = self.create_random_name('cliakstestkv', 16) - identity_name = self.create_random_name('cliakstestidentity', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - "kv_name": kv_name, - "identity_name": identity_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_with_azurekeyvaultkms_private_key_vault( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + kv_name = self.create_random_name("cliakstestkv", 16) + identity_name = self.create_random_name("cliakstestidentity", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kv_name": kv_name, + "identity_name": identity_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create user-assigned identity - create_identity = 'identity create --resource-group={resource_group} --name={identity_name} -o json' + create_identity = "identity create --resource-group={resource_group} --name={identity_name} -o json" identity = self.cmd(create_identity).get_output_in_json() - identity_id = identity['id'] - identity_object_id = identity['principalId'] + identity_id = identity["id"] + identity_object_id = identity["principalId"] assert identity_id is not None assert identity_object_id is not None - self.kwargs.update({ - 'identity_id': identity_id, - 'identity_object_id': identity_object_id, - }) + self.kwargs.update( + { + "identity_id": identity_id, + "identity_object_id": identity_object_id, + } + ) # create key vault and key - create_keyvault = 'keyvault create --resource-group={resource_group} --name={kv_name} -o json' - kv = self.cmd(create_keyvault, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - kv_resource_id = kv['id'] + create_keyvault = ( + "keyvault create --resource-group={resource_group} --name={kv_name} -o json" + ) + kv = self.cmd( + create_keyvault, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + kv_resource_id = kv["id"] assert kv_resource_id is not None - self.kwargs.update({ - 'kv_resource_id': kv_resource_id, - }) - - create_key = 'keyvault key create -n kms --vault-name {kv_name} -o json' - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id_0 = key['key']['kid'] + self.kwargs.update( + { + "kv_resource_id": kv_resource_id, + } + ) + + create_key = "keyvault key create -n kms --vault-name {kv_name} -o json" + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id_0 = key["key"]["kid"] assert key_id_0 is not None - self.kwargs.update({ - 'key_id': key_id_0, - }) + self.kwargs.update( + { + "key_id": key_id_0, + } + ) # assign access policy - set_policy = 'keyvault set-policy --resource-group={resource_group} --name={kv_name} ' \ - '--object-id {identity_object_id} --key-permissions encrypt decrypt -o json' - policy = self.cmd(set_policy, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() + set_policy = ( + "keyvault set-policy --resource-group={resource_group} --name={kv_name} " + "--object-id {identity_object_id} --key-permissions encrypt decrypt -o json" + ) + self.cmd( + set_policy, checks=[self.check("properties.provisioningState", "Succeeded")] + ) # allow the identity approve private endpoint connection (Microsoft.KeyVault/vaults/privateEndpointConnectionsApproval/action) - create_role_assignment = 'role assignment create --role f25e0fa2-a7c8-4377-a976-54943a77a395 ' \ - '--assignee-object-id {identity_object_id} --assignee-principal-type "ServicePrincipal" ' \ - '--scope {kv_resource_id}' - role_assignment = self.cmd(create_role_assignment).get_output_in_json() + create_role_assignment = ( + "role assignment create --role f25e0fa2-a7c8-4377-a976-54943a77a395 " + '--assignee-object-id {identity_object_id} --assignee-principal-type "ServicePrincipal" ' + "--scope {kv_resource_id}" + ) + self.cmd(create_role_assignment) # disable public network access disable_public_network_access = 'keyvault update --resource-group={resource_group} --name={kv_name} --public-network-access "Disabled" -o json' - kv = self.cmd(disable_public_network_access, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--assign-identity {identity_id} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} ' \ - '--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id_0), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', "Private"), - self.check('securityProfile.azureKeyVaultKms.keyVaultResourceId', kv_resource_id) - ]) + kv = self.cmd( + disable_public_network_access, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--assign-identity {identity_id} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} " + "--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id_0), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Private" + ), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultResourceId", + kv_resource_id, + ), + ], + ) # enable public network access enable_public_network_access = 'keyvault update --resource-group={resource_group} --name={kv_name} --public-network-access "Enabled" -o json' - kv = self.cmd(enable_public_network_access, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id_1 = key['key']['kid'] + kv = self.cmd( + enable_public_network_access, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id_1 = key["key"]["kid"] assert key_id_1 is not None - self.kwargs.update({ - 'key_id': key_id_1, - }) + self.kwargs.update( + { + "key_id": key_id_1, + } + ) # disable public network access disable_public_network_access = 'keyvault update --resource-group={resource_group} --name={kv_name} --public-network-access "Disabled" -o json' - kv = self.cmd(disable_public_network_access, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() + kv = self.cmd( + disable_public_network_access, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() # Rotate key - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} ' \ - '--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} ' \ - '-o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id_1), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', "Private"), - self.check('securityProfile.azureKeyVaultKms.keyVaultResourceId', kv_resource_id) - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} " + "--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} " + "-o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id_1), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Private" + ), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultResourceId", + kv_resource_id, + ), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_update_with_azurekeyvaultkms_private_key_vault(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - kv_name = self.create_random_name('cliakstestkv', 16) - identity_name = self.create_random_name('cliakstestidentity', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - "kv_name": kv_name, - "identity_name": identity_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_update_with_azurekeyvaultkms_private_key_vault( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + kv_name = self.create_random_name("cliakstestkv", 16) + identity_name = self.create_random_name("cliakstestidentity", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kv_name": kv_name, + "identity_name": identity_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create user-assigned identity - create_identity = 'identity create --resource-group={resource_group} --name={identity_name} -o json' + create_identity = "identity create --resource-group={resource_group} --name={identity_name} -o json" identity = self.cmd(create_identity).get_output_in_json() - identity_id = identity['id'] - identity_object_id = identity['principalId'] + identity_id = identity["id"] + identity_object_id = identity["principalId"] assert identity_id is not None assert identity_object_id is not None - self.kwargs.update({ - 'identity_id': identity_id, - 'identity_object_id': identity_object_id, - }) + self.kwargs.update( + { + "identity_id": identity_id, + "identity_object_id": identity_object_id, + } + ) # create key vault and key - create_keyvault = 'keyvault create --resource-group={resource_group} --name={kv_name} -o json' - kv = self.cmd(create_keyvault, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - kv_resource_id = kv['id'] + create_keyvault = ( + "keyvault create --resource-group={resource_group} --name={kv_name} -o json" + ) + kv = self.cmd( + create_keyvault, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + kv_resource_id = kv["id"] assert kv_resource_id is not None - self.kwargs.update({ - 'kv_resource_id': kv_resource_id, - }) - - create_key = 'keyvault key create -n kms --vault-name {kv_name} -o json' - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id = key['key']['kid'] + self.kwargs.update( + { + "kv_resource_id": kv_resource_id, + } + ) + + create_key = "keyvault key create -n kms --vault-name {kv_name} -o json" + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id = key["key"]["kid"] assert key_id is not None - self.kwargs.update({ - 'key_id': key_id, - }) + self.kwargs.update( + { + "key_id": key_id, + } + ) # assign access policy - set_policy = 'keyvault set-policy --resource-group={resource_group} --name={kv_name} ' \ - '--object-id {identity_object_id} --key-permissions encrypt decrypt -o json' - policy = self.cmd(set_policy, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() + set_policy = ( + "keyvault set-policy --resource-group={resource_group} --name={kv_name} " + "--object-id {identity_object_id} --key-permissions encrypt decrypt -o json" + ) + self.cmd( + set_policy, checks=[self.check("properties.provisioningState", "Succeeded")] + ) # allow the identity approve private endpoint connection (Microsoft.KeyVault/vaults/privateEndpointConnectionsApproval/action) - create_role_assignment = 'role assignment create --role f25e0fa2-a7c8-4377-a976-54943a77a395 ' \ - '--assignee-object-id {identity_object_id} --assignee-principal-type "ServicePrincipal" ' \ - '--scope {kv_resource_id}' - role_assignment = self.cmd(create_role_assignment).get_output_in_json() + create_role_assignment = ( + "role assignment create --role f25e0fa2-a7c8-4377-a976-54943a77a395 " + '--assignee-object-id {identity_object_id} --assignee-principal-type "ServicePrincipal" ' + "--scope {kv_resource_id}" + ) + self.cmd(create_role_assignment) # disable public network access disable_public_network_access = 'keyvault update --resource-group={resource_group} --name={kv_name} --public-network-access "Disabled" -o json' - kv = self.cmd(disable_public_network_access, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--assign-identity {identity_id} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.not_exists('securityProfile.azureKeyVaultKms') - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} ' \ - '--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} ' \ - '-o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', "Private"), - self.check('securityProfile.azureKeyVaultKms.keyVaultResourceId', kv_resource_id) - ]) + kv = self.cmd( + disable_public_network_access, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--assign-identity {identity_id} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.not_exists("securityProfile.azureKeyVaultKms"), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} " + "--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} " + "-o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Private" + ), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultResourceId", + kv_resource_id, + ), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_with_azurekeyvaultkms_private_cluster_v1_private_key_vault(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - kv_name = self.create_random_name('cliakstestkv', 16) - identity_name = self.create_random_name('cliakstestidentity', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - "kv_name": kv_name, - "identity_name": identity_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_with_azurekeyvaultkms_private_cluster_v1_private_key_vault( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + kv_name = self.create_random_name("cliakstestkv", 16) + identity_name = self.create_random_name("cliakstestidentity", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kv_name": kv_name, + "identity_name": identity_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create user-assigned identity - create_identity = 'identity create --resource-group={resource_group} --name={identity_name} -o json' + create_identity = "identity create --resource-group={resource_group} --name={identity_name} -o json" identity = self.cmd(create_identity).get_output_in_json() - identity_id = identity['id'] - identity_object_id = identity['principalId'] + identity_id = identity["id"] + identity_object_id = identity["principalId"] assert identity_id is not None assert identity_object_id is not None - self.kwargs.update({ - 'identity_id': identity_id, - 'identity_object_id': identity_object_id, - }) + self.kwargs.update( + { + "identity_id": identity_id, + "identity_object_id": identity_object_id, + } + ) # create key vault and key - create_keyvault = 'keyvault create --resource-group={resource_group} --name={kv_name} -o json' - kv = self.cmd(create_keyvault, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - kv_resource_id = kv['id'] + create_keyvault = ( + "keyvault create --resource-group={resource_group} --name={kv_name} -o json" + ) + kv = self.cmd( + create_keyvault, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + kv_resource_id = kv["id"] assert kv_resource_id is not None - self.kwargs.update({ - 'kv_resource_id': kv_resource_id, - }) - - create_key = 'keyvault key create -n kms --vault-name {kv_name} -o json' - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id_0 = key['key']['kid'] + self.kwargs.update( + { + "kv_resource_id": kv_resource_id, + } + ) + + create_key = "keyvault key create -n kms --vault-name {kv_name} -o json" + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id_0 = key["key"]["kid"] assert key_id_0 is not None - self.kwargs.update({ - 'key_id': key_id_0, - }) + self.kwargs.update( + { + "key_id": key_id_0, + } + ) # assign access policy - set_policy = 'keyvault set-policy --resource-group={resource_group} --name={kv_name} ' \ - '--object-id {identity_object_id} --key-permissions encrypt decrypt -o json' - policy = self.cmd(set_policy, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() + set_policy = ( + "keyvault set-policy --resource-group={resource_group} --name={kv_name} " + "--object-id {identity_object_id} --key-permissions encrypt decrypt -o json" + ) + self.cmd( + set_policy, checks=[self.check("properties.provisioningState", "Succeeded")] + ) # allow the identity approve private endpoint connection (Microsoft.KeyVault/vaults/privateEndpointConnectionsApproval/action) - create_role_assignment = 'role assignment create --role f25e0fa2-a7c8-4377-a976-54943a77a395 ' \ - '--assignee-object-id {identity_object_id} --assignee-principal-type "ServicePrincipal" ' \ - '--scope {kv_resource_id}' - role_assignment = self.cmd(create_role_assignment).get_output_in_json() + create_role_assignment = ( + "role assignment create --role f25e0fa2-a7c8-4377-a976-54943a77a395 " + '--assignee-object-id {identity_object_id} --assignee-principal-type "ServicePrincipal" ' + "--scope {kv_resource_id}" + ) + self.cmd(create_role_assignment) # disable public network access disable_public_network_access = 'keyvault update --resource-group={resource_group} --name={kv_name} --public-network-access "Disabled" -o json' - kv = self.cmd(disable_public_network_access, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--assign-identity {identity_id} --enable-private-cluster ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} ' \ - '--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('apiServerAccessProfile.enablePrivateCluster', 'True'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id_0), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', "Private"), - self.check('securityProfile.azureKeyVaultKms.keyVaultResourceId', kv_resource_id) - ]) + kv = self.cmd( + disable_public_network_access, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--assign-identity {identity_id} --enable-private-cluster " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} " + "--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("apiServerAccessProfile.enablePrivateCluster", "True"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id_0), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Private" + ), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultResourceId", + kv_resource_id, + ), + ], + ) # enable public network access enable_public_network_access = 'keyvault update --resource-group={resource_group} --name={kv_name} --public-network-access "Enabled" -o json' - kv = self.cmd(enable_public_network_access, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id_1 = key['key']['kid'] + kv = self.cmd( + enable_public_network_access, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() + + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id_1 = key["key"]["kid"] assert key_id_1 is not None - self.kwargs.update({ - 'key_id': key_id_1, - }) + self.kwargs.update( + { + "key_id": key_id_1, + } + ) # disable public network access disable_public_network_access = 'keyvault update --resource-group={resource_group} --name={kv_name} --public-network-access "Disabled" -o json' - kv = self.cmd(disable_public_network_access, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() + kv = self.cmd( + disable_public_network_access, + checks=[self.check("properties.provisioningState", "Succeeded")], + ).get_output_in_json() # Rotate key - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} ' \ - '--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} ' \ - '-o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id_1), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', "Private"), - self.check('securityProfile.azureKeyVaultKms.keyVaultResourceId', kv_resource_id) - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} " + "--azure-keyvault-kms-key-vault-network-access=Private --azure-keyvault-kms-key-vault-resource-id {kv_resource_id} " + "-o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id_1), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Private" + ), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultResourceId", + kv_resource_id, + ), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_disable_azurekeyvaultkms(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - kv_name = self.create_random_name('cliakstestkv', 16) - identity_name = self.create_random_name('cliakstestidentity', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - "kv_name": kv_name, - "identity_name": identity_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_disable_azurekeyvaultkms( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + kv_name = self.create_random_name("cliakstestkv", 16) + identity_name = self.create_random_name("cliakstestidentity", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kv_name": kv_name, + "identity_name": identity_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create user-assigned identity - create_identity = 'identity create --resource-group={resource_group} --name={identity_name} -o json' + create_identity = "identity create --resource-group={resource_group} --name={identity_name} -o json" identity = self.cmd(create_identity).get_output_in_json() - identity_id = identity['id'] - identity_object_id = identity['principalId'] + identity_id = identity["id"] + identity_object_id = identity["principalId"] assert identity_id is not None assert identity_object_id is not None - self.kwargs.update({ - 'identity_id': identity_id, - 'identity_object_id': identity_object_id, - }) + self.kwargs.update( + { + "identity_id": identity_id, + "identity_object_id": identity_object_id, + } + ) # create key vault and key - create_keyvault = 'keyvault create --resource-group={resource_group} --name={kv_name} -o json' - kv = self.cmd(create_keyvault, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_key = 'keyvault key create -n kms --vault-name {kv_name} -o json' - key = self.cmd(create_key, checks=[ - self.check('attributes.enabled', True) - ]).get_output_in_json() - key_id = key['key']['kid'] + create_keyvault = ( + "keyvault create --resource-group={resource_group} --name={kv_name} -o json" + ) + self.cmd( + create_keyvault, + checks=[self.check("properties.provisioningState", "Succeeded")], + ) + + create_key = "keyvault key create -n kms --vault-name {kv_name} -o json" + key = self.cmd( + create_key, checks=[self.check("attributes.enabled", True)] + ).get_output_in_json() + key_id = key["key"]["kid"] assert key_id is not None - self.kwargs.update({ - 'key_id': key_id, - }) + self.kwargs.update( + { + "key_id": key_id, + } + ) # assign access policy - set_policy = 'keyvault set-policy --resource-group={resource_group} --name={kv_name} ' \ - '--object-id {identity_object_id} --key-permissions encrypt decrypt -o json' - policy = self.cmd(set_policy, checks=[ - self.check('properties.provisioningState', 'Succeeded') - ]).get_output_in_json() - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--assign-identity {identity_id} ' \ - '--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', True), - self.check('securityProfile.azureKeyVaultKms.keyId', key_id), - self.check('securityProfile.azureKeyVaultKms.keyVaultNetworkAccess', "Public") - ]) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--disable-azure-keyvault-kms ' \ - '-o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.azureKeyVaultKms.enabled', False), - ]) + set_policy = ( + "keyvault set-policy --resource-group={resource_group} --name={kv_name} " + "--object-id {identity_object_id} --key-permissions encrypt decrypt -o json" + ) + self.cmd( + set_policy, checks=[self.check("properties.provisioningState", "Succeeded")] + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--assign-identity {identity_id} " + "--enable-azure-keyvault-kms --azure-keyvault-kms-key-id={key_id} --azure-keyvault-kms-key-vault-network-access=Public " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", True), + self.check("securityProfile.azureKeyVaultKms.keyId", key_id), + self.check( + "securityProfile.azureKeyVaultKms.keyVaultNetworkAccess", "Public" + ), + ], + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--disable-azure-keyvault-kms " + "-o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.azureKeyVaultKms.enabled", False), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', preserve_default_location=True) - def test_aks_create_and_update_with_csi_drivers_extensibility(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) + def test_aks_create_and_update_with_csi_drivers_extensibility( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json \ + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json \ --disable-disk-driver \ --disable-file-driver \ - --disable-snapshot-controller' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', False), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', False), - self.check('storageProfile.snapshotController.enabled', False), - ]) + --disable-snapshot-controller" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", False), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", False), + self.check("storageProfile.snapshotController.enabled", False), + ], + ) # check standard reconcile scenario - update_cmd = 'aks update --resource-group={resource_group} --name={name} -y -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', False), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', False), - self.check('storageProfile.snapshotController.enabled', False), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} -y -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", False), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", False), + self.check("storageProfile.snapshotController.enabled", False), + ], + ) - enable_cmd = 'aks update --resource-group={resource_group} --name={name} -o json \ + enable_cmd = "aks update --resource-group={resource_group} --name={name} -o json \ --enable-disk-driver \ --enable-file-driver \ - --enable-snapshot-controller' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', True), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', True), - self.check('storageProfile.snapshotController.enabled', True), - ]) + --enable-snapshot-controller" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", True), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", True), + self.check("storageProfile.snapshotController.enabled", True), + ], + ) + + # check standard reconcile scenario + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} -y -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", True), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", True), + self.check("storageProfile.snapshotController.enabled", True), + ], + ) - # check standard reconcile scenario - update_cmd = 'aks update --resource-group={resource_group} --name={name} -y -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', True), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', True), - self.check('storageProfile.snapshotController.enabled', True), - ]) - - disable_cmd = 'aks update --resource-group={resource_group} --name={name} -o json \ + disable_cmd = "aks update --resource-group={resource_group} --name={name} -o json \ --disable-disk-driver \ --disable-file-driver \ - --disable-snapshot-controller -y' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', False), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', False), - self.check('storageProfile.snapshotController.enabled', False), - ]) + --disable-snapshot-controller -y" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", False), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", False), + self.check("storageProfile.snapshotController.enabled", False), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', preserve_default_location=True) - def test_aks_create_with_standard_csi_drivers(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) + def test_aks_create_with_standard_csi_drivers( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # check standard creation scenario - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', True), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', True), - self.check('storageProfile.snapshotController.enabled', True), - ]) + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", True), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", True), + self.check("storageProfile.snapshotController.enabled", True), + ], + ) # check standard reconcile scenario - update_cmd = 'aks update --resource-group={resource_group} --name={name} -y -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', True), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', True), - self.check('storageProfile.snapshotController.enabled', True), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} -y -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", True), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", True), + self.check("storageProfile.snapshotController.enabled", True), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_with_standard_blob_csi_driver(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_with_standard_blob_csi_driver( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # check standard creation scenario - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', None), - ]) + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", None), + ], + ) # check standard reconcile scenario - update_cmd = 'aks update --resource-group={resource_group} --name={name} -y -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', None), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} -y -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", None), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_and_update_with_blob_csi_driver(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_and_update_with_blob_csi_driver( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create aks with blob driver - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json \ + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json \ --enable-blob-driver \ - --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', True), - ]) + --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", True), + ], + ) # check standard reconcile scenario - update_cmd = 'aks update --resource-group={resource_group} --name={name} -y -o json \ - --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', True), - ]) + update_cmd = "aks update --resource-group={resource_group} --name={name} -y -o json \ + --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver" + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", True), + ], + ) # disable blob driver - disable_cmd = 'aks update --resource-group={resource_group} --name={name} -o json \ + disable_cmd = "aks update --resource-group={resource_group} --name={name} -o json \ --disable-blob-driver -y \ - --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', False), - ]) + --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", False), + ], + ) # check standard reconcile scenario - update_cmd = 'aks update --resource-group={resource_group} --name={name} -y -o json \ - --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', False), - ]) + update_cmd = "aks update --resource-group={resource_group} --name={name} -y -o json \ + --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver" + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", False), + ], + ) # enable blob driver - enable_cmd = 'aks update --resource-group={resource_group} --name={name} -o json \ + enable_cmd = "aks update --resource-group={resource_group} --name={name} -o json \ --enable-blob-driver -y \ - --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', True), - ]) + --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", True), + ], + ) # check standard reconcile scenario - update_cmd = 'aks update --resource-group={resource_group} --name={name} -y -o json \ - --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.blobCsiDriver.enabled', True), - ]) + update_cmd = "aks update --resource-group={resource_group} --name={name} -y -o json \ + --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableBlobCSIDriver" + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.blobCsiDriver.enabled", True), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_with_csi_driver_v2(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_with_csi_driver_v2( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json \ --disk-driver-version "v2" \ --disable-file-driver \ --disable-snapshot-controller' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', True), - self.check('storageProfile.diskCsiDriver.version', "v2"), - self.check('storageProfile.fileCsiDriver.enabled', False), - self.check('storageProfile.snapshotController.enabled', False), - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", True), + self.check("storageProfile.diskCsiDriver.version", "v2"), + self.check("storageProfile.fileCsiDriver.enabled", False), + self.check("storageProfile.snapshotController.enabled", False), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_and_update_csi_driver_to_v2(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_and_update_csi_driver_to_v2( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json \ + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value} -o json \ --disable-disk-driver \ --disable-file-driver \ - --disable-snapshot-controller' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', False), - self.check('storageProfile.diskCsiDriver.version', "v1"), - self.check('storageProfile.fileCsiDriver.enabled', False), - self.check('storageProfile.snapshotController.enabled', False), - ]) + --disable-snapshot-controller" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", False), + self.check("storageProfile.diskCsiDriver.version", "v1"), + self.check("storageProfile.fileCsiDriver.enabled", False), + self.check("storageProfile.snapshotController.enabled", False), + ], + ) enable_cmd = 'aks update --resource-group={resource_group} --name={name} -o json \ --enable-disk-driver \ --disk-driver-version "v2"' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('storageProfile.diskCsiDriver.enabled', True), - self.check('storageProfile.diskCsiDriver.version', "v2"), - self.check('storageProfile.fileCsiDriver.enabled', False), - self.check('storageProfile.snapshotController.enabled', False), - ]) + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("storageProfile.diskCsiDriver.enabled", True), + self.check("storageProfile.diskCsiDriver.version", "v2"), + self.check("storageProfile.fileCsiDriver.enabled", False), + self.check("storageProfile.snapshotController.enabled", False), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_create_with_apiserver_vnet_integration(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_create_with_apiserver_vnet_integration( + self, resource_group, resource_group_location + ): # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-apiserver-vnet-integration ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview ' \ - '--enable-private-cluster --location={location} --ssh-key-value={ssh_key_value} -o json' - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('apiServerAccessProfile.enablePrivateCluster', 'True'), - self.check('apiServerAccessProfile.enableVnetIntegration', 'True'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-apiserver-vnet-integration " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview " + "--enable-private-cluster --location={location} --ssh-key-value={ssh_key_value} -o json" + ) + + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("apiServerAccessProfile.enablePrivateCluster", "True"), + self.check("apiServerAccessProfile.enableVnetIntegration", "True"), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap', preserve_default_location=True) - def test_aks_create_with_apiserver_vnet_integration_public(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="centraluseuap", + preserve_default_location=True, + ) + def test_aks_create_with_apiserver_vnet_integration_public( + self, resource_group, resource_group_location + ): # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --enable-apiserver-vnet-integration ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview ' \ - '--location={location} --ssh-key-value={ssh_key_value} -o json' - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('apiServerAccessProfile.enablePrivateCluster', 'False'), - self.check('apiServerAccessProfile.enableVnetIntegration', 'True'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --enable-apiserver-vnet-integration " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/EnableAPIServerVnetIntegrationPreview " + "--location={location} --ssh-key-value={ssh_key_value} -o json" + ) + + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("apiServerAccessProfile.enablePrivateCluster", "False"), + self.check("apiServerAccessProfile.enableVnetIntegration", "True"), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_web_application_routing(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--enable-addons web_application_routing --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_web_application_routing_with_private_dns_zone(self, resource_group, resource_group_location): + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_web_application_routing( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--enable-addons web_application_routing --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_web_application_routing_with_private_dns_zone( + self, resource_group, resource_group_location + ): # Test creation failure when using an non-existing dns zone resource ID. - aks_name = self.create_random_name('cliakstest', 16) - private_dns_zone_name = self.create_random_name('cliakstest', 16) + ".xyz" - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'private_dns_zone_name': private_dns_zone_name - }) - - create_private_dns_zone_cmd = 'network private-dns zone create -g {resource_group} -n {private_dns_zone_name}' - private_dns_zone_id = self.cmd(create_private_dns_zone_cmd, checks=[ - self.check('name', private_dns_zone_name), - ]).get_output_in_json()['id'] - - self.kwargs.update({ 'private_dns_zone_id': private_dns_zone_id }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--enable-addons web_application_routing ' \ - '--dns-zone-resource-ids={private_dns_zone_id} ' \ - '--ssh-key-value={ssh_key_value} -o json' - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds[0]', private_dns_zone_id), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_disable_addon_web_app_routing(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '-a web_application_routing --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - ]) - - disable_cmd = 'aks disable-addons --addons web_application_routing --resource-group={resource_group} --name={name} -o json' - self.cmd(disable_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - # Enable this once the backend bug fix has been rolled out. - # self.check('ingressProfile.webAppRouting.enabled', False) - ]) + aks_name = self.create_random_name("cliakstest", 16) + private_dns_zone_name = self.create_random_name("cliakstest", 16) + ".xyz" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "private_dns_zone_name": private_dns_zone_name, + } + ) + + create_private_dns_zone_cmd = "network private-dns zone create -g {resource_group} -n {private_dns_zone_name}" + private_dns_zone_id = self.cmd( + create_private_dns_zone_cmd, + checks=[ + self.check("name", private_dns_zone_name), + ], + ).get_output_in_json()["id"] + + self.kwargs.update({"private_dns_zone_id": private_dns_zone_id}) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--enable-addons web_application_routing " + "--dns-zone-resource-ids={private_dns_zone_id} " + "--ssh-key-value={ssh_key_value} -o json" + ) + + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + self.check( + "ingressProfile.webAppRouting.dnsZoneResourceIds[0]", + private_dns_zone_id, + ), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_disable_addon_web_app_routing( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "-a web_application_routing --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ) + + disable_cmd = "aks disable-addons --addons web_application_routing --resource-group={resource_group} --name={name} -o json" + self.cmd( + disable_cmd, + checks=[ + self.check("provisioningState", "Succeeded") + # Enable this once the backend bug fix has been rolled out. + # self.check('ingressProfile.webAppRouting.enabled', False) + ], + ) # graph api is not well mocked @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_web_application_routing_dns_zone(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - dns_zone_name = self.create_random_name('cliakstest', 16) + ".xyz" - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'dns_zone_name': dns_zone_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '-a web_application_routing --ssh-key-value={ssh_key_value} -o json' - mc = self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - ]).get_output_in_json() - web_app_routing_identity_obj_id = mc["ingressProfile"]["webAppRouting"]["identity"]["objectId"] - - create_dns_zone_cmd = 'network dns zone create -g {resource_group} -n {dns_zone_name}' - dns_zone = self.cmd(create_dns_zone_cmd,checks=[ - self.check('name', dns_zone_name), - ]).get_output_in_json() - dns_zone_id = dns_zone['id'] - - self.kwargs.update({ 'web_app_routing_identity_obj_id': web_app_routing_identity_obj_id, 'dns_zone_id': dns_zone_id }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_web_application_routing_dns_zone( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + dns_zone_name = self.create_random_name("cliakstest", 16) + ".xyz" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "dns_zone_name": dns_zone_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "-a web_application_routing --ssh-key-value={ssh_key_value} -o json" + ) + mc = self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ).get_output_in_json() + web_app_routing_identity_obj_id = mc["ingressProfile"]["webAppRouting"][ + "identity" + ]["objectId"] + + create_dns_zone_cmd = ( + "network dns zone create -g {resource_group} -n {dns_zone_name}" + ) + dns_zone = self.cmd( + create_dns_zone_cmd, + checks=[ + self.check("name", dns_zone_name), + ], + ).get_output_in_json() + dns_zone_id = dns_zone["id"] + + self.kwargs.update( + { + "web_app_routing_identity_obj_id": web_app_routing_identity_obj_id, + "dns_zone_id": dns_zone_id, + } + ) role_assignment_cmd = 'role assignment create --role "DNS Zone Contributor" --assignee {web_app_routing_identity_obj_id} --scope {dns_zone_id}' self.cmd(role_assignment_cmd) - addon_update_cmd = 'aks addon update -g {resource_group} -n {name} --addon web_application_routing --dns-zone-resource-ids={dns_zone_id}' - self.cmd(addon_update_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + addon_update_cmd = "aks addon update -g {resource_group} -n {name} --addon web_application_routing --dns-zone-resource-ids={dns_zone_id}" + self.cmd( + addon_update_cmd, checks=[self.check("provisioningState", "Succeeded")] + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_with_keda(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create: enable-keda - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --output=json ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-KedaPreview ' \ - '--enable-keda' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('workloadAutoScalerProfile.keda.enabled', True), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --output=json " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-KedaPreview " + "--enable-keda" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("workloadAutoScalerProfile.keda.enabled", True), + ], + ) # delete - delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(delete_cmd, checks=[ - self.is_empty(), - ]) + delete_cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + delete_cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_update_with_keda(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create: without enable-keda - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --output=json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.not_exists('workloadAutoScalerProfile.keda'), - ]) + create_cmd = "aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --output=json" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.not_exists("workloadAutoScalerProfile.keda"), + ], + ) # update: enable-keda - update_cmd = 'aks update --resource-group={resource_group} --name={name} --yes --output=json ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-KedaPreview ' \ - '--enable-keda' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('workloadAutoScalerProfile.keda.enabled', True), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --yes --output=json " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AKS-KedaPreview " + "--enable-keda" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("workloadAutoScalerProfile.keda.enabled", True), + ], + ) # update: disable-keda - update_cmd = 'aks update --resource-group={resource_group} --name={name} --yes --output=json ' \ - '--disable-keda' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('workloadAutoScalerProfile.keda.enabled', False), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --yes --output=json " + "--disable-keda" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("workloadAutoScalerProfile.keda.enabled", False), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) - @live_only() # this test requires live_only because a binary is downloaded + @live_only() # this test requires live_only because a binary is downloaded def test_aks_draft_with_helm(self): - import tempfile, os + import os + import tempfile script_dir = os.path.dirname(__file__) - create_config = 'aks_draft_config/helm.yaml' + create_config = "aks_draft_config/helm.yaml" abs_file_path = os.path.join(script_dir, create_config) with tempfile.TemporaryDirectory() as tmp_dir: # test `create` - create_cmd = f'aks draft create --path={tmp_dir} --create-config={abs_file_path} --destination={tmp_dir}' + create_cmd = f"aks draft create --path={tmp_dir} --create-config={abs_file_path} --destination={tmp_dir}" self.cmd(create_cmd) - assert os.path.isdir(f'{tmp_dir}/charts') and os.path.isfile(f'{tmp_dir}/Dockerfile') + assert os.path.isdir(f"{tmp_dir}/charts") and os.path.isfile( + f"{tmp_dir}/Dockerfile" + ) # test `generate-workflow` - generate_workflow_cmd = f'aks draft generate-workflow --path={tmp_dir} --branch=main --destination={tmp_dir} --cluster-name=someAksCluster --registry-name=someRegistry --resource-group=someResourceGroup --container-name=someContainer' + generate_workflow_cmd = f"aks draft generate-workflow --path={tmp_dir} --branch=main --destination={tmp_dir} --cluster-name=someAksCluster --registry-name=someRegistry --resource-group=someResourceGroup --container-name=someContainer" self.cmd(generate_workflow_cmd) - assert os.path.isfile(f'{tmp_dir}/charts/production.yaml') and os.path.isfile(f'{tmp_dir}/.github/workflows/azure-kubernetes-service-helm.yml') + assert os.path.isfile( + f"{tmp_dir}/charts/production.yaml" + ) and os.path.isfile( + f"{tmp_dir}/.github/workflows/azure-kubernetes-service-helm.yml" + ) # test `update` - update_cmd = f'aks draft update --path={tmp_dir} --destination={tmp_dir} --host=testHost --certificate=testKV' + update_cmd = f"aks draft update --path={tmp_dir} --destination={tmp_dir} --host=testHost --certificate=testKV" self.cmd(update_cmd) - assert os.path.isfile(f'{tmp_dir}/charts/production.yaml') - + assert os.path.isfile(f"{tmp_dir}/charts/production.yaml") - @live_only() # this test requires live_only because a binary is downloaded + @live_only() # this test requires live_only because a binary is downloaded def test_aks_draft_with_kustomize(self): - import tempfile, os + import os + import tempfile script_dir = os.path.dirname(__file__) - create_config = 'aks_draft_config/kustomize.yaml' + create_config = "aks_draft_config/kustomize.yaml" abs_file_path = os.path.join(script_dir, create_config) with tempfile.TemporaryDirectory() as tmp_dir: # test `create` - create_cmd = f'aks draft create --path={tmp_dir} --create-config={abs_file_path} --destination={tmp_dir}' + create_cmd = f"aks draft create --path={tmp_dir} --create-config={abs_file_path} --destination={tmp_dir}" self.cmd(create_cmd) - assert os.path.isdir(f'{tmp_dir}/base') and os.path.isdir(f'{tmp_dir}/overlays/production') and os.path.isfile(f'{tmp_dir}/Dockerfile') + assert ( + os.path.isdir(f"{tmp_dir}/base") + and os.path.isdir(f"{tmp_dir}/overlays/production") + and os.path.isfile(f"{tmp_dir}/Dockerfile") + ) # test `generate-workflow` - generate_workflow_cmd = f'aks draft generate-workflow --path={tmp_dir} --branch=main --destination={tmp_dir} --cluster-name=someAksCluster --registry-name=someRegistry --resource-group=someResourceGroup --container-name=someContainer' + generate_workflow_cmd = f"aks draft generate-workflow --path={tmp_dir} --branch=main --destination={tmp_dir} --cluster-name=someAksCluster --registry-name=someRegistry --resource-group=someResourceGroup --container-name=someContainer" self.cmd(generate_workflow_cmd) - assert os.path.isfile(f'{tmp_dir}/overlays/production/deployment.yaml') and os.path.isfile(f'{tmp_dir}/.github/workflows/azure-kubernetes-service-kustomize.yml') + assert os.path.isfile( + f"{tmp_dir}/overlays/production/deployment.yaml" + ) and os.path.isfile( + f"{tmp_dir}/.github/workflows/azure-kubernetes-service-kustomize.yml" + ) # test `update` - update_cmd = f'aks draft update --path={tmp_dir} --destination={tmp_dir} --host=testHost --certificate=testKV' + update_cmd = f"aks draft update --path={tmp_dir} --destination={tmp_dir} --host=testHost --certificate=testKV" self.cmd(update_cmd) - assert os.path.isfile(f'{tmp_dir}/overlays/production/service.yaml') + assert os.path.isfile(f"{tmp_dir}/overlays/production/service.yaml") - - @live_only() # this test requires live_only because a binary is downloaded + @live_only() # this test requires live_only because a binary is downloaded def test_aks_draft_with_manifest(self): - import tempfile, os + import os + import tempfile script_dir = os.path.dirname(__file__) - create_config = 'aks_draft_config/manifest.yaml' + create_config = "aks_draft_config/manifest.yaml" abs_file_path = os.path.join(script_dir, create_config) with tempfile.TemporaryDirectory() as tmp_dir: - - create_cmd = f'aks draft create --path={tmp_dir} --create-config={abs_file_path} --destination={tmp_dir}' + create_cmd = f"aks draft create --path={tmp_dir} --create-config={abs_file_path} --destination={tmp_dir}" self.cmd(create_cmd) - assert os.path.isdir(f'{tmp_dir}/manifests') and os.path.isfile(f'{tmp_dir}/Dockerfile') + assert os.path.isdir(f"{tmp_dir}/manifests") and os.path.isfile( + f"{tmp_dir}/Dockerfile" + ) # test `generate-workflow` - generate_workflow_cmd = f'aks draft generate-workflow --path={tmp_dir} --branch=main --destination={tmp_dir} --cluster-name=someAksCluster --registry-name=someRegistry --resource-group=someResourceGroup --container-name=someContainer' + generate_workflow_cmd = f"aks draft generate-workflow --path={tmp_dir} --branch=main --destination={tmp_dir} --cluster-name=someAksCluster --registry-name=someRegistry --resource-group=someResourceGroup --container-name=someContainer" self.cmd(generate_workflow_cmd) - assert os.path.isfile(f'{tmp_dir}/.github/workflows/azure-kubernetes-service.yml') + assert os.path.isfile( + f"{tmp_dir}/.github/workflows/azure-kubernetes-service.yml" + ) # test `update` - update_cmd = f'aks draft update --path={tmp_dir} --destination={tmp_dir} --host=testHost --certificate=testKV' + update_cmd = f"aks draft update --path={tmp_dir} --destination={tmp_dir} --host=testHost --certificate=testKV" self.cmd(update_cmd) - assert os.path.isfile(f'{tmp_dir}/manifests/service.yaml') + assert os.path.isfile(f"{tmp_dir}/manifests/service.yaml") - @live_only() # because we're downloading a binary, and we're not testing the output of any ARM requests. - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') + @live_only() # because we're downloading a binary, and we're not testing the output of any ARM requests. + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) def test_aks_kollect(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - stg_acct_name = self.create_random_name('cliaksteststg', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'location': resource_group_location, - 'aks_name': aks_name, - 'stg_acct_name': stg_acct_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_aks_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --location={location} --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_aks_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) - - create_stg_cmd = 'storage account create --resource-group={resource_group} --name={stg_acct_name} --location={location} -o json' - self.cmd(create_stg_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + aks_name = self.create_random_name("cliakstest", 16) + stg_acct_name = self.create_random_name("cliaksteststg", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "location": resource_group_location, + "aks_name": aks_name, + "stg_acct_name": stg_acct_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_aks_cmd = "aks create --resource-group={resource_group} --name={aks_name} --location={location} --ssh-key-value={ssh_key_value} -o json" + self.cmd(create_aks_cmd, checks=[self.check("provisioningState", "Succeeded")]) + + create_stg_cmd = "storage account create --resource-group={resource_group} --name={stg_acct_name} --location={location} -o json" + self.cmd(create_stg_cmd, checks=[self.check("provisioningState", "Succeeded")]) # Install kubectl (required by the 'kollect' command). try: - subprocess.call(['az', 'aks', 'install-cli']) + subprocess.call(["az", "aks", "install-cli"]) except subprocess.CalledProcessError as err: raise CliTestError(f"Failed to install kubectl with error: '{err}'") self.assert_kollect_deploys_periscope(resource_group, aks_name, stg_acct_name) - @live_only() # because we're downloading a binary, and we're not testing the output of any ARM requests. - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='centraluseuap') - def test_aks_kollect_with_managed_aad(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - stg_acct_name = self.create_random_name('cliaksteststg', 24) - self.kwargs.update({ - 'resource_group': resource_group, - 'location': resource_group_location, - 'aks_name': aks_name, - 'stg_acct_name': stg_acct_name, - 'ssh_key_value': self.generate_ssh_keys() - }) + @live_only() # because we're downloading a binary, and we're not testing the output of any ARM requests. + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="centraluseuap" + ) + def test_aks_kollect_with_managed_aad( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + stg_acct_name = self.create_random_name("cliaksteststg", 24) + self.kwargs.update( + { + "resource_group": resource_group, + "location": resource_group_location, + "aks_name": aks_name, + "stg_acct_name": stg_acct_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # Initially create with local accounts enabled (the default), so that we can use the admin account # to grant the necessary k8s permissions to the AD user (the service principal). - create_aks_cmd = 'aks create --resource-group={resource_group} --name={aks_name} ' \ - '--location={location} --ssh-key-value={ssh_key_value} ' \ - '--vm-set-type VirtualMachineScaleSets -c 1 ' \ - '--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 ' \ - '-o json' - self.cmd(create_aks_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('aadProfile.managed', True), - self.check('aadProfile.adminGroupObjectIDs[0]', '00000000-0000-0000-0000-000000000001'), - self.check('disableLocalAccounts', False) - ]) + create_aks_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} " + "--location={location} --ssh-key-value={ssh_key_value} " + "--vm-set-type VirtualMachineScaleSets -c 1 " + "--enable-aad --aad-admin-group-object-ids 00000000-0000-0000-0000-000000000001 " + "-o json" + ) + self.cmd( + create_aks_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("aadProfile.managed", True), + self.check( + "aadProfile.adminGroupObjectIDs[0]", + "00000000-0000-0000-0000-000000000001", + ), + self.check("disableLocalAccounts", False), + ], + ) # Get the object ID of the service principal - show_acct_cmd = 'account show' + show_acct_cmd = "account show" authenticated_acct = self.cmd(show_acct_cmd).get_output_in_json() sp_name = authenticated_acct["user"]["name"] - show_sp_cmd = f'ad sp show --id {sp_name}' - sp = self.cmd(show_sp_cmd, checks=[ - self.check('appId', sp_name) - ]).get_output_in_json() + show_sp_cmd = f"ad sp show --id {sp_name}" + sp = self.cmd( + show_sp_cmd, checks=[self.check("appId", sp_name)] + ).get_output_in_json() sp_oid = sp["id"] - print(f'objectid of service principal is {sp_oid}') + print(f"objectid of service principal is {sp_oid}") # Install kubectl (for setting up service principal permissions, and required by the 'kollect' command). try: - subprocess.call(['az', 'aks', 'install-cli']) + subprocess.call(["az", "aks", "install-cli"]) except subprocess.CalledProcessError as err: raise CliTestError(f"Failed to install kubectl with error: '{err}'") # Grant the service principal cluster-admin access using the admin account # (it'd be nice if `az aks command invoke` had an --admin option, but it appears not to, so we have to download admin credentials) fd, admin_kubeconfig_path = tempfile.mkstemp() - self.kwargs.update({ 'kubeconfig_path': admin_kubeconfig_path }) + self.kwargs.update({"kubeconfig_path": admin_kubeconfig_path}) try: - get_credential_cmd = 'aks get-credentials --resource-group={resource_group} --name={aks_name} --admin -f {kubeconfig_path}' + get_credential_cmd = "aks get-credentials --resource-group={resource_group} --name={aks_name} --admin -f {kubeconfig_path}" self.cmd(get_credential_cmd) - create_rolebinding_output = subprocess.check_output(['kubectl', 'create', 'clusterrolebinding', '--kubeconfig', admin_kubeconfig_path, '--clusterrole', 'cluster-admin', '--user', sp_oid, 'test-clusterrolebinding']) - print(f'Output of create rolebinding:\n{create_rolebinding_output}') + create_rolebinding_output = subprocess.check_output( + [ + "kubectl", + "create", + "clusterrolebinding", + "--kubeconfig", + admin_kubeconfig_path, + "--clusterrole", + "cluster-admin", + "--user", + sp_oid, + "test-clusterrolebinding", + ] + ) + print(f"Output of create rolebinding:\n{create_rolebinding_output}") except subprocess.CalledProcessError as err: - raise CliTestError(f"Failed to create admin clusterrolebinding for {sp_oid}: '{err}'") + raise CliTestError( + f"Failed to create admin clusterrolebinding for {sp_oid}: '{err}'" + ) finally: os.close(fd) os.remove(admin_kubeconfig_path) # Now the current user has the required permissions, we can disable admin access to the cluster - disable_admin_cmd = 'aks update --resource-group={resource_group} --name={aks_name} --disable-local-accounts' - self.cmd(disable_admin_cmd, checks=[ - self.check('disableLocalAccounts', True) - ]) + disable_admin_cmd = "aks update --resource-group={resource_group} --name={aks_name} --disable-local-accounts" + self.cmd(disable_admin_cmd, checks=[self.check("disableLocalAccounts", True)]) # Create the storage account to which to upload Periscope output - create_stg_cmd = 'storage account create --resource-group={resource_group} --name={stg_acct_name} --location={location} -o json' - self.cmd(create_stg_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + create_stg_cmd = "storage account create --resource-group={resource_group} --name={stg_acct_name} --location={location} -o json" + self.cmd(create_stg_cmd, checks=[self.check("provisioningState", "Succeeded")]) self.assert_kollect_deploys_periscope(resource_group, aks_name, stg_acct_name) @@ -6761,17 +9776,31 @@ def assert_kollect_deploys_periscope(self, resource_group, aks_name, stg_acct_na # sufficient and will raise an exception; we also need to attach a pseudo-TTY to the process. ptyInFd, ptyOutFd = pty.openpty() try: - with os.fdopen(ptyInFd, 'w', closefd=False) as ptyIn: - kollect_cmd = ['az', 'aks', 'kollect', '--resource-group', resource_group, '--name', aks_name, '--storage-account', stg_acct_name] + with os.fdopen(ptyInFd, "w", closefd=False) as ptyIn: + kollect_cmd = [ + "az", + "aks", + "kollect", + "--resource-group", + resource_group, + "--name", + aks_name, + "--storage-account", + stg_acct_name, + ] # For this test, the first input should be 'y' (to confirm), and the second should be 'n' (to see analysis results). # Write these to our PTY (they will be buffered until the command attempts to read them). - kollect_stdin_responses = ['y\n', 'n\n'] - ptyIn.write(''.join(kollect_stdin_responses)) + kollect_stdin_responses = ["y\n", "n\n"] + ptyIn.write("".join(kollect_stdin_responses)) - kollect_output = subprocess.check_output(kollect_cmd, stdin=ptyOutFd, stderr=subprocess.STDOUT, text=True) + kollect_output = subprocess.check_output( + kollect_cmd, stdin=ptyOutFd, stderr=subprocess.STDOUT, text=True + ) except subprocess.CalledProcessError as err: - raise CliTestError(f"Failed to kollect with exit code {err.returncode}. Output:\n{err.output}") + raise CliTestError( + f"Failed to kollect with exit code {err.returncode}. Output:\n{err.output}" + ) finally: os.close(ptyOutFd) os.close(ptyInFd) @@ -6780,283 +9809,428 @@ def assert_kollect_deploys_periscope(self, resource_group, aks_name, stg_acct_na for pattern in [ f"This will deploy a daemon set to your cluster to collect logs and diagnostic information and save them to the storage account {stg_acct_name}", f"Your logs are being uploaded to storage account {stg_acct_name}", - f"You can run 'az aks kanalyze -g {resource_group} -n {aks_name}' anytime to check the analysis results" + f"You can run 'az aks kanalyze -g {resource_group} -n {aks_name}' anytime to check the analysis results", ]: - if not pattern in kollect_output: - raise CliTestError(f"Output from kollect did not contain '{pattern}'. Output:\n{kollect_output}") + if pattern not in kollect_output: + raise CliTestError( + f"Output from kollect did not contain '{pattern}'. Output:\n{kollect_output}" + ) # Invoke kubectl to get the daemonsets deployed to the cluster - k_get_daemonset_cmd = ["az", "aks", "command", "invoke", "--resource-group", resource_group, "--name", aks_name, "--command", "kubectl get daemonset -n aks-periscope -o name"] + k_get_daemonset_cmd = [ + "az", + "aks", + "command", + "invoke", + "--resource-group", + resource_group, + "--name", + aks_name, + "--command", + "kubectl get daemonset -n aks-periscope -o name", + ] k_get_daemonset_output = subprocess.check_output(k_get_daemonset_cmd, text=True) # Check expected output of 'kubectl get daemonset' command for pattern in [ "daemonset.apps/aks-periscope", - "daemonset.apps/aks-periscope-win" + "daemonset.apps/aks-periscope-win", ]: - if not pattern in k_get_daemonset_output: - raise CliTestError(f"Output from 'kubectl get daemonset' did not contain '{pattern}'. Output:\n{k_get_daemonset_output}") + if pattern not in k_get_daemonset_output: + raise CliTestError( + f"Output from 'kubectl get daemonset' did not contain '{pattern}'. Output:\n{k_get_daemonset_output}" + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) def test_aks_availability_zones(self, resource_group, resource_group_location): # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) + aks_name = self.create_random_name("cliakstest", 16) nodepool2_name = "nodepool2" - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'nodepool2_name': nodepool2_name, - 'zones': "1 2 3" - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "nodepool2_name": nodepool2_name, + "zones": "1 2 3", + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--node-count=1 --ssh-key-value={ssh_key_value} --zones {zones}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].availabilityZones[0]', '1'), - self.check('agentPoolProfiles[0].availabilityZones[1]', '2'), - self.check('agentPoolProfiles[0].availabilityZones[2]', '3'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--node-count=1 --ssh-key-value={ssh_key_value} --zones {zones}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].availabilityZones[0]", "1"), + self.check("agentPoolProfiles[0].availabilityZones[1]", "2"), + self.check("agentPoolProfiles[0].availabilityZones[2]", "3"), + ], + ) # nodepool add - self.cmd('aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --node-count=1 --zones {zones}', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('availabilityZones[0]', '1'), - self.check('availabilityZones[1]', '2'), - self.check('availabilityZones[2]', '3'), - ]) + self.cmd( + "aks nodepool add --resource-group={resource_group} --cluster-name={name} --name={nodepool2_name} --node-count=1 --zones {zones}", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("availabilityZones[0]", "1"), + self.check("availabilityZones[1]", "2"), + self.check("availabilityZones[2]", "3"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # live only due to workspace is not mocked correctly @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_with_defender(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'name': aks_name, - 'resource_group': resource_group, - 'ssh_key_value': self.generate_ssh_keys() - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "name": aks_name, + "resource_group": resource_group, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--ssh-key-value={ssh_key_value} --enable-defender' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.defender.securityMonitoring.enabled', True) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--ssh-key-value={ssh_key_value} --enable-defender" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.defender.securityMonitoring.enabled", True), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # live only due to workspace is not mocked correctly @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_update_with_defender(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = "aks create --resource-group={resource_group} --name={name} --ssh-key-value={ssh_key_value}" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # update to enable defender - self.cmd('aks update --resource-group={resource_group} --name={name} --enable-defender', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.defender.securityMonitoring.enabled', True) - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --enable-defender", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("securityProfile.defender.securityMonitoring.enabled", True), + ], + ) - # update to disable defender - self.cmd('aks update --resource-group={resource_group} --name={name} --disable-defender', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('securityProfile.defender.securityMonitoring.enabled', False) - ]) + # update to disable defender + self.cmd( + "aks update --resource-group={resource_group} --name={name} --disable-defender", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "securityProfile.defender.securityMonitoring.enabled", False + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_azuremonitormetrics(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_azuremonitormetrics( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - node_vm_size = 'standard_d2s_v3' - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - 'node_vm_size': node_vm_size - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} ' \ - '--enable-managed-identity --enable-azure-monitor-metrics --enable-windows-recording-rules --output=json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + + node_vm_size = "standard_d2s_v3" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + "node_vm_size": node_vm_size, + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} " + "--enable-managed-identity --enable-azure-monitor-metrics --enable-windows-recording-rules --output=json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # azuremonitor metrics will be set to false after initial creation command as its in the # postprocessing step that we do an update to enable it. Adding a wait for the second put request # in addonput.py which enables the Azure Monitor Metrics addon as all the DC* resources # have now been created. - wait_cmd = ' '.join([ - 'aks', 'wait', '--resource-group={resource_group}', '--name={name}', '--updated', - '--interval 60', '--timeout 300', - ]) - self.cmd(wait_cmd, checks=[ - self.is_empty(), - ]) - - self.cmd('aks show -g {resource_group} -n {name} --output=json', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('azureMonitorProfile.metrics.enabled', True), - ]) + wait_cmd = " ".join( + [ + "aks", + "wait", + "--resource-group={resource_group}", + "--name={name}", + "--updated", + "--interval 60", + "--timeout 300", + ] + ) + self.cmd( + wait_cmd, + checks=[ + self.is_empty(), + ], + ) + + self.cmd( + "aks show -g {resource_group} -n {name} --output=json", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("azureMonitorProfile.metrics.enabled", True), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) # live only due to downloading k8s-extension extension @live_only() @AllowLargeResponse(8192) - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_azurecontainerstorage(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_azurecontainerstorage( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - node_vm_size = 'standard_d4s_v3' - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - 'node_vm_size': node_vm_size - }) + aks_name = self.create_random_name("cliakstest", 16) + + node_vm_size = "standard_d4s_v3" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + "node_vm_size": node_vm_size, + } + ) # add k8s-extension extension for azurecontainerstorage operations. - self.cmd('extension add --name k8s-extension') + self.cmd("extension add --name k8s-extension") - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} ' \ - '--node-count 3 --enable-managed-identity --enable-azure-container-storage azureDisk --output=json' + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} " + "--node-count 3 --enable-managed-identity --enable-azure-container-storage azureDisk --output=json" + ) # enabling azurecontainerstorage will not affect any field in the cluster. # the only check we should perform is to verify that the cluster is provisioned successfully. - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) # live only due to downloading k8s-extension extension @live_only() @AllowLargeResponse(8192) - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_azurecontainerstorage_with_nodepool_name(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_azurecontainerstorage_with_nodepool_name( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('n', 6) - - node_vm_size = 'standard_d4s_v3' - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'ssh_key_value': self.generate_ssh_keys(), - 'node_vm_size': node_vm_size, - 'nodepool_name': nodepool_name - }) + aks_name = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("n", 6) + + node_vm_size = "standard_d4s_v3" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "ssh_key_value": self.generate_ssh_keys(), + "node_vm_size": node_vm_size, + "nodepool_name": nodepool_name, + } + ) # add k8s-extension extension for azurecontainerstorage operations. - self.cmd('extension add --name k8s-extension') + self.cmd("extension add --name k8s-extension") - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} ' \ - '--node-count 3 --nodepool-name {nodepool_name} --enable-managed-identity --enable-azure-container-storage azureDisk --output=json' + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} " + "--node-count 3 --nodepool-name {nodepool_name} --enable-managed-identity --enable-azure-container-storage azureDisk --output=json" + ) # enabling azurecontainerstorage will not affect any field in the cluster. # the only check we should perform is to verify that the cluster is provisioned successfully. - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].name', nodepool_name), - ]) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].name", nodepool_name), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_update_with_azuremonitormetrics(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - node_vm_size = 'standard_d2s_v3' - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'node_vm_size': node_vm_size, - }) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_update_with_azuremonitormetrics( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + node_vm_size = "standard_d2s_v3" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "node_vm_size": node_vm_size, + } + ) # create: without enable-azure-monitor-metrics - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} --enable-managed-identity --output=json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.not_exists('azureMonitorProfile.metrics'), - ]) + create_cmd = "aks create --resource-group={resource_group} --name={name} --location={location} --ssh-key-value={ssh_key_value} --node-vm-size={node_vm_size} --enable-managed-identity --output=json" + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.not_exists("azureMonitorProfile.metrics"), + ], + ) # update: enable-azure-monitor-metrics - update_cmd = 'aks update --resource-group={resource_group} --name={name} --yes --output=json ' \ - '--enable-azure-monitor-metrics --enable-managed-identity --enable-windows-recording-rules' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('azureMonitorProfile.metrics.enabled', True), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --yes --output=json " + "--enable-azure-monitor-metrics --enable-managed-identity --enable-windows-recording-rules" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("azureMonitorProfile.metrics.enabled", True), + ], + ) # update: disable-azure-monitor-metrics - update_cmd = 'aks update --resource-group={resource_group} --name={name} --yes --output=json ' \ - '--disable-azure-monitor-metrics' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('azureMonitorProfile.metrics.enabled', False), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --yes --output=json " + "--disable-azure-monitor-metrics" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("azureMonitorProfile.metrics.enabled", False), + ], + ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) # live only due to downloading k8s-extension extension # @live_only() @@ -7106,604 +10280,847 @@ def test_aks_update_with_azuremonitormetrics(self, resource_group, resource_grou # self.is_empty(), # ]) - # live only due to workspace is not mocked correctly @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_kube_proxy_config(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'kube_proxy_path': _get_test_data_file('kubeproxyconfig.json'), - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --kube-proxy-config={kube_proxy_path} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/KubeProxyConfigurationPreview ' \ - '--ssh-key-value={ssh_key_value} --enable-managed-identity --yes -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.kubeProxyConfig.enabled',True), - self.check('networkProfile.kubeProxyConfig.mode','IPTABLES'), - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_kube_proxy_config( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kube_proxy_path": _get_test_data_file("kubeproxyconfig.json"), + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --kube-proxy-config={kube_proxy_path} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/KubeProxyConfigurationPreview " + "--ssh-key-value={ssh_key_value} --enable-managed-identity --yes -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.kubeProxyConfig.enabled", True), + self.check("networkProfile.kubeProxyConfig.mode", "IPTABLES"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) # live only due to workspace is not mocked correctly @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_update_with_kube_proxy_config(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'kube_proxy_path': _get_test_data_file('kubeproxyconfig.json'), - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} --kube-proxy-config={kube_proxy_path} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/KubeProxyConfigurationPreview ' \ - '--ssh-key-value={ssh_key_value} --enable-managed-identity --yes -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.kubeProxyConfig.enabled',True), - self.check('networkProfile.kubeProxyConfig.mode','IPTABLES'), - ]) - - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'kube_proxy_path': _get_test_data_file('kubeproxyconfig_update.json'), - }) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} --kube-proxy-config={kube_proxy_path} ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/KubeProxyConfigurationPreview' - - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.kubeProxyConfig.enabled',True), - self.check('networkProfile.kubeProxyConfig.mode','IPVS'), - self.check('networkProfile.kubeProxyConfig.ipvsConfig.scheduler','LeastConnection'), - ]) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_update_with_kube_proxy_config( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kube_proxy_path": _get_test_data_file("kubeproxyconfig.json"), + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --kube-proxy-config={kube_proxy_path} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/KubeProxyConfigurationPreview " + "--ssh-key-value={ssh_key_value} --enable-managed-identity --yes -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.kubeProxyConfig.enabled", True), + self.check("networkProfile.kubeProxyConfig.mode", "IPTABLES"), + ], + ) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "kube_proxy_path": _get_test_data_file("kubeproxyconfig_update.json"), + } + ) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --kube-proxy-config={kube_proxy_path} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/KubeProxyConfigurationPreview" + ) + + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.kubeProxyConfig.enabled", True), + self.check("networkProfile.kubeProxyConfig.mode", "IPVS"), + self.check( + "networkProfile.kubeProxyConfig.ipvsConfig.scheduler", + "LeastConnection", + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) def test_aks_create_with_nsg_control(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('n', 6) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'node_vm_size': 'standard_d2s_v3', - 'asg1': 'asg1', - 'asg2': 'asg2', - }) - - create_asg1 = 'network asg create --name {asg1} --resource-group {resource_group} -o json' - create_asg2 = 'network asg create --name {asg2} --resource-group {resource_group} -o json' - asg1 = self.cmd(create_asg1, checks=[self.check('provisioningState', 'Succeeded')]).get_output_in_json() - asg2 = self.cmd(create_asg2, checks=[self.check('provisioningState', 'Succeeded')]).get_output_in_json() - - self.kwargs.update({ - 'asg_ids': ','.join([asg1['id'], asg2['id']]), - 'allowed_host_ports': ','.join(['53/udp', '80/tcp', '443/tcp', '4000-5000/tcp', '4000-6000/udp']), - }) - self.cmd( - 'aks create ' - '--resource-group={resource_group} ' - '--name={name} ' - '--location={location} ' - '--ssh-key-value={ssh_key_value} ' - '--node-count=1 ' - '--node-vm-size={node_vm_size} ' - '--nodepool-asg-ids={asg_ids} ' - '--nodepool-allowed-host-ports={allowed_host_ports} ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPNSGControlPreview', - checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].networkProfile.applicationSecurityGroups', self.kwargs['asg_ids'].split(',')), - self.check('agentPoolProfiles[0].networkProfile.allowedHostPorts[] | length(@)', len(self.kwargs['allowed_host_ports'].split(','))), + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "node_vm_size": "standard_d2s_v3", + "asg1": "asg1", + "asg2": "asg2", + } + ) + + create_asg1 = ( + "network asg create --name {asg1} --resource-group {resource_group} -o json" + ) + create_asg2 = ( + "network asg create --name {asg2} --resource-group {resource_group} -o json" + ) + asg1 = self.cmd( + create_asg1, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() + asg2 = self.cmd( + create_asg2, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() + + self.kwargs.update( + { + "asg_ids": ",".join([asg1["id"], asg2["id"]]), + "allowed_host_ports": ",".join( + ["53/udp", "80/tcp", "443/tcp", "4000-5000/tcp", "4000-6000/udp"] + ), + } + ) + self.cmd( + "aks create " + "--resource-group={resource_group} " + "--name={name} " + "--location={location} " + "--ssh-key-value={ssh_key_value} " + "--node-count=1 " + "--node-vm-size={node_vm_size} " + "--nodepool-asg-ids={asg_ids} " + "--nodepool-allowed-host-ports={allowed_host_ports} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPNSGControlPreview", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[0].networkProfile.applicationSecurityGroups", + self.kwargs["asg_ids"].split(","), + ), + self.check( + "agentPoolProfiles[0].networkProfile.allowedHostPorts[] | length(@)", + len(self.kwargs["allowed_host_ports"].split(",")), + ), ], ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_nodepool_create_with_nsg_control(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('n', 6) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'node_pool_name': nodepool_name, - 'node_vm_size': 'standard_d2s_v3', - 'asg1': 'asg1', - 'asg2': 'asg2', - }) - create_asg1 = 'network asg create --name {asg1} --resource-group {resource_group} -o json' - create_asg2 = 'network asg create --name {asg2} --resource-group {resource_group} -o json' - asg1 = self.cmd(create_asg1, checks=[self.check('provisioningState', 'Succeeded')]).get_output_in_json() - asg2 = self.cmd(create_asg2, checks=[self.check('provisioningState', 'Succeeded')]).get_output_in_json() - - self.kwargs.update({ - 'asg_ids': ','.join([asg1['id'], asg2['id']]), - 'allowed_host_ports': ','.join(['53/udp', '80/tcp', '443/tcp', '4000-5000/tcp', '4000-6000/udp']), - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_nodepool_create_with_nsg_control( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("n", 6) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "node_pool_name": nodepool_name, + "node_vm_size": "standard_d2s_v3", + "asg1": "asg1", + "asg2": "asg2", + } + ) + create_asg1 = ( + "network asg create --name {asg1} --resource-group {resource_group} -o json" + ) + create_asg2 = ( + "network asg create --name {asg2} --resource-group {resource_group} -o json" + ) + asg1 = self.cmd( + create_asg1, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() + asg2 = self.cmd( + create_asg2, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() + + self.kwargs.update( + { + "asg_ids": ",".join([asg1["id"], asg2["id"]]), + "allowed_host_ports": ",".join( + ["53/udp", "80/tcp", "443/tcp", "4000-5000/tcp", "4000-6000/udp"] + ), + } + ) self.cmd( - 'aks create ' - '--resource-group={resource_group} ' - '--name={name} ' - '--location={location} ' - '--ssh-key-value={ssh_key_value} ' - '--node-count=1 ' - '--node-vm-size={node_vm_size} ', + "aks create " + "--resource-group={resource_group} " + "--name={name} " + "--location={location} " + "--ssh-key-value={ssh_key_value} " + "--node-count=1 " + "--node-vm-size={node_vm_size} ", checks=[ - self.check('provisioningState', 'Succeeded'), + self.check("provisioningState", "Succeeded"), ], ) self.cmd( - 'aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name} ' - '--node-vm-size={node_vm_size} ' - '--node-count=1 ' - '--asg-ids={asg_ids} ' - '--allowed-host-ports={allowed_host_ports} ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPNSGControlPreview', + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name} " + "--node-vm-size={node_vm_size} " + "--node-count=1 " + "--asg-ids={asg_ids} " + "--allowed-host-ports={allowed_host_ports} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPNSGControlPreview", checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.applicationSecurityGroups', self.kwargs['asg_ids'].split(',')), - self.check('networkProfile.allowedHostPorts[] | length(@)', len(self.kwargs['allowed_host_ports'].split(','))), + self.check("provisioningState", "Succeeded"), + self.check( + "networkProfile.applicationSecurityGroups", + self.kwargs["asg_ids"].split(","), + ), + self.check( + "networkProfile.allowedHostPorts[] | length(@)", + len(self.kwargs["allowed_host_ports"].split(",")), + ), ], ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_nodepool_update_with_nsg_control(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('n', 6) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'node_pool_name': nodepool_name, - 'node_vm_size': 'standard_d2s_v3', - 'asg1': 'asg1', - 'asg2': 'asg2', - }) - create_asg1 = 'network asg create --name {asg1} --resource-group {resource_group} -o json' - create_asg2 = 'network asg create --name {asg2} --resource-group {resource_group} -o json' - asg1 = self.cmd(create_asg1, checks=[self.check('provisioningState', 'Succeeded')]).get_output_in_json() - asg2 = self.cmd(create_asg2, checks=[self.check('provisioningState', 'Succeeded')]).get_output_in_json() - - self.kwargs.update({ - 'asg_ids': ','.join([asg1['id'], asg2['id']]), - 'allowed_host_ports': ','.join(['53/udp', '80/tcp', '443/tcp', '4000-5000/tcp', '4000-6000/udp']), - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_nodepool_update_with_nsg_control( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("n", 6) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "node_pool_name": nodepool_name, + "node_vm_size": "standard_d2s_v3", + "asg1": "asg1", + "asg2": "asg2", + } + ) + create_asg1 = ( + "network asg create --name {asg1} --resource-group {resource_group} -o json" + ) + create_asg2 = ( + "network asg create --name {asg2} --resource-group {resource_group} -o json" + ) + asg1 = self.cmd( + create_asg1, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() + asg2 = self.cmd( + create_asg2, checks=[self.check("provisioningState", "Succeeded")] + ).get_output_in_json() + + self.kwargs.update( + { + "asg_ids": ",".join([asg1["id"], asg2["id"]]), + "allowed_host_ports": ",".join( + ["53/udp", "80/tcp", "443/tcp", "4000-5000/tcp", "4000-6000/udp"] + ), + } + ) self.cmd( - 'aks create ' - '--resource-group={resource_group} ' - '--name={name} ' - '--location={location} ' - '--ssh-key-value={ssh_key_value} ' - '--nodepool-name={node_pool_name} ' - '--node-count=1 ' - '--node-vm-size={node_vm_size} ', + "aks create " + "--resource-group={resource_group} " + "--name={name} " + "--location={location} " + "--ssh-key-value={ssh_key_value} " + "--nodepool-name={node_pool_name} " + "--node-count=1 " + "--node-vm-size={node_vm_size} ", checks=[ - self.check('provisioningState', 'Succeeded'), + self.check("provisioningState", "Succeeded"), ], ) self.cmd( - 'aks nodepool update ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name} ' - '--asg-ids={asg_ids} ' - '--allowed-host-ports={allowed_host_ports} ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPNSGControlPreview', + "aks nodepool update " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name} " + "--asg-ids={asg_ids} " + "--allowed-host-ports={allowed_host_ports} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPNSGControlPreview", checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.applicationSecurityGroups', self.kwargs['asg_ids'].split(',')), - self.check('networkProfile.allowedHostPorts[] | length(@)', len(self.kwargs['allowed_host_ports'].split(','))), + self.check("provisioningState", "Succeeded"), + self.check( + "networkProfile.applicationSecurityGroups", + self.kwargs["asg_ids"].split(","), + ), + self.check( + "networkProfile.allowedHostPorts[] | length(@)", + len(self.kwargs["allowed_host_ports"].split(",")), + ), ], ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) # the availability of features is controlled by a toggle and cannot be fully tested yet, # however, existing test results show that the client side works as expected, so exclude it at this moment @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_nodepool_update_with_artifact_streaming(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('n', 6) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'node_pool_name': nodepool_name, - 'node_vm_size': 'standard_d2s_v3', - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_nodepool_update_with_artifact_streaming( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("n", 6) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "node_pool_name": nodepool_name, + "node_vm_size": "standard_d2s_v3", + } + ) self.cmd( - 'aks create ' - '--resource-group={resource_group} ' - '--name={name} ' - '--location={location} ' - '--ssh-key-value={ssh_key_value} ' - '--nodepool-name={node_pool_name} ' - '--node-count=1 ' - '--node-vm-size={node_vm_size} ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ArtifactStreamingPreview', + "aks create " + "--resource-group={resource_group} " + "--name={name} " + "--location={location} " + "--ssh-key-value={ssh_key_value} " + "--nodepool-name={node_pool_name} " + "--node-count=1 " + "--node-vm-size={node_vm_size} " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ArtifactStreamingPreview", checks=[ - self.check('provisioningState', 'Succeeded'), + self.check("provisioningState", "Succeeded"), ], ) self.cmd( - 'aks nodepool update ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name} ' - '--enable-artifact-streaming ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ArtifactStreamingPreview', + "aks nodepool update " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name} " + "--enable-artifact-streaming " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ArtifactStreamingPreview", checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[1].ArtifactStreamingProfile.enabled', True), + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[1].ArtifactStreamingProfile.enabled", True + ), ], ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_and_update_ssh_public_key(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys() - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '-c 1 --ssh-key-value={ssh_key_value} -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - TEST_SSH_KEY_PUB = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCYpZoWGqsIbCKOvcrtPi5PpgoaP24pKJ8yk80qBYbqIjyVngCfM8rbgQCZKx4D8emmN7UxjiSt+c4WtV1aUfbT7VA5r4neuhPVgkqgp7CmkKdf0beV/0i5K28J7RojDTktllY9EYRYK6A4olLplaHJiuqbsMYa8amv43ol6IxgM3eE2BiEYm0/uvNKDmZ8AN4w07fFKjz1+wfdkluxC73qhijMY6FCgw+xEvvS1kd2Se6L/M/qV+VVnxW+S/bBT4Yew2dR6KWnauJvxXzdM8WQHyJy52jQ1n5PHxVRMgjRLhWvbcNNgPseFpULxe3a4ATS8kKO2Z9pzpSOgEpW7LVz' # pylint: disable=line-too-long + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_and_update_ssh_public_key( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "-c 1 --ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + TEST_SSH_KEY_PUB = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCYpZoWGqsIbCKOvcrtPi5PpgoaP24pKJ8yk80qBYbqIjyVngCfM8rbgQCZKx4D8emmN7UxjiSt+c4WtV1aUfbT7VA5r4neuhPVgkqgp7CmkKdf0beV/0i5K28J7RojDTktllY9EYRYK6A4olLplaHJiuqbsMYa8amv43ol6IxgM3eE2BiEYm0/uvNKDmZ8AN4w07fFKjz1+wfdkluxC73qhijMY6FCgw+xEvvS1kd2Se6L/M/qV+VVnxW+S/bBT4Yew2dR6KWnauJvxXzdM8WQHyJy52jQ1n5PHxVRMgjRLhWvbcNNgPseFpULxe3a4ATS8kKO2Z9pzpSOgEpW7LVz" # pylint: disable=line-too-long _, pathname = tempfile.mkstemp() - with open(pathname, 'w') as key_file: + with open(pathname, "w") as key_file: key_file.write(TEST_SSH_KEY_PUB) - self.kwargs.update({ - 'ssh_key_value': pathname.replace('\\', '\\\\') - }) + self.kwargs.update({"ssh_key_value": pathname.replace("\\", "\\\\")}) - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('linuxProfile.ssh.publicKeys[0].keyData', TEST_SSH_KEY_PUB) - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("linuxProfile.ssh.publicKeys[0].keyData", TEST_SSH_KEY_PUB), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_no_ssh_key_and_update_ssh_public_key(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_no_ssh_key_and_update_ssh_public_key( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + } + ) - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '-c 1 --no-ssh-key -o json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "-c 1 --no-ssh-key -o json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) - TEST_SSH_KEY_PUB = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCYpZoWGqsIbCKOvcrtPi5PpgoaP24pKJ8yk80qBYbqIjyVngCfM8rbgQCZKx4D8emmN7UxjiSt+c4WtV1aUfbT7VA5r4neuhPVgkqgp7CmkKdf0beV/0i5K28J7RojDTktllY9EYRYK6A4olLplaHJiuqbsMYa8amv43ol6IxgM3eE2BiEYm0/uvNKDmZ8AN4w07fFKjz1+wfdkluxC73qhijMY6FCgw+xEvvS1kd2Se6L/M/qV+VVnxW+S/bBT4Yew2dR6KWnauJvxXzdM8WQHyJy52jQ1n5PHxVRMgjRLhWvbcNNgPseFpULxe3a4ATS8kKO2Z9pzpSOgEpW7LVz' # pylint: disable=line-too-long + TEST_SSH_KEY_PUB = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCYpZoWGqsIbCKOvcrtPi5PpgoaP24pKJ8yk80qBYbqIjyVngCfM8rbgQCZKx4D8emmN7UxjiSt+c4WtV1aUfbT7VA5r4neuhPVgkqgp7CmkKdf0beV/0i5K28J7RojDTktllY9EYRYK6A4olLplaHJiuqbsMYa8amv43ol6IxgM3eE2BiEYm0/uvNKDmZ8AN4w07fFKjz1+wfdkluxC73qhijMY6FCgw+xEvvS1kd2Se6L/M/qV+VVnxW+S/bBT4Yew2dR6KWnauJvxXzdM8WQHyJy52jQ1n5PHxVRMgjRLhWvbcNNgPseFpULxe3a4ATS8kKO2Z9pzpSOgEpW7LVz" # pylint: disable=line-too-long _, pathname = tempfile.mkstemp() - with open(pathname, 'w') as key_file: + with open(pathname, "w") as key_file: key_file.write(TEST_SSH_KEY_PUB) - self.kwargs.update({ - 'ssh_key_value': pathname.replace('\\', '\\\\') - }) - - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--ssh-key-value={ssh_key_value} -o json' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('linuxProfile.adminUsername', "azureuser"), - self.check('linuxProfile.ssh.publicKeys[0].keyData', TEST_SSH_KEY_PUB) - ]) + self.kwargs.update({"ssh_key_value": pathname.replace("\\", "\\\\")}) + + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--ssh-key-value={ssh_key_value} -o json" + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("linuxProfile.adminUsername", "azureuser"), + self.check("linuxProfile.ssh.publicKeys[0].keyData", TEST_SSH_KEY_PUB), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus2euap" + ) def test_node_public_ip_tags(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('n', 6) - nodepool_name_1 = self.create_random_name('n', 6) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'node_pool_name': nodepool_name, - 'node_vm_size': 'standard_d2a_v4', - "node_public_ip_tags": "RoutingPreference=Internet" - }) + aks_name = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("n", 6) + nodepool_name_1 = self.create_random_name("n", 6) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "node_pool_name": nodepool_name, + "node_vm_size": "standard_d2a_v4", + "node_public_ip_tags": "RoutingPreference=Internet", + } + ) self.cmd( - 'aks create ' - '--resource-group={resource_group} ' - '--name={name} ' - '--location={location} ' - '--ssh-key-value={ssh_key_value} ' - '--nodepool-name={node_pool_name} ' - '--node-count=1 ' - '--node-vm-size={node_vm_size} ' - '--enable-node-public-ip ' - '--node-public-ip-tags={node_public_ip_tags} ' - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPTagsPreview', + "aks create " + "--resource-group={resource_group} " + "--name={name} " + "--location={location} " + "--ssh-key-value={ssh_key_value} " + "--nodepool-name={node_pool_name} " + "--node-count=1 " + "--node-vm-size={node_vm_size} " + "--enable-node-public-ip " + "--node-public-ip-tags={node_public_ip_tags} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPTagsPreview", checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].networkProfile.nodePublicIpTags[0].ipTagType', "RoutingPreference"), - self.check('agentPoolProfiles[0].networkProfile.nodePublicIpTags[0].tag', "Internet"), + self.check("provisioningState", "Succeeded"), + self.check( + "agentPoolProfiles[0].networkProfile.nodePublicIpTags[0].ipTagType", + "RoutingPreference", + ), + self.check( + "agentPoolProfiles[0].networkProfile.nodePublicIpTags[0].tag", + "Internet", + ), ], ) - self.kwargs.update({ - 'node_pool_name': nodepool_name_1, - }) + self.kwargs.update( + { + "node_pool_name": nodepool_name_1, + } + ) + + self.cmd( + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name} " + "--node-vm-size={node_vm_size} " + "--enable-node-public-ip " + "--node-public-ip-tags={node_public_ip_tags} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPTagsPreview", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "networkProfile.nodePublicIpTags[0].ipTagType", "RoutingPreference" + ), + self.check("networkProfile.nodePublicIpTags[0].tag", "Internet"), + ], + ) + # delete + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) self.cmd( - 'aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name} ' - '--node-vm-size={node_vm_size} ' - '--enable-node-public-ip ' - '--node-public-ip-tags={node_public_ip_tags} ' - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/NodePublicIPTagsPreview', + cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.nodePublicIpTags[0].ipTagType', "RoutingPreference"), - self.check('networkProfile.nodePublicIpTags[0].tag', "Internet"), + self.is_empty(), ], ) - # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) def test_vms_agentpool_type(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - nodepool_name = self.create_random_name('n', 6) - nodepool_name_1 = self.create_random_name('n', 6) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'node_pool_name': nodepool_name, - 'node_vm_size': 'standard_d2a_v4', - }) - - self.cmd( - 'aks create ' - '--resource-group={resource_group} ' - '--name={name} ' - '--location={location} ' - '--ssh-key-value={ssh_key_value} ' - '--nodepool-name={node_pool_name} ' - '--node-count=1 ' - '--node-vm-size={node_vm_size} ' + aks_name = self.create_random_name("cliakstest", 16) + nodepool_name = self.create_random_name("n", 6) + nodepool_name_1 = self.create_random_name("n", 6) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "node_pool_name": nodepool_name, + "node_vm_size": "standard_d2a_v4", + } + ) + + self.cmd( + "aks create " + "--resource-group={resource_group} " + "--name={name} " + "--location={location} " + "--ssh-key-value={ssh_key_value} " + "--nodepool-name={node_pool_name} " + "--node-count=1 " + "--node-vm-size={node_vm_size} " '--vm-set-type="VirtualMachines" ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/VMsAgentPoolPreview', + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/VMsAgentPoolPreview", checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('agentPoolProfiles[0].type', "VirtualMachines"), + self.check("provisioningState", "Succeeded"), + self.check("agentPoolProfiles[0].type", "VirtualMachines"), ], ) - self.kwargs.update({ - 'node_pool_name': nodepool_name_1, - }) + self.kwargs.update( + { + "node_pool_name": nodepool_name_1, + } + ) self.cmd( - 'aks nodepool add ' - '--resource-group={resource_group} ' - '--cluster-name={name} ' - '--name={node_pool_name} ' - '--node-vm-size={node_vm_size} ' - '--vm-set-type=VirtualMachines ' - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/VMsAgentPoolPreview', + "aks nodepool add " + "--resource-group={resource_group} " + "--cluster-name={name} " + "--name={node_pool_name} " + "--node-vm-size={node_vm_size} " + "--vm-set-type=VirtualMachines " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/VMsAgentPoolPreview", checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('typePropertiesType', "VirtualMachines"), + self.check("provisioningState", "Succeeded"), + self.check("typePropertiesType", "VirtualMachines"), ], ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() def test_get_trustedaccess_roles(self): - versions_cmd = 'aks trustedaccess role list -l eastus -o json' + versions_cmd = "aks trustedaccess role list -l eastus -o json" roles = self.cmd(versions_cmd).get_output_in_json() assert len(roles) > 0 role = roles[0] - assert len(role['rules']) > 0 + assert len(role["rules"]) > 0 @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_trustedaccess_rolebinding(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_trustedaccess_rolebinding( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'resource_type': 'Microsoft.ContainerService/ManagedClusters', - 'vm_size': 'Standard_D4s_v3', - 'node_count': 1, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = ' '.join([ - 'aks', 'create', '--resource-group={resource_group}', '--name={name}', '--location={location}', - '--node-vm-size {vm_size}', - '--node-count {node_count}', - '--ssh-key-value={ssh_key_value}', - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/TrustedAccessPreview', - ]) - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) - - binding_name = 'testbinding' - node_rg_cmd = 'aks list -g {resource_group} --query "[0].nodeResourceGroup" -o tsv' + aks_name = self.create_random_name("cliakstest", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "resource_type": "Microsoft.ContainerService/ManagedClusters", + "vm_size": "Standard_D4s_v3", + "node_count": 1, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = " ".join( + [ + "aks", + "create", + "--resource-group={resource_group}", + "--name={name}", + "--location={location}", + "--node-vm-size {vm_size}", + "--node-count {node_count}", + "--ssh-key-value={ssh_key_value}", + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/TrustedAccessPreview", + ] + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) + + binding_name = "testbinding" + node_rg_cmd = ( + 'aks list -g {resource_group} --query "[0].nodeResourceGroup" -o tsv' + ) node_rg = self.cmd(node_rg_cmd).output.strip() - self.kwargs.update({'node_rg': node_rg, 'binding_name': binding_name}) + self.kwargs.update({"node_rg": node_rg, "binding_name": binding_name}) vmss_cmd = 'vmss list -g {node_rg} --query "[0].id" -o tsv' vmss_id = self.cmd(vmss_cmd).output.strip() - self.kwargs.update({'vmss_id': vmss_id}) + self.kwargs.update({"vmss_id": vmss_id}) # test create rolebinding - create_ta_binding_cmd = ' '.join([ - 'aks', 'trustedaccess', 'rolebinding', 'create', - '-g {resource_group}', - '--cluster-name {name}', - '-n {binding_name}', - '-s {vmss_id}', - '--roles Microsoft.Compute/virtualMachineScaleSets/test-node-reader,Microsoft.Compute/virtualMachineScaleSets/test-admin' - ]) - binding = self.cmd(create_ta_binding_cmd, checks=[ - self.check('name', binding_name), - self.check('type', 'Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings'), - self.check('sourceResourceId', vmss_id) - ]).get_output_in_json() - assert len(binding['roles']) == 2 + create_ta_binding_cmd = " ".join( + [ + "aks", + "trustedaccess", + "rolebinding", + "create", + "-g {resource_group}", + "--cluster-name {name}", + "-n {binding_name}", + "-s {vmss_id}", + "--roles Microsoft.Compute/virtualMachineScaleSets/test-node-reader,Microsoft.Compute/virtualMachineScaleSets/test-admin", + ] + ) + binding = self.cmd( + create_ta_binding_cmd, + checks=[ + self.check("name", binding_name), + self.check( + "type", + "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + ), + self.check("sourceResourceId", vmss_id), + ], + ).get_output_in_json() + assert len(binding["roles"]) == 2 time.sleep(20) # wait for binding creation # test list rolebinding - list_binding_cmd = 'aks trustedaccess rolebinding list --cluster-name {name} -g {resource_group}' + list_binding_cmd = "aks trustedaccess rolebinding list --cluster-name {name} -g {resource_group}" listed_bindings = self.cmd(list_binding_cmd).get_output_in_json() assert len(listed_bindings) == 1 # test get rolebinding - get_binding_cmd = 'aks trustedaccess rolebinding show --cluster-name {name} -g {resource_group} -n {binding_name}' + get_binding_cmd = "aks trustedaccess rolebinding show --cluster-name {name} -g {resource_group} -n {binding_name}" got_binding = self.cmd(get_binding_cmd).get_output_in_json() - assert got_binding['name'] == binding_name - assert len(got_binding['roles']) == 2 - assert got_binding['sourceResourceId'] == vmss_id - assert got_binding['type'] == 'Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings' + assert got_binding["name"] == binding_name + assert len(got_binding["roles"]) == 2 + assert got_binding["sourceResourceId"] == vmss_id + assert ( + got_binding["type"] + == "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings" + ) # test update rolebinding - update_binding_cmd = 'aks trustedaccess rolebinding update -g {resource_group} --cluster-name {name} -n {binding_name} \ - --roles Microsoft.Compute/virtualMachineScaleSets/test-node-reader' + update_binding_cmd = "aks trustedaccess rolebinding update -g {resource_group} --cluster-name {name} -n {binding_name} \ + --roles Microsoft.Compute/virtualMachineScaleSets/test-node-reader" updated_binding = self.cmd(update_binding_cmd).get_output_in_json() - assert updated_binding['name'] == binding_name - assert len(updated_binding['roles']) == 1 - assert updated_binding['roles'][0] == 'Microsoft.Compute/virtualMachineScaleSets/test-node-reader' + assert updated_binding["name"] == binding_name + assert len(updated_binding["roles"]) == 1 + assert ( + updated_binding["roles"][0] + == "Microsoft.Compute/virtualMachineScaleSets/test-node-reader" + ) # test delete rolebinding - delete_binding_cmd = 'aks trustedaccess rolebinding delete -g {resource_group} --cluster-name {name} -n {binding_name} -y' + delete_binding_cmd = "aks trustedaccess rolebinding delete -g {resource_group} --cluster-name {name} -n {binding_name} -y" self.cmd(delete_binding_cmd) time.sleep(20) # wait for binding deleting listed_bindings = self.cmd(list_binding_cmd).get_output_in_json() assert len(listed_bindings) == 0 @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_again_should_fail(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_again_should_fail( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--location={location} --ssh-key-value={ssh_key_value} --output=json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--location={location} --ssh-key-value={ssh_key_value} --output=json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # create again should fail - create_again_cmd = 'aks create --resource-group={resource_group} --name={name} ' \ - '--location={location} --ssh-key-value={ssh_key_value} --output=json' + create_again_cmd = ( + "aks create --resource-group={resource_group} --name={name} " + "--location={location} --ssh-key-value={ssh_key_value} --output=json" + ) try: - self.cmd(create_again_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + self.cmd( + create_again_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) except ClientRequestError as ex: if "already exists" not in str(ex): raise AssertionError( @@ -7713,15 +11130,24 @@ def test_aks_create_again_should_fail(self, resource_group, resource_group_locat ) # delete - cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(cmd, checks=[ - self.is_empty(), - ]) + cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_azure_service_mesh_enable_disable(self, resource_group, resource_group_location): - """ This test case exercises enabling and disabling service mesh profile. + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_azure_service_mesh_enable_disable( + self, resource_group, resource_group_location + ): + """This test case exercises enabling and disabling service mesh profile. It creates a cluster without azure service mesh profile. Then enable it by running `aks mesh enable` followed by disabling by running `aks mesh disable`. @@ -7730,44 +11156,68 @@ def test_aks_azure_service_mesh_enable_disable(self, resource_group, resource_gr # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create cluster without --enable-azure-service-mesh - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview ' \ - '--ssh-key-value={ssh_key_value} --output=json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview " + "--ssh-key-value={ssh_key_value} --output=json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # enable azure service mesh again - update_cmd = 'aks mesh enable --resource-group={resource_group} --name={name}' - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - ]) + update_cmd = "aks mesh enable --resource-group={resource_group} --name={name}" + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + ], + ) # disable azure service mesh - update_cmd = 'aks mesh disable --resource-group={resource_group} --name={name} --yes' - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Disabled'), - ]) + update_cmd = ( + "aks mesh disable --resource-group={resource_group} --name={name} --yes" + ) + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Disabled"), + ], + ) # delete the cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(delete_cmd, checks=[ - self.is_empty(), - ]) + delete_cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + delete_cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_azure_service_mesh_with_ingress_gateway(self, resource_group, resource_group_location): - """ This test case exercises enabling and disabling an ingress gateway. + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_azure_service_mesh_with_ingress_gateway( + self, resource_group, resource_group_location + ): + """This test case exercises enabling and disabling an ingress gateway. It creates a cluster with azure service mesh profile. After that, we enable an ingress gateway, then disable it. @@ -7776,52 +11226,90 @@ def test_aks_azure_service_mesh_with_ingress_gateway(self, resource_group, resou # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create cluster with --enable-azure-service-mesh - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--enable-azure-service-mesh --output=json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('serviceMeshProfile.mode', 'Istio'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview " + "--ssh-key-value={ssh_key_value} " + "--enable-azure-service-mesh --output=json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("serviceMeshProfile.mode", "Istio"), + ], + ) # enable ingress gateway - update_cmd = 'aks mesh enable-ingress-gateway --resource-group={resource_group} --name={name} ' \ - '--ingress-gateway-type Internal' - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - self.check('serviceMeshProfile.istio.components.ingressGateways[0].mode', 'Internal'), - self.check('serviceMeshProfile.istio.components.ingressGateways[0].enabled', True) - ]) + update_cmd = ( + "aks mesh enable-ingress-gateway --resource-group={resource_group} --name={name} " + "--ingress-gateway-type Internal" + ) + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + self.check( + "serviceMeshProfile.istio.components.ingressGateways[0].mode", + "Internal", + ), + self.check( + "serviceMeshProfile.istio.components.ingressGateways[0].enabled", + True, + ), + ], + ) # disable ingress gateway - update_cmd = 'aks mesh disable-ingress-gateway --resource-group={resource_group} --name={name} ' \ - '--ingress-gateway-type Internal --yes' - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - self.check('serviceMeshProfile.istio.components.ingressGateways[0].mode', 'Internal'), - self.check('serviceMeshProfile.istio.components.ingressGateways[0].enabled', None) - ]) + update_cmd = ( + "aks mesh disable-ingress-gateway --resource-group={resource_group} --name={name} " + "--ingress-gateway-type Internal --yes" + ) + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + self.check( + "serviceMeshProfile.istio.components.ingressGateways[0].mode", + "Internal", + ), + self.check( + "serviceMeshProfile.istio.components.ingressGateways[0].enabled", + None, + ), + ], + ) # delete the cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(delete_cmd, checks=[ - self.is_empty(), - ]) + delete_cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + delete_cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_azure_service_mesh_with_egress_gateway(self, resource_group, resource_group_location): - """ This test case exercises enabling and disabling an egress gateway. + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_azure_service_mesh_with_egress_gateway( + self, resource_group, resource_group_location + ): + """This test case exercises enabling and disabling an egress gateway. It creates a cluster with azure service mesh profile. After that, we enable an egress gateway, then disable it. @@ -7830,60 +11318,107 @@ def test_aks_azure_service_mesh_with_egress_gateway(self, resource_group, resour # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create cluster with --enable-azure-service-mesh - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--enable-azure-service-mesh --output=json' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('serviceMeshProfile.mode', 'Istio'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview " + "--ssh-key-value={ssh_key_value} " + "--enable-azure-service-mesh --output=json" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("serviceMeshProfile.mode", "Istio"), + ], + ) # enable egress gateway - update_cmd = 'aks mesh enable-egress-gateway --resource-group={resource_group} --name={name} ' \ - '--egress-gateway-nodeselector istio=egress' - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - self.check('serviceMeshProfile.istio.components.egressGateways[0].nodeSelector.istio', 'egress'), - self.check('serviceMeshProfile.istio.components.egressGateways[0].enabled', True) - ]) + update_cmd = ( + "aks mesh enable-egress-gateway --resource-group={resource_group} --name={name} " + "--egress-gateway-nodeselector istio=egress" + ) + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + self.check( + "serviceMeshProfile.istio.components.egressGateways[0].nodeSelector.istio", + "egress", + ), + self.check( + "serviceMeshProfile.istio.components.egressGateways[0].enabled", + True, + ), + ], + ) # remove egress gateway nodeselector - update_cmd = 'aks mesh enable-egress-gateway --resource-group={resource_group} --name={name} ' \ - '--egress-gateway-nodeselector ' - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - self.check('serviceMeshProfile.istio.components.egressGateways[0].nodeSelector.istio', None), - self.check('serviceMeshProfile.istio.components.egressGateways[0].enabled', True) - ]) + update_cmd = ( + "aks mesh enable-egress-gateway --resource-group={resource_group} --name={name} " + "--egress-gateway-nodeselector " + ) + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + self.check( + "serviceMeshProfile.istio.components.egressGateways[0].nodeSelector.istio", + None, + ), + self.check( + "serviceMeshProfile.istio.components.egressGateways[0].enabled", + True, + ), + ], + ) # disable egress gateway - update_cmd = 'aks mesh disable-egress-gateway --resource-group={resource_group} --name={name} --yes' - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - self.check('serviceMeshProfile.istio.components.egressGateways[0].enabled', None), - self.check('serviceMeshProfile.istio.components.egressGateways[0].nodeSelector', None) - ]) + update_cmd = "aks mesh disable-egress-gateway --resource-group={resource_group} --name={name} --yes" + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + self.check( + "serviceMeshProfile.istio.components.egressGateways[0].enabled", + None, + ), + self.check( + "serviceMeshProfile.istio.components.egressGateways[0].nodeSelector", + None, + ), + ], + ) # delete the cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(delete_cmd, checks=[ - self.is_empty(), - ]) + delete_cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + delete_cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_azure_service_mesh_with_pluginca(self, resource_group, resource_group_location): - """ This test case exercises providing plugin ca params with mesh enable command. + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_azure_service_mesh_with_pluginca( + self, resource_group, resource_group_location + ): + """This test case exercises providing plugin ca params with mesh enable command. It creates a cluster, enables azure service mesh with plugica params, then disable it. """ @@ -7891,70 +11426,107 @@ def test_aks_azure_service_mesh_with_pluginca(self, resource_group, resource_gro # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - akv_resource_id = '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/providers/Microsoft.KeyVault/vaults/foo' - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - 'akv_resource_id': akv_resource_id, - }) + aks_name = self.create_random_name("cliakstest", 16) + akv_resource_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/foo/providers/Microsoft.KeyVault/vaults/foo" + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + "akv_resource_id": akv_resource_id, + } + ) # create cluster - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # enable azurekeyvaultsecretsprovider addon - enable_cmd = 'aks enable-addons --addons azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json' - self.cmd(enable_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.enabled', True), - self.check( - 'addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation', "false") - ]) + enable_cmd = "aks enable-addons --addons azure-keyvault-secrets-provider --resource-group={resource_group} --name={name} -o json" + self.cmd( + enable_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + self.check( + "addonProfiles.azureKeyvaultSecretsProvider.config.enableSecretRotation", + "false", + ), + ], + ) # enable azure service mesh with pluginca - update_cmd = 'aks mesh enable --resource-group={resource_group} --name={name} ' \ - '--key-vault-id {akv_resource_id} ' \ - '--ca-cert-object-name my-ca-cert ' \ - '--ca-key-object-name my-ca-key ' \ - '--cert-chain-object-name my-cert-chain ' \ - '--root-cert-object-name my-root-cert' - - self.cmd(update_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - self.check('serviceMeshProfile.istio.certificateAuthority.plugin.keyVaultId', akv_resource_id), - self.check('serviceMeshProfile.istio.certificateAuthority.plugin.certObjectName', 'my-ca-cert'), - self.check('serviceMeshProfile.istio.certificateAuthority.plugin.keyObjectName', 'my-ca-key'), - self.check('serviceMeshProfile.istio.certificateAuthority.plugin.rootCertObjectName', 'my-root-cert'), - self.check('serviceMeshProfile.istio.certificateAuthority.plugin.certChainObjectName', 'my-cert-chain') - ]) + update_cmd = ( + "aks mesh enable --resource-group={resource_group} --name={name} " + "--key-vault-id {akv_resource_id} " + "--ca-cert-object-name my-ca-cert " + "--ca-key-object-name my-ca-key " + "--cert-chain-object-name my-cert-chain " + "--root-cert-object-name my-root-cert" + ) + + self.cmd( + update_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + self.check( + "serviceMeshProfile.istio.certificateAuthority.plugin.keyVaultId", + akv_resource_id, + ), + self.check( + "serviceMeshProfile.istio.certificateAuthority.plugin.certObjectName", + "my-ca-cert", + ), + self.check( + "serviceMeshProfile.istio.certificateAuthority.plugin.keyObjectName", + "my-ca-key", + ), + self.check( + "serviceMeshProfile.istio.certificateAuthority.plugin.rootCertObjectName", + "my-root-cert", + ), + self.check( + "serviceMeshProfile.istio.certificateAuthority.plugin.certChainObjectName", + "my-cert-chain", + ), + ], + ) # delete the cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(delete_cmd, checks=[ - self.is_empty(), - ]) + delete_cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + delete_cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_azure_service_mesh_get_revisions(self): - """ This test case exercises getting all the available revisions for the location. """ + """This test case exercises getting all the available revisions for the location.""" - revisions_cmd = 'aks mesh get-revisions -l westus2' + revisions_cmd = "aks mesh get-revisions -l westus2" revisions = self.cmd(revisions_cmd).get_output_in_json() - assert len(revisions['meshRevisions']) > 0 + assert len(revisions["meshRevisions"]) > 0 @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_azure_service_mesh_get_upgrades(self, resource_group, resource_group_location): - """ This test case exercises getting all the possible upgrades for azure service mesh enabled on the cluster. + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_azure_service_mesh_get_upgrades( + self, resource_group, resource_group_location + ): + """This test case exercises getting all the possible upgrades for azure service mesh enabled on the cluster. It creates a cluster, enables azure service mesh, then gets all the possible upgrades. """ @@ -7962,845 +11534,1217 @@ def test_aks_azure_service_mesh_get_upgrades(self, resource_group, resource_grou # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create cluster - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--aks-custom-headers=AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureServiceMeshPreview " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # enable azure service mesh - enable_cmd = 'aks mesh enable --resource-group={resource_group} --name={name}' - self.cmd(enable_cmd, checks=[ - self.check('serviceMeshProfile.mode', 'Istio'), - ]) + enable_cmd = "aks mesh enable --resource-group={resource_group} --name={name}" + self.cmd( + enable_cmd, + checks=[ + self.check("serviceMeshProfile.mode", "Istio"), + ], + ) - upgrades_cmd = 'aks mesh get-upgrades --resource-group={resource_group} --name={name}' + upgrades_cmd = ( + "aks mesh get-upgrades --resource-group={resource_group} --name={name}" + ) upgrades = self.cmd(upgrades_cmd).get_output_in_json() - assert 'compatibleWith' in upgrades and len(upgrades['compatibleWith']) > 0 + assert "compatibleWith" in upgrades and len(upgrades["compatibleWith"]) > 0 # delete the cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' - self.cmd(delete_cmd, checks=[ - self.is_empty(), - ]) + delete_cmd = ( + "aks delete --resource-group={resource_group} --name={name} --yes --no-wait" + ) + self.cmd( + delete_cmd, + checks=[ + self.is_empty(), + ], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') - def test_aks_create_with_standard_sku(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) + def test_aks_create_with_standard_sku( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --tier standard' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('sku.name', 'Base'), - self.check('sku.tier', 'Standard'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --tier standard" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("sku.name", "Base"), + self.check("sku.tier", "Standard"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_create_with_premium_sku(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --tier premium --k8s-support-plan AKSLongTermSupport -k 1.27' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('sku.name', 'Base'), - self.check('sku.tier', 'Premium'), - self.check('supportPlan', 'AKSLongTermSupport'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --tier premium --k8s-support-plan AKSLongTermSupport -k 1.27" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("sku.name", "Base"), + self.check("sku.tier", "Premium"), + self.check("supportPlan", "AKSLongTermSupport"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) - + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_update_with_premium_sku(self, resource_group, resource_group_location): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create a free tier - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --tier free -k 1.27' - self.cmd(create_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('sku.name', 'Base'), - self.check('sku.tier', 'Free'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --tier free -k 1.27" + ) + self.cmd( + create_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("sku.name", "Base"), + self.check("sku.tier", "Free"), + ], + ) # update to premium tier - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--tier premium --k8s-support-plan AKSLongTermSupport --auto-upgrade-channel patch' - self.cmd(update_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('sku.name', 'Base'), - self.check('sku.tier', 'Premium'), - self.check('supportPlan', 'AKSLongTermSupport'), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--tier premium --k8s-support-plan AKSLongTermSupport --auto-upgrade-channel patch" + ) + self.cmd( + update_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("sku.name", "Base"), + self.check("sku.tier", "Premium"), + self.check("supportPlan", "AKSLongTermSupport"), + ], + ) # update to standard tier - update_cmd = 'aks update --resource-group={resource_group} --name={name} ' \ - '--tier standard --k8s-support-plan KubernetesOfficial' - self.cmd(update_cmd, checks=[ - self.exists('fqdn'), - self.exists('nodeResourceGroup'), - self.check('provisioningState', 'Succeeded'), - self.check('sku.name', 'Base'), - self.check('sku.tier', 'Standard'), - self.check('supportPlan', 'KubernetesOfficial'), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} " + "--tier standard --k8s-support-plan KubernetesOfficial" + ) + self.cmd( + update_cmd, + checks=[ + self.exists("fqdn"), + self.exists("nodeResourceGroup"), + self.check("provisioningState", "Succeeded"), + self.check("sku.name", "Base"), + self.check("sku.tier", "Standard"), + self.check("supportPlan", "KubernetesOfficial"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_update_upgrade_settings(self, resource_group, resource_group_location): - """ This test case exercises enabling and disabling forceUpgrade override in cluster upgradeSettings. - """ + """This test case exercises enabling and disabling forceUpgrade override in cluster upgradeSettings.""" # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--enable-managed-identity ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.not_exists('upgradeSettings') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--enable-managed-identity " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.not_exists("upgradeSettings"), + ], + ) # update upgrade settings - self.cmd('aks update --resource-group={resource_group} --name={name} --upgrade-override-until 2020-01-01T22:30:17+00:00', checks=[ - self.check('provisioningState', 'Succeeded'), - self.not_exists('upgradeSettings.overrideSettings.forceUpgrade'), - self.exists('upgradeSettings.overrideSettings.until') - ]) - self.cmd('aks update --resource-group={resource_group} --name={name} --enable-force-upgrade', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('upgradeSettings.overrideSettings.forceUpgrade', True), - self.exists('upgradeSettings.overrideSettings.until') - ]) - self.cmd('aks update --resource-group={resource_group} --name={name} --enable-force-upgrade --upgrade-override-until 2020-02-22T22:30:17+00:00', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('upgradeSettings.overrideSettings.forceUpgrade', True), - self.check('upgradeSettings.overrideSettings.until', '2020-02-22T22:30:17+00:00') - ]) - self.cmd('aks update --resource-group={resource_group} --name={name} --disable-force-upgrade', checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('upgradeSettings.overrideSettings.forceUpgrade', False), - self.check('upgradeSettings.overrideSettings.until', '2020-02-22T22:30:17+00:00') - ]) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --upgrade-override-until 2020-01-01T22:30:17+00:00", + checks=[ + self.check("provisioningState", "Succeeded"), + self.not_exists("upgradeSettings.overrideSettings.forceUpgrade"), + self.exists("upgradeSettings.overrideSettings.until"), + ], + ) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --enable-force-upgrade", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("upgradeSettings.overrideSettings.forceUpgrade", True), + self.exists("upgradeSettings.overrideSettings.until"), + ], + ) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --enable-force-upgrade --upgrade-override-until 2020-02-22T22:30:17+00:00", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("upgradeSettings.overrideSettings.forceUpgrade", True), + self.check( + "upgradeSettings.overrideSettings.until", + "2020-02-22T22:30:17+00:00", + ), + ], + ) + self.cmd( + "aks update --resource-group={resource_group} --name={name} --disable-force-upgrade", + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("upgradeSettings.overrideSettings.forceUpgrade", False), + self.check( + "upgradeSettings.overrideSettings.until", + "2020-02-22T22:30:17+00:00", + ), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_update_enable_network_observability(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_update_enable_network_observability( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --tier standard ' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --tier standard " + ) + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # update to enable network observability - update_cmd = 'aks update --resource-group={resource_group} --name={name} --enable-network-observability ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NetworkObservabilityPreview ' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.monitoring.enabled', True), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --enable-network-observability " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NetworkObservabilityPreview " + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.monitoring.enabled", True), + ], + ) # update to disable network observability - update_cmd_two = 'aks update --resource-group={resource_group} --name={name} --disable-network-observability ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NetworkObservabilityPreview ' - self.cmd(update_cmd_two, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.monitoring.enabled', False), - ]) + update_cmd_two = ( + "aks update --resource-group={resource_group} --name={name} --disable-network-observability " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NetworkObservabilityPreview " + ) + self.cmd( + update_cmd_two, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.monitoring.enabled", False), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_create_with_enable_network_observability(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_create_with_enable_network_observability( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --tier standard --enable-network-observability ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NetworkObservabilityPreview' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('networkProfile.monitoring.enabled', True), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --tier standard --enable-network-observability " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NetworkObservabilityPreview" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("networkProfile.monitoring.enabled", True), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', - preserve_default_location=True) - def test_aks_create_with_enable_cost_analysis(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) + def test_aks_create_with_enable_cost_analysis( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --tier standard --enable-cost-analysis ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ClusterCostAnalysis' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('metricsProfile.costAnalysis.enabled', True), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --tier standard --enable-cost-analysis " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ClusterCostAnalysis" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("metricsProfile.costAnalysis.enabled", True), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', - preserve_default_location=True) - def test_aks_update_enable_cost_analysis(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) + def test_aks_update_enable_cost_analysis( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --tier standard ' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded') - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --tier standard " + ) + self.cmd(create_cmd, checks=[self.check("provisioningState", "Succeeded")]) # update to enable - update_cmd = 'aks update --resource-group={resource_group} --name={name} --enable-cost-analysis ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ClusterCostAnalysis ' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('metricsProfile.costAnalysis.enabled', True), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --enable-cost-analysis " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ClusterCostAnalysis " + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("metricsProfile.costAnalysis.enabled", True), + ], + ) # update to disable - update_cmd = 'aks update --resource-group={resource_group} --name={name} --disable-cost-analysis ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ClusterCostAnalysis ' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('metricsProfile.costAnalysis.enabled', False), - ]) + update_cmd = ( + "aks update --resource-group={resource_group} --name={name} --disable-cost-analysis " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/ClusterCostAnalysis " + ) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("metricsProfile.costAnalysis.enabled", False), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', - preserve_default_location=True) - def test_aks_create_node_provisioning_mode_manual(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) + def test_aks_create_node_provisioning_mode_manual( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create # TODO: Use mode Auto instead? - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --enable-managed-identity --node-provisioning-mode=Manual' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('nodeProvisioningProfile.mode', 'Manual'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --enable-managed-identity --node-provisioning-mode=Manual" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("nodeProvisioningProfile.mode", "Manual"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westcentralus', - preserve_default_location=True) - def test_aks_update_node_provisioning_mode_manual(self, resource_group, resource_group_location): + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="westcentralus", + preserve_default_location=True, + ) + def test_aks_update_node_provisioning_mode_manual( + self, resource_group, resource_group_location + ): # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # kwargs for string formatting - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'location': resource_group_location, - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "location": resource_group_location, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --node-count=1 --enable-managed-identity' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} --location={location} " + "--ssh-key-value={ssh_key_value} --node-count=1 --enable-managed-identity" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # update - update_cmd = 'aks update --resource-group={resource_group} --name={name} --node-provisioning-mode=Manual' - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('nodeProvisioningProfile.mode', 'Manual'), - ]) + update_cmd = "aks update --resource-group={resource_group} --name={name} --node-provisioning-mode=Manual" + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("nodeProvisioningProfile.mode", "Manual"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_create_with_custom_headers(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_create_with_custom_headers( + self, resource_group, resource_group_location + ): + aks_name = self.create_random_name("cliakstest", 16) _, create_version = self._get_versions(resource_group_location) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - 'k8s_version': create_version, - }) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + "k8s_version": create_version, + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} -k {k8s_version} -c 1 ' \ - '--ssh-key-value={ssh_key_value} ' \ - '--aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} -k {k8s_version} -c 1 " + "--ssh-key-value={ssh_key_value} " + "--aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # scale cluster - scale_cluster_cmd = 'aks scale --resource-group={resource_group} --name={name} ' \ - '-c 2 --aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef' - self.cmd(scale_cluster_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + scale_cluster_cmd = ( + "aks scale --resource-group={resource_group} --name={name} " + "-c 2 --aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef" + ) + self.cmd( + scale_cluster_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # scale nodepool - scale_nodepool_cmd = 'aks nodepool scale --resource-group={resource_group} --cluster-name={name} --name=nodepool1 ' \ - '-c 1 --aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef' - self.cmd(scale_nodepool_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + scale_nodepool_cmd = ( + "aks nodepool scale --resource-group={resource_group} --cluster-name={name} --name=nodepool1 " + "-c 1 --aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef" + ) + self.cmd( + scale_nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # show - show_cmd = 'aks show --resource-group={resource_group} --name={name} ' \ - '--aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef' - self.cmd(show_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + show_cmd = ( + "aks show --resource-group={resource_group} --name={name} " + "--aks-custom-headers x-ms-correlation-request-id=12345678-90ab-cdef-1234-567890abcdef" + ) + self.cmd( + show_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # delete self.cmd( - 'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') - def test_aks_create_with_app_routing_enabled(self, resource_group, resource_group_location): - """ This test case exercises creating an AKS cluster with app routing addon enabled. - """ + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="eastus" + ) + def test_aks_create_with_app_routing_enabled( + self, resource_group, resource_group_location + ): + """This test case exercises creating an AKS cluster with app routing addon enabled.""" # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # create cluster with app routing addon enabled - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --enable-app-routing ' \ - - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True) - ]) - - @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_approuting_enable_disable(self, resource_group, resource_group_location): - """ This test case exercises enabling and disabling app routing addon in an AKS cluster. - """ + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --location={location} " + "--ssh-key-value={ssh_key_value} --enable-app-routing " + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ) + + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_approuting_enable_disable( + self, resource_group, resource_group_location + ): + """This test case exercises enabling and disabling app routing addon in an AKS cluster.""" # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # create cluster without app routing - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --location={location} ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --location={location} " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # enable app routing - enable_app_routing_cmd = 'aks approuting enable --resource-group={resource_group} --name={aks_name}' - self.cmd(enable_app_routing_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True) - ]) + enable_app_routing_cmd = ( + "aks approuting enable --resource-group={resource_group} --name={aks_name}" + ) + self.cmd( + enable_app_routing_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ) # disable app routing - disable_app_routing_cmd = 'aks approuting disable --resource-group={resource_group} --name={aks_name} --yes' - self.cmd(disable_app_routing_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', False) - ]) + disable_app_routing_cmd = "aks approuting disable --resource-group={resource_group} --name={aks_name} --yes" + self.cmd( + disable_app_routing_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", False), + ], + ) # delete cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait' + delete_cmd = "aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait" self.cmd(delete_cmd, checks=[self.is_empty()]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_approuting_enable_with_keyvault_secrets_provider_addon(self, resource_group, resource_group_location): - """ This test case exercises enabling app routing addon in an AKS cluster along with keyvault secrets provider addon. - """ + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_approuting_enable_with_keyvault_secrets_provider_addon( + self, resource_group, resource_group_location + ): + """This test case exercises enabling app routing addon in an AKS cluster along with keyvault secrets provider addon.""" # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 # create cluster - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} ' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --location={location} " + "--ssh-key-value={ssh_key_value} " + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # enable app routing with keyvault secrets provider addon enabled - enable_app_routing_cmd = 'aks approuting enable --enable-kv --resource-group={resource_group} --name={aks_name}' - self.cmd(enable_app_routing_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - self.check('addonProfiles.azureKeyvaultSecretsProvider.enabled', True) - ]) - - # delete cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait' + enable_app_routing_cmd = "aks approuting enable --enable-kv --resource-group={resource_group} --name={aks_name}" + self.cmd( + enable_app_routing_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + ], + ) + + # delete cluster + delete_cmd = "aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait" self.cmd(delete_cmd, checks=[self.is_empty()]) @live_only() @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) def test_aks_approuting_update(self, resource_group, resource_group_location): - """ This test case exercises updating app routing addon in an AKS cluster. - """ + """This test case exercises updating app routing addon in an AKS cluster.""" # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 - - aks_name = self.create_random_name('cliakstest', 16) - kv_name = self.create_random_name('cliakstestkv', 16) - - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'kv_name' : kv_name, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + kv_name = self.create_random_name("cliakstestkv", 16) + + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "kv_name": kv_name, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create keyvault with rbac auth enabled - create_keyvault_cmd = 'keyvault create --resource-group={resource_group} --location={location} --name={kv_name} --enable-rbac-authorization=true' - keyvault = self.cmd(create_keyvault_cmd, checks=[ - self.check('properties.provisioningState', 'Succeeded'), - self.check('properties.enableRbacAuthorization', True), - self.check('name', kv_name) - ]).get_output_in_json() - keyvault_id = keyvault['id'] - - self.kwargs.update({ - 'keyvault_id': keyvault_id - }) + create_keyvault_cmd = "keyvault create --resource-group={resource_group} --location={location} --name={kv_name} --enable-rbac-authorization=true" + keyvault = self.cmd( + create_keyvault_cmd, + checks=[ + self.check("properties.provisioningState", "Succeeded"), + self.check("properties.enableRbacAuthorization", True), + self.check("name", kv_name), + ], + ).get_output_in_json() + keyvault_id = keyvault["id"] + + self.kwargs.update({"keyvault_id": keyvault_id}) # create cluster with app routing enabled - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --enable-app-routing' - result = self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - ]).get_output_in_json() - object_id = result['ingressProfile']['webAppRouting']['identity']['objectId'] - - self.kwargs.update({ - 'object_id': object_id - }) + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --location={location} " + "--ssh-key-value={ssh_key_value} --enable-app-routing" + ) + result = self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ).get_output_in_json() + object_id = result["ingressProfile"]["webAppRouting"]["identity"]["objectId"] + + self.kwargs.update({"object_id": object_id}) # update with enable_rbac_authroization flag in keyvault set to true - update_cmd = 'aks approuting update --resource-group={resource_group} --name={aks_name} ' \ - '--attach-kv {keyvault_id}' + update_cmd = ( + "aks approuting update --resource-group={resource_group} --name={aks_name} " + "--attach-kv {keyvault_id}" + ) - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True) - ]) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ) check_role_assignment_cmd = 'role assignment list --scope {keyvault_id} --assignee {object_id} --role "Key Vault Secrets User" --output json' - self.cmd(check_role_assignment_cmd, checks=[ - self.check('length(@)', 1), - self.check('[0].roleDefinitionName', 'Key Vault Secrets User'), - self.check('[0].principalId', '{object_id}'), - self.check('[0].scope', keyvault_id) - ]) + self.cmd( + check_role_assignment_cmd, + checks=[ + self.check("length(@)", 1), + self.check("[0].roleDefinitionName", "Key Vault Secrets User"), + self.check("[0].principalId", "{object_id}"), + self.check("[0].scope", keyvault_id), + ], + ) # create keyvault with rbac auth disabled - kv_name = self.create_random_name('cliakstestkv', 16) - self.kwargs.update({ - 'kv_name': kv_name - }) - create_keyvault_cmd = 'keyvault create --resource-group={resource_group} --location={location} --name={kv_name} --enable-rbac-authorization=false' - keyvault = self.cmd(create_keyvault_cmd, checks=[ - self.check('properties.provisioningState', 'Succeeded'), - self.check('properties.enableRbacAuthorization', False), - self.check('name', kv_name) - ]).get_output_in_json() - keyvault_id = keyvault['id'] - - self.kwargs.update({ - 'keyvault_id': keyvault_id - }) + kv_name = self.create_random_name("cliakstestkv", 16) + self.kwargs.update({"kv_name": kv_name}) + create_keyvault_cmd = "keyvault create --resource-group={resource_group} --location={location} --name={kv_name} --enable-rbac-authorization=false" + keyvault = self.cmd( + create_keyvault_cmd, + checks=[ + self.check("properties.provisioningState", "Succeeded"), + self.check("properties.enableRbacAuthorization", False), + self.check("name", kv_name), + ], + ).get_output_in_json() + keyvault_id = keyvault["id"] + + self.kwargs.update({"keyvault_id": keyvault_id}) # update with enable_rbac_authroization flag in keyvault set to false - update_cmd = 'aks approuting update --resource-group={resource_group} --name={aks_name} ' \ - '--attach-kv {keyvault_id}' + update_cmd = ( + "aks approuting update --resource-group={resource_group} --name={aks_name} " + "--attach-kv {keyvault_id}" + ) - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True) - ]) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + ], + ) - check_access_policy_cmd = 'az keyvault show --resource-group={resource_group} --name={kv_name} --query "properties.accessPolicies[?objectId==\'{object_id}\']" -o json' + check_access_policy_cmd = "az keyvault show --resource-group={resource_group} --name={kv_name} --query \"properties.accessPolicies[?objectId=='{object_id}']\" -o json" print(check_access_policy_cmd) - self.cmd(check_access_policy_cmd, checks=[ - self.check('length(@)', 1), - self.check('[0].objectId', '{object_id}'), - self.check('[0].permissions.certificates', ['Get']), - self.check('[0].permissions.keys', None), - self.check('[0].permissions.secrets', ['Get']), - self.check('[0].permissions.storage', None), - ]) + self.cmd( + check_access_policy_cmd, + checks=[ + self.check("length(@)", 1), + self.check("[0].objectId", "{object_id}"), + self.check("[0].permissions.certificates", ["Get"]), + self.check("[0].permissions.keys", None), + self.check("[0].permissions.secrets", ["Get"]), + self.check("[0].permissions.storage", None), + ], + ) # update with --enable-kv flag - update_cmd = 'aks approuting update --resource-group={resource_group} --name={aks_name} --enable-kv' + update_cmd = "aks approuting update --resource-group={resource_group} --name={aks_name} --enable-kv" - self.cmd(update_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - self.check('addonProfiles.azureKeyvaultSecretsProvider.enabled', True) - ]) + self.cmd( + update_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + self.check("addonProfiles.azureKeyvaultSecretsProvider.enabled", True), + ], + ) # delete cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait' + delete_cmd = "aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait" self.cmd(delete_cmd, checks=[self.is_empty()]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) - def test_aks_approuting_zone_add_delete_list(self, resource_group, resource_group_location): - """ This test case exercises adding, deleting and listing zones to app routing addon in an AKS cluster. - """ + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) + def test_aks_approuting_zone_add_delete_list( + self, resource_group, resource_group_location + ): + """This test case exercises adding, deleting and listing zones to app routing addon in an AKS cluster.""" # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 - aks_name = self.create_random_name('cliakstest', 16) - dns_zone_1 = self.create_random_name('cliakstest', 16) + ".com" - dns_zone_2 = self.create_random_name('cliakstest', 16) + ".com" - - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'dns_zone_1': dns_zone_1, - 'dns_zone_2': dns_zone_2, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - - create_dns_zone_cmd_1 = 'network dns zone create --resource-group={resource_group} --name {dns_zone_1}' - dns_zone_result = self.cmd(create_dns_zone_cmd_1, checks=[ - self.check('name', dns_zone_1), - ]).get_output_in_json() - dns_zone_id_1 = dns_zone_result['id'] - - create_dns_zone_cmd_2 = 'network dns zone create --resource-group={resource_group} --name {dns_zone_2}' - dns_zone_result = self.cmd(create_dns_zone_cmd_2, checks=[ - self.check('name', dns_zone_2), - ]).get_output_in_json() - dns_zone_id_2 = dns_zone_result['id'] - - self.kwargs.update({ - 'dns_zone_id_1': dns_zone_id_1, - 'dns_zone_id_2': dns_zone_id_2 - }) + aks_name = self.create_random_name("cliakstest", 16) + dns_zone_1 = self.create_random_name("cliakstest", 16) + ".com" + dns_zone_2 = self.create_random_name("cliakstest", 16) + ".com" + + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "dns_zone_1": dns_zone_1, + "dns_zone_2": dns_zone_2, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_dns_zone_cmd_1 = "network dns zone create --resource-group={resource_group} --name {dns_zone_1}" + dns_zone_result = self.cmd( + create_dns_zone_cmd_1, + checks=[ + self.check("name", dns_zone_1), + ], + ).get_output_in_json() + dns_zone_id_1 = dns_zone_result["id"] + + create_dns_zone_cmd_2 = "network dns zone create --resource-group={resource_group} --name {dns_zone_2}" + dns_zone_result = self.cmd( + create_dns_zone_cmd_2, + checks=[ + self.check("name", dns_zone_2), + ], + ).get_output_in_json() + dns_zone_id_2 = dns_zone_result["id"] + + self.kwargs.update( + {"dns_zone_id_1": dns_zone_id_1, "dns_zone_id_2": dns_zone_id_2} + ) # create cluster with app routing enabled - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --enable-app-routing' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds', None) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --location={location} " + "--ssh-key-value={ssh_key_value} --enable-app-routing" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + self.check("ingressProfile.webAppRouting.dnsZoneResourceIds", None), + ], + ) # add dns zone - add_dns_zone_cmd = 'aks approuting zone add --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_1}' - self.cmd(add_dns_zone_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds[0]', dns_zone_id_1), - ]) + add_dns_zone_cmd = "aks approuting zone add --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_1}" + self.cmd( + add_dns_zone_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "ingressProfile.webAppRouting.dnsZoneResourceIds[0]", dns_zone_id_1 + ), + ], + ) # add dns zone with --atach-zones flag - add_dns_zone_cmd = 'aks approuting zone add --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_2} --attach-zones' - self.cmd(add_dns_zone_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds[0]', dns_zone_id_1), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds[1]', dns_zone_id_2) - ]) + add_dns_zone_cmd = "aks approuting zone add --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_2} --attach-zones" + self.cmd( + add_dns_zone_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "ingressProfile.webAppRouting.dnsZoneResourceIds[0]", dns_zone_id_1 + ), + self.check( + "ingressProfile.webAppRouting.dnsZoneResourceIds[1]", dns_zone_id_2 + ), + ], + ) # list dns zone - list_dns_zone_cmd = 'aks approuting zone list --resource-group={resource_group} --name={aks_name}' - self.cmd(list_dns_zone_cmd, checks=[ - self.check('length(@)', 2), - self.check('[0].resource_group', resource_group), - self.check('[0].type', "dnszones"), - self.check('[0].name', dns_zone_1), - self.check('[1].resource_group', resource_group), - self.check('[1].type', "dnszones"), - self.check('[1].name', dns_zone_2) - ]) + list_dns_zone_cmd = "aks approuting zone list --resource-group={resource_group} --name={aks_name}" + self.cmd( + list_dns_zone_cmd, + checks=[ + self.check("length(@)", 2), + self.check("[0].resource_group", resource_group), + self.check("[0].type", "dnszones"), + self.check("[0].name", dns_zone_1), + self.check("[1].resource_group", resource_group), + self.check("[1].type", "dnszones"), + self.check("[1].name", dns_zone_2), + ], + ) # delete dns zone - delete_dns_zone_cmd = 'aks approuting zone delete --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_1} --yes' - self.cmd(delete_dns_zone_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds[0]', dns_zone_id_2) - ]) + delete_dns_zone_cmd = "aks approuting zone delete --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_1} --yes" + self.cmd( + delete_dns_zone_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "ingressProfile.webAppRouting.dnsZoneResourceIds[0]", dns_zone_id_2 + ), + ], + ) # delete cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait' + delete_cmd = "aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait" self.cmd(delete_cmd, checks=[self.is_empty()]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus', preserve_default_location=True) + @AKSCustomResourceGroupPreparer( + random_name_length=17, + name_prefix="clitest", + location="eastus", + preserve_default_location=True, + ) def test_aks_approuting_zone_update(self, resource_group, resource_group_location): - """ This test case exercises updating zones to app routing addon in an AKS cluster. - """ + """This test case exercises updating zones to app routing addon in an AKS cluster.""" # reset the count so in replay mode the random names will start with 0 self.test_resources_count = 0 - aks_name = self.create_random_name('cliakstest', 16) - dns_zone_1 = self.create_random_name('cliakstest', 16) + ".com" - dns_zone_2 = self.create_random_name('cliakstest', 16) + ".com" - - self.kwargs.update({ - 'resource_group': resource_group, - 'aks_name': aks_name, - 'dns_zone_1' : dns_zone_1, - 'dns_zone_2' : dns_zone_2, - 'location': resource_group_location, - 'ssh_key_value': self.generate_ssh_keys(), - }) - - - create_dns_zone_cmd_1 = 'network dns zone create --resource-group={resource_group} --name {dns_zone_1}' - dns_zone_1 = self.cmd(create_dns_zone_cmd_1,checks=[ - self.check('name', dns_zone_1), - ]).get_output_in_json() - dns_zone_id_1 = dns_zone_1['id'] - - create_dns_zone_cmd_2 = 'network dns zone create --resource-group={resource_group} --name {dns_zone_2}' - dns_zone_2 = self.cmd(create_dns_zone_cmd_2,checks=[ - self.check('name', dns_zone_2), - ]).get_output_in_json() - dns_zone_id_2 = dns_zone_2['id'] - - self.kwargs.update({ - 'dns_zone_id_1': dns_zone_id_1, - 'dns_zone_id_2': dns_zone_id_2 - }) + aks_name = self.create_random_name("cliakstest", 16) + dns_zone_1 = self.create_random_name("cliakstest", 16) + ".com" + dns_zone_2 = self.create_random_name("cliakstest", 16) + ".com" + + self.kwargs.update( + { + "resource_group": resource_group, + "aks_name": aks_name, + "dns_zone_1": dns_zone_1, + "dns_zone_2": dns_zone_2, + "location": resource_group_location, + "ssh_key_value": self.generate_ssh_keys(), + } + ) + + create_dns_zone_cmd_1 = "network dns zone create --resource-group={resource_group} --name {dns_zone_1}" + dns_zone_1 = self.cmd( + create_dns_zone_cmd_1, + checks=[ + self.check("name", dns_zone_1), + ], + ).get_output_in_json() + dns_zone_id_1 = dns_zone_1["id"] + + create_dns_zone_cmd_2 = "network dns zone create --resource-group={resource_group} --name {dns_zone_2}" + dns_zone_2 = self.cmd( + create_dns_zone_cmd_2, + checks=[ + self.check("name", dns_zone_2), + ], + ).get_output_in_json() + dns_zone_id_2 = dns_zone_2["id"] + + self.kwargs.update( + {"dns_zone_id_1": dns_zone_id_1, "dns_zone_id_2": dns_zone_id_2} + ) # create cluster with app routing enabled - create_cmd = 'aks create --resource-group={resource_group} --name={aks_name} --location={location} ' \ - '--ssh-key-value={ssh_key_value} --enable-app-routing' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.enabled', True), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds', None) - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={aks_name} --location={location} " + "--ssh-key-value={ssh_key_value} --enable-app-routing" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("ingressProfile.webAppRouting.enabled", True), + self.check("ingressProfile.webAppRouting.dnsZoneResourceIds", None), + ], + ) # add dns zone - add_dns_zone_cmd = 'aks approuting zone add --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_1}' - self.cmd(add_dns_zone_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds[0]', dns_zone_id_1), - ]) + add_dns_zone_cmd = "aks approuting zone add --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_1}" + self.cmd( + add_dns_zone_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "ingressProfile.webAppRouting.dnsZoneResourceIds[0]", dns_zone_id_1 + ), + ], + ) # update dns zone - update_dns_zone_cmd = 'aks approuting zone update --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_2}' - self.cmd(update_dns_zone_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('ingressProfile.webAppRouting.dnsZoneResourceIds[0]', dns_zone_id_2), - ]) + update_dns_zone_cmd = "aks approuting zone update --resource-group={resource_group} --name={aks_name} --ids {dns_zone_id_2}" + self.cmd( + update_dns_zone_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check( + "ingressProfile.webAppRouting.dnsZoneResourceIds[0]", dns_zone_id_2 + ), + ], + ) # delete cluster - delete_cmd = 'aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait' + delete_cmd = "aks delete --resource-group={resource_group} --name={aks_name} --yes --no-wait" self.cmd(delete_cmd, checks=[self.is_empty()]) @AllowLargeResponse() - @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2') + @AKSCustomResourceGroupPreparer( + random_name_length=17, name_prefix="clitest", location="westus2" + ) def test_aks_update_agentpool_os_sku(self, resource_group, resource_group_location): - aks_name = self.create_random_name('cliakstest', 16) - self.kwargs.update({ - 'resource_group': resource_group, - 'name': aks_name, - 'ssh_key_value': self.generate_ssh_keys(), - }) + aks_name = self.create_random_name("cliakstest", 16) + self.kwargs.update( + { + "resource_group": resource_group, + "name": aks_name, + "ssh_key_value": self.generate_ssh_keys(), + } + ) # create - create_cmd = 'aks create --resource-group={resource_group} --name={name} -c 1 ' \ - '--ssh-key-value={ssh_key_value}' - self.cmd(create_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - ]) + create_cmd = ( + "aks create --resource-group={resource_group} --name={name} -c 1 " + "--ssh-key-value={ssh_key_value}" + ) + self.cmd( + create_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + ], + ) # update nodepool - update_nodepool_cmd = 'aks nodepool update --resource-group={resource_group} --cluster-name={name} ' \ - '--name=nodepool1 --os-sku AzureLinux ' \ - '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/OSSKUMigrationPreview' - self.cmd(update_nodepool_cmd, checks=[ - self.check('provisioningState', 'Succeeded'), - self.check('osSku', 'AzureLinux'), - ]) + update_nodepool_cmd = ( + "aks nodepool update --resource-group={resource_group} --cluster-name={name} " + "--name=nodepool1 --os-sku AzureLinux " + "--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/OSSKUMigrationPreview" + ) + self.cmd( + update_nodepool_cmd, + checks=[ + self.check("provisioningState", "Succeeded"), + self.check("osSku", "AzureLinux"), + ], + ) # delete - self.cmd('aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()]) + self.cmd( + "aks delete -g {resource_group} -n {name} --yes --no-wait", + checks=[self.is_empty()], + ) diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py b/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py index 8db7555cb5b..2a761a3ea5c 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_helpers.py @@ -117,6 +117,7 @@ def test_get_cluster_snapshot(self): ), self.assertRaises(BadRequestError): get_cluster_snapshot("mock_cli_ctx", "test_sub", "mock_rg", "mock_snapshot_name") + class CheckManagedClusterTestCase(unittest.TestCase): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py index 47a76b07800..1c916ee4eee 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_loadbalancer.py @@ -7,13 +7,9 @@ from azext_aks_preview import _loadbalancer as loadbalancer from azext_aks_preview.__init__ import register_aks_preview_resource_type from azext_aks_preview._client_factory import CUSTOM_MGMT_AKS_PREVIEW -from azext_aks_preview.managed_cluster_decorator import ( - AKSPreviewManagedClusterModels, -) +from azext_aks_preview.managed_cluster_decorator import AKSPreviewManagedClusterModels from azext_aks_preview.tests.latest.mocks import MockCLI, MockCmd -from azure.cli.core.azclierror import ( - InvalidArgumentValueError, -) + class TestLoadBalancer(unittest.TestCase): def setUp(self): @@ -51,15 +47,17 @@ def test_configure_load_balancer_profile(self): profile = ManagedClusterLoadBalancerProfile() # ips -> i_ps due to track 2 naming issue - profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( - count=2 + profile.managed_outbound_i_ps = ( + ManagedClusterLoadBalancerProfileManagedOutboundIPs(count=2) ) # ips -> i_ps due to track 2 naming issue profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( public_i_ps="public_ips" ) - profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( - public_ip_prefixes="public_ip_prefixes" + profile.outbound_ip_prefixes = ( + ManagedClusterLoadBalancerProfileOutboundIPPrefixes( + public_ip_prefixes="public_ip_prefixes" + ) ) p = loadbalancer.configure_load_balancer_profile( @@ -107,17 +105,18 @@ def test_configure_load_balancer_profile_error(self): profile = ManagedClusterLoadBalancerProfile() # ips -> i_ps due to track 2 naming issue - profile.managed_outbound_i_ps = ManagedClusterLoadBalancerProfileManagedOutboundIPs( - count=2 + profile.managed_outbound_i_ps = ( + ManagedClusterLoadBalancerProfileManagedOutboundIPs(count=2) ) # ips -> i_ps due to track 2 naming issue profile.outbound_i_ps = ManagedClusterLoadBalancerProfileOutboundIPs( public_i_ps="public_ips" ) - profile.outbound_ip_prefixes = ManagedClusterLoadBalancerProfileOutboundIPPrefixes( - public_ip_prefixes="public_ip_prefixes" + profile.outbound_ip_prefixes = ( + ManagedClusterLoadBalancerProfileOutboundIPPrefixes( + public_ip_prefixes="public_ip_prefixes" + ) ) - err = "outbound ip/ipprefix and managed ip should be mutual exclusive." p = loadbalancer.configure_load_balancer_profile( managed_outbound_ip_count, managed_outbound_ipv6_count, @@ -131,11 +130,18 @@ def test_configure_load_balancer_profile_error(self): ) self.assertEqual(p.managed_outbound_i_ps.count, 5) self.assertEqual(p.managed_outbound_i_ps.count_ipv6, 3) - self.assertEqual(p.outbound_i_ps.public_i_ps, [self.load_balancer_models.ResourceReference(id=x.strip()) for x in ["testpip1","testpip2"]]) + self.assertEqual( + p.outbound_i_ps.public_i_ps, + [ + self.load_balancer_models.ResourceReference(id=x.strip()) + for x in ["testpip1", "testpip2"] + ], + ) self.assertEqual(p.outbound_ip_prefixes, None) self.assertEqual(p.allocated_outbound_ports, 80) self.assertEqual(p.idle_timeout_in_minutes, 3600) self.assertEqual(p.backend_pool_type, "nodeIP") -if __name__ == '__main__': + +if __name__ == "__main__": unittest.main() diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py b/src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py index 422dd33eadd..11d329304b5 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_maintenanceconfiguration.py @@ -5,15 +5,15 @@ import unittest from types import SimpleNamespace -# from azure.cli.core.util import CLIError +import azext_aks_preview.maintenanceconfiguration as mc +from azext_aks_preview.__init__ import register_aks_preview_resource_type +from azure.cli.command_modules.acs.tests.latest.mocks import MockCLI, MockCmd from azure.cli.core.azclierror import ( InvalidArgumentValueError, - RequiredArgumentMissingError, MutuallyExclusiveArgumentError, + RequiredArgumentMissingError, ) -from azext_aks_preview.__init__ import register_aks_preview_resource_type -import azext_aks_preview.maintenanceconfiguration as mc -from azure.cli.command_modules.acs.tests.latest.mocks import MockCLI, MockCmd + class TestAddMaintenanceConfiguration(unittest.TestCase): def test_add_maintenance_configuration_with_invalid_name(self): @@ -24,7 +24,7 @@ def test_add_maintenance_configuration_with_invalid_name(self): "config_name": "something", } - err = ("--config-name must be one of default, aksManagedAutoUpgradeSchedule or aksManagedNodeOSUpgradeSchedule, not something") + err = "--config-name must be one of default, aksManagedAutoUpgradeSchedule or aksManagedNodeOSUpgradeSchedule, not something" with self.assertRaises(InvalidArgumentValueError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) @@ -40,11 +40,11 @@ def test_add_default_maintenance_configuration_with_schedule_type(self): "schedule_type": "Weekly", } - err = ("--schedule-type is not supported for default maintenance configuration.") + err = "--schedule-type is not supported for default maintenance configuration." with self.assertRaises(MutuallyExclusiveArgumentError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) - + def test_add_non_default_schedule_with_weekday(self): cmd = SimpleNamespace() raw_parameters = { @@ -54,11 +54,11 @@ def test_add_non_default_schedule_with_weekday(self): "weekday": "Monday", } - err = ("--weekday and --start-hour are only applicable to default maintenance configuration.") + err = "--weekday and --start-hour are only applicable to default maintenance configuration." with self.assertRaises(MutuallyExclusiveArgumentError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) - + def test_add_daily_schedule_with_missing_options(self): register_aks_preview_resource_type() cli_ctx = MockCLI() @@ -70,11 +70,11 @@ def test_add_daily_schedule_with_missing_options(self): "schedule_type": "Daily", } - err = ("Please specify --interval-days when using daily schedule.") + err = "Please specify --interval-days when using daily schedule." with self.assertRaises(RequiredArgumentMissingError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) - + def test_add_daily_schedule_with_invalid_options(self): register_aks_preview_resource_type() cli_ctx = MockCLI() @@ -88,7 +88,7 @@ def test_add_daily_schedule_with_invalid_options(self): "day_of_week": "Monday", } - err = ("--interval-weeks, --interval-months, --day-of-week, --day-of-month and --week-index cannot be used for Daily schedule.") + err = "--interval-weeks, --interval-months, --day-of-week, --day-of-month and --week-index cannot be used for Daily schedule." with self.assertRaises(MutuallyExclusiveArgumentError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) @@ -107,11 +107,11 @@ def test_add_weekly_schedule_with_invalid_options(self): "week_index": "First", } - err = ("--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule.") + err = "--interval-months, --day-of-month and --week-index cannot be used for Weekly schedule." with self.assertRaises(MutuallyExclusiveArgumentError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) - + def test_add_absolute_monthly_schedule_with_missing_options(self): register_aks_preview_resource_type() cli_ctx = MockCLI() @@ -125,7 +125,7 @@ def test_add_absolute_monthly_schedule_with_missing_options(self): "interval_months": 3, } - err = ("Please specify --interval-months and --day-of-month when using absolute monthly schedule.") + err = "Please specify --interval-months and --day-of-month when using absolute monthly schedule." with self.assertRaises(RequiredArgumentMissingError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) @@ -144,11 +144,11 @@ def test_add_absolute_monthly_schedule_with_invalid_options(self): "week_index": "First", } - err = ("--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for AbsoluteMonthly schedule.") + err = "--interval-days, --interval-weeks, --day-of-week and --week-index cannot be used for AbsoluteMonthly schedule." with self.assertRaises(MutuallyExclusiveArgumentError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) - + def test_add_relative_monthly_schedule_with_missing_options(self): register_aks_preview_resource_type() cli_ctx = MockCLI() @@ -162,11 +162,11 @@ def test_add_relative_monthly_schedule_with_missing_options(self): "interval_months": 3, } - err = ("Please specify --interval-months, --day-of-week and --week-index when using relative monthly schedule.") + err = "Please specify --interval-months, --day-of-week and --week-index when using relative monthly schedule." with self.assertRaises(RequiredArgumentMissingError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) - + def test_add_dedicated_schedule_with_missing_options(self): register_aks_preview_resource_type() cli_ctx = MockCLI() @@ -181,8 +181,7 @@ def test_add_dedicated_schedule_with_missing_options(self): "start_time": "00:00", } - err = ("Please specify --duration for maintenance window.") + err = "Please specify --duration for maintenance window." with self.assertRaises(RequiredArgumentMissingError) as cm: mc.aks_maintenanceconfiguration_update_internal(cmd, None, raw_parameters) self.assertEqual(str(cm.exception), err) - \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py index d44c54d8ceb..8e498ad64d8 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_managed_cluster_decorator.py @@ -15,7 +15,11 @@ CONST_ACC_SGX_QUOTE_HELPER_ENABLED, CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, CONST_AZURE_POLICY_ADDON_NAME, + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE, + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK, + CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START, CONST_CONFCOM_ADDON_NAME, + CONST_CUSTOM_CA_TEST_CERT, CONST_DEFAULT_NODE_OS_TYPE, CONST_DEFAULT_NODE_VM_SIZE, CONST_DISK_DRIVER_V2, @@ -28,8 +32,8 @@ CONST_INGRESS_APPGW_SUBNET_ID, CONST_INGRESS_APPGW_WATCH_NAMESPACE, CONST_KUBE_DASHBOARD_ADDON_NAME, - CONST_LOAD_BALANCER_SKU_STANDARD, CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IP, + CONST_LOAD_BALANCER_SKU_STANDARD, CONST_MONITORING_ADDON_NAME, CONST_MONITORING_LOG_ANALYTICS_WORKSPACE_RESOURCE_ID, CONST_MONITORING_USING_AAD_MSI_AUTH, @@ -43,10 +47,6 @@ CONST_VIRTUAL_NODE_ADDON_NAME, CONST_VIRTUAL_NODE_SUBNET_NAME, CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, - CONST_CUSTOM_CA_TEST_CERT, - CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START, - CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE, - CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK, ) from azext_aks_preview.agentpool_decorator import AKSPreviewAgentPoolContext from azext_aks_preview.managed_cluster_decorator import ( @@ -77,8 +77,6 @@ RequiredArgumentMissingError, UnknownError, ) - -from azure.cli.core.util import read_file_content from dateutil.parser import parse @@ -97,8 +95,10 @@ def test_models(self): sdk_profile = AZURE_API_PROFILES["latest"][CUSTOM_MGMT_AKS_PREVIEW] api_version = sdk_profile.default_api_version - module_name = "azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.v{}.models".format( - api_version.replace("-", "_") + module_name = ( + "azext_aks_preview.vendored_sdks.azure_mgmt_preview_aks.v{}.models".format( + api_version.replace("-", "_") + ) ) module = importlib.import_module(module_name) @@ -121,7 +121,9 @@ def setUp(self): self.cmd = MockCmd(self.cli_ctx) self.models = AKSPreviewManagedClusterModels(self.cmd, CUSTOM_MGMT_AKS_PREVIEW) - def create_attach_agentpool_context(self, ctx: AKSPreviewManagedClusterContext, **kwargs): + def create_attach_agentpool_context( + self, ctx: AKSPreviewManagedClusterContext, **kwargs + ): """Helper function to create an AKSPreviewAgentPoolContext based on AKSPreviewManagedClusterContext and attach it to the given context. @@ -145,14 +147,18 @@ def test_validate_pod_identity_with_kubenet(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - network_profile_1 = self.models.ContainerServiceNetworkProfile(network_plugin="kubenet") + network_profile_1 = self.models.ContainerServiceNetworkProfile( + network_plugin="kubenet" + ) mc_1 = self.models.ManagedCluster( location="test_location", network_profile=network_profile_1, ) # fail on enable_pod_identity_with_kubenet not specified with self.assertRaises(RequiredArgumentMissingError): - ctx_1._AKSPreviewManagedClusterContext__validate_pod_identity_with_kubenet(mc_1, True, False) + ctx_1._AKSPreviewManagedClusterContext__validate_pod_identity_with_kubenet( + mc_1, True, False + ) def test_get_addon_consts(self): # default @@ -201,7 +207,9 @@ def test_get_http_proxy_config(self): self.assertEqual(ctx_1.get_http_proxy_config(), None) mc = self.models.ManagedCluster( location="test_location", - http_proxy_config=self.models.ManagedClusterHTTPProxyConfig(http_proxy="test_http_proxy"), + http_proxy_config=self.models.ManagedClusterHTTPProxyConfig( + http_proxy="test_http_proxy" + ), ) ctx_1.attach_mc(mc) self.assertEqual( @@ -223,7 +231,9 @@ def test_get_http_proxy_config(self): # custom value ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"http_proxy_config": get_test_data_file_path("invalidconfig.json")}), + AKSManagedClusterParamDict( + {"http_proxy_config": get_test_data_file_path("invalidconfig.json")} + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -236,7 +246,7 @@ def test_get_guardrails_level(self): self.cmd, AKSManagedClusterParamDict({"guardrails_level": None}), self.models, - decorator_mode=DecoratorMode.CREATE + decorator_mode=DecoratorMode.CREATE, ) self.assertEqual(ctx1.get_guardrails_level(), None) @@ -244,11 +254,13 @@ def test_get_guardrails_level(self): self.cmd, AKSManagedClusterParamDict({"guardrails_level": "Warning"}), self.models, - decorator_mode=DecoratorMode.CREATE + decorator_mode=DecoratorMode.CREATE, ) mc2 = self.models.ManagedCluster( location="test_location", - guardrails_profile=self.models.GuardrailsProfile(level="Warning", excluded_namespaces=None, version="") + guardrails_profile=self.models.GuardrailsProfile( + level="Warning", excluded_namespaces=None, version="" + ), ) ctx2.attach_mc(mc2) self.assertEqual(ctx2.get_guardrails_level(), "Warning") @@ -258,7 +270,7 @@ def test_get_guardrails_version(self): self.cmd, AKSManagedClusterParamDict({"guardrails_version": None}), self.models, - decorator_mode=DecoratorMode.CREATE + decorator_mode=DecoratorMode.CREATE, ) self.assertEqual(ctx1.get_guardrails_version(), None) @@ -266,12 +278,14 @@ def test_get_guardrails_version(self): self.cmd, AKSManagedClusterParamDict({"guardrails_version": "v1.0.0"}), self.models, - decorator_mode=DecoratorMode.CREATE + decorator_mode=DecoratorMode.CREATE, ) mc2 = self.models.ManagedCluster( location="test_location", - guardrails_profile=self.models.GuardrailsProfile(version="v1.0.0", level=None, excluded_namespaces=None) + guardrails_profile=self.models.GuardrailsProfile( + version="v1.0.0", level=None, excluded_namespaces=None + ), ) ctx2.attach_mc(mc2) self.assertEqual(ctx2.get_guardrails_version(), "v1.0.0") @@ -281,7 +295,7 @@ def test_get_guardrails_excluded_namespaces(self): self.cmd, AKSManagedClusterParamDict({"guardrails_excluded_ns": None}), self.models, - decorator_mode=DecoratorMode.CREATE + decorator_mode=DecoratorMode.CREATE, ) self.assertEqual(ctx1.get_guardrails_excluded_namespaces(), None) @@ -289,12 +303,14 @@ def test_get_guardrails_excluded_namespaces(self): self.cmd, AKSManagedClusterParamDict({"guardrails_excluded_ns": "ns1,ns2"}), self.models, - decorator_mode=DecoratorMode.CREATE + decorator_mode=DecoratorMode.CREATE, ) mc2 = self.models.ManagedCluster( location="test_location", - guardrails_profile=self.models.GuardrailsProfile(excluded_namespaces=["ns1","ns2"], level=None, version=None) + guardrails_profile=self.models.GuardrailsProfile( + excluded_namespaces=["ns1", "ns2"], level=None, version=None + ), ) ctx2.attach_mc(mc2) self.assertEqual(ctx2.get_guardrails_excluded_namespaces(), "ns1,ns2") @@ -310,12 +326,18 @@ def test_get_kube_proxy_config(self): self.assertEqual(ctx_1.get_kube_proxy_config(), None) mc = self.models.ManagedCluster( location="test_location", - network_profile=self.models.ContainerServiceNetworkProfile(kube_proxy_config=self.models.ContainerServiceNetworkProfileKubeProxyConfig(kube_proxy="test_kube_proxy")), + network_profile=self.models.ContainerServiceNetworkProfile( + kube_proxy_config=self.models.ContainerServiceNetworkProfileKubeProxyConfig( + kube_proxy="test_kube_proxy" + ) + ), ) ctx_1.attach_mc(mc) self.assertEqual( ctx_1.get_kube_proxy_config(), - self.models.ContainerServiceNetworkProfileKubeProxyConfig(kube_proxy="test_kube_proxy"), + self.models.ContainerServiceNetworkProfileKubeProxyConfig( + kube_proxy="test_kube_proxy" + ), ) # custom value @@ -332,7 +354,9 @@ def test_get_kube_proxy_config(self): # custom value ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"kube_proxy_config": get_test_data_file_path("invalidconfig.json")}), + AKSManagedClusterParamDict( + {"kube_proxy_config": get_test_data_file_path("invalidconfig.json")} + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -343,7 +367,9 @@ def test_get_kube_proxy_config(self): # custom value ctx_4 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"kube_proxy_config": get_test_data_file_path("kubeproxyconfig.json")}), + AKSManagedClusterParamDict( + {"kube_proxy_config": get_test_data_file_path("kubeproxyconfig.json")} + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -356,7 +382,13 @@ def test_get_kube_proxy_config(self): # update case ctx_5 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"kube_proxy_config": get_test_data_file_path("kubeproxyconfig_update.json")}), + AKSManagedClusterParamDict( + { + "kube_proxy_config": get_test_data_file_path( + "kubeproxyconfig_update.json" + ) + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) @@ -364,12 +396,15 @@ def test_get_kube_proxy_config(self): # existing cluster mc_5 = self.models.ManagedCluster( location="test_location", - network_profile=self.models.ContainerServiceNetworkProfile(kube_proxy_config=self.models.ContainerServiceNetworkProfileKubeProxyConfig( - enabled=True, - mode="IPTABLES", - ipvs_config=self.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig( - scheduler="RoundRobin", - ))), + network_profile=self.models.ContainerServiceNetworkProfile( + kube_proxy_config=self.models.ContainerServiceNetworkProfileKubeProxyConfig( + enabled=True, + mode="IPTABLES", + ipvs_config=self.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig( + scheduler="RoundRobin", + ), + ) + ), ) ctx_5.attach_mc(mc_5) config_5 = ctx_5.get_kube_proxy_config() @@ -388,7 +423,9 @@ def test_get_pod_cidrs(self): self.assertEqual(ctx_1.get_pod_cidrs(), None) mc = self.models.ManagedCluster( location="test_location", - network_profile=self.models.ContainerServiceNetworkProfile(pod_cidrs="test_pod_cidrs"), + network_profile=self.models.ContainerServiceNetworkProfile( + pod_cidrs="test_pod_cidrs" + ), ) ctx_1.attach_mc(mc) self.assertEqual( @@ -423,7 +460,9 @@ def test_get_service_cidrs(self): self.assertEqual(ctx_1.get_service_cidrs(), None) mc = self.models.ManagedCluster( location="test_location", - network_profile=self.models.ContainerServiceNetworkProfile(service_cidrs="test_service_cidrs"), + network_profile=self.models.ContainerServiceNetworkProfile( + service_cidrs="test_service_cidrs" + ), ) ctx_1.attach_mc(mc) self.assertEqual( @@ -441,7 +480,9 @@ def test_get_service_cidrs(self): ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"service_cidrs": "10.244.0.0/16,2001:abcd::/64"}), + AKSManagedClusterParamDict( + {"service_cidrs": "10.244.0.0/16,2001:abcd::/64"} + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -458,7 +499,9 @@ def test_get_ip_families(self): self.assertEqual(ctx_1.get_ip_families(), None) mc = self.models.ManagedCluster( location="test_location", - network_profile=self.models.ContainerServiceNetworkProfile(ip_families="test_ip_families"), + network_profile=self.models.ContainerServiceNetworkProfile( + ip_families="test_ip_families" + ), ) ctx_1.attach_mc(mc) self.assertEqual( @@ -500,8 +543,12 @@ def test_get_load_balancer_managed_outbound_ip_count(self): count=10 ) ) - network_profile = self.models.ContainerServiceNetworkProfile(load_balancer_profile=load_balancer_profile) - mc = self.models.ManagedCluster(location="test_location", network_profile=network_profile) + network_profile = self.models.ContainerServiceNetworkProfile( + load_balancer_profile=load_balancer_profile + ) + mc = self.models.ManagedCluster( + location="test_location", network_profile=network_profile + ) ctx_1.attach_mc(mc) self.assertEqual(ctx_1.get_load_balancer_managed_outbound_ip_count(), None) @@ -523,14 +570,26 @@ def test_get_load_balancer_managed_outbound_ip_count(self): count=10, count_ipv6=20 ), outbound_i_ps=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPs( - public_i_ps=[self.models.load_balancer_models.ResourceReference(id="test_public_ip")] + public_i_ps=[ + self.models.load_balancer_models.ResourceReference( + id="test_public_ip" + ) + ] ), outbound_ip_prefixes=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes( - public_ip_prefixes=[self.models.load_balancer_models.ResourceReference(id="test_public_ip_prefix")] + public_ip_prefixes=[ + self.models.load_balancer_models.ResourceReference( + id="test_public_ip_prefix" + ) + ] ), ) - network_profile_2 = self.models.ContainerServiceNetworkProfile(load_balancer_profile=load_balancer_profile_2) - mc_2 = self.models.ManagedCluster(location="test_location", network_profile=network_profile_2) + network_profile_2 = self.models.ContainerServiceNetworkProfile( + load_balancer_profile=load_balancer_profile_2 + ) + mc_2 = self.models.ManagedCluster( + location="test_location", network_profile=network_profile_2 + ) ctx_2.attach_mc(mc_2) self.assertEqual(ctx_2.get_load_balancer_managed_outbound_ip_count(), None) @@ -552,15 +611,21 @@ def test_get_load_balancer_managed_outbound_ipv6_count(self): count_ipv6=10 ) ) - network_profile = self.models.ContainerServiceNetworkProfile(load_balancer_profile=load_balancer_profile) - mc = self.models.ManagedCluster(location="test_location", network_profile=network_profile) + network_profile = self.models.ContainerServiceNetworkProfile( + load_balancer_profile=load_balancer_profile + ) + mc = self.models.ManagedCluster( + location="test_location", network_profile=network_profile + ) ctx_1.attach_mc(mc) self.assertEqual(ctx_1.get_load_balancer_managed_outbound_ipv6_count(), None) # custom value ctx_2 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"load_balancer_managed_outbound_ipv6_count": 0}), + AKSManagedClusterParamDict( + {"load_balancer_managed_outbound_ipv6_count": 0} + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -584,14 +649,26 @@ def test_get_load_balancer_managed_outbound_ipv6_count(self): count=10, count_ipv6=20 ), outbound_i_ps=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPs( - public_i_ps=[self.models.load_balancer_models.ResourceReference(id="test_public_ip")] + public_i_ps=[ + self.models.load_balancer_models.ResourceReference( + id="test_public_ip" + ) + ] ), outbound_ip_prefixes=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes( - public_ip_prefixes=[self.models.load_balancer_models.ResourceReference(id="test_public_ip_prefix")] + public_ip_prefixes=[ + self.models.load_balancer_models.ResourceReference( + id="test_public_ip_prefix" + ) + ] ), ) - network_profile_3 = self.models.ContainerServiceNetworkProfile(load_balancer_profile=load_balancer_profile_3) - mc_3 = self.models.ManagedCluster(location="test_location", network_profile=network_profile_3) + network_profile_3 = self.models.ContainerServiceNetworkProfile( + load_balancer_profile=load_balancer_profile_3 + ) + mc_3 = self.models.ManagedCluster( + location="test_location", network_profile=network_profile_3 + ) ctx_3.attach_mc(mc_3) self.assertEqual(ctx_3.get_load_balancer_managed_outbound_ipv6_count(), None) @@ -608,7 +685,6 @@ def test_get_load_balancer_backend_pool_type(self): ) self.assertEqual(ctx.get_load_balancer_backend_pool_type(), "nodeIP") - def test_get_enable_pod_security_policy(self): # default ctx_1 = AKSPreviewManagedClusterContext( @@ -686,8 +762,12 @@ def test_get_network_plugin(self): DecoratorMode.CREATE, ) self.assertEqual(ctx_1.get_network_plugin(), None) - network_profile_1 = self.models.ContainerServiceNetworkProfile(network_plugin="test_network_plugin") - mc = self.models.ManagedCluster(location="test_location", network_profile=network_profile_1) + network_profile_1 = self.models.ContainerServiceNetworkProfile( + network_plugin="test_network_plugin" + ) + mc = self.models.ManagedCluster( + location="test_location", network_profile=network_profile_1 + ) ctx_1.attach_mc(mc) self.assertEqual(ctx_1.get_network_plugin(), "test_network_plugin") @@ -846,7 +926,7 @@ def test_mc_get_enable_cilium_dataplane(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - self.assertEqual(ctx_1.get_enable_cilium_dataplane(), False) + self.assertEqual(ctx_3.get_enable_cilium_dataplane(), False) def test_mc_get_enable_network_observability(self): # Default, not set. @@ -917,7 +997,9 @@ def test_get_enable_managed_identity(self): # custom value ctx_1 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"enable_managed_identity": False, "enable_pod_identity": True}), + AKSManagedClusterParamDict( + {"enable_managed_identity": False, "enable_pod_identity": True} + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -949,7 +1031,11 @@ def test_get_enable_pod_identity(self): decorator_mode=DecoratorMode.CREATE, ) self.assertEqual(ctx_1.get_enable_pod_identity(), False) - pod_identity_profile = self.models.pod_identity_models.ManagedClusterPodIdentityProfile(enabled=True) + pod_identity_profile = ( + self.models.pod_identity_models.ManagedClusterPodIdentityProfile( + enabled=True + ) + ) mc = self.models.ManagedCluster( location="test_location", pod_identity_profile=pod_identity_profile, @@ -972,7 +1058,9 @@ def test_get_enable_pod_identity(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - network_profile_2 = self.models.ContainerServiceNetworkProfile(network_plugin="kubenet") + network_profile_2 = self.models.ContainerServiceNetworkProfile( + network_plugin="kubenet" + ) mc_2 = self.models.ManagedCluster( location="test_location", network_profile=network_profile_2, @@ -1055,9 +1143,11 @@ def test_get_enable_pod_identity_with_kubenet(self): decorator_mode=DecoratorMode.CREATE, ) self.assertEqual(ctx_1.get_enable_pod_identity_with_kubenet(), False) - pod_identity_profile = self.models.pod_identity_models.ManagedClusterPodIdentityProfile( - enabled=True, - allow_network_plugin_kubenet=True, + pod_identity_profile = ( + self.models.pod_identity_models.ManagedClusterPodIdentityProfile( + enabled=True, + allow_network_plugin_kubenet=True, + ) ) mc = self.models.ManagedCluster( location="test_location", @@ -1081,7 +1171,9 @@ def test_get_enable_pod_identity_with_kubenet(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - network_profile_2 = self.models.ContainerServiceNetworkProfile(network_plugin="kubenet") + network_profile_2 = self.models.ContainerServiceNetworkProfile( + network_plugin="kubenet" + ) mc_2 = self.models.ManagedCluster( location="test_location", network_profile=network_profile_2, @@ -1093,7 +1185,10 @@ def test_get_enable_pod_identity_with_kubenet(self): def test_get_oidc_issuer_profile__create_not_set(self): ctx = AKSPreviewManagedClusterContext( - self.cmd, AKSManagedClusterParamDict({}), self.models, decorator_mode=DecoratorMode.CREATE + self.cmd, + AKSManagedClusterParamDict({}), + self.models, + decorator_mode=DecoratorMode.CREATE, ) self.assertIsNone(ctx.get_oidc_issuer_profile()) @@ -1114,7 +1209,10 @@ def test_get_oidc_issuer_profile__create_enable(self): def test_get_oidc_issuer_profile__update_not_set(self): ctx = AKSPreviewManagedClusterContext( - self.cmd, AKSManagedClusterParamDict({}), self.models, decorator_mode=DecoratorMode.UPDATE + self.cmd, + AKSManagedClusterParamDict({}), + self.models, + decorator_mode=DecoratorMode.UPDATE, ) ctx.attach_mc(self.models.ManagedCluster(location="test_location")) self.assertIsNone(ctx.get_oidc_issuer_profile()) @@ -1123,10 +1221,15 @@ def test_get_oidc_issuer_profile__update_not_set_with_previous_profile( self, ): ctx = AKSPreviewManagedClusterContext( - self.cmd, AKSManagedClusterParamDict({}), self.models, decorator_mode=DecoratorMode.UPDATE + self.cmd, + AKSManagedClusterParamDict({}), + self.models, + decorator_mode=DecoratorMode.UPDATE, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) ctx.attach_mc(self.models.ManagedCluster(location="test_location")) self.assertIsNone(ctx.get_oidc_issuer_profile()) @@ -1140,7 +1243,9 @@ def test_get_oidc_issuer_profile__update_enable_with_previous_profile( decorator_mode=DecoratorMode.UPDATE, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=False) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=False + ) ctx.attach_mc(mc) profile = ctx.get_oidc_issuer_profile() self.assertIsNotNone(profile) @@ -1164,7 +1269,10 @@ def test_get_oidc_issuer_profile__update_enable(self): def test_get_workload_identity_profile__create_no_set(self): ctx = AKSPreviewManagedClusterContext( - self.cmd, AKSManagedClusterParamDict({}), self.models, decorator_mode=DecoratorMode.CREATE + self.cmd, + AKSManagedClusterParamDict({}), + self.models, + decorator_mode=DecoratorMode.CREATE, ) self.assertIsNone(ctx.get_workload_identity_profile()) @@ -1199,7 +1307,10 @@ def test_get_workload_identity_profile__create_enable_with_oidc_issuer(self): def test_get_workload_identity_profile__update_not_set(self): ctx = AKSPreviewManagedClusterContext( - self.cmd, AKSManagedClusterParamDict({}), self.models, decorator_mode=DecoratorMode.UPDATE + self.cmd, + AKSManagedClusterParamDict({}), + self.models, + decorator_mode=DecoratorMode.UPDATE, ) ctx.attach_mc(self.models.ManagedCluster(location="test_location")) self.assertIsNone(ctx.get_workload_identity_profile()) @@ -1213,13 +1324,16 @@ def test_get_workload_identity_profile__update_with_enable_and_disable(self): "disable_workload_identity": True, } ), - self.models, decorator_mode=DecoratorMode.UPDATE + self.models, + decorator_mode=DecoratorMode.UPDATE, ) ctx.attach_mc(self.models.ManagedCluster(location="test_location")) with self.assertRaises(MutuallyExclusiveArgumentError): ctx.get_workload_identity_profile() - def test_get_workload_identity_profile__update_with_enable_without_oidc_issuer(self): + def test_get_workload_identity_profile__update_with_enable_without_oidc_issuer( + self, + ): ctx = AKSPreviewManagedClusterContext( self.cmd, AKSManagedClusterParamDict( @@ -1251,7 +1365,9 @@ def test_get_workload_identity_profile__update_with_enable(self): decorator_mode=DecoratorMode.UPDATE, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) if previous_enablement_status is None: mc.security_profile = None else: @@ -1281,7 +1397,9 @@ def test_get_workload_identity_profile__update_with_disable(self): decorator_mode=DecoratorMode.UPDATE, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) if previous_enablement_status is None: mc.security_profile = None else: @@ -1393,7 +1511,6 @@ def test_get_image_cleaner_interval_hours(self): ) self.assertIsNone(ctx_0.get_image_cleaner_interval_hours()) - ctx_1 = AKSPreviewManagedClusterContext( self.cmd, AKSManagedClusterParamDict( @@ -1431,9 +1548,11 @@ def test_get_image_cleaner_interval_hours(self): decorator_mode=DecoratorMode.UPDATE, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.image_cleaner = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=25, + security_profile.image_cleaner = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=25, + ) ) mc = self.models.ManagedCluster( location="test_location", @@ -1453,9 +1572,11 @@ def test_get_image_cleaner_interval_hours(self): decorator_mode=DecoratorMode.UPDATE, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.image_cleaner = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=False, - interval_hours=25, + security_profile.image_cleaner = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=False, + interval_hours=25, + ) ) mc = self.models.ManagedCluster( location="test_location", @@ -1501,7 +1622,9 @@ def test_get_enable_azure_keyvault_kms(self): ) self.assertEqual(ctx_1.get_enable_azure_keyvault_kms(), False) - key_id_1 = "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + key_id_1 = ( + "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + ) ctx_2 = AKSPreviewManagedClusterContext( self.cmd, AKSManagedClusterParamDict( @@ -1628,7 +1751,9 @@ def test_get_azure_keyvault_kms_key_id(self): ) self.assertIsNone(ctx_0.get_azure_keyvault_kms_key_id()) - key_id_1 = "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + key_id_1 = ( + "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + ) ctx_1 = AKSPreviewManagedClusterContext( self.cmd, AKSManagedClusterParamDict( @@ -1653,7 +1778,9 @@ def test_get_azure_keyvault_kms_key_id(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - key_id_2 = "https://fakekeyvault2.vault.azure.net/secrets/fakekeyname2/fakekeyversion2" + key_id_2 = ( + "https://fakekeyvault2.vault.azure.net/secrets/fakekeyname2/fakekeyversion2" + ) security_profile = self.models.ManagedClusterSecurityProfile() security_profile.azure_key_vault_kms = self.models.AzureKeyVaultKms( enabled=True, @@ -1731,9 +1858,11 @@ def test_get_azure_keyvault_kms_key_vault_network_access(self): ctx_1 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_1, - }), + AKSManagedClusterParamDict( + { + "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1742,10 +1871,12 @@ def test_get_azure_keyvault_kms_key_vault_network_access(self): ctx_2 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": False, - "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_1, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": False, + "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1754,21 +1885,28 @@ def test_get_azure_keyvault_kms_key_vault_network_access(self): ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_1, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) - self.assertEqual(ctx_3.get_azure_keyvault_kms_key_vault_network_access(), key_vault_network_access_1) + self.assertEqual( + ctx_3.get_azure_keyvault_kms_key_vault_network_access(), + key_vault_network_access_1, + ) ctx_4 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_2, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_2, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1777,23 +1915,30 @@ def test_get_azure_keyvault_kms_key_vault_network_access(self): ctx_5 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_2, - "azure_keyvault_kms_key_vault_resource_id": "fake-resource-id", - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_2, + "azure_keyvault_kms_key_vault_resource_id": "fake-resource-id", + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) - self.assertEqual(ctx_5.get_azure_keyvault_kms_key_vault_network_access(), key_vault_network_access_2) + self.assertEqual( + ctx_5.get_azure_keyvault_kms_key_vault_network_access(), + key_vault_network_access_2, + ) ctx_6 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_2, - "azure_keyvault_kms_key_vault_resource_id": "fake-resource-id", - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": key_vault_network_access_2, + "azure_keyvault_kms_key_vault_resource_id": "fake-resource-id", + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) @@ -1807,7 +1952,10 @@ def test_get_azure_keyvault_kms_key_vault_network_access(self): security_profile=security_profile, ) ctx_6.attach_mc(mc) - self.assertEqual(ctx_6.get_azure_keyvault_kms_key_vault_network_access(), key_vault_network_access_2) + self.assertEqual( + ctx_6.get_azure_keyvault_kms_key_vault_network_access(), + key_vault_network_access_2, + ) def test_get_azure_keyvault_kms_key_vault_resource_id(self): key_vault_resource_id_1 = "/subscriptions/8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8/resourceGroups/foo/providers/Microsoft.KeyVault/vaults/foo" @@ -1823,10 +1971,12 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): ctx_1 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": "Public", - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": "Public", + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1834,11 +1984,13 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): ctx_2 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": "Public", - "azure_keyvault_kms_key_vault_resource_id": "", - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": "Public", + "azure_keyvault_kms_key_vault_resource_id": "", + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1846,23 +1998,30 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": "Private", - "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": "Private", + "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) - self.assertEqual(ctx_3.get_azure_keyvault_kms_key_vault_resource_id(), key_vault_resource_id_1) + self.assertEqual( + ctx_3.get_azure_keyvault_kms_key_vault_resource_id(), + key_vault_resource_id_1, + ) ctx_4 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": "Private", - "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": "Private", + "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1877,15 +2036,20 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): security_profile=security_profile, ) ctx_4.attach_mc(mc) - self.assertEqual(ctx_4.get_azure_keyvault_kms_key_vault_resource_id(), key_vault_resource_id_2) + self.assertEqual( + ctx_4.get_azure_keyvault_kms_key_vault_resource_id(), + key_vault_resource_id_2, + ) ctx_5 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": "Private", - "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_2, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": "Private", + "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_2, + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) @@ -1900,13 +2064,18 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): security_profile=security_profile, ) ctx_5.attach_mc(mc) - self.assertEqual(ctx_5.get_azure_keyvault_kms_key_vault_resource_id(), key_vault_resource_id_2) + self.assertEqual( + ctx_5.get_azure_keyvault_kms_key_vault_resource_id(), + key_vault_resource_id_2, + ) ctx_6 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, - }), + AKSManagedClusterParamDict( + { + "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1915,10 +2084,12 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): ctx_7 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": False, - "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": False, + "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1927,11 +2098,13 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): ctx_8 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": "Public", - "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": "Public", + "azure_keyvault_kms_key_vault_resource_id": key_vault_resource_id_1, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1940,11 +2113,13 @@ def test_get_azure_keyvault_kms_key_vault_resource_id(self): ctx_9 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_azure_keyvault_kms": True, - "azure_keyvault_kms_key_vault_network_access": "Private", - "azure_keyvault_kms_key_vault_resource_id": "", - }), + AKSManagedClusterParamDict( + { + "enable_azure_keyvault_kms": True, + "azure_keyvault_kms_key_vault_network_access": "Private", + "azure_keyvault_kms_key_vault_resource_id": "", + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -1964,8 +2139,12 @@ def test_get_cluster_snapshot_id(self): 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") + 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], @@ -2005,14 +2184,18 @@ def test_get_kubernetes_version(self): ) self.create_attach_agentpool_context(ctx_1) self.assertEqual(ctx_1.get_kubernetes_version(), "") - mc_1 = self.models.ManagedCluster(location="test_location", kubernetes_version="test_kubernetes_version") + mc_1 = self.models.ManagedCluster( + location="test_location", kubernetes_version="test_kubernetes_version" + ) ctx_1.attach_mc(mc_1) self.assertEqual(ctx_1.get_kubernetes_version(), "test_kubernetes_version") # custom value ctx_2 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({"kubernetes_version": "", "snapshot_id": "test_snapshot_id"}), + AKSManagedClusterParamDict( + {"kubernetes_version": "", "snapshot_id": "test_snapshot_id"} + ), self.models, DecoratorMode.CREATE, ) @@ -2042,7 +2225,9 @@ def test_get_kubernetes_version(self): "azext_aks_preview.agentpool_decorator.get_nodepool_snapshot_by_snapshot_id", return_value=mock_snapshot, ): - self.assertEqual(ctx_3.get_kubernetes_version(), "custom_kubernetes_version") + self.assertEqual( + ctx_3.get_kubernetes_version(), "custom_kubernetes_version" + ) # custom value ctx_4 = AKSPreviewManagedClusterContext( @@ -2058,9 +2243,15 @@ def test_get_kubernetes_version(self): decorator_mode=DecoratorMode.CREATE, ) self.create_attach_agentpool_context(ctx_4) - mock_snapshot = Mock(managed_cluster_properties_read_only=Mock(kubernetes_version="test_kubernetes_version")) + mock_snapshot = Mock( + managed_cluster_properties_read_only=Mock( + kubernetes_version="test_kubernetes_version" + ) + ) mock_mc_snapshot = Mock( - managed_cluster_properties_read_only=Mock(kubernetes_version="test_cluster_kubernetes_version") + managed_cluster_properties_read_only=Mock( + kubernetes_version="test_cluster_kubernetes_version" + ) ) with patch( "azext_aks_preview.agentpool_decorator.get_nodepool_snapshot_by_snapshot_id", @@ -2069,7 +2260,9 @@ def test_get_kubernetes_version(self): "azext_aks_preview.managed_cluster_decorator.get_cluster_snapshot_by_snapshot_id", return_value=mock_mc_snapshot, ): - self.assertEqual(ctx_4.get_kubernetes_version(), "test_cluster_kubernetes_version") + self.assertEqual( + ctx_4.get_kubernetes_version(), "test_cluster_kubernetes_version" + ) # custom value ctx_5 = AKSPreviewManagedClusterContext( @@ -2085,9 +2278,15 @@ def test_get_kubernetes_version(self): decorator_mode=DecoratorMode.CREATE, ) self.create_attach_agentpool_context(ctx_5) - mock_snapshot = Mock(managed_cluster_properties_read_only=Mock(kubernetes_version="test_kubernetes_version")) + mock_snapshot = Mock( + managed_cluster_properties_read_only=Mock( + kubernetes_version="test_kubernetes_version" + ) + ) mock_mc_snapshot = Mock( - managed_cluster_properties_read_only=Mock(kubernetes_version="test_cluster_kubernetes_version") + managed_cluster_properties_read_only=Mock( + kubernetes_version="test_cluster_kubernetes_version" + ) ) with patch( "azext_aks_preview.agentpool_decorator.get_nodepool_snapshot_by_snapshot_id", @@ -2096,7 +2295,9 @@ def test_get_kubernetes_version(self): "azext_aks_preview.managed_cluster_decorator.get_cluster_snapshot_by_snapshot_id", return_value=mock_mc_snapshot, ): - self.assertEqual(ctx_5.get_kubernetes_version(), "custom_kubernetes_version") + self.assertEqual( + ctx_5.get_kubernetes_version(), "custom_kubernetes_version" + ) def test_get_disk_driver(self): ctx_1 = AKSPreviewManagedClusterContext( @@ -2145,20 +2346,20 @@ def test_get_disk_driver(self): version="v2", ) ) - self.assertEqual( - ctx_2.get_disk_driver(), ground_truth_disk_csi_driver_2 - ) + self.assertEqual(ctx_2.get_disk_driver(), ground_truth_disk_csi_driver_2) # fail with enable-disk-driver as false and value passed for disk_driver_version ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "disable_disk_driver": True, - "disk_driver_version": "v2", - }), - self.models, - decorator_mode=DecoratorMode.UPDATE, - ) + AKSManagedClusterParamDict( + { + "disable_disk_driver": True, + "disk_driver_version": "v2", + } + ), + self.models, + decorator_mode=DecoratorMode.UPDATE, + ) # fail on argument usage error with self.assertRaises(ArgumentUsageError): @@ -2167,9 +2368,11 @@ def test_get_disk_driver(self): # fail with enable-disk-driver as false and value passed for disk_driver_version ctx_4 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "disk_driver_version": "v2", - }), + AKSManagedClusterParamDict( + { + "disk_driver_version": "v2", + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) @@ -2180,9 +2383,11 @@ def test_get_disk_driver(self): # fail on prompt_y_n not specified when disabling disk driver ctx_5 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "disable_disk_driver": True, - }), + AKSManagedClusterParamDict( + { + "disable_disk_driver": True, + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) @@ -2194,9 +2399,11 @@ def test_get_disk_driver(self): ctx_6 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "disable_disk_driver": True, - }), + AKSManagedClusterParamDict( + { + "disable_disk_driver": True, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2205,15 +2412,15 @@ def test_get_disk_driver(self): enabled=False, ) ) - self.assertEqual( - ctx_6.get_disk_driver(), ground_truth_disk_csi_driver_6 - ) + self.assertEqual(ctx_6.get_disk_driver(), ground_truth_disk_csi_driver_6) ctx_7 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "disk_driver_version": CONST_DISK_DRIVER_V2, - }), + AKSManagedClusterParamDict( + { + "disk_driver_version": CONST_DISK_DRIVER_V2, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2223,9 +2430,7 @@ def test_get_disk_driver(self): version=CONST_DISK_DRIVER_V2, ) ) - self.assertEqual( - ctx_7.get_disk_driver(), ground_truth_disk_csi_driver_7 - ) + self.assertEqual(ctx_7.get_disk_driver(), ground_truth_disk_csi_driver_7) def test_get_enable_apiserver_vnet_integration(self): ctx_0 = AKSPreviewManagedClusterContext( @@ -2238,9 +2443,11 @@ def test_get_enable_apiserver_vnet_integration(self): ctx_1 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": False, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": False, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2248,10 +2455,12 @@ def test_get_enable_apiserver_vnet_integration(self): ctx_2 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": False, - "enable_private_cluster": False, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": False, + "enable_private_cluster": False, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2267,10 +2476,12 @@ def test_get_enable_apiserver_vnet_integration(self): ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": True, - "enable_private_cluster": True, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": True, + "enable_private_cluster": True, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2278,21 +2489,24 @@ def test_get_enable_apiserver_vnet_integration(self): ctx_5 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": True, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": True, + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) with self.assertRaises(RequiredArgumentMissingError): ctx_5.get_enable_apiserver_vnet_integration() - ctx_6 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": True, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": True, + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) @@ -2319,12 +2533,14 @@ def test_get_apiserver_subnet_id(self): vnet_subnet_id = "/subscriptions/fakesub/resourceGroups/fakerg/providers/Microsoft.Network/virtualNetworks/fakevnet/subnets/node" ctx_1 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": True, - "enable_private_cluster": True, - "apiserver_subnet_id": apiserver_subnet_id, - "vnet_subnet_id": vnet_subnet_id, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": True, + "enable_private_cluster": True, + "apiserver_subnet_id": apiserver_subnet_id, + "vnet_subnet_id": vnet_subnet_id, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2333,11 +2549,13 @@ def test_get_apiserver_subnet_id(self): ctx_2 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": True, - "enable_private_cluster": True, - "vnet_subnet_id": vnet_subnet_id - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": True, + "enable_private_cluster": True, + "vnet_subnet_id": vnet_subnet_id, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2353,10 +2571,12 @@ def test_get_apiserver_subnet_id(self): ctx_3 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": True, - "apiserver_subnet_id": apiserver_subnet_id, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": True, + "apiserver_subnet_id": apiserver_subnet_id, + } + ), self.models, decorator_mode=DecoratorMode.UPDATE, ) @@ -2365,11 +2585,13 @@ def test_get_apiserver_subnet_id(self): ctx_4 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_private_cluster": True, - "apiserver_subnet_id": apiserver_subnet_id, - "vnet_subnet_id": vnet_subnet_id, - }), + AKSManagedClusterParamDict( + { + "enable_private_cluster": True, + "apiserver_subnet_id": apiserver_subnet_id, + "vnet_subnet_id": vnet_subnet_id, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2379,11 +2601,13 @@ def test_get_apiserver_subnet_id(self): ctx_5 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "enable_apiserver_vnet_integration": False, - "apiserver_subnet_id": apiserver_subnet_id, - "vnet_subnet_id": vnet_subnet_id, - }), + AKSManagedClusterParamDict( + { + "enable_apiserver_vnet_integration": False, + "apiserver_subnet_id": apiserver_subnet_id, + "vnet_subnet_id": vnet_subnet_id, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2393,9 +2617,11 @@ def test_get_apiserver_subnet_id(self): ctx_6 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict({ - "apiserver_subnet_id": apiserver_subnet_id, - }), + AKSManagedClusterParamDict( + { + "apiserver_subnet_id": apiserver_subnet_id, + } + ), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2414,7 +2640,9 @@ def test_get_dns_zone_resource_ids(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - self.assertEqual(ctx_1.get_dns_zone_resource_ids(), ["test_dns_zone_resource_id"]) + self.assertEqual( + ctx_1.get_dns_zone_resource_ids(), ["test_dns_zone_resource_id"] + ) mc_1 = self.models.ManagedCluster( location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( @@ -2425,7 +2653,9 @@ def test_get_dns_zone_resource_ids(self): ), ) ctx_1.attach_mc(mc_1) - self.assertEqual(ctx_1.get_dns_zone_resource_ids(), ["test_mc_dns_zone_resource_id"]) + self.assertEqual( + ctx_1.get_dns_zone_resource_ids(), ["test_mc_dns_zone_resource_id"] + ) ctx_2 = AKSPreviewManagedClusterContext( self.cmd, @@ -2437,7 +2667,10 @@ def test_get_dns_zone_resource_ids(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - self.assertEqual(ctx_2.get_dns_zone_resource_ids(), ["test_dns_zone_resource_id_1", "test_dns_zone_resource_id_2"]) + self.assertEqual( + ctx_2.get_dns_zone_resource_ids(), + ["test_dns_zone_resource_id_1", "test_dns_zone_resource_id_2"], + ) ctx_3 = AKSPreviewManagedClusterContext( self.cmd, @@ -2449,7 +2682,9 @@ def test_get_dns_zone_resource_ids(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - self.assertEqual(ctx_3.get_dns_zone_resource_ids(), ["test_dns_zone_resource_id_1"]) + self.assertEqual( + ctx_3.get_dns_zone_resource_ids(), ["test_dns_zone_resource_id_1"] + ) def test_get_enable_keda(self): # Returns the value of enable_keda if keda is None in existing profile. @@ -2541,9 +2776,7 @@ def test_get_enable_keda(self): # Throws exception when both enable_keda and disable_keda are True. ctx_8 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict( - {"enable_keda": True, "disable_keda": True} - ), + AKSManagedClusterParamDict({"enable_keda": True, "disable_keda": True}), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2590,9 +2823,7 @@ def test_get_disable_keda(self): # Throws exception when both enable_keda and disable_keda are True. ctx_4 = AKSPreviewManagedClusterContext( self.cmd, - AKSManagedClusterParamDict( - {"enable_keda": True, "disable_keda": True} - ), + AKSManagedClusterParamDict({"enable_keda": True, "disable_keda": True}), self.models, decorator_mode=DecoratorMode.CREATE, ) @@ -2625,9 +2856,7 @@ def test_get_defender_config(self): AKSManagedClusterParamDict( { "enable_defender": True, - "defender_config": get_test_data_file_path( - "defenderconfig.json" - ), + "defender_config": get_test_data_file_path("defenderconfig.json"), } ), self.models, @@ -2723,8 +2952,8 @@ def test_get_enable_node_restriction(self): decorator_mode=DecoratorMode.CREATE, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction( - enabled=True + security_profile.node_restriction = ( + self.models.ManagedClusterSecurityProfileNodeRestriction(enabled=True) ) mc = self.models.ManagedCluster( location="test_location", @@ -2744,8 +2973,8 @@ def test_get_enable_node_restriction(self): decorator_mode=DecoratorMode.UPDATE, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction( - enabled=True + security_profile.node_restriction = ( + self.models.ManagedClusterSecurityProfileNodeRestriction(enabled=True) ) mc = self.models.ManagedCluster( location="test_location", @@ -2986,13 +3215,15 @@ def test_get_enable_private_cluster(self): AKSManagedClusterParamDict( { "enable_private_cluster": True, - "enable_apiserver_vnet_integration": True + "enable_apiserver_vnet_integration": True, } ), self.models, DecoratorMode.UPDATE, ) - api_server_access_profile_10 = self.models.ManagedClusterAPIServerAccessProfile() + api_server_access_profile_10 = ( + self.models.ManagedClusterAPIServerAccessProfile() + ) mc_10 = self.models.ManagedCluster( location="test_location", api_server_access_profile=api_server_access_profile_10, @@ -3095,13 +3326,15 @@ def test_get_disable_private_cluster(self): AKSManagedClusterParamDict( { "disable_private_cluster": True, - "enable_apiserver_vnet_integration": True + "enable_apiserver_vnet_integration": True, } ), self.models, DecoratorMode.UPDATE, ) - api_server_access_profile_10 = self.models.ManagedClusterAPIServerAccessProfile() + api_server_access_profile_10 = ( + self.models.ManagedClusterAPIServerAccessProfile() + ) mc_10 = self.models.ManagedCluster( location="test_location", api_server_access_profile=api_server_access_profile_10, @@ -3251,7 +3484,9 @@ def test_get_private_dns_zone(self): ) # fail on invalid private_dns_zone when fqdn_subdomain is specified with self.assertRaises(InvalidArgumentValueError): - self.assertEqual(ctx_3.get_private_dns_zone(), CONST_PRIVATE_DNS_ZONE_SYSTEM) + self.assertEqual( + ctx_3.get_private_dns_zone(), CONST_PRIVATE_DNS_ZONE_SYSTEM + ) # custom value ctx_4 = AKSPreviewManagedClusterContext( @@ -3308,8 +3543,14 @@ def test_get_enable_vpa(self): self.models, decorator_mode=DecoratorMode.CREATE, ) - workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() - workload_auto_scaler_profile.vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(enable=True) + workload_auto_scaler_profile = ( + self.models.ManagedClusterWorkloadAutoScalerProfile() + ) + workload_auto_scaler_profile.vertical_pod_autoscaler = ( + self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( + enable=True + ) + ) mc = self.models.ManagedCluster( location="test_location", workload_auto_scaler_profile=workload_auto_scaler_profile, @@ -3327,9 +3568,13 @@ def test_get_enable_vpa(self): self.models, decorator_mode=DecoratorMode.UPDATE, ) - workload_auto_scaler_profile = self.models.ManagedClusterWorkloadAutoScalerProfile() - workload_auto_scaler_profile.vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( - enabled=True + workload_auto_scaler_profile = ( + self.models.ManagedClusterWorkloadAutoScalerProfile() + ) + workload_auto_scaler_profile.vertical_pod_autoscaler = ( + self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( + enabled=True + ) ) mc = self.models.ManagedCluster( location="test_location", @@ -3444,6 +3689,7 @@ def test_get_upgrade_override_until(self): ) self.assertEqual(ctx_1.get_upgrade_override_until(), "2022-11-01T13:00:00Z") + class AKSPreviewManagedClusterCreateDecoratorTestCase(unittest.TestCase): def setUp(self): # manually register CUSTOM_MGMT_AKS_PREVIEW @@ -3456,28 +3702,25 @@ def setUp(self): def test_set_up_guardrails_profile(self): # Base case - no options specified, GuardrailsProfile should be None dec_1 = AKSPreviewManagedClusterCreateDecorator( - self.cmd, - self.client, - {}, - CUSTOM_MGMT_AKS_PREVIEW + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW ) mc_1 = self.models.ManagedCluster(location="test_location") dec_1.context.attach_mc(mc_1) dec_mc_1 = dec_1.set_up_guardrails_profile(mc_1) gt_mc_1 = self.models.ManagedCluster(location="test_location") - self.assertEqual(dec_mc_1,gt_mc_1) + self.assertEqual(dec_mc_1, gt_mc_1) # Make sure GuardrailsProfile is filled out appropriately dec_2 = AKSPreviewManagedClusterCreateDecorator( self.cmd, self.client, { - "guardrails_level": "Warning", - "guardrails_version": "v1.0.0", - "guardrails_excluded_ns": "ns1,ns2" + "guardrails_level": "Warning", + "guardrails_version": "v1.0.0", + "guardrails_excluded_ns": "ns1,ns2", }, - CUSTOM_MGMT_AKS_PREVIEW + CUSTOM_MGMT_AKS_PREVIEW, ) mc_2 = self.models.ManagedCluster(location="test_location") @@ -3485,11 +3728,9 @@ def test_set_up_guardrails_profile(self): dec_mc_2 = dec_2.set_up_guardrails_profile(mc_2) gt_mc_2 = self.models.ManagedCluster(location="test_location") gt_mc_2.guardrails_profile = self.models.GuardrailsProfile( - level="Warning", - version="v1.0.0", - excluded_namespaces=["ns1","ns2"] + level="Warning", version="v1.0.0", excluded_namespaces=["ns1", "ns2"] ) - self.assertEqual(dec_mc_2,gt_mc_2) + self.assertEqual(dec_mc_2, gt_mc_2) def test_set_up_agentpool_profile(self): dec_1 = AKSPreviewManagedClusterCreateDecorator( @@ -3548,7 +3789,9 @@ def test_set_up_agentpool_profile(self): vm_size="Standard_DSx_vy", os_type=CONST_DEFAULT_NODE_OS_TYPE, os_sku="snapshot_os_sku", - creation_data=self.models.CreationData(source_resource_id="test_snapshot_id"), + creation_data=self.models.CreationData( + source_resource_id="test_snapshot_id" + ), vnet_subnet_id="test_vnet_subnet_id", pod_subnet_id="test_pod_subnet_id", enable_node_public_ip=True, @@ -3618,12 +3861,16 @@ def test_set_up_network_profile(self): network_profile_1 = self.models.ContainerServiceNetworkProfile() # TODO: remove this temp fix once aks-preview's dependency on core azure-cli is updated to 2.26.0 for attr_name, attr_value in vars(network_profile_1).items(): - if not attr_name.startswith("_") and attr_name not in ["additional_properties", "outbound_type"] and attr_value is not None: - setattr(network_profile_1, attr_name, None) + if ( + not attr_name.startswith("_") + and attr_name not in ["additional_properties", "outbound_type"] + and attr_value is not None + ): + setattr(network_profile_1, attr_name, None) network_profile_1.load_balancer_sku = CONST_LOAD_BALANCER_SKU_STANDARD network_profile_1.ip_families = ["IPv4", "IPv6"] network_profile_1.pod_cidrs = ["10.246.0.0/16", "2001:abcd::/64"] - network_profile_1.service_cidrs=["10.0.0.0/16", "2001:ffff::/108"] + network_profile_1.service_cidrs = ["10.0.0.0/16", "2001:ffff::/108"] load_balancer_profile_1 = self.models.load_balancer_models.ManagedClusterLoadBalancerProfile( managed_outbound_i_ps=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileManagedOutboundIPs( @@ -3632,7 +3879,9 @@ def test_set_up_network_profile(self): backend_pool_type=CONST_LOAD_BALANCER_BACKEND_POOL_TYPE_NODE_IP, ) network_profile_1.load_balancer_profile = load_balancer_profile_1 - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location", network_profile=network_profile_1) + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location", network_profile=network_profile_1 + ) self.assertEqual(dec_mc_1, ground_truth_mc_1) def test_set_up_api_server_access_profile(self): @@ -3642,14 +3891,10 @@ def test_set_up_api_server_access_profile(self): {}, CUSTOM_MGMT_AKS_PREVIEW, ) - mc_1 = self.models.ManagedCluster( - location="test_location" - ) + mc_1 = self.models.ManagedCluster(location="test_location") dec_1.context.attach_mc(mc_1) dec_mc_1 = dec_1.set_up_api_server_access_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) apiserver_subnet_id = "/subscriptions/fakesub/resourceGroups/fakerg/providers/Microsoft.Network/virtualNetworks/fakevnet/subnets/apiserver" @@ -3668,11 +3913,13 @@ def test_set_up_api_server_access_profile(self): mc_2 = self.models.ManagedCluster(location="test_location") dec_2.context.attach_mc(mc_2) dec_mc_2 = dec_2.set_up_api_server_access_profile(mc_2) - ground_truth_api_server_access_profile_2 = self.models.ManagedClusterAPIServerAccessProfile( - enable_vnet_integration=True, - subnet_id=apiserver_subnet_id, - enable_private_cluster=True, - authorized_ip_ranges=[], + ground_truth_api_server_access_profile_2 = ( + self.models.ManagedClusterAPIServerAccessProfile( + enable_vnet_integration=True, + subnet_id=apiserver_subnet_id, + enable_private_cluster=True, + authorized_ip_ranges=[], + ) ) ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", @@ -3692,8 +3939,10 @@ def test_set_up_api_server_access_profile(self): mc_3 = self.models.ManagedCluster(location="test_location") dec_3.context.attach_mc(mc_3) dec_mc_3 = dec_3.set_up_api_server_access_profile(mc_3) - ground_truth_api_server_access_profile_3 = self.models.ManagedClusterAPIServerAccessProfile( - enable_vnet_integration=True, + ground_truth_api_server_access_profile_3 = ( + self.models.ManagedClusterAPIServerAccessProfile( + enable_vnet_integration=True, + ) ) ground_truth_mc_3 = self.models.ManagedCluster( location="test_location", @@ -3711,14 +3960,10 @@ def test_build_gitops_addon_profile(self): ) gitops_addon_profile = dec_1.build_gitops_addon_profile() - ground_truth_gitops_addon_profile = ( - self.models.ManagedClusterAddonProfile( - enabled=True, - ) - ) - self.assertEqual( - gitops_addon_profile, ground_truth_gitops_addon_profile + ground_truth_gitops_addon_profile = self.models.ManagedClusterAddonProfile( + enabled=True, ) + self.assertEqual(gitops_addon_profile, ground_truth_gitops_addon_profile) def test_set_up_addon_profiles(self): # default value in `aks_create` @@ -3756,9 +4001,7 @@ def test_set_up_addon_profiles(self): ) self.assertEqual(dec_mc_1, ground_truth_mc_1) self.assertEqual(dec_1.context.get_intermediate("monitoring"), None) - self.assertEqual( - dec_1.context.get_intermediate("enable_virtual_node"), None - ) + self.assertEqual(dec_1.context.get_intermediate("enable_virtual_node"), None) self.assertEqual( dec_1.context.get_intermediate("ingress_appgw_addon_enabled"), None ) @@ -3785,9 +4028,7 @@ def test_set_up_addon_profiles(self): }, CUSTOM_MGMT_AKS_PREVIEW, ) - dec_2.context.set_intermediate( - "subscription_id", "test_subscription_id" - ) + dec_2.context.set_intermediate("subscription_id", "test_subscription_id") mc_2 = self.models.ManagedCluster(location="test_location") dec_2.context.attach_mc(mc_2) with patch( @@ -3822,9 +4063,15 @@ def test_set_up_addon_profiles(self): location="test_location", addon_profiles=addon_profiles_2 ) self.assertEqual(dec_mc_2, ground_truth_mc_2) - self.assertEqual(dec_2.context.get_intermediate("monitoring_addon_enabled"), True) - self.assertEqual(dec_2.context.get_intermediate("virtual_node_addon_enabled"), None) - self.assertEqual(dec_2.context.get_intermediate("ingress_appgw_addon_enabled"), True) + self.assertEqual( + dec_2.context.get_intermediate("monitoring_addon_enabled"), True + ) + self.assertEqual( + dec_2.context.get_intermediate("virtual_node_addon_enabled"), None + ) + self.assertEqual( + dec_2.context.get_intermediate("ingress_appgw_addon_enabled"), True + ) def test_set_up_http_proxy_config(self): dec_1 = AKSPreviewManagedClusterCreateDecorator( @@ -3866,7 +4113,9 @@ def test_set_up_pod_security_policy(self): with self.assertRaises(CLIInternalError): dec_1.set_up_pod_security_policy(None) dec_mc_1 = dec_1.set_up_pod_security_policy(mc_1) - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location", enable_pod_security_policy=False) + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location", enable_pod_security_policy=False + ) self.assertEqual(dec_mc_1, ground_truth_mc_1) # custom value @@ -3916,14 +4165,22 @@ def test_set_up_pod_identity_profile(self): }, CUSTOM_MGMT_AKS_PREVIEW, ) - network_profile_2 = self.models.ContainerServiceNetworkProfile(network_plugin="kubenet") - mc_2 = self.models.ManagedCluster(location="test_location", network_profile=network_profile_2) + network_profile_2 = self.models.ContainerServiceNetworkProfile( + network_plugin="kubenet" + ) + mc_2 = self.models.ManagedCluster( + location="test_location", network_profile=network_profile_2 + ) dec_2.context.attach_mc(mc_2) dec_mc_2 = dec_2.set_up_pod_identity_profile(mc_2) - network_profile_2 = self.models.ContainerServiceNetworkProfile(network_plugin="kubenet") - pod_identity_profile_2 = self.models.pod_identity_models.ManagedClusterPodIdentityProfile( - enabled=True, - allow_network_plugin_kubenet=True, + network_profile_2 = self.models.ContainerServiceNetworkProfile( + network_plugin="kubenet" + ) + pod_identity_profile_2 = ( + self.models.pod_identity_models.ManagedClusterPodIdentityProfile( + enabled=True, + allow_network_plugin_kubenet=True, + ) ) ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", @@ -3933,7 +4190,9 @@ def test_set_up_pod_identity_profile(self): self.assertEqual(dec_mc_2, ground_truth_mc_2) def test_set_up_oidc_issuer_profile__default_value(self): - dec = AKSPreviewManagedClusterCreateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + dec = AKSPreviewManagedClusterCreateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) mc = self.models.ManagedCluster(location="test_location") dec.context.attach_mc(mc) updated_mc = dec.set_up_oidc_issuer_profile(mc) @@ -3964,21 +4223,29 @@ def test_set_up_oidc_issuer_profile__enabled_mc_enabled(self): CUSTOM_MGMT_AKS_PREVIEW, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) dec.context.attach_mc(mc) updated_mc = dec.set_up_oidc_issuer_profile(mc) self.assertIsNotNone(updated_mc.oidc_issuer_profile) self.assertTrue(updated_mc.oidc_issuer_profile.enabled) def test_set_up_workload_identity_profile__default_value(self): - dec = AKSPreviewManagedClusterCreateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + dec = AKSPreviewManagedClusterCreateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) mc = self.models.ManagedCluster(location="test_location") dec.context.attach_mc(mc) updated_mc = dec.set_up_workload_identity_profile(mc) self.assertIsNone(updated_mc.security_profile) - def test_set_up_workload_identity_profile__default_value_with_security_profile(self): - dec = AKSPreviewManagedClusterCreateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + def test_set_up_workload_identity_profile__default_value_with_security_profile( + self, + ): + dec = AKSPreviewManagedClusterCreateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) mc = self.models.ManagedCluster(location="test_location") mc.security_profile = self.models.ManagedClusterSecurityProfile() dec.context.attach_mc(mc) @@ -4025,9 +4292,11 @@ def test_set_up_image_cleaner(self): dec_1.context.attach_mc(mc_1) dec_mc_1 = dec_1.set_up_image_cleaner(mc_1) - ground_truth_image_cleaner_profile_1 = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=7*24, + ground_truth_image_cleaner_profile_1 = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=7 * 24, + ) ) ground_truth_security_profile_1 = self.models.ManagedClusterSecurityProfile( image_cleaner=ground_truth_image_cleaner_profile_1, @@ -4041,19 +4310,18 @@ def test_set_up_image_cleaner(self): dec_2 = AKSPreviewManagedClusterCreateDecorator( self.cmd, self.client, - { - "enable_image_cleaner": True, - "image_cleaner_interval_hours": 24 - }, + {"enable_image_cleaner": True, "image_cleaner_interval_hours": 24}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_2 = self.models.ManagedCluster(location="test_location") dec_2.context.attach_mc(mc_2) dec_mc_2 = dec_2.set_up_image_cleaner(mc_2) - ground_truth_image_cleaner_profile_2 = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=24, + ground_truth_image_cleaner_profile_2 = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=24, + ) ) ground_truth_security_profile_2 = self.models.ManagedClusterSecurityProfile( image_cleaner=ground_truth_image_cleaner_profile_2, @@ -4065,7 +4333,9 @@ def test_set_up_image_cleaner(self): self.assertEqual(dec_mc_2, ground_truth_mc_2) def test_set_up_azure_keyvault_kms(self): - key_id_1 = "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + key_id_1 = ( + "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + ) dec_1 = AKSPreviewManagedClusterCreateDecorator( self.cmd, @@ -4151,7 +4421,9 @@ def test_set_up_creationdata_of_cluster_snapshot(self): dec_1.context.attach_mc(mc_1) 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) + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location", creation_data=cd + ) self.assertEqual(dec_mc_1, ground_truth_mc_1) def test_set_up_custom_ca_trust_certificates(self): @@ -4165,16 +4437,23 @@ def test_set_up_custom_ca_trust_certificates(self): dec_1.context.attach_mc(mc_1) dec_mc_1 = dec_1.set_up_custom_ca_trust_certificates(mc_1) sec_profile = self.models.ManagedClusterSecurityProfile( - custom_ca_trust_certificates=[str.encode(CONST_CUSTOM_CA_TEST_CERT) for _ in range(2)] + custom_ca_trust_certificates=[ + str.encode(CONST_CUSTOM_CA_TEST_CERT) for _ in range(2) + ] + ) + ground_truth_mc_1 = self.models.ManagedCluster( + location="test_location", security_profile=sec_profile ) - ground_truth_mc_1 = self.models.ManagedCluster(location="test_location", security_profile=sec_profile) self.assertEqual(dec_mc_1, ground_truth_mc_1) def test_set_up_ingress_web_app_routing(self): dec_1 = AKSPreviewManagedClusterCreateDecorator( self.cmd, self.client, - {"enable_addons": "web_application_routing", "dns_zone_resource_ids": "test_dns_zone_resource_id"}, + { + "enable_addons": "web_application_routing", + "dns_zone_resource_ids": "test_dns_zone_resource_id", + }, CUSTOM_MGMT_AKS_PREVIEW, ) mc_1 = self.models.ManagedCluster(location="test_location") @@ -4198,7 +4477,7 @@ def test_set_up_workload_auto_scaler_profile(self): ) with self.assertRaisesRegex( CLIInternalError, - "^Unexpected mc object with type ''\.$", + r"^Unexpected mc object with type ''\.$", ): dec_1.set_up_workload_auto_scaler_profile(None) @@ -4252,8 +4531,8 @@ def test_set_up_defender(self): dec_1.context.set_intermediate("subscription_id", "test_subscription_id") with patch( - "azure.cli.command_modules.acs.managed_cluster_decorator.ensure_default_log_analytics_workspace_for_monitoring", - return_value="test_workspace_resource_id", + "azure.cli.command_modules.acs.managed_cluster_decorator.ensure_default_log_analytics_workspace_for_monitoring", + return_value="test_workspace_resource_id", ): dec_mc_1 = dec_1.set_up_defender(mc_1) @@ -4286,9 +4565,7 @@ def test_set_up_node_restriction(self): dec_2 = AKSPreviewManagedClusterCreateDecorator( self.cmd, self.client, - { - "enable_node_restriction": True - }, + {"enable_node_restriction": True}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_2 = self.models.ManagedCluster(location="test_location") @@ -4298,8 +4575,8 @@ def test_set_up_node_restriction(self): ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", security_profile=self.models.ManagedClusterSecurityProfile( - node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction( - enabled = True, + node_restriction=self.models.ManagedClusterSecurityProfileNodeRestriction( + enabled=True, ) ), ) @@ -4321,9 +4598,7 @@ def test_set_up_vpa(self): dec_2 = AKSPreviewManagedClusterCreateDecorator( self.cmd, self.client, - { - "enable_vpa": True - }, + {"enable_vpa": True}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_2 = self.models.ManagedCluster(location="test_location") @@ -4333,8 +4608,8 @@ def test_set_up_vpa(self): ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", workload_auto_scaler_profile=self.models.ManagedClusterWorkloadAutoScalerProfile( - vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( - enabled = True, + vertical_pod_autoscaler=self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( + enabled=True, ) ), ) @@ -4369,8 +4644,7 @@ def test_set_up_azure_service_mesh(self): ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh() + mode="Istio", istio=self.models.IstioServiceMesh() ), ) @@ -4431,7 +4705,9 @@ def test_construct_mc_profile_preview(self): raw_param_dict.update(optional_params) # default value in `aks_create` - dec_1 = AKSPreviewManagedClusterCreateDecorator(self.cmd, self.client, raw_param_dict, CUSTOM_MGMT_AKS_PREVIEW) + dec_1 = AKSPreviewManagedClusterCreateDecorator( + self.cmd, self.client, raw_param_dict, CUSTOM_MGMT_AKS_PREVIEW + ) mock_profile = Mock(get_subscription_id=Mock(return_value="1234-5678-9012")) with patch( @@ -4467,7 +4743,9 @@ def test_construct_mc_profile_preview(self): ssh_config_1 = self.models.ContainerServiceSshConfiguration( public_keys=[self.models.ContainerServiceSshPublicKey(key_data=public_key)] ) - linux_profile_1 = self.models.ContainerServiceLinuxProfile(admin_username="azureuser", ssh=ssh_config_1) + linux_profile_1 = self.models.ContainerServiceLinuxProfile( + admin_username="azureuser", ssh=ssh_config_1 + ) network_profile_1 = self.models.ContainerServiceNetworkProfile( load_balancer_sku="standard", ) @@ -4600,8 +4878,12 @@ def test_update_load_balancer_profile(self): load_balancer_profile=self.models.load_balancer_models.ManagedClusterLoadBalancerProfile( outbound_ip_prefixes=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes( public_ip_prefixes=[ - self.models.load_balancer_models.ResourceReference(id="id1"), - self.models.load_balancer_models.ResourceReference(id="id2"), + self.models.load_balancer_models.ResourceReference( + id="id1" + ), + self.models.load_balancer_models.ResourceReference( + id="id2" + ), ] ) ) @@ -4616,8 +4898,12 @@ def test_update_load_balancer_profile(self): load_balancer_profile=self.models.load_balancer_models.ManagedClusterLoadBalancerProfile( outbound_ip_prefixes=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes( public_ip_prefixes=[ - self.models.load_balancer_models.ResourceReference(id="id3"), - self.models.load_balancer_models.ResourceReference(id="id4"), + self.models.load_balancer_models.ResourceReference( + id="id3" + ), + self.models.load_balancer_models.ResourceReference( + id="id4" + ), ] ) ) @@ -4643,8 +4929,12 @@ def test_update_load_balancer_profile(self): load_balancer_profile=self.models.load_balancer_models.ManagedClusterLoadBalancerProfile( outbound_i_ps=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPs( public_i_ps=[ - self.models.load_balancer_models.ResourceReference(id="id1"), - self.models.load_balancer_models.ResourceReference(id="id2"), + self.models.load_balancer_models.ResourceReference( + id="id1" + ), + self.models.load_balancer_models.ResourceReference( + id="id2" + ), ] ) ) @@ -4659,8 +4949,12 @@ def test_update_load_balancer_profile(self): load_balancer_profile=self.models.load_balancer_models.ManagedClusterLoadBalancerProfile( outbound_i_ps=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPs( public_i_ps=[ - self.models.load_balancer_models.ResourceReference(id="id3"), - self.models.load_balancer_models.ResourceReference(id="id4"), + self.models.load_balancer_models.ResourceReference( + id="id3" + ), + self.models.load_balancer_models.ResourceReference( + id="id4" + ), ] ) ) @@ -4820,8 +5114,12 @@ def test_update_load_balancer_profile(self): load_balancer_profile=self.models.load_balancer_models.ManagedClusterLoadBalancerProfile( outbound_i_ps=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPs( public_i_ps=[ - self.models.load_balancer_models.ResourceReference(id="id1"), - self.models.load_balancer_models.ResourceReference(id="id2"), + self.models.load_balancer_models.ResourceReference( + id="id1" + ), + self.models.load_balancer_models.ResourceReference( + id="id2" + ), ] ) ) @@ -4845,11 +5143,19 @@ def test_update_load_balancer_profile(self): load_balancer_profile_8 = self.models.load_balancer_models.ManagedClusterLoadBalancerProfile( outbound_ip_prefixes=self.models.load_balancer_models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes( - public_ip_prefixes=[self.models.load_balancer_models.ResourceReference(id="test_public_ip_prefix")] + public_ip_prefixes=[ + self.models.load_balancer_models.ResourceReference( + id="test_public_ip_prefix" + ) + ] ), ) - network_profile_8 = self.models.ContainerServiceNetworkProfile(load_balancer_profile=load_balancer_profile_8) - mc_8 = self.models.ManagedCluster(location="test_location", network_profile=network_profile_8) + network_profile_8 = self.models.ContainerServiceNetworkProfile( + load_balancer_profile=load_balancer_profile_8 + ) + mc_8 = self.models.ManagedCluster( + location="test_location", network_profile=network_profile_8 + ) dec_8.context.attach_mc(mc_8) dec_mc_8 = dec_8.update_load_balancer_profile(mc_8) @@ -4993,9 +5299,7 @@ def test_update_network_plugin_settings(self): mc_1 = self.models.ManagedCluster( location="test_location", network_profile=self.models.ContainerServiceNetworkProfile( - network_plugin="azure", - pod_cidr=None, - service_cidr="192.168.0.0/16" + network_plugin="azure", pod_cidr=None, service_cidr="192.168.0.0/16" ), ) @@ -5031,7 +5335,7 @@ def test_update_network_plugin_settings(self): network_profile=self.models.ContainerServiceNetworkProfile( network_plugin="azure", pod_cidr="100.64.0.0/16", - service_cidr="192.168.0.0/16" + service_cidr="192.168.0.0/16", ), ) @@ -5067,7 +5371,7 @@ def test_update_network_plugin_settings(self): network_plugin="azure", network_plugin_mode="overlay", pod_cidr="100.64.0.0/16", - service_cidr="192.168.0.0/16" + service_cidr="192.168.0.0/16", ), ) @@ -5106,7 +5410,7 @@ def test_update_network_plugin_settings(self): network_dataplane="cilium", network_policy="", pod_cidr="100.64.0.0/16", - service_cidr="192.168.0.0/16" + service_cidr="192.168.0.0/16", ), ) @@ -5143,7 +5447,7 @@ def test_update_network_plugin_settings(self): network_plugin="azure", network_plugin_mode="overlay", pod_cidr="100.64.0.0/16", - service_cidr="192.168.0.0/16" + service_cidr="192.168.0.0/16", ), ) @@ -5261,9 +5565,11 @@ def test_update_api_server_access_profile(self): mc_2 = self.models.ManagedCluster(location="test_location") dec_2.context.attach_mc(mc_2) dec_mc_2 = dec_2.update_api_server_access_profile(mc_2) - ground_truth_api_server_access_profile_2 = self.models.ManagedClusterAPIServerAccessProfile( - enable_vnet_integration=True, - subnet_id=apiserver_subnet_id, + ground_truth_api_server_access_profile_2 = ( + self.models.ManagedClusterAPIServerAccessProfile( + enable_vnet_integration=True, + subnet_id=apiserver_subnet_id, + ) ) ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", @@ -5283,12 +5589,16 @@ def test_update_api_server_access_profile(self): api_server_access_profile = self.models.ManagedClusterAPIServerAccessProfile() api_server_access_profile.enable_vnet_integration = True api_server_access_profile.enable_private_cluster = True - mc_3 = self.models.ManagedCluster(location="test_location", api_server_access_profile=api_server_access_profile) + mc_3 = self.models.ManagedCluster( + location="test_location", + api_server_access_profile=api_server_access_profile, + ) dec_3.context.attach_mc(mc_3) dec_mc_3 = dec_3.update_api_server_access_profile(mc_3) - ground_truth_api_server_access_profile_3 = self.models.ManagedClusterAPIServerAccessProfile( - enable_vnet_integration=True, - enable_private_cluster=False + ground_truth_api_server_access_profile_3 = ( + self.models.ManagedClusterAPIServerAccessProfile( + enable_vnet_integration=True, enable_private_cluster=False + ) ) ground_truth_mc_3 = self.models.ManagedCluster( location="test_location", @@ -5306,12 +5616,16 @@ def test_update_api_server_access_profile(self): ) api_server_access_profile = self.models.ManagedClusterAPIServerAccessProfile() api_server_access_profile.enable_vnet_integration = True - mc_4 = self.models.ManagedCluster(location="test_location", api_server_access_profile=api_server_access_profile) + mc_4 = self.models.ManagedCluster( + location="test_location", + api_server_access_profile=api_server_access_profile, + ) dec_4.context.attach_mc(mc_4) dec_mc_4 = dec_4.update_api_server_access_profile(mc_4) - ground_truth_api_server_access_profile_4 = self.models.ManagedClusterAPIServerAccessProfile( - enable_vnet_integration=True, - enable_private_cluster=True + ground_truth_api_server_access_profile_4 = ( + self.models.ManagedClusterAPIServerAccessProfile( + enable_vnet_integration=True, enable_private_cluster=True + ) ) ground_truth_mc_4 = self.models.ManagedCluster( location="test_location", @@ -5536,16 +5850,22 @@ def test_update_pod_identity_profile(self): self.assertEqual(dec_mc_4, ground_truth_mc_4) def test_update_oidc_issuer_profile__default_value(self): - dec = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) - mc = self.models.ManagedCluster(location="test_location") - dec.context.attach_mc(mc) + dec = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) + mc = self.models.ManagedCluster(location="test_location") + dec.context.attach_mc(mc) updated_mc = dec.update_oidc_issuer_profile(mc) self.assertIsNone(updated_mc.oidc_issuer_profile) def test_update_oidc_issuer_profile__default_value_mc_enabled(self): - dec = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + dec = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) dec.context.attach_mc(mc) updated_mc = dec.update_oidc_issuer_profile(mc) self.assertTrue(updated_mc.oidc_issuer_profile.enabled) @@ -5575,21 +5895,27 @@ def test_update_oidc_issuer_profile__enabled_mc_enabled(self): CUSTOM_MGMT_AKS_PREVIEW, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) dec.context.attach_mc(mc) updated_mc = dec.update_oidc_issuer_profile(mc) self.assertIsNotNone(updated_mc.oidc_issuer_profile) self.assertTrue(updated_mc.oidc_issuer_profile.enabled) def test_update_workload_identity_profile__default_value(self): - dec = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + dec = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) mc = self.models.ManagedCluster(location="test_location") dec.context.attach_mc(mc) updated_mc = dec.update_workload_identity_profile(mc) self.assertIsNone(updated_mc.security_profile) def test_update_workload_identity_profile__default_value_mc_enabled(self): - dec = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + dec = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) mc = self.models.ManagedCluster(location="test_location") mc.security_profile = self.models.ManagedClusterSecurityProfile( workload_identity=self.models.ManagedClusterSecurityProfileWorkloadIdentity( @@ -5610,7 +5936,9 @@ def test_update_workload_identity_profile__enabled(self): CUSTOM_MGMT_AKS_PREVIEW, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) dec.context.attach_mc(mc) updated_mc = dec.update_workload_identity_profile(mc) self.assertTrue(updated_mc.security_profile.workload_identity.enabled) @@ -5625,7 +5953,9 @@ def test_update_workload_identity_profile__disabled(self): CUSTOM_MGMT_AKS_PREVIEW, ) mc = self.models.ManagedCluster(location="test_location") - mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile(enabled=True) + mc.oidc_issuer_profile = self.models.ManagedClusterOIDCIssuerProfile( + enabled=True + ) dec.context.attach_mc(mc) updated_mc = dec.update_workload_identity_profile(mc) self.assertFalse(updated_mc.security_profile.workload_identity.enabled) @@ -5661,9 +5991,11 @@ def test_update_image_cleaner(self): dec_1.context.attach_mc(mc_1) dec_mc_1 = dec_1.update_image_cleaner(mc_1) - ground_truth_image_cleaner_profile_1 = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=7*24, + ground_truth_image_cleaner_profile_1 = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=7 * 24, + ) ) ground_truth_security_profile_1 = self.models.ManagedClusterSecurityProfile( image_cleaner=ground_truth_image_cleaner_profile_1, @@ -5677,15 +6009,15 @@ def test_update_image_cleaner(self): dec_2 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "image_cleaner_interval_hours": 24 - }, + {"image_cleaner_interval_hours": 24}, CUSTOM_MGMT_AKS_PREVIEW, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.image_cleaner = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=25, + security_profile.image_cleaner = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=25, + ) ) mc_2 = self.models.ManagedCluster( location="test_location", @@ -5694,9 +6026,11 @@ def test_update_image_cleaner(self): dec_2.context.attach_mc(mc_2) dec_mc_2 = dec_2.update_image_cleaner(mc_2) - ground_truth_image_cleaner_profile_2 = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=24, + ground_truth_image_cleaner_profile_2 = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=24, + ) ) ground_truth_security_profile_2 = self.models.ManagedClusterSecurityProfile( image_cleaner=ground_truth_image_cleaner_profile_2, @@ -5716,9 +6050,11 @@ def test_update_image_cleaner(self): CUSTOM_MGMT_AKS_PREVIEW, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.image_cleaner = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=False, - interval_hours=25, + security_profile.image_cleaner = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=False, + interval_hours=25, + ) ) mc_3 = self.models.ManagedCluster( location="test_location", @@ -5727,9 +6063,11 @@ def test_update_image_cleaner(self): dec_3.context.attach_mc(mc_3) dec_mc_3 = dec_3.update_image_cleaner(mc_3) - ground_truth_image_cleaner_profile_3 = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=25, + ground_truth_image_cleaner_profile_3 = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=25, + ) ) ground_truth_security_profile_3 = self.models.ManagedClusterSecurityProfile( image_cleaner=ground_truth_image_cleaner_profile_3, @@ -5749,9 +6087,11 @@ def test_update_image_cleaner(self): CUSTOM_MGMT_AKS_PREVIEW, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.image_cleaner = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=25, + security_profile.image_cleaner = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=25, + ) ) mc_4 = self.models.ManagedCluster( location="test_location", @@ -5760,9 +6100,11 @@ def test_update_image_cleaner(self): dec_4.context.attach_mc(mc_4) dec_mc_4 = dec_4.update_image_cleaner(mc_4) - ground_truth_image_cleaner_profile_4 = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=False, - interval_hours=25, + ground_truth_image_cleaner_profile_4 = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=False, + interval_hours=25, + ) ) ground_truth_security_profile_4 = self.models.ManagedClusterSecurityProfile( image_cleaner=ground_truth_image_cleaner_profile_4, @@ -5783,9 +6125,11 @@ def test_update_image_cleaner(self): CUSTOM_MGMT_AKS_PREVIEW, ) security_profile = self.models.ManagedClusterSecurityProfile() - security_profile.image_cleaner = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=False, - interval_hours=25, + security_profile.image_cleaner = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=False, + interval_hours=25, + ) ) mc_5 = self.models.ManagedCluster( location="test_location", @@ -5794,9 +6138,11 @@ def test_update_image_cleaner(self): dec_5.context.attach_mc(mc_5) dec_mc_5 = dec_5.update_image_cleaner(mc_5) - ground_truth_image_cleaner_profile_5 = self.models.ManagedClusterSecurityProfileImageCleaner( - enabled=True, - interval_hours=24, + ground_truth_image_cleaner_profile_5 = ( + self.models.ManagedClusterSecurityProfileImageCleaner( + enabled=True, + interval_hours=24, + ) ) ground_truth_security_profile_5 = self.models.ManagedClusterSecurityProfile( image_cleaner=ground_truth_image_cleaner_profile_5, @@ -5824,7 +6170,9 @@ def test_update_azure_keyvault_kms(self): ) self.assertEqual(dec_mc_1, ground_truth_mc_1) - key_id_1 = "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + key_id_1 = ( + "https://fakekeyvault.vault.azure.net/secrets/fakekeyname/fakekeyversion" + ) dec_2 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, @@ -5909,9 +6257,11 @@ def test_update_azure_keyvault_kms(self): dec_mc_6 = dec_6.update_azure_keyvault_kms(mc_6) ground_truth_azure_keyvault_kms_profile_6 = self.models.AzureKeyVaultKms() - ground_truth_azure_keyvault_kms_profile_6.enabled=False + ground_truth_azure_keyvault_kms_profile_6.enabled = False ground_truth_security_profile_6 = self.models.ManagedClusterSecurityProfile() - ground_truth_security_profile_6.azure_key_vault_kms=ground_truth_azure_keyvault_kms_profile_6 + ground_truth_security_profile_6.azure_key_vault_kms = ( + ground_truth_azure_keyvault_kms_profile_6 + ) ground_truth_mc_6 = self.models.ManagedCluster( location="test_location", security_profile=ground_truth_security_profile_6, @@ -5951,18 +6301,29 @@ def test_update_azure_keyvault_kms(self): def test_update_workload_auto_scaler_profile(self): # Throws exception when incorrect mc object is passed. - dec_1 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) - with self.assertRaisesRegex(CLIInternalError, "^Unexpected mc object with type ''\.$"): + dec_1 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) + with self.assertRaisesRegex( + CLIInternalError, r"^Unexpected mc object with type ''\.$" + ): dec_1.update_workload_auto_scaler_profile(None) # Throws exception when the mc object passed does not match the one in context. - dec_2 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) - with self.assertRaisesRegex(CLIInternalError, "^Inconsistent state detected\. The incoming `mc` is not the same as the `mc` in the context\.$"): + dec_2 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) + with self.assertRaisesRegex( + CLIInternalError, + r"^Inconsistent state detected\. The incoming `mc` is not the same as the `mc` in the context\.$", + ): mc_in = self.models.ManagedCluster(location="test_location") dec_2.update_workload_auto_scaler_profile(mc_in) # Leaves profile as None without raw parameters. - dec_3 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + dec_3 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) mc_in = self.models.ManagedCluster(location="test_location") dec_3.context.attach_mc(mc_in) mc_out = dec_3.update_workload_auto_scaler_profile(mc_in) @@ -5970,10 +6331,15 @@ def test_update_workload_auto_scaler_profile(self): self.assertIsNone(mc_out.workload_auto_scaler_profile) # Leaves existing profile untouched without raw parameters. - dec_4 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW) + dec_4 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {}, CUSTOM_MGMT_AKS_PREVIEW + ) profile = self.models.ManagedClusterWorkloadAutoScalerProfile( - keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True)) - mc_in = self.models.ManagedCluster(location="test_location", workload_auto_scaler_profile = profile) + keda=self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) + ) + mc_in = self.models.ManagedCluster( + location="test_location", workload_auto_scaler_profile=profile + ) dec_4.context.attach_mc(mc_in) mc_out = dec_4.update_workload_auto_scaler_profile(mc_in) self.assertEqual(mc_out, mc_in) @@ -5982,7 +6348,9 @@ def test_update_workload_auto_scaler_profile(self): self.assertTrue(mc_out.workload_auto_scaler_profile.keda.enabled) # Enables keda when enable_keda is True. - dec_5 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {"enable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + dec_5 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {"enable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW + ) mc_in = self.models.ManagedCluster(location="test_location") dec_5.context.attach_mc(mc_in) mc_out = dec_5.update_workload_auto_scaler_profile(mc_in) @@ -5992,10 +6360,15 @@ def test_update_workload_auto_scaler_profile(self): self.assertTrue(mc_out.workload_auto_scaler_profile.keda.enabled) # Enables keda in existing profile when enable_keda is True. - dec_6 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {"enable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + dec_6 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {"enable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW + ) profile = self.models.ManagedClusterWorkloadAutoScalerProfile( - keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=False)) - mc_in = self.models.ManagedCluster(location="test_location", workload_auto_scaler_profile = profile) + keda=self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=False) + ) + mc_in = self.models.ManagedCluster( + location="test_location", workload_auto_scaler_profile=profile + ) dec_6.context.attach_mc(mc_in) mc_out = dec_6.update_workload_auto_scaler_profile(mc_in) self.assertEqual(mc_out, mc_in) @@ -6004,7 +6377,9 @@ def test_update_workload_auto_scaler_profile(self): self.assertTrue(mc_out.workload_auto_scaler_profile.keda.enabled) # Disables keda when disable_keda is True. - dec_7 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {"disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + dec_7 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {"disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW + ) mc_in = self.models.ManagedCluster(location="test_location") dec_7.context.attach_mc(mc_in) mc_out = dec_7.update_workload_auto_scaler_profile(mc_in) @@ -6014,10 +6389,15 @@ def test_update_workload_auto_scaler_profile(self): self.assertFalse(mc_out.workload_auto_scaler_profile.keda.enabled) # Disables keda in existing profile when disable_keda is True. - dec_8 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {"disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + dec_8 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, self.client, {"disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW + ) profile = self.models.ManagedClusterWorkloadAutoScalerProfile( - keda = self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True)) - mc_in = self.models.ManagedCluster(location="test_location", workload_auto_scaler_profile = profile) + keda=self.models.ManagedClusterWorkloadAutoScalerProfileKeda(enabled=True) + ) + mc_in = self.models.ManagedCluster( + location="test_location", workload_auto_scaler_profile=profile + ) dec_8.context.attach_mc(mc_in) mc_out = dec_8.update_workload_auto_scaler_profile(mc_in) self.assertEqual(mc_out, mc_in) @@ -6026,7 +6406,12 @@ def test_update_workload_auto_scaler_profile(self): self.assertFalse(mc_out.workload_auto_scaler_profile.keda.enabled) # Throws exception when both enable_keda and disable_keda are True. - dec_9 = AKSPreviewManagedClusterUpdateDecorator(self.cmd, self.client, {"enable_keda": True, "disable_keda": True}, CUSTOM_MGMT_AKS_PREVIEW) + dec_9 = AKSPreviewManagedClusterUpdateDecorator( + self.cmd, + self.client, + {"enable_keda": True, "disable_keda": True}, + CUSTOM_MGMT_AKS_PREVIEW, + ) mc_in = self.models.ManagedCluster(location="test_location") dec_9.context.attach_mc(mc_in) with self.assertRaises(MutuallyExclusiveArgumentError): @@ -6039,17 +6424,13 @@ def test_update_defender(self): self.client, { "enable_defender": True, - "defender_config": get_test_data_file_path( - "defenderconfig.json" - ), + "defender_config": get_test_data_file_path("defenderconfig.json"), }, CUSTOM_MGMT_AKS_PREVIEW, ) mc_1 = self.models.ManagedCluster(location="test_location") dec_1.context.attach_mc(mc_1) - dec_1.context.set_intermediate( - "subscription_id", "test_subscription_id" - ) + dec_1.context.set_intermediate("subscription_id", "test_subscription_id") dec_mc_1 = dec_1.update_defender(mc_1) @@ -6085,9 +6466,7 @@ def test_update_defender(self): ), ) dec_2.context.attach_mc(mc_2) - dec_2.context.set_intermediate( - "subscription_id", "test_subscription_id" - ) + dec_2.context.set_intermediate("subscription_id", "test_subscription_id") dec_mc_2 = dec_2.update_defender(mc_2) @@ -6115,16 +6494,16 @@ def test_update_custom_ca_certificates(self): ) mc_1 = self.models.ManagedCluster(location="test_location") dec_1.context.attach_mc(mc_1) - dec_1.context.set_intermediate( - "subscription_id", "test_subscription_id" - ) + dec_1.context.set_intermediate("subscription_id", "test_subscription_id") dec_mc_1 = dec_1.update_custom_ca_trust_certificates(mc_1) ground_truth_mc_1 = self.models.ManagedCluster( location="test_location", security_profile=self.models.ManagedClusterSecurityProfile( - custom_ca_trust_certificates=[str.encode(CONST_CUSTOM_CA_TEST_CERT) for _ in range(2)] + custom_ca_trust_certificates=[ + str.encode(CONST_CUSTOM_CA_TEST_CERT) for _ in range(2) + ] ), ) self.assertEqual(dec_mc_1, ground_truth_mc_1) @@ -6143,9 +6522,7 @@ def test_update_custom_ca_certificates(self): ), ) dec_2.context.attach_mc(mc_2) - dec_2.context.set_intermediate( - "subscription_id", "test_subscription_id" - ) + dec_2.context.set_intermediate("subscription_id", "test_subscription_id") dec_mc_2 = dec_2.update_custom_ca_trust_certificates(mc_2) @@ -6177,9 +6554,7 @@ def test_update_node_restriction(self): dec_2 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "enable_node_restriction": True - }, + {"enable_node_restriction": True}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_2 = self.models.ManagedCluster(location="test_location") @@ -6189,8 +6564,8 @@ def test_update_node_restriction(self): ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", security_profile=self.models.ManagedClusterSecurityProfile( - node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction( - enabled = True, + node_restriction=self.models.ManagedClusterSecurityProfileNodeRestriction( + enabled=True, ) ), ) @@ -6211,8 +6586,8 @@ def test_update_node_restriction(self): ground_truth_mc_3 = self.models.ManagedCluster( location="test_location", security_profile=self.models.ManagedClusterSecurityProfile( - node_restriction = self.models.ManagedClusterSecurityProfileNodeRestriction( - enabled = False, + node_restriction=self.models.ManagedClusterSecurityProfileNodeRestriction( + enabled=False, ) ), ) @@ -6238,9 +6613,7 @@ def test_update_vpa(self): dec_2 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "enable_vpa": True - }, + {"enable_vpa": True}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_2 = self.models.ManagedCluster(location="test_location") @@ -6250,8 +6623,8 @@ def test_update_vpa(self): ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", workload_auto_scaler_profile=self.models.ManagedClusterWorkloadAutoScalerProfile( - vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( - enabled = True, + vertical_pod_autoscaler=self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( + enabled=True, ) ), ) @@ -6272,10 +6645,10 @@ def test_update_vpa(self): ground_truth_mc_3 = self.models.ManagedCluster( location="test_location", workload_auto_scaler_profile=self.models.ManagedClusterWorkloadAutoScalerProfile( - vertical_pod_autoscaler = self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( - enabled = False, + vertical_pod_autoscaler=self.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( + enabled=False, ) - ) + ), ) self.assertEqual(dec_mc_3, ground_truth_mc_3) @@ -6312,10 +6685,12 @@ def test_update_linux_profile(self): location="test_location", linux_profile=self.models.ContainerServiceLinuxProfile( admin_username="azureuser", - ssh= self.models.ContainerServiceSshConfiguration( - public_keys=[self.models.ContainerServiceSshPublicKey(key_data="test_key")] - ) - ) + ssh=self.models.ContainerServiceSshConfiguration( + public_keys=[ + self.models.ContainerServiceSshPublicKey(key_data="test_key") + ] + ), + ), ) self.assertEqual(dec_mc_1, ground_truth_mc_1) @@ -6329,10 +6704,12 @@ def test_update_linux_profile(self): location="test_location", linux_profile=self.models.ContainerServiceLinuxProfile( admin_username="olduser", - ssh= self.models.ContainerServiceSshConfiguration( - public_keys=[self.models.ContainerServiceSshPublicKey(key_data="old_key")] - ) - ) + ssh=self.models.ContainerServiceSshConfiguration( + public_keys=[ + self.models.ContainerServiceSshPublicKey(key_data="old_key") + ] + ), + ), ) dec_2.context.attach_mc(mc_2) dec_mc_2 = dec_2.update_linux_profile(mc_2) @@ -6340,10 +6717,12 @@ def test_update_linux_profile(self): location="test_location", linux_profile=self.models.ContainerServiceLinuxProfile( admin_username="olduser", - ssh= self.models.ContainerServiceSshConfiguration( - public_keys=[self.models.ContainerServiceSshPublicKey(key_data="new_key")] - ) - ) + ssh=self.models.ContainerServiceSshConfiguration( + public_keys=[ + self.models.ContainerServiceSshPublicKey(key_data="new_key") + ] + ), + ), ) self.assertEqual(dec_mc_2, ground_truth_mc_2) @@ -6351,10 +6730,7 @@ def test_update_service_mesh_profile(self): dec_1 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "enable_azure_service_mesh": True, - "revision": "asm-1-18" - }, + {"enable_azure_service_mesh": True, "revision": "asm-1-18"}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_1 = self.models.ManagedCluster( @@ -6365,11 +6741,8 @@ def test_update_service_mesh_profile(self): ground_truth_mc_1 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-18"] - ) - ) + mode="Istio", istio=self.models.IstioServiceMesh(revisions=["asm-1-18"]) + ), ) self.assertEqual(dec_mc_1, ground_truth_mc_1) @@ -6401,8 +6774,8 @@ def test_update_service_mesh_profile(self): ) ] ) - ) - ) + ), + ), ) self.assertEqual(dec_mc_2, ground_truth_mc_2) @@ -6431,15 +6804,15 @@ def test_update_service_mesh_profile(self): istio=self.models.IstioServiceMesh( certificate_authority=self.models.IstioCertificateAuthority( plugin=self.models.IstioPluginCertificateAuthority( - key_vault_id='/subscriptions/8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8/resourceGroups/foo/providers/Microsoft.KeyVault/vaults/foo', - cert_object_name='my-ca-cert', - key_object_name='my-ca-key', - root_cert_object_name='my-root-cert', - cert_chain_object_name='my-cert-chain', + key_vault_id="/subscriptions/8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8/resourceGroups/foo/providers/Microsoft.KeyVault/vaults/foo", + cert_object_name="my-ca-cert", + key_object_name="my-ca-key", + root_cert_object_name="my-root-cert", + cert_chain_object_name="my-cert-chain", ) ) - ) - ) + ), + ), ) self.assertEqual(dec_mc_3, ground_truth_mc_3) @@ -6466,13 +6839,12 @@ def test_update_service_mesh_profile(self): components=self.models.IstioComponents( egress_gateways=[ self.models.IstioEgressGateway( - enabled=True, - nodeSelector={"istio": "egress"} + enabled=True, nodeSelector={"istio": "egress"} ) ] ) - ) - ) + ), + ), ) self.assertEqual(dec_mc_4, ground_truth_mc_4) @@ -6482,18 +6854,15 @@ def test_update_service_mesh_profile(self): self.client, { "mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_START, - "revision": "asm-1-18" + "revision": "asm-1-18", }, CUSTOM_MGMT_AKS_PREVIEW, ) mc_5 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17"] - ) - ) + mode="Istio", istio=self.models.IstioServiceMesh(revisions=["asm-1-17"]) + ), ) dec_5.context.attach_mc(mc_5) dec_mc_5 = dec_5.update_azure_service_mesh_profile(mc_5) @@ -6501,10 +6870,8 @@ def test_update_service_mesh_profile(self): location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17", "asm-1-18"] - ) - ) + istio=self.models.IstioServiceMesh(revisions=["asm-1-17", "asm-1-18"]), + ), ) self.assertEqual(dec_mc_5, ground_truth_mc_5) @@ -6512,34 +6879,27 @@ def test_update_service_mesh_profile(self): dec_6 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE - }, + {"mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_6 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17", "asm-1-18"] - ) - ) + istio=self.models.IstioServiceMesh(revisions=["asm-1-17", "asm-1-18"]), + ), ) dec_6.context.attach_mc(mc_6) with patch( - "azext_aks_preview.managed_cluster_decorator.prompt_y_n", - return_value=True, + "azext_aks_preview.managed_cluster_decorator.prompt_y_n", + return_value=True, ): dec_mc_6 = dec_6.update_azure_service_mesh_profile(mc_6) ground_truth_mc_6 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-18"] - ) - ) + mode="Istio", istio=self.models.IstioServiceMesh(revisions=["asm-1-18"]) + ), ) self.assertEqual(dec_mc_6, ground_truth_mc_6) @@ -6547,34 +6907,27 @@ def test_update_service_mesh_profile(self): dec_7 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK - }, + {"mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_7 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17", "asm-1-18"] - ) - ) + istio=self.models.IstioServiceMesh(revisions=["asm-1-17", "asm-1-18"]), + ), ) dec_7.context.attach_mc(mc_7) with patch( - "azext_aks_preview.managed_cluster_decorator.prompt_y_n", - return_value=True, + "azext_aks_preview.managed_cluster_decorator.prompt_y_n", + return_value=True, ): dec_mc_7 = dec_7.update_azure_service_mesh_profile(mc_7) ground_truth_mc_7 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17"] - ) - ) + mode="Istio", istio=self.models.IstioServiceMesh(revisions=["asm-1-17"]) + ), ) self.assertEqual(dec_mc_7, ground_truth_mc_7) @@ -6582,19 +6935,14 @@ def test_update_service_mesh_profile(self): dec_8 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK - }, + {"mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_ROLLBACK}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_8 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17"] - ) - ) + mode="Istio", istio=self.models.IstioServiceMesh(revisions=["asm-1-17"]) + ), ) dec_8.context.attach_mc(mc_8) with self.assertRaises(ArgumentUsageError): @@ -6604,19 +6952,14 @@ def test_update_service_mesh_profile(self): dec_9 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE - }, + {"mesh_upgrade_command": CONST_AZURE_SERVICE_MESH_UPGRADE_COMMAND_COMPLETE}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_9 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17"] - ) - ) + mode="Istio", istio=self.models.IstioServiceMesh(revisions=["asm-1-17"]) + ), ) dec_9.context.attach_mc(mc_9) with self.assertRaises(ArgumentUsageError): @@ -6634,11 +6977,8 @@ def test_update_service_mesh_profile(self): mc_10 = self.models.ManagedCluster( location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( - mode="Istio", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17"] - ) - ) + mode="Istio", istio=self.models.IstioServiceMesh(revisions=["asm-1-17"]) + ), ) dec_10.context.attach_mc(mc_10) with self.assertRaises(ArgumentUsageError): @@ -6657,10 +6997,8 @@ def test_update_service_mesh_profile(self): location="test_location", service_mesh_profile=self.models.ServiceMeshProfile( mode="Disabled", - istio=self.models.IstioServiceMesh( - revisions=["asm-1-17"] - ) - ) + istio=self.models.IstioServiceMesh(revisions=["asm-1-17"]), + ), ) dec_10.context.attach_mc(mc_10) with self.assertRaises(ArgumentUsageError): @@ -6682,7 +7020,6 @@ def test_update_service_mesh_profile(self): with self.assertRaises(ArgumentUsageError): dec_11.update_azure_service_mesh_profile(mc_11) - def test_update_upgrade_settings(self): # Should not update mc if unset dec_0 = AKSPreviewManagedClusterUpdateDecorator( @@ -6693,13 +7030,13 @@ def test_update_upgrade_settings(self): ) mc_0 = self.models.ManagedCluster( location="test_location", - upgrade_settings=self.models.ClusterUpgradeSettings() + upgrade_settings=self.models.ClusterUpgradeSettings(), ) dec_0.context.attach_mc(mc_0) dec_mc_0 = dec_0.update_upgrade_settings(mc_0) ground_truth_mc_0 = self.models.ManagedCluster( location="test_location", - upgrade_settings=self.models.ClusterUpgradeSettings() + upgrade_settings=self.models.ClusterUpgradeSettings(), ) self.assertEqual(dec_mc_0, ground_truth_mc_0) @@ -6712,22 +7049,20 @@ def test_update_upgrade_settings(self): mc_1 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( - force_upgrade=True, - until=parse("2023-04-01T13:00:00Z") + override_settings=self.models.UpgradeOverrideSettings( + force_upgrade=True, until=parse("2023-04-01T13:00:00Z") ) - ) + ), ) dec_1.context.attach_mc(mc_1) dec_mc_1 = dec_1.update_upgrade_settings(mc_1) ground_truth_mc_1 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( - force_upgrade=True, - until=parse("2023-04-01T13:00:00Z") + override_settings=self.models.UpgradeOverrideSettings( + force_upgrade=True, until=parse("2023-04-01T13:00:00Z") ) - ) + ), ) self.assertEqual(dec_mc_1, ground_truth_mc_1) @@ -6741,22 +7076,20 @@ def test_update_upgrade_settings(self): mc_2 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( - force_upgrade=True, - until=parse("2099-04-01T13:00:00Z") + override_settings=self.models.UpgradeOverrideSettings( + force_upgrade=True, until=parse("2099-04-01T13:00:00Z") ) - ) + ), ) dec_2.context.attach_mc(mc_2) dec_mc_2 = dec_2.update_upgrade_settings(mc_2) ground_truth_mc_2 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( - force_upgrade=False, - until=parse("2099-04-01T13:00:00Z") + override_settings=self.models.UpgradeOverrideSettings( + force_upgrade=False, until=parse("2099-04-01T13:00:00Z") ) - ) + ), ) self.assertEqual(dec_mc_2, ground_truth_mc_2) @@ -6772,9 +7105,17 @@ def test_update_upgrade_settings(self): ) dec_3.context.attach_mc(mc_3) dec_mc_3 = dec_3.update_upgrade_settings(mc_3) - self.assertEqual(dec_mc_3.upgrade_settings.override_settings.force_upgrade, True) - self.assertGreater(dec_mc_3.upgrade_settings.override_settings.until.timestamp(), (datetime.datetime.utcnow() + datetime.timedelta(days=2)).timestamp()) - self.assertLess(dec_mc_3.upgrade_settings.override_settings.until.timestamp(), (datetime.datetime.utcnow() + datetime.timedelta(days=4)).timestamp()) + self.assertEqual( + dec_mc_3.upgrade_settings.override_settings.force_upgrade, True + ) + self.assertGreater( + dec_mc_3.upgrade_settings.override_settings.until.timestamp(), + (datetime.datetime.utcnow() + datetime.timedelta(days=2)).timestamp(), + ) + self.assertLess( + dec_mc_3.upgrade_settings.override_settings.until.timestamp(), + (datetime.datetime.utcnow() + datetime.timedelta(days=4)).timestamp(), + ) # Set Until dec_4 = AKSPreviewManagedClusterUpdateDecorator( @@ -6786,20 +7127,20 @@ def test_update_upgrade_settings(self): mc_4 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( + override_settings=self.models.UpgradeOverrideSettings( until=parse("2023-01-01T13:00:00Z") ) - ) + ), ) dec_4.context.attach_mc(mc_4) dec_mc_4 = dec_4.update_upgrade_settings(mc_4) ground_truth_mc_4 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( + override_settings=self.models.UpgradeOverrideSettings( until=parse("2023-04-01T13:00:00Z") ) - ) + ), ) self.assertEqual(dec_mc_4, ground_truth_mc_4) @@ -6807,29 +7148,29 @@ def test_update_upgrade_settings(self): dec_5 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - {"enable_force_upgrade": True, - "upgrade_override_until": "2023-04-01T13:00:00Z"}, + { + "enable_force_upgrade": True, + "upgrade_override_until": "2023-04-01T13:00:00Z", + }, CUSTOM_MGMT_AKS_PREVIEW, ) mc_5 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( - force_upgrade=True, - until=parse("2023-05-01T13:00:00Z") + override_settings=self.models.UpgradeOverrideSettings( + force_upgrade=True, until=parse("2023-05-01T13:00:00Z") ) - ) + ), ) dec_5.context.attach_mc(mc_5) dec_mc_5 = dec_5.update_upgrade_settings(mc_5) ground_truth_mc_5 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( - force_upgrade=True, - until=parse("2023-04-01T13:00:00Z") + override_settings=self.models.UpgradeOverrideSettings( + force_upgrade=True, until=parse("2023-04-01T13:00:00Z") ) - ) + ), ) self.assertEqual(dec_mc_5, ground_truth_mc_5) @@ -6842,10 +7183,10 @@ def test_update_upgrade_settings(self): mc_6 = self.models.ManagedCluster( location="test_location", upgrade_settings=self.models.ClusterUpgradeSettings( - override_settings = self.models.UpgradeOverrideSettings( + override_settings=self.models.UpgradeOverrideSettings( until=parse("2023-05-01T13:00:00Z") ) - ) + ), ) dec_6.context.attach_mc(mc_6) with self.assertRaises(InvalidArgumentValueError): @@ -6884,15 +7225,11 @@ def test_enable_disable_cost_analysis(self): dec_6.update_metrics_profile(mc_6) def test_update_app_routing_profile(self): - # enable app routing dec_1 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "enable_app_routing": True, - "enable_kv": False - }, + {"enable_app_routing": True, "enable_kv": False}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_1 = self.models.ManagedCluster( @@ -6914,10 +7251,7 @@ def test_update_app_routing_profile(self): dec_2 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "enable_app_routing": True, - "enable_kv": True - }, + {"enable_app_routing": True, "enable_kv": True}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_2 = self.models.ManagedCluster( @@ -6932,11 +7266,15 @@ def test_update_app_routing_profile(self): enabled=True, ) ), - addon_profiles={CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME: self.models.ManagedClusterAddonProfile( + addon_profiles={ + CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME: self.models.ManagedClusterAddonProfile( enabled=True, - config={CONST_SECRET_ROTATION_ENABLED: "false", CONST_ROTATION_POLL_INTERVAL: "2m"} + config={ + CONST_SECRET_ROTATION_ENABLED: "false", + CONST_ROTATION_POLL_INTERVAL: "2m", + }, ) - } + }, ) self.assertEqual(dec_mc_2, ground_truth_mc_2) @@ -6958,9 +7296,9 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=False, + enabled=False, ) - ) + ), ) self.assertEqual(dec_mc_3, ground_truth_mc_3) # add dns zone resource ids @@ -6969,7 +7307,7 @@ def test_update_app_routing_profile(self): self.client, { "dns_zone_resource_ids": "test_dns_zone_resource_id_1,test_dns_zone_resource_id_2", - "add_dns_zone": True + "add_dns_zone": True, }, CUSTOM_MGMT_AKS_PREVIEW, ) @@ -6977,9 +7315,9 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - ) - ) + enabled=True, + ) + ), ) dec_4.context.attach_mc(mc_4) dec_mc_4 = dec_4.update_app_routing_profile(mc_4) @@ -6987,10 +7325,13 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - dns_zone_resource_ids=["test_dns_zone_resource_id_1","test_dns_zone_resource_id_2"] + enabled=True, + dns_zone_resource_ids=[ + "test_dns_zone_resource_id_1", + "test_dns_zone_resource_id_2", + ], ) - ) + ), ) self.assertEqual(dec_mc_4, ground_truth_mc_4) @@ -7001,7 +7342,7 @@ def test_update_app_routing_profile(self): self.client, { "dns_zone_resource_ids": "test_dns_zone_resource_id_1", - "delete_dns_zone": True + "delete_dns_zone": True, }, CUSTOM_MGMT_AKS_PREVIEW, ) @@ -7009,10 +7350,13 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - dns_zone_resource_ids=["test_dns_zone_resource_id_1","test_dns_zone_resource_id_2"] - ) - ) + enabled=True, + dns_zone_resource_ids=[ + "test_dns_zone_resource_id_1", + "test_dns_zone_resource_id_2", + ], + ) + ), ) dec_5.context.attach_mc(mc_5) dec_mc_5 = dec_5.update_app_routing_profile(mc_5) @@ -7020,10 +7364,9 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - dns_zone_resource_ids=["test_dns_zone_resource_id_2"] + enabled=True, dns_zone_resource_ids=["test_dns_zone_resource_id_2"] ) - ) + ), ) self.assertEqual(dec_mc_5, ground_truth_mc_5) @@ -7033,7 +7376,7 @@ def test_update_app_routing_profile(self): self.client, { "dns_zone_resource_ids": "test_dns_zone_resource_id_3,test_dns_zone_resource_id_4", - "update_dns_zone" :True + "update_dns_zone": True, }, CUSTOM_MGMT_AKS_PREVIEW, ) @@ -7041,10 +7384,13 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - dns_zone_resource_ids=["test_dns_zone_resource_id_1","test_dns_zone_resource_id_2"] - ) - ) + enabled=True, + dns_zone_resource_ids=[ + "test_dns_zone_resource_id_1", + "test_dns_zone_resource_id_2", + ], + ) + ), ) dec_6.context.attach_mc(mc_6) dec_mc_6 = dec_6.update_app_routing_profile(mc_6) @@ -7053,10 +7399,13 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - dns_zone_resource_ids=["test_dns_zone_resource_id_3","test_dns_zone_resource_id_4"] - ) - ) + enabled=True, + dns_zone_resource_ids=[ + "test_dns_zone_resource_id_3", + "test_dns_zone_resource_id_4", + ], + ) + ), ) self.assertEqual(dec_mc_6, ground_truth_mc_6) @@ -7064,19 +7413,20 @@ def test_update_app_routing_profile(self): dec_7 = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "list_dns_zones": True - }, + {"list_dns_zones": True}, CUSTOM_MGMT_AKS_PREVIEW, ) mc_7 = self.models.ManagedCluster( location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - dns_zone_resource_ids=["test_dns_zone_resource_id_1","test_dns_zone_resource_id_2"] - ) - ) + enabled=True, + dns_zone_resource_ids=[ + "test_dns_zone_resource_id_1", + "test_dns_zone_resource_id_2", + ], + ) + ), ) dec_7.context.attach_mc(mc_7) dec_mc_7 = dec_7.update_app_routing_profile(mc_7) @@ -7084,10 +7434,13 @@ def test_update_app_routing_profile(self): location="test_location", ingress_profile=self.models.ManagedClusterIngressProfile( web_app_routing=self.models.ManagedClusterIngressProfileWebAppRouting( - enabled=True, - dns_zone_resource_ids=["test_dns_zone_resource_id_1","test_dns_zone_resource_id_2"] - ) - ) + enabled=True, + dns_zone_resource_ids=[ + "test_dns_zone_resource_id_1", + "test_dns_zone_resource_id_2", + ], + ) + ), ) self.assertEqual(dec_mc_7, ground_truth_mc_7) @@ -7166,7 +7519,9 @@ def test_update_mc_profile_preview(self): ground_truth_network_profile_1 = self.models.ContainerServiceNetworkProfile( load_balancer_sku="standard", ) - ground_truth_identity_1 = self.models.ManagedClusterIdentity(type="SystemAssigned") + ground_truth_identity_1 = self.models.ManagedClusterIdentity( + type="SystemAssigned" + ) ground_truth_identity_profile_1 = { "kubeletidentity": self.models.UserAssignedIdentity( resource_id="test_resource_id", @@ -7191,21 +7546,16 @@ def test_update_mc_profile_preview(self): dec_1.context.raw_param.print_usage_statistics() - def test_setup_supportPlan(self): # default value in `aks_create` ltsDecorator = AKSPreviewManagedClusterCreateDecorator( self.cmd, self.client, - { - "k8s_support_plan": "AKSLongTermSupport" - }, + {"k8s_support_plan": "AKSLongTermSupport"}, CUSTOM_MGMT_AKS_PREVIEW, ) - premiumSKU = self.models.ManagedClusterSKU( - name="Base", - tier="Premium") + premiumSKU = self.models.ManagedClusterSKU(name="Base", tier="Premium") premiumCluster = self.models.ManagedCluster( location="test_location", support_plan=None, @@ -7228,13 +7578,13 @@ def test_setup_supportPlan(self): nonLTSDecorator = AKSPreviewManagedClusterCreateDecorator( self.cmd, self.client, - { - "k8s_support_plan": "KubernetesOfficial" - }, + {"k8s_support_plan": "KubernetesOfficial"}, CUSTOM_MGMT_AKS_PREVIEW, ) nonLTSDecorator.context.attach_mc(premiumCluster) - nonLTSClusterCalculated = nonLTSDecorator.set_up_k8s_support_plan(premiumCluster) + nonLTSClusterCalculated = nonLTSDecorator.set_up_k8s_support_plan( + premiumCluster + ) expectedNonLTSCluster = self.models.ManagedCluster( location="test_location", support_plan="KubernetesOfficial", @@ -7251,9 +7601,7 @@ def test_update_supportPlan(self): CUSTOM_MGMT_AKS_PREVIEW, ) - premiumSKU = self.models.ManagedClusterSKU( - name="Base", - tier="Premium") + premiumSKU = self.models.ManagedClusterSKU(name="Base", tier="Premium") ltsCluster = self.models.ManagedCluster( location="test_location", sku=premiumSKU, @@ -7271,13 +7619,13 @@ def test_update_supportPlan(self): disableLTSDecorator = AKSPreviewManagedClusterUpdateDecorator( self.cmd, self.client, - { - "k8s_support_plan": "KubernetesOfficial" - }, + {"k8s_support_plan": "KubernetesOfficial"}, CUSTOM_MGMT_AKS_PREVIEW, ) disableLTSDecorator.context.attach_mc(ltsCluster) - nonLTSClusterCalculated = disableLTSDecorator.update_k8s_support_plan(ltsCluster) + nonLTSClusterCalculated = disableLTSDecorator.update_k8s_support_plan( + ltsCluster + ) expectedNonLTSCluster = self.models.ManagedCluster( location="test_location", support_plan="KubernetesOfficial", @@ -7287,9 +7635,7 @@ def test_update_supportPlan(self): normalCluster = self.models.ManagedCluster( location="test_location", - sku=self.models.ManagedClusterSKU( - name="Base", - tier="Standard"), + sku=self.models.ManagedClusterSKU(name="Base", tier="Standard"), support_plan="KubernetesOfficial", ) noopDecorator3 = AKSPreviewManagedClusterUpdateDecorator( @@ -7302,5 +7648,6 @@ def test_update_supportPlan(self): normalClusterCalculated = noopDecorator3.update_k8s_support_plan(normalCluster) self.assertEqual(normalClusterCalculated, normalCluster) + if __name__ == "__main__": unittest.main() diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py b/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py index b7156d30378..cfbaed0c7dd 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_validators.py @@ -5,24 +5,26 @@ import unittest from types import SimpleNamespace -from azure.cli.core.util import CLIError +import azext_aks_preview._validators as validators +import azext_aks_preview.azurecontainerstorage._consts as acstor_consts +import azext_aks_preview.azurecontainerstorage._validators as acstor_validator +from azext_aks_preview._consts import ADDONS from azure.cli.core.azclierror import ( ArgumentUsageError, InvalidArgumentValueError, MutuallyExclusiveArgumentError, ) -import azext_aks_preview._validators as validators -from azext_aks_preview._consts import ADDONS -import azext_aks_preview.azurecontainerstorage._validators as acstor_validator -import azext_aks_preview.azurecontainerstorage._consts as acstor_consts +from azure.cli.core.util import CLIError class TestValidateIPRanges(unittest.TestCase): def test_simultaneous_allow_and_disallow_with_spaces(self): api_server_authorized_ip_ranges = " 0.0.0.0/32 , 129.1.1.1.1 " namespace = Namespace(api_server_authorized_ip_ranges) - err = ("Setting --api-server-authorized-ip-ranges to 0.0.0.0/32 is not allowed with other IP ranges." - "Refer to https://aka.ms/aks/whitelist for more details") + err = ( + "Setting --api-server-authorized-ip-ranges to 0.0.0.0/32 is not allowed with other IP ranges." + "Refer to https://aka.ms/aks/whitelist for more details" + ) with self.assertRaises(CLIError) as cm: validators.validate_ip_ranges(namespace) @@ -39,7 +41,7 @@ def test_simultaneous_enable_and_disable_with_spaces(self): self.assertEqual(str(cm.exception), err) def test_disable_authorized_ip_ranges(self): - api_server_authorized_ip_ranges = '' + api_server_authorized_ip_ranges = "" namespace = Namespace(api_server_authorized_ip_ranges) validators.validate_ip_ranges(namespace) @@ -72,7 +74,12 @@ def test_IPv6(self): class Namespace: - def __init__(self, api_server_authorized_ip_ranges=None, cluster_autoscaler_profile=None, kubernetes_version=None): + def __init__( + self, + api_server_authorized_ip_ranges=None, + cluster_autoscaler_profile=None, + kubernetes_version=None, + ): self.api_server_authorized_ip_ranges = api_server_authorized_ip_ranges self.cluster_autoscaler_profile = cluster_autoscaler_profile self.kubernetes_version = kubernetes_version @@ -81,7 +88,7 @@ def __init__(self, api_server_authorized_ip_ranges=None, cluster_autoscaler_prof class TestSubnetId(unittest.TestCase): def test_invalid_subnet_id(self): invalid_vnet_subnet_id = "dummy subnet id" - err = ("--vnet-subnet-id is not a valid Azure resource ID.") + err = "--vnet-subnet-id is not a valid Azure resource ID." with self.assertRaises(CLIError) as cm: validators._validate_subnet_id(invalid_vnet_subnet_id, "--vnet-subnet-id") @@ -120,16 +127,19 @@ def __init__(self, os_type, enable_custom_ca_trust): self.os_type = os_type self.enable_custom_ca_trust = enable_custom_ca_trust + class CustomCATrustCertificatesNamespace: def __init__(self, os_type, custom_ca_trust_certificates): self.os_type = os_type self.custom_ca_trust_certificates = custom_ca_trust_certificates + class DisableWindowsOutboundNatNamespace: def __init__(self, os_type, disable_windows_outbound_nat): self.os_type = os_type self.disable_windows_outbound_nat = disable_windows_outbound_nat + class TestMaxSurge(unittest.TestCase): def test_valid_cases(self): valid = ["5", "33%", "1", "100%"] @@ -139,12 +149,12 @@ def test_valid_cases(self): def test_throws_on_string(self): with self.assertRaises(CLIError) as cm: validators.validate_max_surge(MaxSurgeNamespace("foobar")) - self.assertTrue('int or percentage' in str(cm.exception), msg=str(cm.exception)) + self.assertTrue("int or percentage" in str(cm.exception), msg=str(cm.exception)) def test_throws_on_negative(self): with self.assertRaises(CLIError) as cm: validators.validate_max_surge(MaxSurgeNamespace("-3")) - self.assertTrue('positive' in str(cm.exception), msg=str(cm.exception)) + self.assertTrue("positive" in str(cm.exception), msg=str(cm.exception)) class TestSpotMaxPrice(unittest.TestCase): @@ -156,22 +166,38 @@ def test_valid_cases(self): def test_throws_if_more_than_5(self): with self.assertRaises(CLIError) as cm: validators.validate_spot_max_price(SpotMaxPriceNamespace(5.123456)) - self.assertTrue('--spot_max_price can only include up to 5 decimal places' in str(cm.exception), msg=str(cm.exception)) + self.assertTrue( + "--spot_max_price can only include up to 5 decimal places" + in str(cm.exception), + msg=str(cm.exception), + ) def test_throws_if_non_valid_negative(self): with self.assertRaises(CLIError) as cm: validators.validate_spot_max_price(SpotMaxPriceNamespace(-2)) - self.assertTrue('--spot_max_price can only be any decimal value greater than zero, or -1 which indicates' in str(cm.exception), msg=str(cm.exception)) + self.assertTrue( + "--spot_max_price can only be any decimal value greater than zero, or -1 which indicates" + in str(cm.exception), + msg=str(cm.exception), + ) with self.assertRaises(CLIError) as cm: validators.validate_spot_max_price(SpotMaxPriceNamespace(0)) - self.assertTrue('--spot_max_price can only be any decimal value greater than zero, or -1 which indicates' in str(cm.exception), msg=str(cm.exception)) + self.assertTrue( + "--spot_max_price can only be any decimal value greater than zero, or -1 which indicates" + in str(cm.exception), + msg=str(cm.exception), + ) def test_throws_if_input_max_price_for_regular(self): ns = SpotMaxPriceNamespace(2) ns.priority = "Regular" with self.assertRaises(CLIError) as cm: validators.validate_spot_max_price(ns) - self.assertTrue('--spot_max_price can only be set when --priority is Spot' in str(cm.exception), msg=str(cm.exception)) + self.assertTrue( + "--spot_max_price can only be set when --priority is Spot" + in str(cm.exception), + msg=str(cm.exception), + ) class TestMessageOfTheday(unittest.TestCase): @@ -182,60 +208,115 @@ def test_valid_cases(self): def test_fail_if_os_type_windows(self): with self.assertRaises(CLIError) as cm: - validators.validate_message_of_the_day(MessageOfTheDayNamespace("foo", "Windows")) - self.assertTrue('--message-of-the-day can only be set for linux nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_message_of_the_day( + MessageOfTheDayNamespace("foo", "Windows") + ) + self.assertTrue( + "--message-of-the-day can only be set for linux nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) def test_fail_if_os_type_invalid(self): with self.assertRaises(CLIError) as cm: - validators.validate_message_of_the_day(MessageOfTheDayNamespace("foo", "invalid")) - self.assertTrue('--message-of-the-day can only be set for linux nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_message_of_the_day( + MessageOfTheDayNamespace("foo", "invalid") + ) + self.assertTrue( + "--message-of-the-day can only be set for linux nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) class TestEnableCustomCATrust(unittest.TestCase): def test_pass_if_os_type_linux(self): - validators.validate_enable_custom_ca_trust(EnableCustomCATrustNamespace("Linux", True)) + validators.validate_enable_custom_ca_trust( + EnableCustomCATrustNamespace("Linux", True) + ) def test_fail_if_os_type_windows(self): with self.assertRaises(CLIError) as cm: - validators.validate_enable_custom_ca_trust(EnableCustomCATrustNamespace("Windows", True)) - self.assertTrue('--enable_custom_ca_trust can only be set for Linux nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_enable_custom_ca_trust( + EnableCustomCATrustNamespace("Windows", True) + ) + self.assertTrue( + "--enable_custom_ca_trust can only be set for Linux nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) def test_fail_if_os_type_invalid(self): with self.assertRaises(CLIError) as cm: - validators.validate_enable_custom_ca_trust(EnableCustomCATrustNamespace("invalid", True)) - self.assertTrue('--enable_custom_ca_trust can only be set for Linux nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_enable_custom_ca_trust( + EnableCustomCATrustNamespace("invalid", True) + ) + self.assertTrue( + "--enable_custom_ca_trust can only be set for Linux nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) class TestCustomCATrustCertificates(unittest.TestCase): def test_valid_cases(self): valid = ["foo", ""] for v in valid: - validators.validate_custom_ca_trust_certificates(CustomCATrustCertificatesNamespace("Linux", v)) + validators.validate_custom_ca_trust_certificates( + CustomCATrustCertificatesNamespace("Linux", v) + ) def test_fail_if_os_type_windows(self): with self.assertRaises(CLIError) as cm: - validators.validate_custom_ca_trust_certificates(CustomCATrustCertificatesNamespace("Windows", "foo")) - self.assertTrue('--custom-ca-trust-certificates can only be set for linux nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_custom_ca_trust_certificates( + CustomCATrustCertificatesNamespace("Windows", "foo") + ) + self.assertTrue( + "--custom-ca-trust-certificates can only be set for linux nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) def test_fail_if_os_type_invalid(self): with self.assertRaises(CLIError) as cm: - validators.validate_custom_ca_trust_certificates(CustomCATrustCertificatesNamespace("invalid", "foo")) - self.assertTrue('--custom-ca-trust-certificates can only be set for linux nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_custom_ca_trust_certificates( + CustomCATrustCertificatesNamespace("invalid", "foo") + ) + self.assertTrue( + "--custom-ca-trust-certificates can only be set for linux nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) class TestDisableWindowsOutboundNAT(unittest.TestCase): def test_pass_if_os_type_windows(self): - validators.validate_disable_windows_outbound_nat(DisableWindowsOutboundNatNamespace("Windows", True)) + validators.validate_disable_windows_outbound_nat( + DisableWindowsOutboundNatNamespace("Windows", True) + ) def test_fail_if_os_type_linux(self): with self.assertRaises(CLIError) as cm: - validators.validate_disable_windows_outbound_nat(DisableWindowsOutboundNatNamespace("Linux", True)) - self.assertTrue('--disable-windows-outbound-nat can only be set for Windows nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_disable_windows_outbound_nat( + DisableWindowsOutboundNatNamespace("Linux", True) + ) + self.assertTrue( + "--disable-windows-outbound-nat can only be set for Windows nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) def test_fail_if_os_type_invalid(self): with self.assertRaises(CLIError) as cm: - validators.validate_disable_windows_outbound_nat(DisableWindowsOutboundNatNamespace("invalid", True)) - self.assertTrue('--disable-windows-outbound-nat can only be set for Windows nodepools' in str(cm.exception), msg=str(cm.exception)) + validators.validate_disable_windows_outbound_nat( + DisableWindowsOutboundNatNamespace("invalid", True) + ) + self.assertTrue( + "--disable-windows-outbound-nat can only be set for Windows nodepools" + in str(cm.exception), + msg=str(cm.exception), + ) + class ValidateAddonsNamespace: def __init__(self, addons): @@ -261,7 +342,8 @@ def test_validate_addons(self): midlen = int(len(first_addon) / 2) namespace = ValidateAddonsNamespace( - first_addon[:midlen] + first_addon[midlen + 1:]) + first_addon[:midlen] + first_addon[midlen + 1:] + ) self.assertRaises(CLIError, validators.validate_addons, namespace) def test_no_addon_match(self): @@ -279,7 +361,7 @@ class TestAssignIdentity(unittest.TestCase): def test_invalid_identity_id(self): invalid_identity_id = "dummy identity id" namespace = AssignIdentityNamespace(invalid_identity_id) - err = ("--assign-identity is not a valid Azure resource ID.") + err = "--assign-identity is not a valid Azure resource ID." with self.assertRaises(CLIError) as cm: validators.validate_assign_identity(namespace) @@ -302,37 +384,37 @@ def test_empty_identity_id(self): class PodIdentityNamespace: - def __init__(self, identity_name): self.identity_name = identity_name class TestValidatePodIdentityResourceName(unittest.TestCase): - def test_valid_required_resource_name(self): - validator = validators.validate_pod_identity_resource_name('identity_name', required=True) - namespace = PodIdentityNamespace('test-name') + validator = validators.validate_pod_identity_resource_name( + "identity_name", required=True + ) + namespace = PodIdentityNamespace("test-name") validator(namespace) def test_missing_required_resource_name(self): - validator = validators.validate_pod_identity_resource_name('identity_name', required=True) + validator = validators.validate_pod_identity_resource_name( + "identity_name", required=True + ) namespace = PodIdentityNamespace(None) with self.assertRaises(CLIError) as cm: validator(namespace) - self.assertEqual(str(cm.exception), '--name is required') + self.assertEqual(str(cm.exception), "--name is required") class PodIdentityResourceNamespace: - def __init__(self, namespace): self.namespace = namespace class TestValidatePodIdentityResourceNamespace(unittest.TestCase): - def test_valid_required_resource_name(self): - namespace = PodIdentityResourceNamespace('test-name') + namespace = PodIdentityResourceNamespace("test-name") validators.validate_pod_identity_resource_namespace(namespace) def test_missing_required_resource_name(self): @@ -340,10 +422,10 @@ def test_missing_required_resource_name(self): with self.assertRaises(CLIError) as cm: validators.validate_pod_identity_resource_namespace(namespace) - self.assertEqual(str(cm.exception), '--namespace is required') + self.assertEqual(str(cm.exception), "--namespace is required") -class TestValidateKubernetesVersion(unittest.TestCase): +class TestValidateKubernetesVersion(unittest.TestCase): def test_valid_full_kubernetes_version(self): kubernetes_version = "1.11.8" namespace = Namespace(kubernetes_version=kubernetes_version) @@ -366,8 +448,10 @@ def test_invalid_kubernetes_version(self): kubernetes_version = "1.2.3.4" namespace = Namespace(kubernetes_version=kubernetes_version) - err = ("--kubernetes-version should be the full version number or alias minor version, " - "such as \"1.7.12\" or \"1.7\"") + err = ( + "--kubernetes-version should be the full version number or alias minor version, " + 'such as "1.7.12" or "1.7"' + ) with self.assertRaises(CLIError) as cm: validators.validate_k8s_version(namespace) @@ -381,42 +465,54 @@ def test_invalid_kubernetes_version(self): validators.validate_k8s_version(namespace) self.assertEqual(str(cm.exception), err) -class HostGroupIDNamespace: +class HostGroupIDNamespace: def __init__(self, host_group_id): self.host_group_id = host_group_id + class TestValidateHostGroupID(unittest.TestCase): def test_invalid_host_group_id(self): invalid_host_group_id = "dummy group id" namespace = HostGroupIDNamespace(host_group_id=invalid_host_group_id) - err = ("--host-group-id is not a valid Azure resource ID.") + err = "--host-group-id is not a valid Azure resource ID." with self.assertRaises(CLIError) as cm: validators.validate_host_group_id(namespace) self.assertEqual(str(cm.exception), err) -class AzureKeyVaultKmsKeyIdNamespace: +class AzureKeyVaultKmsKeyIdNamespace: def __init__(self, azure_keyvault_kms_key_id): self.azure_keyvault_kms_key_id = azure_keyvault_kms_key_id + class TestValidateAzureKeyVaultKmsKeyId(unittest.TestCase): def test_invalid_azure_keyvault_kms_key_id_without_https(self): invalid_azure_keyvault_kms_key_id = "dummy key id" - namespace = AzureKeyVaultKmsKeyIdNamespace(azure_keyvault_kms_key_id=invalid_azure_keyvault_kms_key_id) - err = '--azure-keyvault-kms-key-id is not a valid Key Vault key ID. ' \ - 'See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name' + namespace = AzureKeyVaultKmsKeyIdNamespace( + azure_keyvault_kms_key_id=invalid_azure_keyvault_kms_key_id + ) + err = ( + "--azure-keyvault-kms-key-id is not a valid Key Vault key ID. " + "See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name" + ) with self.assertRaises(CLIError) as cm: validators.validate_azure_keyvault_kms_key_id(namespace) self.assertEqual(str(cm.exception), err) def test_invalid_azure_keyvault_kms_key_id_without_key_version(self): - invalid_azure_keyvault_kms_key_id = "https://fakekeyvault.vault.azure.net/keys/fakekeyname" - namespace = AzureKeyVaultKmsKeyIdNamespace(azure_keyvault_kms_key_id=invalid_azure_keyvault_kms_key_id) - err = '--azure-keyvault-kms-key-id is not a valid Key Vault key ID. ' \ - 'See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name' + invalid_azure_keyvault_kms_key_id = ( + "https://fakekeyvault.vault.azure.net/keys/fakekeyname" + ) + namespace = AzureKeyVaultKmsKeyIdNamespace( + azure_keyvault_kms_key_id=invalid_azure_keyvault_kms_key_id + ) + err = ( + "--azure-keyvault-kms-key-id is not a valid Key Vault key ID. " + "See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name" + ) with self.assertRaises(CLIError) as cm: validators.validate_azure_keyvault_kms_key_id(namespace) @@ -424,25 +520,33 @@ def test_invalid_azure_keyvault_kms_key_id_without_key_version(self): def test_invalid_azure_keyvault_kms_key_id_with_wrong_object_type(self): invalid_azure_keyvault_kms_key_id = "https://fakekeyvault.vault.azure.net/secrets/fakesecretname/fakesecretversion" - namespace = AzureKeyVaultKmsKeyIdNamespace(azure_keyvault_kms_key_id=invalid_azure_keyvault_kms_key_id) - err = '--azure-keyvault-kms-key-id is not a valid Key Vault key ID. ' \ - 'See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name' + namespace = AzureKeyVaultKmsKeyIdNamespace( + azure_keyvault_kms_key_id=invalid_azure_keyvault_kms_key_id + ) + err = ( + "--azure-keyvault-kms-key-id is not a valid Key Vault key ID. " + "See https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name" + ) with self.assertRaises(CLIError) as cm: validators.validate_azure_keyvault_kms_key_id(namespace) self.assertEqual(str(cm.exception), err) -class AzureKeyVaultKmsKeyVaultResourceIdNamespace: +class AzureKeyVaultKmsKeyVaultResourceIdNamespace: def __init__(self, azure_keyvault_kms_key_vault_resource_id): - self.azure_keyvault_kms_key_vault_resource_id = azure_keyvault_kms_key_vault_resource_id + self.azure_keyvault_kms_key_vault_resource_id = ( + azure_keyvault_kms_key_vault_resource_id + ) class TestValidateAzureKeyVaultKmsKeyVaultResourceId(unittest.TestCase): def test_invalid_azure_keyvault_kms_key_vault_resource_id(self): invalid_azure_keyvault_kms_key_vault_resource_id = "invalid" - namespace = AzureKeyVaultKmsKeyVaultResourceIdNamespace(azure_keyvault_kms_key_vault_resource_id=invalid_azure_keyvault_kms_key_vault_resource_id) - err = '--azure-keyvault-kms-key-vault-resource-id is not a valid Azure resource ID.' + namespace = AzureKeyVaultKmsKeyVaultResourceIdNamespace( + azure_keyvault_kms_key_vault_resource_id=invalid_azure_keyvault_kms_key_vault_resource_id + ) + err = "--azure-keyvault-kms-key-vault-resource-id is not a valid Azure resource ID." with self.assertRaises(InvalidArgumentValueError) as cm: validators.validate_azure_keyvault_kms_key_vault_resource_id(namespace) @@ -450,7 +554,9 @@ def test_invalid_azure_keyvault_kms_key_vault_resource_id(self): def test_valid_azure_keyvault_kms_key_vault_resource_id(self): valid_azure_keyvault_kms_key_vault_resource_id = "/subscriptions/8ecadfc9-d1a3-4ea4-b844-0d9f87e4d7c8/resourceGroups/foo/providers/Microsoft.KeyVault/vaults/foo" - namespace = AzureKeyVaultKmsKeyVaultResourceIdNamespace(azure_keyvault_kms_key_vault_resource_id=valid_azure_keyvault_kms_key_vault_resource_id) + namespace = AzureKeyVaultKmsKeyVaultResourceIdNamespace( + azure_keyvault_kms_key_vault_resource_id=valid_azure_keyvault_kms_key_vault_resource_id + ) validators.validate_azure_keyvault_kms_key_vault_resource_id(namespace) @@ -463,9 +569,7 @@ def test_invalid_nodepool_name_too_long(self): } ) with self.assertRaises(InvalidArgumentValueError): - validators.validate_nodepool_name( - namespace - ) + validators.validate_nodepool_name(namespace) def test_invalid_agent_pool_name_too_long(self): namespace = SimpleNamespace( @@ -474,9 +578,7 @@ def test_invalid_agent_pool_name_too_long(self): } ) with self.assertRaises(InvalidArgumentValueError): - validators.validate_agent_pool_name( - namespace - ) + validators.validate_agent_pool_name(namespace) def test_invalid_nodepool_name_not_alnum(self): namespace = SimpleNamespace( @@ -485,9 +587,7 @@ def test_invalid_nodepool_name_not_alnum(self): } ) with self.assertRaises(InvalidArgumentValueError): - validators.validate_nodepool_name( - namespace - ) + validators.validate_nodepool_name(namespace) def test_invalid_agent_pool_name_not_alnum(self): namespace = SimpleNamespace( @@ -496,9 +596,7 @@ def test_invalid_agent_pool_name_not_alnum(self): } ) with self.assertRaises(InvalidArgumentValueError): - validators.validate_agent_pool_name( - namespace - ) + validators.validate_agent_pool_name(namespace) def test_valid_nodepool_name(self): namespace = SimpleNamespace( @@ -506,9 +604,7 @@ def test_valid_nodepool_name(self): "nodepool_name": "np100", } ) - validators.validate_nodepool_name( - namespace - ) + validators.validate_nodepool_name(namespace) def test_valid_agent_pool_name(self): namespace = SimpleNamespace( @@ -516,9 +612,7 @@ def test_valid_agent_pool_name(self): "agent_pool_name": "np100", } ) - validators.validate_agent_pool_name( - namespace - ) + validators.validate_agent_pool_name(namespace) class TestValidateAllowedHostPorts(unittest.TestCase): @@ -529,9 +623,7 @@ def test_invalid_allowed_host_ports(self): } ) with self.assertRaises(InvalidArgumentValueError): - validators.validate_allowed_host_ports( - namespace - ) + validators.validate_allowed_host_ports(namespace) def test_valid_allowed_host_ports(self): namespace = SimpleNamespace( @@ -539,9 +631,7 @@ def test_valid_allowed_host_ports(self): "allowed_host_ports": "80/tcp,443/tcp,8080-8090/tcp,53/udp", } ) - validators.validate_allowed_host_ports( - namespace - ) + validators.validate_allowed_host_ports(namespace) class TestValidateApplicationSecurityGroups(unittest.TestCase): @@ -552,9 +642,7 @@ def test_invalid_application_security_groups(self): } ) with self.assertRaises(InvalidArgumentValueError): - validators.validate_application_security_groups( - namespace - ) + validators.validate_application_security_groups(namespace) def test_empty_application_security_groups(self): namespace = SimpleNamespace( @@ -562,23 +650,22 @@ def test_empty_application_security_groups(self): "asg_ids": "", } ) - validators.validate_application_security_groups( - namespace - ) + validators.validate_application_security_groups(namespace) def test_multiple_application_security_groups(self): - asg_ids = ','.join([ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationSecurityGroups/asg1", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/applicationSecurityGroups/asg2", - ]) + asg_ids = ",".join( + [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/applicationSecurityGroups/asg1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/applicationSecurityGroups/asg2", + ] + ) namespace = SimpleNamespace( **{ "asg_ids": asg_ids, } ) - validators.validate_application_security_groups( - namespace - ) + validators.validate_application_security_groups(namespace) + class MaintenanceWindowNameSpace: def __init__(self, utc_offset=None, start_date=None, start_time=None): @@ -586,175 +673,315 @@ def __init__(self, utc_offset=None, start_date=None, start_time=None): self.start_date = start_date self.start_time = start_time + class TestValidateMaintenanceWindow(unittest.TestCase): - def test_invalid_utc_offset(self): + def test_invalid_utc_offset(self): namespace = MaintenanceWindowNameSpace(utc_offset="5:00") err = '--utc-offset must be in format: "+/-HH:mm". For example, "+05:30" and "-12:00".' with self.assertRaises(InvalidArgumentValueError) as cm: validators.validate_utc_offset(namespace) self.assertEqual(str(cm.exception), err) - - def test_valid_utc_offset(self): + + def test_valid_utc_offset(self): namespace = MaintenanceWindowNameSpace(utc_offset="+05:00") validators.validate_utc_offset(namespace) - def test_invalid_start_date(self): + def test_invalid_start_date(self): namespace = MaintenanceWindowNameSpace(start_date="2023/01/01") err = '--start-date must be in format: "yyyy-MM-dd". For example, "2023-01-01".' with self.assertRaises(InvalidArgumentValueError) as cm: validators.validate_start_date(namespace) self.assertEqual(str(cm.exception), err) - - def test_valid_start_datet(self): + + def test_valid_start_datet(self): namespace = MaintenanceWindowNameSpace(start_date="2023-01-01") validators.validate_start_date(namespace) - - def test_invalid_start_time(self): + + def test_invalid_start_time(self): namespace = MaintenanceWindowNameSpace(start_time="3am") - err = '--start-time must be in format "HH:mm". For example, "09:30" and "17:00".' + err = ( + '--start-time must be in format "HH:mm". For example, "09:30" and "17:00".' + ) with self.assertRaises(InvalidArgumentValueError) as cm: validators.validate_start_time(namespace) self.assertEqual(str(cm.exception), err) - - def test_valid_start_time(self): + + def test_valid_start_time(self): namespace = MaintenanceWindowNameSpace(start_date="00:30") validators.validate_start_time(namespace) class TestValidateAzureContainerStorage(unittest.TestCase): def test_conflicting_flags_for_enable_disable(self): - err = 'Conflicting flags. Cannot set --enable-azure-container-storage '\ - 'and --disable-azure-container-storage together.' + err = ( + "Conflicting flags. Cannot set --enable-azure-container-storage " + "and --disable-azure-container-storage together." + ) with self.assertRaises(MutuallyExclusiveArgumentError) as cm: - acstor_validator.validate_azure_container_storage_params(True, True, None, None, None, None, None, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, True, None, None, None, None, None, None, None, False + ) self.assertEqual(str(cm.exception), err) def test_disable_when_extension_not_installed(self): is_extension_installed = False - err = 'Invalid usage of --disable-azure-container-storage. '\ - 'Azure Container Storage is not enabled on the cluster. ' \ - 'Aborting disabling of Azure Container Storage.' + err = ( + "Invalid usage of --disable-azure-container-storage. " + "Azure Container Storage is not enabled on the cluster. " + "Aborting disabling of Azure Container Storage." + ) with self.assertRaises(InvalidArgumentValueError) as cm: - acstor_validator.validate_azure_container_storage_params(None, True, None, None, None, None, None, None, None, is_extension_installed) + acstor_validator.validate_azure_container_storage_params( + None, + True, + None, + None, + None, + None, + None, + None, + None, + is_extension_installed, + ) self.assertEqual(str(cm.exception), err) def test_disable_flag_with_storage_pool_name(self): storage_pool_name = "pool-name" - err = 'Conflicting flags. Cannot define --storage-pool-name value '\ - 'when --disable-azure-container-storage is set.' + err = ( + "Conflicting flags. Cannot define --storage-pool-name value " + "when --disable-azure-container-storage is set." + ) with self.assertRaises(MutuallyExclusiveArgumentError) as cm: - acstor_validator.validate_azure_container_storage_params(None, True, storage_pool_name, None, None, None, None, None, None, True) + acstor_validator.validate_azure_container_storage_params( + None, True, storage_pool_name, None, None, None, None, None, None, True + ) self.assertEqual(str(cm.exception), err) def test_disable_flag_with_storage_pool_sku(self): storage_pool_sku = acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUM_LRS - err = 'Conflicting flags. Cannot define --storage-pool-sku value ' \ - 'when --disable-azure-container-storage is set.' + err = ( + "Conflicting flags. Cannot define --storage-pool-sku value " + "when --disable-azure-container-storage is set." + ) with self.assertRaises(MutuallyExclusiveArgumentError) as cm: - acstor_validator.validate_azure_container_storage_params(None, True, None, None, storage_pool_sku, None, None, None, None, True) + acstor_validator.validate_azure_container_storage_params( + None, True, None, None, storage_pool_sku, None, None, None, None, True + ) self.assertEqual(str(cm.exception), err) def test_disable_flag_with_storage_pool_size(self): storage_pool_size = "5Gi" - err = 'Conflicting flags. Cannot define --storage-pool-size value ' \ - 'when --disable-azure-container-storage is set.' + err = ( + "Conflicting flags. Cannot define --storage-pool-size value " + "when --disable-azure-container-storage is set." + ) with self.assertRaises(MutuallyExclusiveArgumentError) as cm: - acstor_validator.validate_azure_container_storage_params(None, True, None, None, None, None, storage_pool_size, None, None, True) + acstor_validator.validate_azure_container_storage_params( + None, True, None, None, None, None, storage_pool_size, None, None, True + ) self.assertEqual(str(cm.exception), err) def test_disable_flag_with_storage_pool_option(self): storage_pool_option = acstor_consts.CONST_STORAGE_POOL_OPTION_NVME - err = 'Conflicting flags. Cannot define --storage-pool-option value ' \ - 'when --disable-azure-container-storage is set.' + err = ( + "Conflicting flags. Cannot define --storage-pool-option value " + "when --disable-azure-container-storage is set." + ) with self.assertRaises(MutuallyExclusiveArgumentError) as cm: - acstor_validator.validate_azure_container_storage_params(None, True, None, None, None, storage_pool_option, None, None, None, True) + acstor_validator.validate_azure_container_storage_params( + None, + True, + None, + None, + None, + storage_pool_option, + None, + None, + None, + True, + ) self.assertEqual(str(cm.exception), err) def test_disable_flag_with_nodepool_list(self): nodepool_list = "test,test1" - err = 'Conflicting flags. Cannot define --azure-container-storage-nodepools value ' \ - 'when --disable-azure-container-storage is set.' + err = ( + "Conflicting flags. Cannot define --azure-container-storage-nodepools value " + "when --disable-azure-container-storage is set." + ) with self.assertRaises(MutuallyExclusiveArgumentError) as cm: - acstor_validator.validate_azure_container_storage_params(None, True, None, None, None, None, None, nodepool_list, None, True) + acstor_validator.validate_azure_container_storage_params( + None, True, None, None, None, None, None, nodepool_list, None, True + ) self.assertEqual(str(cm.exception), err) def test_valid_disable(self): - acstor_validator.validate_azure_container_storage_params(None, True, None, None, None, None, None, None, None, True) + acstor_validator.validate_azure_container_storage_params( + None, True, None, None, None, None, None, None, None, True + ) def test_enable_when_extension_installed(self): is_extension_installed = True - err = 'Invalid usage of --enable-azure-container-storage. '\ - 'Azure Container Storage is already enabled on the cluster. ' \ - 'Aborting installation of Azure Container Storage.' + err = ( + "Invalid usage of --enable-azure-container-storage. " + "Azure Container Storage is already enabled on the cluster. " + "Aborting installation of Azure Container Storage." + ) with self.assertRaises(InvalidArgumentValueError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, None, None, None, None, None, None, None, is_extension_installed) + acstor_validator.validate_azure_container_storage_params( + True, + None, + None, + None, + None, + None, + None, + None, + None, + is_extension_installed, + ) self.assertEqual(str(cm.exception), err) def test_enable_with_invalid_storage_pool_name(self): storage_pool_name = "my_test_pool" - err = "Invalid --storage-pool-name value. " \ - "Accepted values are lowercase alphanumeric characters, " \ - "'-' or '.', and must start and end with an alphanumeric character." + err = ( + "Invalid --storage-pool-name value. " + "Accepted values are lowercase alphanumeric characters, " + "'-' or '.', and must start and end with an alphanumeric character." + ) with self.assertRaises(InvalidArgumentValueError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, None, None, None, None, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, None, storage_pool_name, None, None, None, None, None, None, False + ) self.assertEqual(str(cm.exception), err) def test_enable_with_sku_and_ephemeral_disk_pool(self): storage_pool_name = "valid-name" storage_pool_sku = acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUM_LRS storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK - err = 'Cannot set --storage-pool-sku when --enable-azure-container-storage is ephemeralDisk.' + err = "Cannot set --storage-pool-sku when --enable-azure-container-storage is ephemeralDisk." with self.assertRaises(ArgumentUsageError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, storage_pool_sku, None, None, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + storage_pool_sku, + None, + None, + None, + None, + False, + ) self.assertEqual(str(cm.exception), err) def test_enable_with_sku_and_elastic_san_pool(self): storage_pool_name = "valid-name" storage_pool_sku = acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUMV2_LRS storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_ELASTIC_SAN - supported_skus = acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUM_LRS + ", " + \ - acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUM_ZRS - err = 'Invalid --storage-pool-sku value. ' \ - 'Supported value for --storage-pool-sku are {0} ' \ - 'when --enable-azure-container-storage is set to elasticSan.' \ - .format(supported_skus) + supported_skus = ( + acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUM_LRS + + ", " + + acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUM_ZRS + ) + err = ( + "Invalid --storage-pool-sku value. " + "Supported value for --storage-pool-sku are {0} " + "when --enable-azure-container-storage is set to elasticSan.".format( + supported_skus + ) + ) with self.assertRaises(ArgumentUsageError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, storage_pool_sku, None, None, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + storage_pool_sku, + None, + None, + None, + None, + False, + ) self.assertEqual(str(cm.exception), err) def test_enable_with_option_and_non_ephemeral_disk_pool(self): storage_pool_name = "valid-name" storage_pool_option = acstor_consts.CONST_STORAGE_POOL_OPTION_NVME storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_AZURE_DISK - err = 'Cannot set --storage-pool-option when --enable-azure-container-storage is not ephemeralDisk.' + err = "Cannot set --storage-pool-option when --enable-azure-container-storage is not ephemeralDisk." with self.assertRaises(ArgumentUsageError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, None, storage_pool_option, None, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + None, + storage_pool_option, + None, + None, + None, + False, + ) self.assertEqual(str(cm.exception), err) def test_enable_with_ssd_option_and_ephemeral_disk_pool(self): storage_pool_name = "valid-name" storage_pool_option = acstor_consts.CONST_STORAGE_POOL_OPTION_SSD storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK - err = '--storage-pool-option Temp storage (SSD) currently not supported.' + err = "--storage-pool-option Temp storage (SSD) currently not supported." with self.assertRaises(ArgumentUsageError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, None, storage_pool_option, None, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + None, + storage_pool_option, + None, + None, + None, + False, + ) self.assertEqual(str(cm.exception), err) def test_enable_with_invalid_storage_pool_size(self): storage_pool_name = "valid-name" storage_pool_size = "5" - err = 'Value for --storage-pool-size should be defined with size followed by Gi or Ti e.g. 512Gi or 2Ti.' + err = "Value for --storage-pool-size should be defined with size followed by Gi or Ti e.g. 512Gi or 2Ti." with self.assertRaises(ArgumentUsageError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, None, None, None, storage_pool_size, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + None, + None, + None, + storage_pool_size, + None, + None, + False, + ) self.assertEqual(str(cm.exception), err) def test_enable_with_invalid_size_for_esan_storage_pool(self): storage_pool_name = "valid-name" storage_pool_size = "512Gi" storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_ELASTIC_SAN - err = 'Value for --storage-pool-size must be at least 1Ti when --enable-azure-container-storage is elasticSan.' + err = "Value for --storage-pool-size must be at least 1Ti when --enable-azure-container-storage is elasticSan." with self.assertRaises(ArgumentUsageError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, None, None, storage_pool_size, None, None, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + None, + None, + storage_pool_size, + None, + None, + False, + ) self.assertEqual(str(cm.exception), err) def test_invalid_comma_separated_nodepool_list(self): @@ -762,43 +989,79 @@ def test_invalid_comma_separated_nodepool_list(self): storage_pool_name = "valid-name" storage_pool_size = "5Ti" storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK - storage_pool_option = acstor_consts.CONST_STORAGE_POOL_OPTION_NVME - err = "Invalid --azure-container-storage-nodepools value. " \ - "Accepted value is a comma separated string of valid nodepool " \ - "names without any spaces.\nA valid nodepool name may only contain lowercase " \ + err = ( + "Invalid --azure-container-storage-nodepools value. " + "Accepted value is a comma separated string of valid nodepool " + "names without any spaces.\nA valid nodepool name may only contain lowercase " "alphanumeric characters and must begin with a lowercase letter." + ) with self.assertRaises(InvalidArgumentValueError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, None, None, storage_pool_size, nodepool_list, None, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + None, + None, + storage_pool_size, + nodepool_list, + None, + False, + ) self.assertEqual(str(cm.exception), err) def test_missing_nodepool_from_cluster_nodepool_list_single(self): storage_pool_name = "valid-name" storage_pool_size = "5Ti" storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK - storage_pool_option = acstor_consts.CONST_STORAGE_POOL_OPTION_NVME nodepool_list = "pool1" agentpools = ["nodepool1"] - err = 'Nodepool: pool1 not found. Please provide a comma separated ' \ - 'string of existing nodepool names in --azure-container-storage-nodepools.' \ - '\nNodepool available in the cluster is: nodepool1.' \ - '\nAborting installation of Azure Container Storage.' + err = ( + "Nodepool: pool1 not found. Please provide a comma separated " + "string of existing nodepool names in --azure-container-storage-nodepools." + "\nNodepool available in the cluster is: nodepool1." + "\nAborting installation of Azure Container Storage." + ) with self.assertRaises(InvalidArgumentValueError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, None, None, storage_pool_size, nodepool_list, agentpools, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + None, + None, + storage_pool_size, + nodepool_list, + agentpools, + False, + ) self.assertEqual(str(cm.exception), err) def test_missing_nodepool_from_cluster_nodepool_list_multiple(self): storage_pool_name = "valid-name" storage_pool_size = "5Ti" storage_pool_type = acstor_consts.CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK - storage_pool_option = acstor_consts.CONST_STORAGE_POOL_OPTION_NVME nodepool_list = "pool1,pool2" agentpools = ["nodepool1", "nodepool2"] - err = 'Nodepool: pool1 not found. Please provide a comma separated ' \ - 'string of existing nodepool names in --azure-container-storage-nodepools.' \ - '\nNodepools available in the cluster are: nodepool1, nodepool2.' \ - '\nAborting installation of Azure Container Storage.' + err = ( + "Nodepool: pool1 not found. Please provide a comma separated " + "string of existing nodepool names in --azure-container-storage-nodepools." + "\nNodepools available in the cluster are: nodepool1, nodepool2." + "\nAborting installation of Azure Container Storage." + ) with self.assertRaises(InvalidArgumentValueError) as cm: - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, None, None, storage_pool_size, nodepool_list, agentpools, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + None, + None, + storage_pool_size, + nodepool_list, + agentpools, + False, + ) self.assertEqual(str(cm.exception), err) def test_valid_enable_for_azure_disk_pool(self): @@ -808,7 +1071,18 @@ def test_valid_enable_for_azure_disk_pool(self): storage_pool_sku = acstor_consts.CONST_STORAGE_POOL_SKU_PREMIUM_LRS nodepool_list = "nodepool1,nodepool2" agentpools = ["nodepool1", "nodepool2"] - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, storage_pool_sku, None, storage_pool_size, nodepool_list, agentpools, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + storage_pool_sku, + None, + storage_pool_size, + nodepool_list, + agentpools, + False, + ) def test_valid_enable_for_ephemeral_disk_pool(self): storage_pool_name = "valid-name" @@ -817,7 +1091,18 @@ def test_valid_enable_for_ephemeral_disk_pool(self): storage_pool_option = acstor_consts.CONST_STORAGE_POOL_OPTION_NVME nodepool_list = "nodepool1" agentpools = ["nodepool1", "nodepool2"] - acstor_validator.validate_azure_container_storage_params(True, None, storage_pool_name, storage_pool_type, None, storage_pool_option, storage_pool_size, nodepool_list, agentpools, False) + acstor_validator.validate_azure_container_storage_params( + True, + None, + storage_pool_name, + storage_pool_type, + None, + storage_pool_option, + storage_pool_size, + nodepool_list, + agentpools, + False, + ) if __name__ == "__main__":