diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 6df7a2f0d96..56770f2de72 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -11,9 +11,12 @@ To release a new version, please select a new version number (usually plus 1 to Pending ++++++ -* Vendor new SDK and bump API version to 2023-06-02-preview. +0.5.150 ++++++++ +* Vendor new SDK and bump API version to 2023-06-02-preview. * Add `--network-dataplane` to the `az aks update` command. +* Support "VirtualMachines" agent pool type to `az aks create --vm-set-type` and `az aks nodepool add --vm-set-type`. This is internal use only, not for public preview. 0.5.149 +++++++ diff --git a/src/aks-preview/azext_aks_preview/_consts.py b/src/aks-preview/azext_aks_preview/_consts.py index 3a0289d12d5..cd139c113c2 100644 --- a/src/aks-preview/azext_aks_preview/_consts.py +++ b/src/aks-preview/azext_aks_preview/_consts.py @@ -38,6 +38,7 @@ # vm set type CONST_VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" CONST_AVAILABILITY_SET = "AvailabilitySet" +CONST_VIRTUAL_MACHINES = "VirtualMachines" # vm size CONST_DEFAULT_NODE_VM_SIZE = "Standard_DS2_v2" diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 40dd2bacff1..04a030f0204 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -297,7 +297,7 @@ short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 1000]. - name: --vm-set-type type: string - short-summary: Agent pool vm set type. VirtualMachineScaleSets or AvailabilitySet. + short-summary: Agent pool vm set type. VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(internal use only). - name: --enable-pod-security-policy type: bool short-summary: Enable pod security policy. @@ -1566,6 +1566,9 @@ - name: --mode type: string short-summary: The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode `System`. Learn more at https://aka.ms/aks/nodepool/mode. + - name: --vm-set-type + type: string + short-summary: Agent pool vm set type. VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(internal use only). - name: --aks-custom-headers type: string short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2 diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index a775448e591..2e2dabee42b 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -609,6 +609,7 @@ def load_arguments(self, _): c.argument('max_pods', type=int, options_list=['--max-pods', '-m']) c.argument('zones', zones_type, options_list=['--zones', '-z'], help='Space-separated list of availability zones where agent nodes will be placed.') c.argument('ppg') + c.argument('vm_set_type', validator=validate_vm_set_type) c.argument('enable_encryption_at_host', action='store_true') c.argument('enable_ultra_ssd', action='store_true') c.argument('enable_fips_image', action='store_true') diff --git a/src/aks-preview/azext_aks_preview/_validators.py b/src/aks-preview/azext_aks_preview/_validators.py index a9c77f9b114..5244bb54cb7 100644 --- a/src/aks-preview/azext_aks_preview/_validators.py +++ b/src/aks-preview/azext_aks_preview/_validators.py @@ -186,9 +186,10 @@ def validate_vm_set_type(namespace): if namespace.vm_set_type == '': return if namespace.vm_set_type.lower() != "availabilityset" and \ + namespace.vm_set_type.lower() != "virtualmachines" and \ namespace.vm_set_type.lower() != "virtualmachinescalesets": raise CLIError( - "--vm-set-type can only be VirtualMachineScaleSets or AvailabilitySet") + "--vm-set-type can only be VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(internal use only)") def validate_load_balancer_sku(namespace): diff --git a/src/aks-preview/azext_aks_preview/agentpool_decorator.py b/src/aks-preview/azext_aks_preview/agentpool_decorator.py index c372083063e..965ea973f9d 100644 --- a/src/aks-preview/azext_aks_preview/agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/agentpool_decorator.py @@ -9,6 +9,7 @@ from typing import Dict, TypeVar, Union, List from azure.cli.command_modules.acs._consts import AgentPoolDecoratorMode, DecoratorMode + from azure.cli.command_modules.acs.agentpool_decorator import ( AKSAgentPoolAddDecorator, AKSAgentPoolContext, @@ -26,7 +27,12 @@ from knack.log import get_logger from azext_aks_preview._client_factory import cf_agent_pools -from azext_aks_preview._consts import CONST_WORKLOAD_RUNTIME_OCI_CONTAINER +from azext_aks_preview._consts import ( + CONST_WORKLOAD_RUNTIME_OCI_CONTAINER, + CONST_VIRTUAL_MACHINE_SCALE_SETS, + CONST_AVAILABILITY_SET, + CONST_VIRTUAL_MACHINES +) from azext_aks_preview._helpers import get_nodepool_snapshot_by_snapshot_id logger = get_logger(__name__) @@ -68,6 +74,32 @@ def external_functions(self) -> SimpleNamespace: self.__external_functions = SimpleNamespace(**external_functions) return self.__external_functions + def get_vm_set_type(self) -> str: + """Obtain the value of vm_set_type, default value is CONST_VIRTUAL_MACHINE_SCALE_SETS. + :return: string + """ + # read the original value passed by the command + vm_set_type = self.raw_param.get("vm_set_type", CONST_VIRTUAL_MACHINE_SCALE_SETS) + # try to read the property value corresponding to the parameter from the `agentpool` object + if self.agentpool_decorator_mode == AgentPoolDecoratorMode.MANAGED_CLUSTER: + if self.agentpool and self.agentpool.type is not None: + vm_set_type = self.agentpool.type + else: + if self.agentpool and self.agentpool.type_properties_type is not None: + vm_set_type = self.agentpool.type_properties_type + + # normalize + if vm_set_type.lower() == CONST_VIRTUAL_MACHINE_SCALE_SETS.lower(): + vm_set_type = CONST_VIRTUAL_MACHINE_SCALE_SETS + elif vm_set_type.lower() == CONST_AVAILABILITY_SET.lower(): + vm_set_type = CONST_AVAILABILITY_SET + elif vm_set_type.lower() == CONST_VIRTUAL_MACHINES.lower(): + vm_set_type = CONST_VIRTUAL_MACHINES + else: + raise InvalidArgumentValueError("--vm-set-type can only be VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(internal use only)") + # this parameter does not need validation + return vm_set_type + def get_crg_id(self) -> Union[str, None]: """Obtain the value of crg_id. diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index c3969d66033..465b31fc828 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -1067,6 +1067,7 @@ def aks_agentpool_add( max_pods=0, zones=None, ppg=None, + vm_set_type=None, enable_encryption_at_host=False, enable_ultra_ssd=False, enable_fips_image=False, diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_vms_agentpool_type.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_vms_agentpool_type.yaml new file mode 100644 index 00000000000..86ec323e874 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_vms_agentpool_type.yaml @@ -0,0 +1,1285 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-06-02-preview + response: + body: + string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.ContainerService/managedClusters/cliakstest000002'' + under resource group ''clitest000001'' was not found. For more details please + go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + cache-control: + - no-cache + content-length: + - '244' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 03 Aug 2023 03:49:10 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - gateway + status: + code: 404 + message: Not Found +- request: + body: '{"location": "eastus", "identity": {"type": "SystemAssigned"}, "properties": + {"kubernetesVersion": "", "dnsPrefix": "cliakstest-clitestxtxu54few-8ecadf", + "agentPoolProfiles": [{"count": 1, "vmSize": "standard_d2a_v4", "osDiskSizeGB": + 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": + false, "type": "VirtualMachines", "mode": "System", "orchestratorVersion": "", + "upgradeSettings": {}, "enableNodePublicIP": false, "enableCustomCATrust": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "enableEncryptionAtHost": false, "enableUltraSSD": false, + "enableFIPS": false, "networkProfile": {}, "name": "n000003"}], "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", "outboundType": "loadBalancer", + "loadBalancerSku": "standard"}, "disableLocalAccounts": false, "storageProfile": + {}}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/VMsAgentPoolPreview + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + Content-Length: + - '1861' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-06-02-preview + 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.25.11\",\n \"currentKubernetesVersion\"\ + : \"1.25.11\",\n \"dnsPrefix\": \"cliakstest-clitestxtxu54few-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestxtxu54few-8ecadf-9usv4hcy.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestxtxu54few-8ecadf-9usv4hcy.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"n000003\",\n \"\ + count\": 1,\n \"vmSize\": \"standard_d2a_v4\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachines\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Creating\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.25.11\"\ + ,\n \"currentOrchestratorVersion\": \"1.25.11\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-2204gen2containerd-202307.12.0\",\n \"upgradeSettings\"\ + : {},\n \"enableFIPS\": false,\n \"networkProfile\": {},\n \"\ + securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n\ + \ ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \ + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa\ + \ 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 \"supportPlan\"\ + : \"KubernetesOfficial\",\n \"networkProfile\": {\n \"networkPlugin\"\ + : \"kubenet\",\n \"loadBalancerSku\": \"standard\",\n \"loadBalancerProfile\"\ + : {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"\ + backendPoolType\": \"nodeIPConfiguration\"\n },\n \"podCidr\": \"10.244.0.0/16\"\ + ,\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\"\ + ,\n \"outboundType\": \"loadBalancer\",\n \"podCidrs\": [\n \"10.244.0.0/16\"\ + \n ],\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\"\ + : [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": 100,\n \"autoUpgradeProfile\"\ + : {\n \"nodeOSUpgradeChannel\": \"NodeImage\"\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\"\ + : false\n },\n \"nodeResourceGroupProfile\": {\n \"restrictionLevel\"\ + : \"Unrestricted\"\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"\ + identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Base\",\n \"tier\": \"Free\"\n }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '4010' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:49: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 --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:49:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:49:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:50:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:50:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:51:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:51:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:52: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 --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:52:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/d83320b7-a2d4-44ce-bac8-3e2ff470834f?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"b72033d8-d4a2-ce44-bac8-3e2ff470834f\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-08-03T03:49:14.8395193Z\",\n \"\ + endTime\": \"2023-08-03T03:53:06.7602773Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:53: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 --location --ssh-key-value --nodepool-name --node-count + --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-06-02-preview + 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.25.11\",\n \"currentKubernetesVersion\"\ + : \"1.25.11\",\n \"dnsPrefix\": \"cliakstest-clitestxtxu54few-8ecadf\",\n\ + \ \"fqdn\": \"cliakstest-clitestxtxu54few-8ecadf-9usv4hcy.hcp.eastus.azmk8s.io\"\ + ,\n \"azurePortalFQDN\": \"cliakstest-clitestxtxu54few-8ecadf-9usv4hcy.portal.hcp.eastus.azmk8s.io\"\ + ,\n \"agentPoolProfiles\": [\n {\n \"name\": \"n000003\",\n \"\ + count\": 1,\n \"vmSize\": \"standard_d2a_v4\",\n \"osDiskSizeGB\"\ + : 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\"\ + ,\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n \ + \ \"type\": \"VirtualMachines\",\n \"enableAutoScaling\": false,\n\ + \ \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \ + \ \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.25.11\"\ + ,\n \"currentOrchestratorVersion\": \"1.25.11\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-2204gen2containerd-202307.12.0\",\n \"upgradeSettings\"\ + : {},\n \"enableFIPS\": false,\n \"networkProfile\": {},\n \"\ + securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n\ + \ ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \ + \ \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa\ + \ 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 \"supportPlan\"\ + : \"KubernetesOfficial\",\n \"networkProfile\": {\n \"networkPlugin\"\ + : \"kubenet\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\"\ + : {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"\ + effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.Network/publicIPAddresses/ce71334c-eeca-4c29-86db-cd0f1f79f916\"\ + \n }\n ],\n \"backendPoolType\": \"nodeIPConfiguration\"\n \ + \ },\n \"podCidr\": \"10.244.0.0/16\",\n \"serviceCidr\": \"10.0.0.0/16\"\ + ,\n \"dnsServiceIP\": \"10.0.0.10\",\n \"outboundType\": \"loadBalancer\"\ + ,\n \"podCidrs\": [\n \"10.244.0.0/16\"\n ],\n \"serviceCidrs\"\ + : [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\": [\n \"IPv4\"\n\ + \ ]\n },\n \"maxAgentPools\": 100,\n \"identityProfile\": {\n \ + \ \"kubeletidentity\": {\n \"resourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_clitest000001_cliakstest000002_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliakstest000002-agentpool\"\ + ,\n \"clientId\":\"00000000-0000-0000-0000-000000000001\",\n \"objectId\"\ + :\"00000000-0000-0000-0000-000000000001\"\n }\n },\n \"autoUpgradeProfile\"\ + : {\n \"nodeOSUpgradeChannel\": \"NodeImage\"\n },\n \"disableLocalAccounts\"\ + : false,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\"\ + : {\n \"enabled\": true,\n \"version\": \"v1\"\n },\n \"fileCSIDriver\"\ + : {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"\ + enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\"\ + : false\n },\n \"nodeResourceGroupProfile\": {\n \"restrictionLevel\"\ + : \"Unrestricted\"\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"\ + identity\": {\n \"type\": \"SystemAssigned\",\n \"principalId\":\"00000000-0000-0000-0000-000000000001\"\ + ,\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\n },\n \"sku\"\ + : {\n \"name\": \"Base\",\n \"tier\": \"Free\"\n }\n }" + headers: + cache-control: + - no-cache + content-length: + - '4661' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:53: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: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools?api-version=2023-06-02-preview + response: + body: + string: "{\n \"value\": [\n {\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/n000003\"\ + ,\n \"name\": \"n000003\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\"\ + ,\n \"properties\": {\n \"count\": 1,\n \"vmSize\": \"standard_d2a_v4\"\ + ,\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"\ + kubeletDiskType\": \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n\ + \ \"maxPods\": 110,\n \"type\": \"VirtualMachines\",\n \"enableAutoScaling\"\ + : false,\n \"provisioningState\": \"Succeeded\",\n \"powerState\"\ + : {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"\ + 1.25.11\",\n \"currentOrchestratorVersion\": \"1.25.11\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"System\"\ + ,\n \"enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n\ + \ \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\"\ + : \"AKSUbuntu-2204gen2containerd-202307.12.0\",\n \"upgradeSettings\"\ + : {},\n \"enableFIPS\": false,\n \"networkProfile\": {},\n \"\ + securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n }\n\ + \ }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '1194' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:53: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: '{"properties": {"count": 3, "vmSize": "standard_d2a_v4", "osDiskSizeGB": + 0, "workloadRuntime": "OCIContainer", "osType": "Linux", "enableAutoScaling": + false, "scaleDownMode": "Delete", "type": "VirtualMachines", "mode": "User", + "upgradeSettings": {}, "enableNodePublicIP": false, "enableCustomCATrust": false, + "scaleSetPriority": "Regular", "scaleSetEvictionPolicy": "Delete", "spotMaxPrice": + -1.0, "nodeTaints": [], "enableEncryptionAtHost": false, "enableUltraSSD": false, + "enableFIPS": false, "networkProfile": {}}}' + headers: + AKSHTTPCustomFeatures: + - Microsoft.ContainerService/VMsAgentPoolPreview + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + Content-Length: + - '518' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --cluster-name --name --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/n000004?api-version=2023-06-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/n000004\"\ + ,\n \"name\": \"n000004\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\"\ + ,\n \"properties\": {\n \"count\": 3,\n \"vmSize\": \"standard_d2a_v4\"\ + ,\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\"\ + : \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n\ + \ \"type\": \"VirtualMachines\",\n \"enableAutoScaling\": false,\n \"\ + scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Creating\",\n \ + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ + : \"1.25.11\",\n \"currentOrchestratorVersion\": \"1.25.11\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"User\",\n \"\ + enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n \"osType\"\ + : \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-2204gen2containerd-202307.12.0\"\ + ,\n \"upgradeSettings\": {},\n \"enableFIPS\": false,\n \"networkProfile\"\ + : {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n\ + \ }\n }" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '1126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:53:23 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 --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"67712ddd-a630-bd41-9943-5afc6366f7cd\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:53:24.2168127Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:53:23 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 --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"67712ddd-a630-bd41-9943-5afc6366f7cd\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:53:24.2168127Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:53:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"67712ddd-a630-bd41-9943-5afc6366f7cd\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:53:24.2168127Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:54: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"67712ddd-a630-bd41-9943-5afc6366f7cd\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:53:24.2168127Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:54:55 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 --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"67712ddd-a630-bd41-9943-5afc6366f7cd\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:53:24.2168127Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:55:24 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 --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"67712ddd-a630-bd41-9943-5afc6366f7cd\",\n \"status\"\ + : \"InProgress\",\n \"startTime\": \"2023-08-03T03:53:24.2168127Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:55:54 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 --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dd2d7167-30a6-41bd-9943-5afc6366f7cd?api-version=2017-08-31 + response: + body: + string: "{\n \"name\": \"67712ddd-a630-bd41-9943-5afc6366f7cd\",\n \"status\"\ + : \"Succeeded\",\n \"startTime\": \"2023-08-03T03:53:24.2168127Z\",\n \"\ + endTime\": \"2023-08-03T03:56:22.8340279Z\"\n }" + headers: + cache-control: + - no-cache + content-length: + - '170' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:56: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: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - aks nodepool add + Connection: + - keep-alive + ParameterSetName: + - --resource-group --cluster-name --name --node-vm-size --vm-set-type --aks-custom-headers + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/n000004?api-version=2023-06-02-preview + response: + body: + string: "{\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002/agentPools/n000004\"\ + ,\n \"name\": \"n000004\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\"\ + ,\n \"properties\": {\n \"count\": 3,\n \"vmSize\": \"standard_d2a_v4\"\ + ,\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\"\ + : \"OS\",\n \"workloadRuntime\": \"OCIContainer\",\n \"maxPods\": 110,\n\ + \ \"type\": \"VirtualMachines\",\n \"enableAutoScaling\": false,\n \"\ + scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Succeeded\",\n \ + \ \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\"\ + : \"1.25.11\",\n \"currentOrchestratorVersion\": \"1.25.11\",\n \"enableNodePublicIP\"\ + : false,\n \"enableCustomCATrust\": false,\n \"mode\": \"User\",\n \"\ + enableEncryptionAtHost\": false,\n \"enableUltraSSD\": false,\n \"osType\"\ + : \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-2204gen2containerd-202307.12.0\"\ + ,\n \"upgradeSettings\": {},\n \"enableFIPS\": false,\n \"networkProfile\"\ + : {},\n \"securityProfile\": {\n \"sshAccess\": \"LocalUser\"\n }\n\ + \ }\n }" + headers: + cache-control: + - no-cache + content-length: + - '1127' + content-type: + - application/json + date: + - Thu, 03 Aug 2023 03:56:26 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: + - --resource-group --name --yes --no-wait + User-Agent: + - AZURECLI/2.50.0 (DOCKER) azsdk-python-azure-mgmt-containerservice/24.0.0b + Python/3.10.12 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.ContainerService/managedClusters/cliakstest000002?api-version=2023-06-02-preview + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operations/dfa467c5-27f8-408b-9940-76bc68f6dc49?api-version=2017-08-31 + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 03 Aug 2023 03:56:27 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus/operationresults/dfa467c5-27f8-408b-9940-76bc68f6dc49?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 fe1194a3861..34bc4267d88 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 @@ -7007,6 +7007,63 @@ def test_node_public_ip_tags(self, resource_group, resource_group_location): self.is_empty(), ]) + @AllowLargeResponse() + @AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus') + def test_vms_agentpool_type(self, resource_group, resource_group_location): + aks_name = self.create_random_name('cliakstest', 16) + nodepool_name = self.create_random_name('n', 6) + nodepool_name_1 = self.create_random_name('n', 6) + + self.kwargs.update({ + 'resource_group': resource_group, + 'name': aks_name, + 'location': resource_group_location, + 'ssh_key_value': self.generate_ssh_keys(), + 'node_pool_name': nodepool_name, + 'node_vm_size': 'standard_d2a_v4', + }) + + self.cmd( + 'aks create ' + '--resource-group={resource_group} ' + '--name={name} ' + '--location={location} ' + '--ssh-key-value={ssh_key_value} ' + '--nodepool-name={node_pool_name} ' + '--node-count=1 ' + '--node-vm-size={node_vm_size} ' + '--vm-set-type="VirtualMachines" ' + '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/VMsAgentPoolPreview', + checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('agentPoolProfiles[0].type', "VirtualMachines"), + ], + ) + + self.kwargs.update({ + 'node_pool_name': nodepool_name_1, + }) + + self.cmd( + 'aks nodepool add ' + '--resource-group={resource_group} ' + '--cluster-name={name} ' + '--name={node_pool_name} ' + '--node-vm-size={node_vm_size} ' + '--vm-set-type=VirtualMachines ' + '--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/VMsAgentPoolPreview', + checks=[ + self.check('provisioningState', 'Succeeded'), + self.check('typePropertiesType', "VirtualMachines"), + ], + ) + + # delete + cmd = 'aks delete --resource-group={resource_group} --name={name} --yes --no-wait' + self.cmd(cmd, checks=[ + self.is_empty(), + ]) + @AllowLargeResponse() def test_get_trustedaccess_roles(self): versions_cmd = 'aks trustedaccess role list -l eastus -o json' diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py index 0aee190bcda..a328289254e 100644 --- a/src/aks-preview/setup.py +++ b/src/aks-preview/setup.py @@ -9,7 +9,7 @@ from setuptools import setup, find_packages -VERSION = "0.5.149" +VERSION = "0.5.150" CLASSIFIERS = [ "Development Status :: 4 - Beta",