From 33ec455f2abe229f99ba8b825ba8687dbb7e4c49 Mon Sep 17 00:00:00 2001 From: Ace Eldeib Date: Tue, 28 Sep 2021 22:08:04 -0400 Subject: [PATCH 01/10] add workload runtime support for aks (#3896) * wip wasm * don't run live tests due to feature registration * fix: typos, align consts, rerecord test. * history: bump version for new features * bump version in setup.py --- src/aks-preview/HISTORY.md | 5 + .../configs/ext_matrix_default.json | 3 +- src/aks-preview/azext_aks_preview/_consts.py | 3 + src/aks-preview/azext_aks_preview/_help.py | 10 +- src/aks-preview/azext_aks_preview/_params.py | 7 +- src/aks-preview/azext_aks_preview/custom.py | 8 +- ...ks_nodepool_add_with_workload_runtime.yaml | 1123 +++++++++++++++++ .../tests/latest/test_aks_commands.py | 36 + src/aks-preview/setup.py | 2 +- 9 files changed, 1191 insertions(+), 6 deletions(-) create mode 100644 src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_workload_runtime.yaml diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md index 234fe468edc..503904cfa4d 100644 --- a/src/aks-preview/HISTORY.md +++ b/src/aks-preview/HISTORY.md @@ -2,6 +2,11 @@ Release History =============== +0.5.34 ++++++ +* Add support for WASM nodepools (`--workload-runtime WasmWasi`) in `az aks create` +and `az aks nodepool add` + 0.5.33 +++++ * Add support for new addon commands diff --git a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json index 66e196e0634..68d63ea8074 100644 --- a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json @@ -33,7 +33,8 @@ "test_aks_enable_monitoring_with_aad_auth_msi", "test_aks_enable_monitoring_with_aad_auth_uai", "test_aks_create_and_update_with_managed_nat_gateway_outbound", - "test_aks_create_with_http_proxy_config" + "test_aks_create_with_http_proxy_config", + "test_aks_nodepool_add_with_workload_runtime" ] } } diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 85617802999..5055ac33fc4 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -100,5 +100,8 @@ CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME: '- enable Azure Keyvault Secrets Provider addon (PREVIEW).' } +CONST_WORKLOAD_RUNTIME_OCI_CONTAINER = "OCIContainer" +CONST_WORKLOAD_RUNTIME_WASM_WASI = "WasmWasi" + CONST_MANAGED_IDENTITY_OPERATOR_ROLE = 'Managed Identity Operator' CONST_MANAGED_IDENTITY_OPERATOR_ROLE_ID = 'f1a07417-d97a-45cb-824c-7a7467783830' diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index b9f8ea5c808..3a919143f25 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -352,6 +352,9 @@ - name: --disable-local-accounts type: bool short-summary: (Preview) If set to true, getting static credential will be disabled for this cluster. + - name: --workload-runtime + type: string + short-summary: Determines the type of workload a node can run. Defaults to OCIContainer. examples: - name: Create a Kubernetes cluster with an existing SSH public key. text: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey @@ -936,13 +939,18 @@ - name: --enable-ultra-ssd type: bool short-summary: Enable UltraSSD on agent node pool. + - name: --workload-runtime + type: string + short-summary: Determines the type of workload a node can run. Defaults to OCIContainer. examples: - name: Create a nodepool in an existing AKS cluster with ephemeral os enabled. text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48 - name: Create a nodepool with EncryptionAtHost enabled. text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --enable-encryption-at-host - - name: Create a nodepool cluster with a specific os-sku + - name: Create a nodepool with a specific os-sku text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --os-sku Ubuntu + - name: Create a nodepool which can run wasm workloads. + text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --workload-runtime WasmWasi """ helps['aks nodepool scale'] = """ diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 8d7a30422af..f6d2f54a098 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -30,7 +30,10 @@ CONST_SCALE_DOWN_MODE_DELETE, CONST_SCALE_DOWN_MODE_DEALLOCATE, \ CONST_NODEPOOL_MODE_SYSTEM, CONST_NODEPOOL_MODE_USER, \ CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL, \ - CONST_RAPID_UPGRADE_CHANNEL, CONST_STABLE_UPGRADE_CHANNEL, CONST_PATCH_UPGRADE_CHANNEL, CONST_NODE_IMAGE_UPGRADE_CHANNEL, CONST_NONE_UPGRADE_CHANNEL + CONST_RAPID_UPGRADE_CHANNEL, CONST_STABLE_UPGRADE_CHANNEL, CONST_PATCH_UPGRADE_CHANNEL, CONST_NODE_IMAGE_UPGRADE_CHANNEL, CONST_NONE_UPGRADE_CHANNEL, \ + CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, CONST_WORKLOAD_RUNTIME_WASM_WASI + +workload_runtimes = [CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, CONST_WORKLOAD_RUNTIME_WASM_WASI] def load_arguments(self, _): @@ -141,6 +144,7 @@ def load_arguments(self, _): c.argument('assign_kubelet_identity', type=str, validator=validate_assign_kubelet_identity) c.argument('disable_local_accounts', action='store_true') c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') + c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) with self.argument_context('aks update') as c: c.argument('enable_cluster_autoscaler', options_list=["--enable-cluster-autoscaler", "-e"], action='store_true') @@ -233,6 +237,7 @@ def load_arguments(self, _): c.argument('linux_os_config', type=str) c.argument('enable_encryption_at_host', options_list=['--enable-encryption-at-host'], action='store_true') c.argument('enable_ultra_ssd', action='store_true') + c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) for scope in ['aks nodepool show', 'aks nodepool delete', 'aks nodepool scale', 'aks nodepool upgrade', 'aks nodepool update']: with self.argument_context(scope) as c: diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index e90472cb7ab..8f746371a09 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -809,6 +809,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to disable_local_accounts=False, no_wait=False, assign_kubelet_identity=None, + workload_runtime=None, yes=False): if not no_ssh_key: try: @@ -868,7 +869,8 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to enable_encryption_at_host=enable_encryption_at_host, enable_ultra_ssd=enable_ultra_ssd, max_pods=int(max_pods) if max_pods else None, - type=vm_set_type + type=vm_set_type, + workload_runtime=workload_runtime ) if node_osdisk_size: @@ -2375,6 +2377,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local linux_os_config=None, enable_encryption_at_host=False, enable_ultra_ssd=False, + workload_runtime=None, no_wait=False): instances = client.list(resource_group_name, cluster_name) for agentpool_profile in instances: @@ -2428,7 +2431,8 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local upgrade_settings=upgradeSettings, enable_encryption_at_host=enable_encryption_at_host, enable_ultra_ssd=enable_ultra_ssd, - mode=mode + mode=mode, + workload_runtime=workload_runtime ) if priority == CONST_SCALE_SET_PRIORITY_SPOT: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_workload_runtime.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_workload_runtime.yaml new file mode 100644 index 00000000000..cc76dd8724d --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_workload_runtime.yaml @@ -0,0 +1,1123 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.10 (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-09-18T00:21:32Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '312' + content-type: + - application/json; charset=utf-8 + date: + - Sat, 18 Sep 2021 00:21:37 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitest56wh5p3r7-8ecadf", + "agentPoolProfiles": [{"count": 1, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "OCIContainer", "osType": "Linux", "type": "VirtualMachineScaleSets", "mode": + "System", "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": + "Delete", "spotMaxPrice": -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": + false, "enableFIPS": false, "name": "c000003"}], "linuxProfile": {"adminUsername": + "azureuser", "ssh": {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "disableLocalAccounts": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1716' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitest56wh5p3r7-8ecadf\",\n \"fqdn\": + \"cliakstest-clitest56wh5p3r7-8ecadf-488b62d8.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": + \"cliakstest-clitest56wh5p3r7-8ecadf-488b62d8.portal.hcp.eastus.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"c000003\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": + \"OCIContainer\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_eastus\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": + false,\n \"publicNetworkAccess\": \"Enabled\"\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '3100' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:21:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b12e51fa-03f2-c24d-831b-d07c046d903e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:21:45.4833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:22:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b12e51fa-03f2-c24d-831b-d07c046d903e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:21:45.4833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:22:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b12e51fa-03f2-c24d-831b-d07c046d903e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:21:45.4833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:23:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b12e51fa-03f2-c24d-831b-d07c046d903e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:21:45.4833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:23:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b12e51fa-03f2-c24d-831b-d07c046d903e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:21:45.4833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:24:16 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 --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b12e51fa-03f2-c24d-831b-d07c046d903e\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:21:45.4833333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:24:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/fa512eb1-f203-4dc2-831b-d07c046d903e?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b12e51fa-03f2-c24d-831b-d07c046d903e\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-18T00:21:45.4833333Z\",\n \"endTime\": + \"2021-09-18T00:24:49.0226343Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:25:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitest56wh5p3r7-8ecadf\",\n \"fqdn\": + \"cliakstest-clitest56wh5p3r7-8ecadf-488b62d8.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": + \"cliakstest-clitest56wh5p3r7-8ecadf-488b62d8.portal.hcp.eastus.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"c000003\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"workloadRuntime\": + \"OCIContainer\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n + \ \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": + \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": + \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_eastus\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.Network/publicIPAddresses/d6d20b29-713b-4605-b38e-02aadb11534f\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"publicNetworkAccess\": + \"Enabled\"\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3761' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:25:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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/agentPools?api-version=2021-08-01 + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/c000003\",\n + \ \"name\": \"c000003\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n \"enableFIPS\": false\n + \ }\n }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '968' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:25:16 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: '{"properties": {"count": 3, "vmSize": "Standard_DS2_v2", "workloadRuntime": + "WasmWasi", "osType": "Linux", "scaleDownMode": "Delete", "mode": "User", "upgradeSettings": + {}, "enableNodePublicIP": false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": + "Delete", "spotMaxPrice": -1.0, "nodeTaints": [], "enableEncryptionAtHost": + false, "enableUltraSSD": false, "enableFIPS": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + Content-Length: + - '388' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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/agentPools/c000004?api-version=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/c000004\",\n + \ \"name\": \"c000004\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"WasmWasi\",\n \"maxPods\": 110,\n \"type\": + \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"User\",\n \"enableEncryptionAtHost\": + false,\n \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n + \ \"upgradeSettings\": {},\n \"enableFIPS\": false\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '938' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:25:18 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"ce5a98ab-e30b-2d48-9dd2-a1d9ed228cf7\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:25:19.3Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:25:48 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"ce5a98ab-e30b-2d48-9dd2-a1d9ed228cf7\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:25:19.3Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:26:19 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"ce5a98ab-e30b-2d48-9dd2-a1d9ed228cf7\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:25:19.3Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:26:49 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"ce5a98ab-e30b-2d48-9dd2-a1d9ed228cf7\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:25:19.3Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:27:19 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"ce5a98ab-e30b-2d48-9dd2-a1d9ed228cf7\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:25:19.3Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:27:49 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"ce5a98ab-e30b-2d48-9dd2-a1d9ed228cf7\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-18T00:25:19.3Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '120' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:28:19 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/ab985ace-0be3-482d-9dd2-a1d9ed228cf7?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"ce5a98ab-e30b-2d48-9dd2-a1d9ed228cf7\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-18T00:25:19.3Z\",\n \"endTime\": + \"2021-09-18T00:28:40.8267107Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '164' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:28:49 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --workload-runtime + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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/agentPools/c000004?api-version=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/c000004\",\n + \ \"name\": \"c000004\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 3,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"workloadRuntime\": \"WasmWasi\",\n \"maxPods\": 110,\n \"type\": + \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"User\",\n \"enableEncryptionAtHost\": + false,\n \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n + \ \"upgradeSettings\": {},\n \"enableFIPS\": false\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '939' + content-type: + - application/json + date: + - Sat, 18 Sep 2021 00:28:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes --no-wait + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/8597bd94-f4b9-4e41-bd45-04dddd51e959?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '0' + date: + - Sat, 18 Sep 2021 00:28:50 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operationresults/8597bd94-f4b9-4e41-bd45-04dddd51e959?api-version=2017-08-31 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 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 0fef10a61eb..e98f16a88b1 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 @@ -1287,6 +1287,42 @@ def test_aks_create_with_ossku(self, resource_group, resource_group_location): # 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'), + ]) + + # 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') diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index f29915dfbdb..d511f6deaf6 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -8,7 +8,7 @@ from codecs import open as open1 from setuptools import setup, find_packages -VERSION = "0.5.33" +VERSION = "0.5.34" CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From 4c4c89765cb055887d1bc530f31620dbca83ae1a Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Wed, 29 Sep 2021 13:43:06 +0800 Subject: [PATCH 02/10] [Release] Update index.json for extension [ aks-preview ] (#3928) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=1118858 Last commit: https://github.com/Azure/azure-cli-extensions/commit/33ec455f2abe229f99ba8b825ba8687dbb7e4c49 --- src/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/index.json b/src/index.json index 4d29e45b966..5526aadd304 100644 --- a/src/index.json +++ b/src/index.json @@ -3691,6 +3691,49 @@ "version": "0.5.33" }, "sha256Digest": "a087c366a73df27aa0950067649a75cfb08432e331f95d497915e62c5291f59e" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-0.5.34-py2.py3-none-any.whl", + "filename": "aks_preview-0.5.34-py2.py3-none-any.whl", + "metadata": { + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.0.49", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "azpycli@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aks-preview" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "aks-preview", + "summary": "Provides a preview for upcoming AKS features", + "version": "0.5.34" + }, + "sha256Digest": "32a00c0a498ca140540ffd4a33685cbf9f188bee23c9b75d47a12ca342420102" } ], "alertsmanagement": [ From 207b7c5cd61f700c190273713f523a906fef4c0e Mon Sep 17 00:00:00 2001 From: FumingZhang <81607949+FumingZhang@users.noreply.github.com> Date: Wed, 29 Sep 2021 14:38:26 +0800 Subject: [PATCH 03/10] {AKS} Exclude several test cases which need feature registration (#3927) * exclude several test cases which need feature registration * update matrix --- .../azcli_aks_live_test/configs/cli_matrix_default.json | 8 +++++++- .../azcli_aks_live_test/configs/ext_matrix_default.json | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json index 19f1a7137a5..8237bcafc86 100644 --- a/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json @@ -5,10 +5,16 @@ ] }, "exclude": { + "compatibility issue": [ + "test_aks_nodepool_add_with_ossku" + ], "need additional feature": [ "test_aks_create_enable_encryption", "test_aks_create_edge_zone", - "test_aks_create_with_auto_upgrade_channel" + "test_aks_create_with_auto_upgrade_channel", + "test_aks_create_with_openservicemesh_addon", + "test_aks_enable_openservicemesh_addon", + "test_aks_disable_openservicemesh_addon" ] } } \ No newline at end of file diff --git a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json index 68d63ea8074..647c5b0b390 100644 --- a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json @@ -5,6 +5,10 @@ ] }, "exclude": { + "compatibility issue": [ + "test_aks_nodepool_add_with_ossku", + "test_aks_create_with_ossku" + ], "need additional feature": [ "test_aks_create_with_azurekeyvaultsecretsprovider_addon", "test_aks_create_addon_with_azurekeyvaultsecretsprovider_with_secret_rotation", From 0277e855470c260ce4fb8a2ef34e8c4d4842aa52 Mon Sep 17 00:00:00 2001 From: Dejan Gregor Date: Thu, 30 Sep 2021 11:56:59 +0100 Subject: [PATCH 04/10] Missing space when concat the msg lines, sentence too long (#3930) Current: This node image upgrade operation will run across every node pool in the clusterand might take a while, do you wish to continue Proposed: This node image upgrade operation will run across every node pool in the cluster and might take a while. Do you wish to continue --- src/aks-preview/azext_aks_preview/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 8f746371a09..d5f1c17e10d 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -2019,8 +2019,8 @@ def aks_upgrade(cmd, # pylint: disable=unused-argument, too-many-return-state 'If you only want to upgrade the node version please use the "--node-image-only" option only.') if node_image_only: - msg = "This node image upgrade operation will run across every node pool in the cluster" \ - "and might take a while, do you wish to continue?" + msg = "This node image upgrade operation will run across every node pool in the cluster " \ + "and might take a while. Do you wish to continue?" if not yes and not prompt_y_n(msg, default="n"): return None From 995397c84c03d9554cbbbabc37fa12d6daeb2419 Mon Sep 17 00:00:00 2001 From: Ace Eldeib Date: Sat, 2 Oct 2021 01:36:46 -0400 Subject: [PATCH 05/10] implement aks gpu instance profile (#3895) * implement aks gpu instance profile * exclude test from live run due to feature registration * wrap enum opts with variable * fix bad merge * fix ordering --- .../configs/ext_matrix_default.json | 3 +- src/aks-preview/azext_aks_preview/_consts.py | 6 + src/aks-preview/azext_aks_preview/_help.py | 6 + src/aks-preview/azext_aks_preview/_params.py | 4 + src/aks-preview/azext_aks_preview/custom.py | 8 +- ...odepool_add_with_gpu_instance_profile.yaml | 2178 +++++++++++++++++ .../tests/latest/test_aks_commands.py | 39 + 7 files changed, 2241 insertions(+), 3 deletions(-) create mode 100644 src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_gpu_instance_profile.yaml diff --git a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json index 647c5b0b390..1dd699cfdaa 100644 --- a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json @@ -38,7 +38,8 @@ "test_aks_enable_monitoring_with_aad_auth_uai", "test_aks_create_and_update_with_managed_nat_gateway_outbound", "test_aks_create_with_http_proxy_config", - "test_aks_nodepool_add_with_workload_runtime" + "test_aks_nodepool_add_with_workload_runtime", + "test_aks_nodepool_add_with_gpu_instance_profile" ] } } diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 5055ac33fc4..b0447732a88 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -105,3 +105,9 @@ CONST_MANAGED_IDENTITY_OPERATOR_ROLE = 'Managed Identity Operator' CONST_MANAGED_IDENTITY_OPERATOR_ROLE_ID = 'f1a07417-d97a-45cb-824c-7a7467783830' + +CONST_GPU_INSTANCE_PROFILE_MIG1_G = "MIG1g" +CONST_GPU_INSTANCE_PROFILE_MIG2_G = "MIG2g" +CONST_GPU_INSTANCE_PROFILE_MIG3_G = "MIG3g" +CONST_GPU_INSTANCE_PROFILE_MIG4_G = "MIG4g" +CONST_GPU_INSTANCE_PROFILE_MIG7_G = "MIG7g" diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 3a919143f25..190ea2b5eda 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -355,6 +355,9 @@ - name: --workload-runtime type: string short-summary: Determines the type of workload a node can run. Defaults to OCIContainer. + - name: --gpu-instance-profile + type: string + short-summary: GPU instance profile to partition multi-gpu Nvidia GPUs. examples: - name: Create a Kubernetes cluster with an existing SSH public key. text: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey @@ -942,6 +945,9 @@ - name: --workload-runtime type: string short-summary: Determines the type of workload a node can run. Defaults to OCIContainer. + - name: --gpu-instance-profile + type: string + short-summary: GPU instance profile to partition multi-gpu Nvidia GPUs. examples: - name: Create a nodepool in an existing AKS cluster with ephemeral os enabled. text: az aks nodepool add -g MyResourceGroup -n nodepool1 --cluster-name MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48 diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index f6d2f54a098..2d989a25fa3 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -32,8 +32,10 @@ CONST_OS_DISK_TYPE_MANAGED, CONST_OS_DISK_TYPE_EPHEMERAL, \ CONST_RAPID_UPGRADE_CHANNEL, CONST_STABLE_UPGRADE_CHANNEL, CONST_PATCH_UPGRADE_CHANNEL, CONST_NODE_IMAGE_UPGRADE_CHANNEL, CONST_NONE_UPGRADE_CHANNEL, \ CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, CONST_WORKLOAD_RUNTIME_WASM_WASI +from ._consts import CONST_GPU_INSTANCE_PROFILE_MIG1_G, CONST_GPU_INSTANCE_PROFILE_MIG2_G, CONST_GPU_INSTANCE_PROFILE_MIG3_G, CONST_GPU_INSTANCE_PROFILE_MIG4_G, CONST_GPU_INSTANCE_PROFILE_MIG7_G workload_runtimes = [CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, CONST_WORKLOAD_RUNTIME_WASM_WASI] +gpu_instance_profiles = [CONST_GPU_INSTANCE_PROFILE_MIG1_G, CONST_GPU_INSTANCE_PROFILE_MIG2_G, CONST_GPU_INSTANCE_PROFILE_MIG3_G, CONST_GPU_INSTANCE_PROFILE_MIG4_G, CONST_GPU_INSTANCE_PROFILE_MIG7_G] def load_arguments(self, _): @@ -143,6 +145,7 @@ def load_arguments(self, _): c.argument('enable_secret_rotation', action='store_true') c.argument('assign_kubelet_identity', type=str, validator=validate_assign_kubelet_identity) c.argument('disable_local_accounts', action='store_true') + c.argument('gpu_instance_profile', arg_type=get_enum_type(gpu_instance_profiles)) c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true') c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) @@ -238,6 +241,7 @@ def load_arguments(self, _): c.argument('enable_encryption_at_host', options_list=['--enable-encryption-at-host'], action='store_true') c.argument('enable_ultra_ssd', action='store_true') c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) + c.argument('gpu_instance_profile', arg_type=get_enum_type(gpu_instance_profiles)) for scope in ['aks nodepool show', 'aks nodepool delete', 'aks nodepool scale', 'aks nodepool upgrade', 'aks nodepool update']: with self.argument_context(scope) as c: diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index d5f1c17e10d..daa6699175e 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -810,6 +810,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to no_wait=False, assign_kubelet_identity=None, workload_runtime=None, + gpu_instance_profile=None, yes=False): if not no_ssh_key: try: @@ -870,7 +871,8 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to enable_ultra_ssd=enable_ultra_ssd, max_pods=int(max_pods) if max_pods else None, type=vm_set_type, - workload_runtime=workload_runtime + workload_runtime=workload_runtime, + gpu_instance_profile=gpu_instance_profile ) if node_osdisk_size: @@ -2378,6 +2380,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local enable_encryption_at_host=False, enable_ultra_ssd=False, workload_runtime=None, + gpu_instance_profile=None, no_wait=False): instances = client.list(resource_group_name, cluster_name) for agentpool_profile in instances: @@ -2432,7 +2435,8 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local enable_encryption_at_host=enable_encryption_at_host, enable_ultra_ssd=enable_ultra_ssd, mode=mode, - workload_runtime=workload_runtime + workload_runtime=workload_runtime, + gpu_instance_profile=gpu_instance_profile ) if priority == CONST_SCALE_SET_PRIORITY_SPOT: diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_gpu_instance_profile.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_gpu_instance_profile.yaml new file mode 100644 index 00000000000..d1ac180a09f --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_nodepool_add_with_gpu_instance_profile.yaml @@ -0,0 +1,2178 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-resource/19.0.0 Python/3.8.10 (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001?api-version=2021-04-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001","name":"clitest000001","type":"Microsoft.Resources/resourceGroups","location":"eastus","tags":{"product":"azurecli","cause":"automation","date":"2021-09-16T00:23:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '312' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 16 Sep 2021 00:23:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitest5weoyd52e-8ecadf", + "agentPoolProfiles": [{"count": 1, "vmSize": "Standard_DS2_v2", "osType": "Linux", + "type": "VirtualMachineScaleSets", "mode": "System", "enableNodePublicIP": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "enableEncryptionAtHost": false, "enableUltraSSD": false, "enableFIPS": + false, "name": "c000003"}], "linuxProfile": {"adminUsername": "azureuser", "ssh": + {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\n"}]}}, "addonProfiles": {}, "enableRBAC": true, "enablePodSecurityPolicy": + false, "networkProfile": {"networkPlugin": "kubenet", "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", "dnsServiceIP": "10.0.0.10", "dockerBridgeCidr": + "172.17.0.1/16", "outboundType": "loadBalancer", "loadBalancerSku": "standard"}, + "disableLocalAccounts": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1681' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitest5weoyd52e-8ecadf\",\n \"fqdn\": + \"cliakstest-clitest5weoyd52e-8ecadf-3030d47c.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": + \"cliakstest-clitest5weoyd52e-8ecadf-3030d47c.portal.hcp.eastus.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"c000003\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_eastus\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n }\n },\n \"podCidr\": + \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": + \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": + \"loadBalancer\"\n },\n \"maxAgentPools\": 100,\n \"disableLocalAccounts\": + false,\n \"publicNetworkAccess\": \"Enabled\"\n },\n \"identity\": {\n + \ \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/e3a819a3-efb8-4315-8ee1-12c44ec06fd4?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '3060' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:23:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/e3a819a3-efb8-4315-8ee1-12c44ec06fd4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"a319a8e3-b8ef-1543-8ee1-12c44ec06fd4\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:23:14.5033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:23:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/e3a819a3-efb8-4315-8ee1-12c44ec06fd4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"a319a8e3-b8ef-1543-8ee1-12c44ec06fd4\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:23:14.5033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:24:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/e3a819a3-efb8-4315-8ee1-12c44ec06fd4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"a319a8e3-b8ef-1543-8ee1-12c44ec06fd4\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:23:14.5033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:24:43 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 --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/e3a819a3-efb8-4315-8ee1-12c44ec06fd4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"a319a8e3-b8ef-1543-8ee1-12c44ec06fd4\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:23:14.5033333Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:25:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/e3a819a3-efb8-4315-8ee1-12c44ec06fd4?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"a319a8e3-b8ef-1543-8ee1-12c44ec06fd4\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-16T00:23:14.5033333Z\",\n \"endTime\": + \"2021-09-16T00:25:36.9906943Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:25:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --nodepool-name -c --ssh-key-value + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002\",\n + \ \"location\": \"eastus\",\n \"name\": \"cliakstest000002\",\n \"type\": + \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": + \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": + \"1.20.9\",\n \"dnsPrefix\": \"cliakstest-clitest5weoyd52e-8ecadf\",\n \"fqdn\": + \"cliakstest-clitest5weoyd52e-8ecadf-3030d47c.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": + \"cliakstest-clitest5weoyd52e-8ecadf-3030d47c.portal.hcp.eastus.azmk8s.io\",\n + \ \"agentPoolProfiles\": [\n {\n \"name\": \"c000003\",\n \"count\": + 1,\n \"vmSize\": \"Standard_DS2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": + \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 110,\n + \ \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"System\",\n + \ \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n \"enableFIPS\": false\n + \ }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAACAQCbIg1guRHbI0lV11wWDt1r2cUdcNd27CJsg+SfgC7miZeubtwUhbsPdhMQsfDyhOWHq1+ZL0M+nJZV63d/1dhmhtgyOqejUwrPlzKhydsbrsdUor+JmNJDdW01v7BXHyuymT8G4s09jCasNOwiufbP/qp72ruu0bIA1nySsvlf9pCQAuFkAnVnf/rFhUlOkhtRpwcq8SUNY2zRHR/EKb/4NWY1JzR4sa3q2fWIJdrrX0DvLoa5g9bIEd4Df79ba7v+yiUBOS0zT2ll+z4g9izHK3EO5d8hL4jYxcjKs+wcslSYRWrascfscLgMlMGh0CdKeNTDjHpGPncaf3Z+FwwwjWeuiNBxv7bJo13/8B/098KlVDl4GZqsoBCEjPyJfV6hO0y/LkRGkk7oHWKgeWAfKtfLItRp00eZ4fcJNK9kCaSMmEugoZWcI7NGbZXzqFWqbpRI7NcDP9+WIQ+i9U5vqWsqd/zng4kbuAJ6UuKqIzB0upYrLShfQE3SAck8oaLhJqqq56VfDuASNpJKidV+zq27HfSBmbXnkR/5AK337dc3MXKJypoK/QPMLKUAP5XLPbs+NddJQV7EZXd29DLgp+fRIg3edpKdO7ZErWhv7d+3Kws+e1Y+ypmR2WIVSwVyBEUfgv2C8Ts9gnTF4pNcEY/S2aBicz5Ew2+jdyGNQQ== + test@example.com\\n\"\n }\n ]\n }\n },\n \"servicePrincipalProfile\": + {\n \"clientId\":\"00000000-0000-0000-0000-000000000001\"\n },\n \"nodeResourceGroup\": + \"MC_clitest000001_cliakstest000002_eastus\",\n \"enableRBAC\": true,\n + \ \"enablePodSecurityPolicy\": false,\n \"networkProfile\": {\n \"networkPlugin\": + \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": + {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": + [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.Network/publicIPAddresses/c9761d84-3ac3-4181-a87b-f7fe1e929d55\"\n + \ }\n ]\n },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": + \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": + \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\"\n },\n \"maxAgentPools\": + 100,\n \"identityProfile\": {\n \"kubeletidentity\": {\n \"resourceId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\",\n + \ \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\":\"00000000-0000-0000-0000-000000000001\"\n + \ }\n },\n \"disableLocalAccounts\": false,\n \"publicNetworkAccess\": + \"Enabled\"\n },\n \"identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\",\n + \ \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\": + {\n \"name\": \"Basic\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '3721' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:25:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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/agentPools?api-version=2021-08-01 + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/c000003\",\n + \ \"name\": \"c000003\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_DS2_v2\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": + \"OS\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": + \"Running\"\n },\n \"orchestratorVersion\": \"1.20.9\",\n \"enableNodePublicIP\": + false,\n \"mode\": \"System\",\n \"enableEncryptionAtHost\": false,\n + \ \"enableUltraSSD\": false,\n \"osType\": \"Linux\",\n \"osSKU\": + \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804gen2containerd-2021.09.03\",\n + \ \"enableFIPS\": false\n }\n }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '928' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:25:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"count": 1, "vmSize": "standard_nd96asr_v4", "osType": + "Linux", "scaleDownMode": "Delete", "mode": "User", "upgradeSettings": {}, "enableNodePublicIP": + false, "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "enableEncryptionAtHost": false, "enableUltraSSD": false, + "enableFIPS": false, "gpuInstanceProfile": "MIG3g"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + Content-Length: + - '392' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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/agentPools/c000004?api-version=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/c000004\",\n + \ \"name\": \"c000004\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"standard_nd96asr_v4\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Ephemeral\",\n \"kubeletDiskType\": + \"OS\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Creating\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"User\",\n \"enableEncryptionAtHost\": + false,\n \"enableUltraSSD\": false,\n \"gpuInstanceProfile\": \"MIG3g\",\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2gpucontainerd-2021.09.03\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '947' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:25:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:26:16 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:26:47 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:27:17 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:27:47 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:28:18 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:28:47 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:29:17 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:29:47 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:30:18 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:30:48 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:31:17 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:31:48 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:32:18 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:32:48 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:33:18 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:33:48 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:34:18 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:34:48 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:35:18 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:35:49 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:36:18 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:36:48 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:37:19 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:37:49 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:38:19 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:38:49 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:39:19 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"InProgress\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '121' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:39:49 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/a2847b5f-dec5-43df-9c91-6fa2985fef15?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"5f7b84a2-c5de-df43-9c91-6fa2985fef15\",\n \"status\": + \"Succeeded\",\n \"startTime\": \"2021-09-16T00:25:47.74Z\",\n \"endTime\": + \"2021-09-16T00:40:17.5727724Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '165' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:40:19 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 nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --gpu-instance-profile -c --aks-custom-headers + --node-vm-size + UseGPUDedicatedVHD: + - 'true' + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.2.0 Python/3.8.10 + (Linux-5.8.0-1041-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/agentPools/c000004?api-version=2021-08-01 + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/c000004\",\n + \ \"name\": \"c000004\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n + \ \"properties\": {\n \"count\": 1,\n \"vmSize\": \"standard_nd96asr_v4\",\n + \ \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Ephemeral\",\n \"kubeletDiskType\": + \"OS\",\n \"maxPods\": 110,\n \"type\": \"VirtualMachineScaleSets\",\n + \ \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Succeeded\",\n + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": + \"1.20.9\",\n \"enableNodePublicIP\": false,\n \"mode\": \"User\",\n \"enableEncryptionAtHost\": + false,\n \"enableUltraSSD\": false,\n \"gpuInstanceProfile\": \"MIG3g\",\n + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": + \"AKSUbuntu-1804gen2gpucontainerd-2021.09.03\",\n \"upgradeSettings\": {},\n + \ \"enableFIPS\": false\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '948' + content-type: + - application/json + date: + - Thu, 16 Sep 2021 00:40:25 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --yes --no-wait + User-Agent: + - AZURECLI/2.28.1 azsdk-python-azure-mgmt-containerservice/16.1.0 Python/3.8.10 + (Linux-5.8.0-1041-azure-x86_64-with-glibc2.29) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2021-07-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d3df1c0f-d6ab-42e5-961f-3930c2bbdd61?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 16 Sep 2021 00:40:26 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operationresults/d3df1c0f-d6ab-42e5-961f-3930c2bbdd61?api-version=2017-08-31 + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 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 e98f16a88b1..327e437644a 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 @@ -1360,6 +1360,45 @@ def test_aks_nodepool_add_with_ossku(self, resource_group, resource_group_locati 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_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'), + ]) + + # 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_nodepool_get_upgrades(self, resource_group, resource_group_location): From d867f98f134db21e115fd4dce38d5ff3cc9ee347 Mon Sep 17 00:00:00 2001 From: Atharva Mulmuley Date: Tue, 5 Oct 2021 03:18:13 -0700 Subject: [PATCH 06/10] Arc Platform GA changes (#3880) * replaced existing GA sdk with 2021-10-01 GA sdk * removed aio, made changes for listclusteruser, moved proxy command to ga * added track-2 sdk * made changes to use v1.3.016682 of CSP and tested the changes on windows * updated csp to 1.3.017131 * updated history.srt and setup.py * lint fix * changed csp storage endpoint to cdn * updated HISTORY.srt * updated setup.py * disabled proxy command in fairfax and bumped version to 1.2.0 * added exception telemetry * minor --- src/connectedk8s/HISTORY.rst | 7 + .../azext_connectedk8s/_constants.py | 9 +- .../azext_connectedk8s/commands.py | 4 +- src/connectedk8s/azext_connectedk8s/custom.py | 15 +- .../vendored_sdks/_configuration.py | 2 +- .../vendored_sdks/_metadata.json | 104 ------------ .../vendored_sdks/_version.py | 2 +- .../vendored_sdks/models/__init__.py | 14 ++ .../_connected_kubernetes_client_enums.py | 7 + .../vendored_sdks/models/_models.py | 141 ++++++++++++++++- .../vendored_sdks/models/_models_py3.py | 148 +++++++++++++++++- .../_connected_cluster_operations.py | 105 +++++++++++-- .../vendored_sdks/operations/_operations.py | 2 +- .../azext_connectedk8s/vendored_sdks/py.typed | 1 - src/connectedk8s/setup.py | 2 +- 15 files changed, 417 insertions(+), 146 deletions(-) delete mode 100644 src/connectedk8s/azext_connectedk8s/vendored_sdks/_metadata.json delete mode 100644 src/connectedk8s/azext_connectedk8s/vendored_sdks/py.typed diff --git a/src/connectedk8s/HISTORY.rst b/src/connectedk8s/HISTORY.rst index 63f1d0ef81d..f4e4636f31f 100644 --- a/src/connectedk8s/HISTORY.rst +++ b/src/connectedk8s/HISTORY.rst @@ -2,6 +2,13 @@ Release History =============== +1.2.0 +++++++ + +* Updated CSP version to 1.3.017131 +* Updated GA SDK to 2021-10-01 +* Updated CSP endpoint to CDN +* Disabled proxy command in fairfax 1.1.11 ++++++ diff --git a/src/connectedk8s/azext_connectedk8s/_constants.py b/src/connectedk8s/azext_connectedk8s/_constants.py index 273473b921a..2e8791c17c8 100644 --- a/src/connectedk8s/azext_connectedk8s/_constants.py +++ b/src/connectedk8s/azext_connectedk8s/_constants.py @@ -111,16 +111,17 @@ Cannot_Create_ClusterRoleBindings_Fault_Type = 'Cannot create cluster role bindings on this Kubernets cluster' CC_Provider_Namespace_Not_Registered_Fault_Type = "Connected Cluster Provider MS.K8 namespace not registered" Default_Namespace_Does_Not_Exist_Fault_Type = "The default namespace defined in the kubeconfig doesn't exist on the kubernetes cluster." -CLIENT_PROXY_VERSION = '1.1.0' +ClusterConnect_Not_Present_Fault_Type = "cluster-connect-feature-unavailable" +CLIENT_PROXY_VERSION = '1.3.017131' API_SERVER_PORT = 47011 CLIENT_PROXY_PORT = 47010 CLIENTPROXY_CLIENT_ID = '04b07795-8ddb-461a-bbee-02f9e1bf7b46' API_CALL_RETRIES = 200 DEFAULT_REQUEST_TIMEOUT = 10 # seconds -RELEASE_DATE_WINDOWS = 'release12-03-21' -RELEASE_DATE_LINUX = 'release12-03-21' +RELEASE_DATE_WINDOWS = 'release13-09-21' +RELEASE_DATE_LINUX = 'release13-09-21' CSP_REFRESH_TIME = 300 # URL constants -CSP_Storage_Url = "https://k8sconnectcsp.blob.core.windows.net" +CSP_Storage_Url = "https://k8sconnectcsp.azureedge.net" HELM_STORAGE_URL = "https://k8connecthelm.azureedge.net" HELM_VERSION = 'v3.6.3' diff --git a/src/connectedk8s/azext_connectedk8s/commands.py b/src/connectedk8s/azext_connectedk8s/commands.py index 6c79422d655..fdd90e19442 100644 --- a/src/connectedk8s/azext_connectedk8s/commands.py +++ b/src/connectedk8s/azext_connectedk8s/commands.py @@ -29,6 +29,8 @@ def load_command_table(self, _): g.custom_command('disable-features', 'disable_features', is_preview=True) g.custom_command('list', 'list_connectedk8s', table_transformer=connectedk8s_list_table_format) g.custom_show_command('show', 'get_connectedk8s', table_transformer=connectedk8s_show_table_format) + g.custom_command('proxy', 'client_side_proxy_wrapper') with self.command_group('connectedk8s', connectedk8s_sdk_prev, client_factory=cf_connected_cluster_prev_2021_04_01) as g: - g.custom_command('proxy', 'client_side_proxy_wrapper', is_preview=True) + pass + # use this block for using preview sdk client for a command diff --git a/src/connectedk8s/azext_connectedk8s/custom.py b/src/connectedk8s/azext_connectedk8s/custom.py index ce43e94a003..6cc93b252d9 100644 --- a/src/connectedk8s/azext_connectedk8s/custom.py +++ b/src/connectedk8s/azext_connectedk8s/custom.py @@ -41,8 +41,7 @@ import azext_connectedk8s._constants as consts import azext_connectedk8s._utils as utils from glob import glob -from .vendored_sdks.models import ConnectedCluster, ConnectedClusterIdentity -from .vendored_sdks.preview_2021_04_01.models import ListClusterUserCredentialsProperties +from .vendored_sdks.models import ConnectedCluster, ConnectedClusterIdentity, ListClusterUserCredentialProperties from threading import Timer, Thread import sys import hashlib @@ -1599,11 +1598,17 @@ def client_side_proxy_wrapper(cmd, context_name=None, api_server_port=consts.API_SERVER_PORT): + cloud = send_cloud_telemetry(cmd) + if cloud == consts.Azure_USGovCloudName: + telemetry.set_debug_info('User tried proxy command in fairfax') + telemetry.set_exception(exception='Proxy command is not present yet in fairfax cloud.', fault_type=consts.ClusterConnect_Not_Present_Fault_Type, + summary=f'User tried proxy command in fairfax.') + raise ClientRequestError(f'Cluster Connect feature is not yet available in {consts.Azure_USGovCloudName}') + client_proxy_port = consts.CLIENT_PROXY_PORT if int(client_proxy_port) == int(api_server_port): raise ClientRequestError('Proxy uses port 47010 internally.', recommendation='Please pass some other unused port through --port option.') - cloud = send_cloud_telemetry(cmd) args = [] operating_system = platform.system() proc_name = f'arcProxy{operating_system}' @@ -1852,11 +1857,11 @@ def client_side_proxy(cmd, # Fetching hybrid connection details from Userrp try: - list_prop = ListClusterUserCredentialsProperties( + list_prop = ListClusterUserCredentialProperties( authentication_method=auth_method, client_proxy=True ) - response = client.list_cluster_user_credentials(resource_group_name, cluster_name, list_prop) + response = client.list_cluster_user_credential(resource_group_name, cluster_name, list_prop) except Exception as e: if flag == 1: clientproxy_process.terminate() diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/_configuration.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/_configuration.py index 94b86be667a..e19d63e4e4c 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/_configuration.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-hybridkubernetes/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/_metadata.json b/src/connectedk8s/azext_connectedk8s/vendored_sdks/_metadata.json deleted file mode 100644 index f76dc3a23ee..00000000000 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/_metadata.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "chosen_version": "2021-03-01", - "total_api_version_list": ["2021-03-01"], - "client": { - "name": "ConnectedKubernetesClient", - "filename": "_connected_kubernetes_client", - "description": "Azure Connected Cluster Resource Provider API for adopting any Kubernetes Cluster.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ConnectedKubernetesClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ConnectedKubernetesClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "The ID of the target subscription.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "connected_cluster": "ConnectedClusterOperations", - "operations": "Operations" - } -} \ No newline at end of file diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/_version.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/_version.py index c47f66669f1..e5754a47ce6 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/_version.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py index 2c3091d2c8b..85af76a7c2f 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/__init__.py @@ -11,9 +11,13 @@ from ._models_py3 import ConnectedClusterIdentity from ._models_py3 import ConnectedClusterList from ._models_py3 import ConnectedClusterPatch + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import HybridConnectionConfig + from ._models_py3 import ListClusterUserCredentialProperties from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationList @@ -25,9 +29,13 @@ from ._models import ConnectedClusterIdentity # type: ignore from ._models import ConnectedClusterList # type: ignore from ._models import ConnectedClusterPatch # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import HybridConnectionConfig # type: ignore + from ._models import ListClusterUserCredentialProperties # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationList # type: ignore @@ -36,6 +44,7 @@ from ._models import TrackedResource # type: ignore from ._connected_kubernetes_client_enums import ( + AuthenticationMethod, ConnectivityStatus, CreatedByType, LastModifiedByType, @@ -48,15 +57,20 @@ 'ConnectedClusterIdentity', 'ConnectedClusterList', 'ConnectedClusterPatch', + 'CredentialResult', + 'CredentialResults', 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', + 'HybridConnectionConfig', + 'ListClusterUserCredentialProperties', 'Operation', 'OperationDisplay', 'OperationList', 'Resource', 'SystemData', 'TrackedResource', + 'AuthenticationMethod', 'ConnectivityStatus', 'CreatedByType', 'LastModifiedByType', diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_connected_kubernetes_client_enums.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_connected_kubernetes_client_enums.py index 84f185bf193..a58b19c6b6c 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_connected_kubernetes_client_enums.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_connected_kubernetes_client_enums.py @@ -26,6 +26,13 @@ def __getattr__(cls, name): raise AttributeError(name) +class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The mode of client authentication. + """ + + TOKEN = "Token" + AAD = "AAD" + class ConnectivityStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represents the connectivity status of the connected cluster. """ diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models.py index 030d3aba956..5d3e787ba82 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models.py @@ -281,12 +281,12 @@ class ConnectedClusterPatch(msrest.serialization.Model): :type tags: dict[str, str] :param properties: Describes the connected cluster resource properties that can be updated during PATCH operation. - :type properties: str + :type properties: any """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( @@ -298,6 +298,67 @@ def __init__( self.properties = kwargs.get('properties', None) +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~connected_kubernetes_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~connected_kubernetes_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. @@ -306,7 +367,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: str + :vartype info: any """ _validation = { @@ -316,7 +377,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -392,6 +453,78 @@ def __init__( self.error = kwargs.get('error', None) +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class ListClusterUserCredentialProperties(msrest.serialization.Model): + """ListClusterUserCredentialProperties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_method: Required. The mode of client authentication. Possible values + include: "Token", "AAD". + :type authentication_method: str or ~connected_kubernetes_client.models.AuthenticationMethod + :param client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :type client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ListClusterUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = kwargs['authentication_method'] + self.client_proxy = kwargs['client_proxy'] + + class Operation(msrest.serialization.Model): """The Connected cluster API operation. diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models_py3.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models_py3.py index 90e1b0bd198..d1208982d77 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models_py3.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -302,19 +302,19 @@ class ConnectedClusterPatch(msrest.serialization.Model): :type tags: dict[str, str] :param properties: Describes the connected cluster resource properties that can be updated during PATCH operation. - :type properties: str + :type properties: any """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - properties: Optional[str] = None, + properties: Optional[Any] = None, **kwargs ): super(ConnectedClusterPatch, self).__init__(**kwargs) @@ -322,6 +322,67 @@ def __init__( self.properties = properties +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~connected_kubernetes_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~connected_kubernetes_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. @@ -330,7 +391,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: str + :vartype info: any """ _validation = { @@ -340,7 +401,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -418,6 +479,81 @@ def __init__( self.error = error +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class ListClusterUserCredentialProperties(msrest.serialization.Model): + """ListClusterUserCredentialProperties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_method: Required. The mode of client authentication. Possible values + include: "Token", "AAD". + :type authentication_method: str or ~connected_kubernetes_client.models.AuthenticationMethod + :param client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :type client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + *, + authentication_method: Union[str, "AuthenticationMethod"], + client_proxy: bool, + **kwargs + ): + super(ListClusterUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = authentication_method + self.client_proxy = client_proxy + + class Operation(msrest.serialization.Model): """The Connected cluster API operation. diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_connected_cluster_operations.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_connected_cluster_operations.py index 9efeb126fea..2d0390d45d7 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_connected_cluster_operations.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_connected_cluster_operations.py @@ -60,7 +60,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -68,7 +68,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -127,8 +127,8 @@ def begin_create( :type connected_cluster: ~connected_kubernetes_client.models.ConnectedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ConnectedCluster or the result of cls(response) @@ -163,7 +163,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -209,7 +209,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -217,7 +217,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -277,14 +277,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -326,14 +326,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -377,8 +377,8 @@ def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -409,7 +409,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -427,6 +427,77 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} # type: ignore + def list_cluster_user_credential( + self, + resource_group_name, # type: str + cluster_name, # type: str + properties, # type: "_models.ListClusterUserCredentialProperties" + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster user credentials of a connected cluster. + + Gets cluster user credentials of the connected cluster with a specified resource group and + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get is called. + :type cluster_name: str + :param properties: ListClusterUserCredential properties. + :type properties: ~connected_kubernetes_client.models.ListClusterUserCredentialProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~connected_kubernetes_client.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'ListClusterUserCredentialProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential'} # type: ignore + def list_by_resource_group( self, resource_group_name, # type: str @@ -449,7 +520,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -462,7 +533,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -520,7 +591,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_operations.py b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_operations.py index 4effb139b9c..aa3d1b47789 100644 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_operations.py +++ b/src/connectedk8s/azext_connectedk8s/vendored_sdks/operations/_operations.py @@ -62,7 +62,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/src/connectedk8s/azext_connectedk8s/vendored_sdks/py.typed b/src/connectedk8s/azext_connectedk8s/vendored_sdks/py.typed deleted file mode 100644 index e5aff4f83af..00000000000 --- a/src/connectedk8s/azext_connectedk8s/vendored_sdks/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/src/connectedk8s/setup.py b/src/connectedk8s/setup.py index d99a5b6bfcf..6223f2dd686 100644 --- a/src/connectedk8s/setup.py +++ b/src/connectedk8s/setup.py @@ -17,7 +17,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.1.11' +VERSION = '1.2.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From d55d68fce6232f56a0ae6e3341f2d7030beebe6a Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Tue, 5 Oct 2021 18:39:47 +0800 Subject: [PATCH 07/10] [Release] Update index.json for extension [ connectedk8s ] (#3939) Triggered by Azure CLI Extensions Release Pipeline - ADO_BUILD_ID=1127256 Last commit: https://github.com/Azure/azure-cli-extensions/commit/d867f98f134db21e115fd4dce38d5ff3cc9ee347 --- src/index.json | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/index.json b/src/index.json index 5526aadd304..9a52c5efdb7 100644 --- a/src/index.json +++ b/src/index.json @@ -8774,6 +8774,58 @@ "version": "1.1.11" }, "sha256Digest": "986924760ccd29d74a35b5fb2253a23400d6e27e48521b72fc8d06a493eb4faa" + }, + { + "downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/connectedk8s-1.2.0-py2.py3-none-any.whl", + "filename": "connectedk8s-1.2.0-py2.py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.16.0", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "description_content_type": "text/markdown", + "extensions": { + "python.details": { + "contacts": [ + { + "email": "k8connect@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/connectedk8s" + } + } + }, + "extras": [], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "connectedk8s", + "run_requires": [ + { + "requires": [ + "kubernetes (==11.0.0)", + "pycryptodome (==3.9.8)" + ] + } + ], + "summary": "Microsoft Azure Command-Line Tools Connectedk8s Extension", + "version": "1.2.0" + }, + "sha256Digest": "e6873b0cdcfb82cda00f00dfdc5ce9d0daf4db651e100c6c3e3ff58ca89732ab" } ], "connectedmachine": [ From 05f28bb9ad5544d297ae794e9787552cc0871f03 Mon Sep 17 00:00:00 2001 From: Ryan K Date: Wed, 6 Oct 2021 09:47:32 -0700 Subject: [PATCH 08/10] IoT Extension Release v0.11.0 (#3942) --- src/index.json | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/src/index.json b/src/index.json index 9a52c5efdb7..5e7f3079e72 100644 --- a/src/index.json +++ b/src/index.json @@ -6565,6 +6565,74 @@ "version": "0.10.17" }, "sha256Digest": "71f449108419e66f4b8f72a0d9b544e7a38c7fc4b3fdfcab9a9088dff3190710" + }, + { + "downloadUrl": "https://github.com/Azure/azure-iot-cli-extension/releases/download/v0.11.0/azure_iot-0.11.0-py3-none-any.whl", + "filename": "azure_iot-0.11.0-py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.17.1", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "iotupx@microsoft.com", + "name": "Microsoft", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://github.com/azure/azure-iot-cli-extension" + } + } + }, + "extras": [ + "uamqp" + ], + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "azure-iot", + "requires_python": ">=3.6,<4", + "run_requires": [ + { + "requires": [ + "azure-iot-device (~=2.5)", + "jsonschema (~=3.2.0)", + "packaging", + "tqdm (~=4.62)" + ] + }, + { + "extra": "uamqp", + "requires": [ + "uamqp (~=1.2)" + ] + }, + { + "environment": "python_version < \"3.8\"", + "requires": [ + "importlib-metadata" + ] + } + ], + "summary": "The Azure IoT extension for Azure CLI.", + "version": "0.11.0" + }, + "sha256Digest": "b599137425d8b0df615813b9cbedb02d43549acf3ae0c9a703f5d636cf05ebf9" } ], "baremetal-infrastructure": [ From ae1689b92d996264961598c1156b58c1e3ef5693 Mon Sep 17 00:00:00 2001 From: Aditi <12823918+aditimalladi@users.noreply.github.com> Date: Thu, 7 Oct 2021 22:04:46 -0700 Subject: [PATCH 09/10] Adding API - 2021-08-15 version CLI build (#3944) * Adding GA API - 2021-08-15 version CLI build * updated index.json with latest .whl file Co-authored-by: Aditi --- src/index.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/index.json b/src/index.json index 5e7f3079e72..12a0f87454a 100644 --- a/src/index.json +++ b/src/index.json @@ -9962,6 +9962,48 @@ "version": "0.1.2" }, "sha256Digest": "7dfa4f2231fd4ce0b50eeb5a5e470e1f7e510adb2f8602167157e508dbf84e77" + }, + { + "downloadUrl": "https://arcplatformcliextprod.blob.core.windows.net/customlocation/customlocation-0.1.3-py2.py3-none-any.whl", + "filename": "customlocation-0.1.3-py2.py3-none-any.whl", + "metadata": { + "azext.minCliCoreVersion": "2.0.67", + "classifiers": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "License :: OSI Approved :: MIT License" + ], + "extensions": { + "python.details": { + "contacts": [ + { + "email": "arcplatform-core@microsoft.com", + "name": "Microsoft Corporation", + "role": "author" + } + ], + "document_names": { + "description": "DESCRIPTION.rst" + }, + "project_urls": { + "Home": "https://msazure.visualstudio.com/AzureArcPlatform/_git/customlocation-cli-extensions" + } + } + }, + "generator": "bdist_wheel (0.30.0)", + "license": "MIT", + "metadata_version": "2.0", + "name": "customlocation", + "summary": "Microsoft Azure Command-Line Tools Customlocation Extension", + "version": "0.1.3" + }, + "sha256Digest": "5e36435b1a81de25e74e70c45c2ac9f98065138c35050f29210ae40c18484e28" } ], "databox": [ From f07bf0ad0b5b0ec72836371a488b303fecf16c48 Mon Sep 17 00:00:00 2001 From: Vivian Thiebaut Date: Mon, 11 Oct 2021 10:38:47 -0400 Subject: [PATCH 10/10] Add ssharc telemetry --- src/ssh/azext_ssh/constants.py | 5 +++++ src/ssh/azext_ssh/custom.py | 41 +++++++++++++++++++++++++++++++++- src/ssh/azext_ssh/ssh_utils.py | 5 ++++- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/ssh/azext_ssh/constants.py b/src/ssh/azext_ssh/constants.py index 9be7ef75418..b95db67d2a7 100644 --- a/src/ssh/azext_ssh/constants.py +++ b/src/ssh/azext_ssh/constants.py @@ -8,3 +8,8 @@ CLIENT_PROXY_STORAGE_URL = "https://sshproxysa.blob.core.windows.net" CLEANUP_TOTAL_TIME_LIMIT_IN_SECONDS = 120 CLEANUP_TIME_INTERVAL_IN_SECONDS = 10 +Proxy_Download_Failed = 'client-proxy-download-error' +Proxy_Unsuported_OS_Fault_Type = 'client-proxy-unsupported-os-error' +Proxy_Unsuported_Arch_Fault_Type = 'client-proxy-unsupported-architecture-error' +Get_Relay_Info_Invalid_Status = 'get-relay-information-invalid-status-error' + diff --git a/src/ssh/azext_ssh/custom.py b/src/ssh/azext_ssh/custom.py index e93a6ac9353..12ab0f0668a 100644 --- a/src/ssh/azext_ssh/custom.py +++ b/src/ssh/azext_ssh/custom.py @@ -11,10 +11,12 @@ import urllib.request import base64 import stat +import time from glob import glob from azure.cli.core import azclierror from msrestazure import tools +from azure.cli.core import telemetry from . import ip_utils from . import rsa_parser @@ -112,6 +114,7 @@ def _get_and_write_certificate(cmd, public_key_file, cert_file): from azure.cli.core._profile import Profile profile = Profile(cli_ctx=cmd.cli_ctx) + t0 = time.time() # We currently are using the presence of get_msal_token to detect if we are running on an older azure cli client # TODO: Remove when adal has been deprecated for a while if hasattr(profile, "get_msal_token"): @@ -122,6 +125,9 @@ def _get_and_write_certificate(cmd, public_key_file, cert_file): certificatedata = credential.get_token(*scopes, data=data) certificate = certificatedata.token + time_elapsed = time.time() - t0 + telemetry.add_extension_event('ssh', {'Context.Default.AzureCLI.GetSSHCertificateTime': time_elapsed}) + if not cert_file: cert_file = public_key_file + "-aadcert.pub" _write_cert_file(certificate, cert_file) @@ -245,7 +251,17 @@ def _arc_get_client_side_proxy(): elif machine == '': raise azclierror.BadRequestError("Couldn't identify the platform architecture.") else: + telemetry.set_exception(exception='Unsuported architecture for installing proxy', + fault_type=consts.Proxy_Unsuported_Arch_Fault_Type, + summary=f'{machine} is not supported for installing client proxy') raise azclierror.BadRequestError(f"Unsuported architecture: {machine} is not currently supported") + + machine_properties = { + 'Context.Default.AzureCLI.MachineType': machine, + 'Context.Default.AzureCLI.ArchitectureType': architecture, + 'Context.Default.AzureCLI.OSType': operating_system + } + telemetry.add_extension_event('ssh', machine_properties) # define the request url and install location based on the os and architecture request_uri = (f"{consts.CLIENT_PROXY_STORAGE_URL}/{consts.CLIENT_PROXY_RELEASE}" @@ -254,11 +270,16 @@ def _arc_get_client_side_proxy(): install_location = os.path.join(".clientsshproxy", proxy_name.replace('.', '_')) older_version_location = os.path.join(".clientsshproxy", 'argSSHProxy*') + telemetry.add_extension_event('ssh', {'Context.Default.AzureCLI.SSHProxyVersion': consts.CLIENT_PROXY_VERSION}) + if operating_system == 'Windows': request_uri = request_uri + ".exe" install_location = install_location + ".exe" older_version_location = older_version_location + ".exe" elif operating_system not in ('Linux', 'Darwin'): + telemetry.set_exception(exception='Unsuported OS for installing ssh client proxy', + fault_type=consts.Proxy_Unsuported_OS_Fault_Type, + summary=f'{operating_system} is not supported for installing client proxy') raise azclierror.BadRequestError(f"Unsuported OS: {operating_system} platform is not currently supported") install_location = os.path.expanduser(os.path.join('~', install_location)) @@ -268,14 +289,20 @@ def _arc_get_client_side_proxy(): # Only download new proxy if it doesn't exist already if not os.path.isfile(install_location): # download the executable + t0 = time.time() try: with urllib.request.urlopen(request_uri) as response: response_content = response.read() response.close() except Exception as e: + telemetry.set_exception(exception=e, fault_type=consts.Proxy_Download_Failed_Fault_Type, + summary=f'Failed to download proxy from {request_uri}') raise azclierror.ClientRequestError(f"Failed to download client proxy executable from {request_uri}. " "Error: " + str(e)) from e - + time_elapsed = time.time() - t0 + print(f'proxy dowload: {time_elapsed}') + telemetry.add_extension_event('ssh', {'Context.Default.AzureCLI.SSHProxyDownloadTime': time_elapsed}) + # if directory doesn't exist, create it if not os.path.exists(install_dir): file_utils.create_directory(install_dir, f"Failed to create client proxy directory '{install_dir}'. ") @@ -297,9 +324,21 @@ def _arc_get_client_side_proxy(): def _arc_list_access_details(cmd, resource_group, vm_name): from azext_ssh._client_factory import cf_machine client = cf_machine(cmd.cli_ctx) + t0 = time.time() status_code, result = client.list_access_details(resource_group_name=resource_group, machine_name=vm_name) + time_elapsed = time.time()-t0 + + relay_info_properties = { + 'Context.Default.AzureCLI.GetRelayInfoTime': time_elapsed, + 'Context.Default.AzureCLI.GetRelayInfoStatusCode': status_code + } + telemetry.add_extension_event('ssh', relay_info_properties) + if status_code in [501, 404]: error = {404: 'Not Found', 501: 'Not Implemented'} + telemetry.set_exception(exception='REST API request for access information returned an invalid status', + fault_type=consts.Get_Relay_Info_Invalid_Status, + summary=f'REST API request for access information returned {error[status_code]}.') raise azclierror.BadRequestError("REST API request for access information returned an invalid status " f"\"{error[status_code]}\". Please update the current version of the SSH" "extension by runing \"az extension update ssh\".") diff --git a/src/ssh/azext_ssh/ssh_utils.py b/src/ssh/azext_ssh/ssh_utils.py index 0b3f7d2c424..36b1d3f2845 100644 --- a/src/ssh/azext_ssh/ssh_utils.py +++ b/src/ssh/azext_ssh/ssh_utils.py @@ -14,6 +14,7 @@ from knack import log from azure.cli.core import azclierror +from azure.cli.core import telemetry from . import file_utils from . import constants as const @@ -75,8 +76,10 @@ def start_ssh_connection(relay_info, proxy_path, vm_name, ip, username, cert_fil cleanup_process.start() logger.debug("Running ssh command %s", ' '.join(command)) + t0 = time.time() subprocess.call(command, shell=platform.system() == 'Windows', env=env) - + time_elapsed = time.time() - t0 + telemetry.add_extension_event('ssh', {'Context.Default.AzureCLI.SSHConnectionTime': time_elapsed}) # If the cleanup process is still alive once the ssh process is terminated, we terminate it and make # sure the private key and certificate are deleted. if delete_privkey and (cert_file or private_key_file):