diff --git a/src/azure-cli/azure/cli/command_modules/vm/_params.py b/src/azure-cli/azure/cli/command_modules/vm/_params.py index ffc67bd161c..51743c268a5 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long +# pylint: disable=line-too-long, too-many-lines from argcomplete.completers import FilesCompleter from knack.arguments import CLIArgumentType @@ -610,6 +610,18 @@ def load_arguments(self, _): with self.argument_context(scope) as c: c.argument('terminate_notification_time', min_api='2019-03-01', help='Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted') + c.argument('max_batch_instance_percent', type=int, min_api='2020-12-01', + help='The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. Default: 20%') + c.argument('max_unhealthy_instance_percent', type=int, min_api='2020-12-01', + help='The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy. Default: 20%') + c.argument('max_unhealthy_upgraded_instance_percent', type=int, min_api='2020-12-01', + help='The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. Default: 20%') + c.argument('pause_time_between_batches', min_api='2020-12-01', + help='The wait time between completing the update for all virtual machines in one batch and starting the next batch. Default: 0 seconds') + c.argument('enable_cross_zone_upgrade', arg_type=get_three_state_flag(), min_api='2020-12-01', + help='Set this Boolean property will allow VMSS to ignore AZ boundaries when constructing upgrade batches, and only consider Update Domain and maxBatchInstancePercent to determine the batch size') + c.argument('prioritize_unhealthy_instances', arg_type=get_three_state_flag(), min_api='2020-12-01', + help='Set this Boolean property will lead to all unhealthy instances in a scale set getting upgraded before any healthy instances') for scope, help_prefix in [('vmss update', 'Update the'), ('vmss wait', 'Wait on the')]: with self.argument_context(scope) as c: diff --git a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py index 1b39cf0ccbb..c4054fbf97b 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_template_builder.py @@ -757,7 +757,10 @@ def build_vmss_resource(cmd, name, naming_prefix, location, tags, overprovision, terminate_notification_time=None, max_price=None, scale_in_policy=None, os_disk_encryption_set=None, data_disk_encryption_sets=None, data_disk_iops=None, data_disk_mbps=None, automatic_repairs_grace_period=None, - specialized=None, os_disk_size_gb=None, encryption_at_host=None, host_group=None): + specialized=None, os_disk_size_gb=None, encryption_at_host=None, host_group=None, + max_batch_instance_percent=None, max_unhealthy_instance_percent=None, + max_unhealthy_upgraded_instance_percent=None, pause_time_between_batches=None, + enable_cross_zone_upgrade=None, prioritize_unhealthy_instances=None): # Build IP configuration ip_configuration = { @@ -915,7 +918,15 @@ def build_vmss_resource(cmd, name, naming_prefix, location, tags, overprovision, vmss_properties = { 'overprovision': overprovision, 'upgradePolicy': { - 'mode': upgrade_policy_mode + 'mode': upgrade_policy_mode, + 'rollingUpgradePolicy': { + 'maxBatchInstancePercent': max_batch_instance_percent, + 'maxUnhealthyInstancePercent': max_unhealthy_instance_percent, + 'maxUnhealthyUpgradedInstancePercent': max_unhealthy_upgraded_instance_percent, + 'pauseTimeBetweenBatches': pause_time_between_batches, + 'enableCrossZoneUpgrade': enable_cross_zone_upgrade, + 'prioritizeUnhealthyInstances': prioritize_unhealthy_instances + } }, 'virtualMachineProfile': { 'storageProfile': storage_properties, diff --git a/src/azure-cli/azure/cli/command_modules/vm/custom.py b/src/azure-cli/azure/cli/command_modules/vm/custom.py index 27adc69e8e5..2334324a415 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -2419,7 +2419,9 @@ def create_vmss(cmd, vmss_name, resource_group_name, image=None, max_price=None, computer_name_prefix=None, orchestration_mode='Uniform', scale_in_policy=None, os_disk_encryption_set=None, data_disk_encryption_sets=None, data_disk_iops=None, data_disk_mbps=None, automatic_repairs_grace_period=None, specialized=None, os_disk_size_gb=None, encryption_at_host=None, - host_group=None): + host_group=None, max_batch_instance_percent=None, max_unhealthy_instance_percent=None, + max_unhealthy_upgraded_instance_percent=None, pause_time_between_batches=None, + enable_cross_zone_upgrade=None, prioritize_unhealthy_instances=None): from azure.cli.core.commands.client_factory import get_subscription_id from azure.cli.core.util import random_string, hash_string from azure.cli.core.commands.arm import ArmTemplateBuilder @@ -2654,7 +2656,11 @@ def _get_public_ip_address_allocation(value, sku): data_disk_encryption_sets=data_disk_encryption_sets, data_disk_iops=data_disk_iops, data_disk_mbps=data_disk_mbps, automatic_repairs_grace_period=automatic_repairs_grace_period, specialized=specialized, os_disk_size_gb=os_disk_size_gb, encryption_at_host=encryption_at_host, - host_group=host_group) + host_group=host_group, max_batch_instance_percent=max_batch_instance_percent, + max_unhealthy_instance_percent=max_unhealthy_instance_percent, + max_unhealthy_upgraded_instance_percent=max_unhealthy_upgraded_instance_percent, + pause_time_between_batches=pause_time_between_batches, enable_cross_zone_upgrade=enable_cross_zone_upgrade, + prioritize_unhealthy_instances=prioritize_unhealthy_instances) vmss_resource['dependsOn'] = vmss_dependencies @@ -2944,7 +2950,10 @@ def update_vmss(cmd, resource_group_name, name, license_type=None, no_wait=False protect_from_scale_in=None, protect_from_scale_set_actions=None, enable_terminate_notification=None, terminate_notification_time=None, ultra_ssd_enabled=None, scale_in_policy=None, priority=None, max_price=None, proximity_placement_group=None, - enable_automatic_repairs=None, automatic_repairs_grace_period=None, **kwargs): + enable_automatic_repairs=None, automatic_repairs_grace_period=None, max_batch_instance_percent=None, + max_unhealthy_instance_percent=None, max_unhealthy_upgraded_instance_percent=None, + pause_time_between_batches=None, enable_cross_zone_upgrade=None, prioritize_unhealthy_instances=None, + **kwargs): vmss = kwargs['parameters'] aux_subscriptions = None # pylint: disable=too-many-boolean-expressions @@ -3024,6 +3033,29 @@ def update_vmss(cmd, resource_group_name, name, license_type=None, no_wait=False if proximity_placement_group is not None: vmss.proximity_placement_group = {'id': proximity_placement_group} + if max_batch_instance_percent is not None or max_unhealthy_instance_percent is not None \ + or max_unhealthy_upgraded_instance_percent is not None or pause_time_between_batches is not None \ + or enable_cross_zone_upgrade is not None or prioritize_unhealthy_instances is not None: + if vmss.upgrade_policy is None: + vmss.upgrade_policy = {'rolling_upgrade_policy': None} + if vmss.upgrade_policy.rolling_upgrade_policy is None: + vmss.upgrade_policy.rolling_upgrade_policy = { + 'maxBatchInstancePercent': max_batch_instance_percent, + 'maxUnhealthyInstancePercent': max_unhealthy_instance_percent, + 'maxUnhealthyUpgradedInstancePercent': max_unhealthy_upgraded_instance_percent, + 'pauseTimeBetweenBatches': pause_time_between_batches, + 'enableCrossZoneUpgrade': enable_cross_zone_upgrade, + 'prioritizeUnhealthyInstances': prioritize_unhealthy_instances + } + else: + vmss.upgrade_policy.rolling_upgrade_policy.max_batch_instance_percent = max_batch_instance_percent + vmss.upgrade_policy.rolling_upgrade_policy.max_unhealthy_instance_percent = max_unhealthy_instance_percent + vmss.upgrade_policy.rolling_upgrade_policy.max_unhealthy_upgraded_instance_percent = \ + max_unhealthy_upgraded_instance_percent + vmss.upgrade_policy.rolling_upgrade_policy.pause_time_between_batches = pause_time_between_batches + vmss.upgrade_policy.rolling_upgrade_policy.enable_cross_zone_upgrade = enable_cross_zone_upgrade + vmss.upgrade_policy.rolling_upgrade_policy.prioritize_unhealthy_instances = prioritize_unhealthy_instances + return sdk_no_wait(no_wait, client.virtual_machine_scale_sets.begin_create_or_update, resource_group_name, name, **kwargs) diff --git a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml index 7a4d679bacd..6292ba3e23d 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml +++ b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml @@ -9,6 +9,44 @@ vmss create: public_ip_address_allocation: rule_exclusions: - missing_parameter_help + enable_cross_zone_upgrade: + rule_exclusions: + - option_length_too_long + max_batch_instance_percent: + rule_exclusions: + - option_length_too_long + max_unhealthy_instance_percent: + rule_exclusions: + - option_length_too_long + max_unhealthy_upgraded_instance_percent: + rule_exclusions: + - option_length_too_long + pause_time_between_batches: + rule_exclusions: + - option_length_too_long + prioritize_unhealthy_instances: + rule_exclusions: + - option_length_too_long +vmss update: + parameters: + enable_cross_zone_upgrade: + rule_exclusions: + - option_length_too_long + max_batch_instance_percent: + rule_exclusions: + - option_length_too_long + max_unhealthy_instance_percent: + rule_exclusions: + - option_length_too_long + max_unhealthy_upgraded_instance_percent: + rule_exclusions: + - option_length_too_long + pause_time_between_batches: + rule_exclusions: + - option_length_too_long + prioritize_unhealthy_instances: + rule_exclusions: + - option_length_too_long vmss encryption enable: parameters: key_encryption_algorithm: diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_create_with_policy_setting.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_create_with_policy_setting.yaml new file mode 100644 index 00000000000..b91e6933282 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_create_with_policy_setting.yaml @@ -0,0 +1,483 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - --image --admin-password -g -n --instance-count --generate-ssh-keys --admin-username + --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_with_policy_setting000001?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001","name":"cli_test_vmss_create_with_policy_setting000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-06T08:37:18Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:37:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"CoreOS\": {\n \"publisher\": \"CoreOS\",\n \"offer\": + \"CoreOS\",\n \"sku\": \"Stable\",\n \"version\": \"latest\"\n + \ },\n \"Debian\": {\n \"publisher\": \"Debian\",\n + \ \"offer\": \"debian-10\",\n \"sku\": \"10\",\n \"version\": + \"latest\"\n },\n \"openSUSE-Leap\": {\n \"publisher\": + \"SUSE\",\n \"offer\": \"openSUSE-Leap\",\n \"sku\": + \"42.3\",\n \"version\": \"latest\"\n },\n \"RHEL\": + {\n \"publisher\": \"RedHat\",\n \"offer\": \"RHEL\",\n + \ \"sku\": \"7-LVM\",\n \"version\": \"latest\"\n },\n + \ \"SLES\": {\n \"publisher\": \"SUSE\",\n \"offer\": + \"SLES\",\n \"sku\": \"15\",\n \"version\": \"latest\"\n + \ },\n \"UbuntuLTS\": {\n \"publisher\": \"Canonical\",\n + \ \"offer\": \"UbuntuServer\",\n \"sku\": \"18.04-LTS\",\n + \ \"version\": \"latest\"\n }\n },\n \"Windows\": + {\n \"Win2019Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2019-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2016Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012R2Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-R2-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2008R2SP1\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n \"version\": + \"latest\"\n }\n }\n }\n }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2501' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:37:22 GMT + etag: + - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" + expires: + - Tue, 06 Apr 2021 08:42:22 GMT + source-age: + - '0' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 8867632a6781ef54e2dc6d0aee5350121874cb07 + x-frame-options: + - deny + x-github-request-id: + - A884:695C:242C40:2B2160:6068FACA + x-served-by: + - cache-qpg1282-QPG + x-timer: + - S1617698242.297027,VS0,VE217 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - --image --admin-password -g -n --instance-count --generate-ssh-keys --admin-username + --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:37:22 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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "vrfvmssVNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vrfvmssSubnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vrfvmssLBPublicIP", + "location": "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Dynamic"}}, {"type": "Microsoft.Network/loadBalancers", "name": "vrfvmssLB", + "location": "westus", "tags": {}, "apiVersion": "2018-01-01", "dependsOn": ["Microsoft.Network/virtualNetworks/vrfvmssVNET", + "Microsoft.Network/publicIpAddresses/vrfvmssLBPublicIP"], "properties": {"backendAddressPools": + [{"name": "vrfvmssLBBEPool"}], "inboundNatPools": [{"name": "vrfvmssLBNatPool", + "properties": {"frontendIPConfiguration": {"id": "[concat(resourceId(''Microsoft.Network/loadBalancers'', + ''vrfvmssLB''), ''/frontendIPConfigurations/'', ''loadBalancerFrontEnd'')]"}, + "protocol": "tcp", "frontendPortRangeStart": "50000", "frontendPortRangeEnd": + "50119", "backendPort": 22}}], "frontendIPConfigurations": [{"name": "loadBalancerFrontEnd", + "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/publicIPAddresses/vrfvmssLBPublicIP"}}}]}}, + {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "vrfvmss", "location": + "westus", "tags": {}, "apiVersion": "2020-12-01", "dependsOn": ["Microsoft.Network/virtualNetworks/vrfvmssVNET", + "Microsoft.Network/loadBalancers/vrfvmssLB"], "sku": {"name": "Standard_DS1_v2", + "capacity": 1}, "properties": {"overprovision": true, "upgradePolicy": {"mode": + "manual", "rollingUpgradePolicy": {"maxBatchInstancePercent": 40, "maxUnhealthyInstancePercent": + 40, "maxUnhealthyUpgradedInstancePercent": 40, "pauseTimeBetweenBatches": "PT1S", + "enableCrossZoneUpgrade": null, "prioritizeUnhealthyInstances": true}}, "virtualMachineProfile": + {"storageProfile": {"osDisk": {"createOption": "FromImage", "caching": "ReadWrite", + "managedDisk": {"storageAccountType": null}}, "imageReference": {"publisher": + "Debian", "offer": "debian-10", "sku": "10", "version": "latest"}}, "networkProfile": + {"networkInterfaceConfigurations": [{"name": "vrfvmc8dbNic", "properties": {"primary": + "true", "ipConfigurations": [{"name": "vrfvmc8dbIPConfig", "properties": {"subnet": + {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET/subnets/vrfvmssSubnet"}, + "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB/backendAddressPools/vrfvmssLBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB/inboundNatPools/vrfvmssLBNatPool"}]}}]}}]}, + "osProfile": {"computerNamePrefix": "vrfvmc8db", "adminUsername": "myadmin", + "adminPassword": "[parameters(''adminPassword'')]"}}, "singlePlacementGroup": + null}}], "outputs": {"VMSS": {"type": "object", "value": "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', + ''vrfvmss''),providers(''Microsoft.Compute'', ''virtualMachineScaleSets'').apiVersions[0])]"}}}, + "parameters": {"adminPassword": {"value": "testPassword0"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + Content-Length: + - '4081' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --image --admin-password -g -n --instance-count --generate-ssh-keys --admin-username + --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Resources/deployments/vmss_deploy_wWYpiguKkx5i2zJohIKwhcdY9EJgPk8Q","name":"vmss_deploy_wWYpiguKkx5i2zJohIKwhcdY9EJgPk8Q","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1080109596380747975","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-04-06T08:37:28.1207621Z","duration":"PT2.7918793S","correlationId":"1b8c4257-7b99-4ebe-b24d-c5f43ad605df","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vrfvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/publicIPAddresses/vrfvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vrfvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vrfvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vrfvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vrfvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Compute/virtualMachineScaleSets/vrfvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vrfvmss"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Resources/deployments/vmss_deploy_wWYpiguKkx5i2zJohIKwhcdY9EJgPk8Q/operationStatuses/08585839086401487554?api-version=2020-10-01 + cache-control: + - no-cache + content-length: + - '2755' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:37:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - --image --admin-password -g -n --instance-count --generate-ssh-keys --admin-username + --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585839086401487554?api-version=2020-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:38:01 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - --image --admin-password -g -n --instance-count --generate-ssh-keys --admin-username + --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585839086401487554?api-version=2020-10-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:38:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - --image --admin-password -g -n --instance-count --generate-ssh-keys --admin-username + --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Resources/deployments/vmss_deploy_wWYpiguKkx5i2zJohIKwhcdY9EJgPk8Q","name":"vmss_deploy_wWYpiguKkx5i2zJohIKwhcdY9EJgPk8Q","type":"Microsoft.Resources/deployments","properties":{"templateHash":"1080109596380747975","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-04-06T08:38:27.7454889Z","duration":"PT1M2.4166061S","correlationId":"1b8c4257-7b99-4ebe-b24d-c5f43ad605df","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vrfvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/publicIPAddresses/vrfvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vrfvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vrfvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vrfvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"vrfvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Compute/virtualMachineScaleSets/vrfvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"vrfvmss"}],"outputs":{"vmss":{"type":"Object","value":{"singlePlacementGroup":true,"upgradePolicy":{"mode":"Manual","rollingUpgradePolicy":{"maxBatchInstancePercent":40,"maxUnhealthyInstancePercent":40,"maxUnhealthyUpgradedInstancePercent":40,"pauseTimeBetweenBatches":"PT1S","prioritizeUnhealthyInstances":true}},"virtualMachineProfile":{"osProfile":{"computerNamePrefix":"vrfvmc8db","adminUsername":"myadmin","linuxConfiguration":{"disablePasswordAuthentication":false,"provisionVMAgent":true},"secrets":[],"allowExtensionOperations":true,"requireGuestProvisionSignal":true},"storageProfile":{"osDisk":{"osType":"Linux","createOption":"FromImage","caching":"ReadWrite","managedDisk":{"storageAccountType":"Premium_LRS"},"diskSizeGB":30},"imageReference":{"publisher":"Debian","offer":"debian-10","sku":"10","version":"latest"}},"networkProfile":{"networkInterfaceConfigurations":[{"name":"vrfvmc8dbNic","properties":{"primary":true,"enableAcceleratedNetworking":false,"dnsSettings":{"dnsServers":[]},"enableIPForwarding":false,"ipConfigurations":[{"name":"vrfvmc8dbIPConfig","properties":{"subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET/subnets/vrfvmssSubnet"},"privateIPAddressVersion":"IPv4","loadBalancerBackendAddressPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB/backendAddressPools/vrfvmssLBBEPool"}],"loadBalancerInboundNatPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB/inboundNatPools/vrfvmssLBNatPool"}]}}]}}]}},"provisioningState":"Succeeded","overprovision":true,"doNotRunExtensionsOnOverprovisionedVMs":false,"uniqueId":"5ab67d0a-cd1c-4019-8e4c-92a7a113375a"}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Compute/virtualMachineScaleSets/vrfvmss"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/publicIPAddresses/vrfvmssLBPublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '5676' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:38:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Compute/virtualMachineScaleSets/vrfvmss?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"vrfvmss\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Compute/virtualMachineScaleSets/vrfvmss\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\",\r\n \"rollingUpgradePolicy\": {\r\n \"maxBatchInstancePercent\": + 40,\r\n \"maxUnhealthyInstancePercent\": 40,\r\n \"maxUnhealthyUpgradedInstancePercent\": + 40,\r\n \"pauseTimeBetweenBatches\": \"PT1S\",\r\n \"prioritizeUnhealthyInstances\": + true\r\n }\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"vrfvmc8db\",\r\n \"adminUsername\": + \"myadmin\",\r\n \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": + false,\r\n \"provisionVMAgent\": true\r\n },\r\n \"secrets\": + [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": + true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n + \ \"osType\": \"Linux\",\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n },\r\n \"diskSizeGB\": + 30\r\n },\r\n \"imageReference\": {\r\n \"publisher\": + \"Debian\",\r\n \"offer\": \"debian-10\",\r\n \"sku\": \"10\",\r\n + \ \"version\": \"latest\"\r\n }\r\n },\r\n \"networkProfile\": + {\"networkInterfaceConfigurations\":[{\"name\":\"vrfvmc8dbNic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"vrfvmc8dbIPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/virtualNetworks/vrfvmssVNET/subnets/vrfvmssSubnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB/backendAddressPools/vrfvmssLBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_create_with_policy_setting000001/providers/Microsoft.Network/loadBalancers/vrfvmssLB/inboundNatPools/vrfvmssLBNatPool\"}]}}]}}]}\r\n + \ },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": + true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": + \"5ab67d0a-cd1c-4019-8e4c-92a7a113375a\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2938' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:38:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;384,Microsoft.Compute/GetVMScaleSet30Min;2557 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_update_policy.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_update_policy.yaml new file mode 100644 index 00000000000..582fe44e7e3 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vmss_update_policy.yaml @@ -0,0 +1,802 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-username --admin-password --license-type --instance-count + --generate-ssh-keys + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_update_policy_000001?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001","name":"cli_test_vmss_update_policy_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-06T08:39:30Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:39:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"CoreOS\": {\n \"publisher\": \"CoreOS\",\n \"offer\": + \"CoreOS\",\n \"sku\": \"Stable\",\n \"version\": \"latest\"\n + \ },\n \"Debian\": {\n \"publisher\": \"Debian\",\n + \ \"offer\": \"debian-10\",\n \"sku\": \"10\",\n \"version\": + \"latest\"\n },\n \"openSUSE-Leap\": {\n \"publisher\": + \"SUSE\",\n \"offer\": \"openSUSE-Leap\",\n \"sku\": + \"42.3\",\n \"version\": \"latest\"\n },\n \"RHEL\": + {\n \"publisher\": \"RedHat\",\n \"offer\": \"RHEL\",\n + \ \"sku\": \"7-LVM\",\n \"version\": \"latest\"\n },\n + \ \"SLES\": {\n \"publisher\": \"SUSE\",\n \"offer\": + \"SLES\",\n \"sku\": \"15\",\n \"version\": \"latest\"\n + \ },\n \"UbuntuLTS\": {\n \"publisher\": \"Canonical\",\n + \ \"offer\": \"UbuntuServer\",\n \"sku\": \"18.04-LTS\",\n + \ \"version\": \"latest\"\n }\n },\n \"Windows\": + {\n \"Win2019Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2019-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2016Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012R2Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-R2-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2008R2SP1\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n \"version\": + \"latest\"\n }\n }\n }\n }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2501' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:39:33 GMT + etag: + - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" + expires: + - Tue, 06 Apr 2021 08:44:33 GMT + source-age: + - '131' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 00939d6e69b68dd6dcdec302f21793a2c1599633 + x-frame-options: + - deny + x-github-request-id: + - A884:695C:242C40:2B2160:6068FACA + x-served-by: + - cache-qpg1231-QPG + x-timer: + - S1617698374.918813,VS0,VE1 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-username --admin-password --license-type --instance-count + --generate-ssh-keys + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:39:33 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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "winvmssVNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "winvmssSubnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "winvmssLBPublicIP", + "location": "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Dynamic"}}, {"type": "Microsoft.Network/loadBalancers", "name": "winvmssLB", + "location": "westus", "tags": {}, "apiVersion": "2018-01-01", "dependsOn": ["Microsoft.Network/virtualNetworks/winvmssVNET", + "Microsoft.Network/publicIpAddresses/winvmssLBPublicIP"], "properties": {"backendAddressPools": + [{"name": "winvmssLBBEPool"}], "inboundNatPools": [{"name": "winvmssLBNatPool", + "properties": {"frontendIPConfiguration": {"id": "[concat(resourceId(''Microsoft.Network/loadBalancers'', + ''winvmssLB''), ''/frontendIPConfigurations/'', ''loadBalancerFrontEnd'')]"}, + "protocol": "tcp", "frontendPortRangeStart": "50000", "frontendPortRangeEnd": + "50119", "backendPort": 3389}}], "frontendIPConfigurations": [{"name": "loadBalancerFrontEnd", + "properties": {"publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/publicIPAddresses/winvmssLBPublicIP"}}}]}}, + {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "winvmss", "location": + "westus", "tags": {}, "apiVersion": "2020-12-01", "dependsOn": ["Microsoft.Network/virtualNetworks/winvmssVNET", + "Microsoft.Network/loadBalancers/winvmssLB"], "sku": {"name": "Standard_DS1_v2", + "capacity": 1}, "properties": {"overprovision": true, "upgradePolicy": {"mode": + "manual", "rollingUpgradePolicy": {"maxBatchInstancePercent": null, "maxUnhealthyInstancePercent": + null, "maxUnhealthyUpgradedInstancePercent": null, "pauseTimeBetweenBatches": + null, "enableCrossZoneUpgrade": null, "prioritizeUnhealthyInstances": null}}, + "virtualMachineProfile": {"storageProfile": {"osDisk": {"createOption": "FromImage", + "caching": "ReadWrite", "managedDisk": {"storageAccountType": null}}, "imageReference": + {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2012-R2-Datacenter", + "version": "latest"}}, "networkProfile": {"networkInterfaceConfigurations": + [{"name": "winvm30a7Nic", "properties": {"primary": "true", "ipConfigurations": + [{"name": "winvm30a7IPConfig", "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET/subnets/winvmssSubnet"}, + "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/backendAddressPools/winvmssLBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/inboundNatPools/winvmssLBNatPool"}]}}]}}]}, + "osProfile": {"computerNamePrefix": "winvm30a7", "adminUsername": "clitest1234", + "adminPassword": "[parameters(''adminPassword'')]"}, "licenseType": "Windows_Server"}, + "singlePlacementGroup": null}}], "outputs": {"VMSS": {"type": "object", "value": + "[reference(resourceId(''Microsoft.Compute/virtualMachineScaleSets'', ''winvmss''),providers(''Microsoft.Compute'', + ''virtualMachineScaleSets'').apiVersions[0])]"}}}, "parameters": {"adminPassword": + {"value": "Test123456789#"}}, "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + Content-Length: + - '4161' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --image --admin-username --admin-password --license-type --instance-count + --generate-ssh-keys + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/vmss_deploy_HFl91eZ3tHu8iIWPNADBBqJytI8DQka2","name":"vmss_deploy_HFl91eZ3tHu8iIWPNADBBqJytI8DQka2","type":"Microsoft.Resources/deployments","properties":{"templateHash":"7455154107066474689","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-04-06T08:39:38.709668Z","duration":"PT2.0779209S","correlationId":"c4ed237a-901c-4ef0-8e7e-aa51382fb0ca","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"winvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/publicIPAddresses/winvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"winvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"winvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"winvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"winvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"winvmss"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/vmss_deploy_HFl91eZ3tHu8iIWPNADBBqJytI8DQka2/operationStatuses/08585839085088458899?api-version=2020-10-01 + cache-control: + - no-cache + content-length: + - '2754' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:39:41 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-username --admin-password --license-type --instance-count + --generate-ssh-keys + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585839085088458899?api-version=2020-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:40:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-username --admin-password --license-type --instance-count + --generate-ssh-keys + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585839085088458899?api-version=2020-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:40:42 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-username --admin-password --license-type --instance-count + --generate-ssh-keys + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585839085088458899?api-version=2020-10-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:41:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-username --admin-password --license-type --instance-count + --generate-ssh-keys + User-Agent: + - python/3.7.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Resources/deployments/vmss_deploy_HFl91eZ3tHu8iIWPNADBBqJytI8DQka2","name":"vmss_deploy_HFl91eZ3tHu8iIWPNADBBqJytI8DQka2","type":"Microsoft.Resources/deployments","properties":{"templateHash":"7455154107066474689","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-04-06T08:41:12.7503872Z","duration":"PT1M36.1186401S","correlationId":"c4ed237a-901c-4ef0-8e7e-aa51382fb0ca","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"loadBalancers","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachineScaleSets","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"winvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/publicIPAddresses/winvmssLBPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"winvmssLBPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"winvmssLB"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"winvmssVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"winvmssLB"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"winvmss"}],"outputs":{"vmss":{"type":"Object","value":{"singlePlacementGroup":true,"upgradePolicy":{"mode":"Manual","rollingUpgradePolicy":{"maxBatchInstancePercent":20,"maxUnhealthyInstancePercent":20,"maxUnhealthyUpgradedInstancePercent":20,"pauseTimeBetweenBatches":"PT0S"}},"virtualMachineProfile":{"osProfile":{"computerNamePrefix":"winvm30a7","adminUsername":"clitest1234","windowsConfiguration":{"provisionVMAgent":true,"enableAutomaticUpdates":true},"secrets":[],"allowExtensionOperations":true,"requireGuestProvisionSignal":true},"storageProfile":{"osDisk":{"osType":"Windows","createOption":"FromImage","caching":"ReadWrite","managedDisk":{"storageAccountType":"Premium_LRS"},"diskSizeGB":127},"imageReference":{"publisher":"MicrosoftWindowsServer","offer":"WindowsServer","sku":"2012-R2-Datacenter","version":"latest"}},"networkProfile":{"networkInterfaceConfigurations":[{"name":"winvm30a7Nic","properties":{"primary":true,"enableAcceleratedNetworking":false,"dnsSettings":{"dnsServers":[]},"enableIPForwarding":false,"ipConfigurations":[{"name":"winvm30a7IPConfig","properties":{"subnet":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET/subnets/winvmssSubnet"},"privateIPAddressVersion":"IPv4","loadBalancerBackendAddressPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/backendAddressPools/winvmssLBBEPool"}],"loadBalancerInboundNatPools":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/inboundNatPools/winvmssLBNatPool"}]}}]}}]},"licenseType":"Windows_Server"},"provisioningState":"Succeeded","overprovision":true,"doNotRunExtensionsOnOverprovisionedVMs":false,"uniqueId":"702b3fa2-4d97-4d0f-94ae-0a1d29c56eba"}}},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/publicIPAddresses/winvmssLBPublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '5709' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:41:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"winvmss\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\",\r\n \"rollingUpgradePolicy\": {\r\n \"maxBatchInstancePercent\": + 20,\r\n \"maxUnhealthyInstancePercent\": 20,\r\n \"maxUnhealthyUpgradedInstancePercent\": + 20,\r\n \"pauseTimeBetweenBatches\": \"PT0S\"\r\n }\r\n },\r\n + \ \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": + \"winvm30a7\",\r\n \"adminUsername\": \"clitest1234\",\r\n \"windowsConfiguration\": + {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": + true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": + {\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"createOption\": + \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": + {\r\n \"storageAccountType\": \"Premium_LRS\"\r\n },\r\n + \ \"diskSizeGB\": 127\r\n },\r\n \"imageReference\": + {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": + \"WindowsServer\",\r\n \"sku\": \"2012-R2-Datacenter\",\r\n \"version\": + \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"winvm30a7Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"winvm30a7IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET/subnets/winvmssSubnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/backendAddressPools/winvmssLBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/inboundNatPools/winvmssLBNatPool\"}]}}]}}]},\r\n + \ \"licenseType\": \"Windows_Server\"\r\n },\r\n \"provisioningState\": + \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"702b3fa2-4d97-4d0f-94ae-0a1d29c56eba\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2968' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:41:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;389,Microsoft.Compute/GetVMScaleSet30Min;2547 + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "tags": {}, "sku": {"name": "Standard_DS1_v2", "tier": + "Standard", "capacity": 1}, "properties": {"upgradePolicy": {"mode": "Manual", + "rollingUpgradePolicy": {"maxBatchInstancePercent": 40, "maxUnhealthyInstancePercent": + 40, "maxUnhealthyUpgradedInstancePercent": 40, "pauseTimeBetweenBatches": "PT1S", + "prioritizeUnhealthyInstances": true}}, "virtualMachineProfile": {"osProfile": + {"computerNamePrefix": "winvm30a7", "adminUsername": "clitest1234", "windowsConfiguration": + {"provisionVMAgent": true, "enableAutomaticUpdates": true}, "secrets": []}, + "storageProfile": {"osDisk": {"caching": "ReadWrite", "createOption": "FromImage", + "diskSizeGB": 127, "osType": "Windows", "managedDisk": {"storageAccountType": + "Premium_LRS"}}}, "networkProfile": {"networkInterfaceConfigurations": [{"name": + "winvm30a7Nic", "properties": {"primary": true, "enableAcceleratedNetworking": + false, "dnsSettings": {"dnsServers": []}, "ipConfigurations": [{"name": "winvm30a7IPConfig", + "properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET/subnets/winvmssSubnet"}, + "privateIPAddressVersion": "IPv4", "loadBalancerBackendAddressPools": [{"id": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/backendAddressPools/winvmssLBBEPool"}], + "loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/inboundNatPools/winvmssLBNatPool"}]}}], + "enableIPForwarding": false}}]}, "licenseType": "Windows_Server"}, "overprovision": + true, "doNotRunExtensionsOnOverprovisionedVMs": false, "singlePlacementGroup": + true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + Content-Length: + - '2002' + Content-Type: + - application/json + ParameterSetName: + - -g -n --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"winvmss\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\",\r\n \"rollingUpgradePolicy\": {\r\n \"maxBatchInstancePercent\": + 40,\r\n \"maxUnhealthyInstancePercent\": 40,\r\n \"maxUnhealthyUpgradedInstancePercent\": + 40,\r\n \"pauseTimeBetweenBatches\": \"PT1S\",\r\n \"prioritizeUnhealthyInstances\": + true\r\n }\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"winvm30a7\",\r\n \"adminUsername\": + \"clitest1234\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": + true,\r\n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\": + [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": + true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n + \ \"osType\": \"Windows\",\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n },\r\n \"diskSizeGB\": + 127\r\n },\r\n \"imageReference\": {\r\n \"publisher\": + \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n + \ \"sku\": \"2012-R2-Datacenter\",\r\n \"version\": \"latest\"\r\n + \ }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"winvm30a7Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"winvm30a7IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET/subnets/winvmssSubnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/backendAddressPools/winvmssLBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/inboundNatPools/winvmssLBNatPool\"}]}}]}}]},\r\n + \ \"licenseType\": \"Windows_Server\"\r\n },\r\n \"provisioningState\": + \"Updating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"702b3fa2-4d97-4d0f-94ae-0a1d29c56eba\"\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/667ed5b5-f3e5-4fab-a0e5-8b1608332db3?api-version=2020-12-01 + cache-control: + - no-cache + content-length: + - '3014' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:41:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/CreateVMScaleSet3Min;58,Microsoft.Compute/CreateVMScaleSet30Min;292,Microsoft.Compute/VmssQueuedVMOperations;0 + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-ms-request-charge: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/667ed5b5-f3e5-4fab-a0e5-8b1608332db3?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-06T08:41:16.4133914+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"667ed5b5-f3e5-4fab-a0e5-8b1608332db3\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:41:31 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29971 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/667ed5b5-f3e5-4fab-a0e5-8b1608332db3?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-06T08:41:16.4133914+00:00\",\r\n \"endTime\": + \"2021-04-06T08:41:32.8985022+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"667ed5b5-f3e5-4fab-a0e5-8b1608332db3\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '184' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:42:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29969 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vmss update + Connection: + - keep-alive + ParameterSetName: + - -g -n --max-bip --max-uip --max-uuip --ptb --prioritize-ui + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss?api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"winvmss\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Compute/virtualMachineScaleSets/winvmss\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_DS1_v2\",\r\n + \ \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"properties\": + {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n \"mode\": + \"Manual\",\r\n \"rollingUpgradePolicy\": {\r\n \"maxBatchInstancePercent\": + 40,\r\n \"maxUnhealthyInstancePercent\": 40,\r\n \"maxUnhealthyUpgradedInstancePercent\": + 40,\r\n \"pauseTimeBetweenBatches\": \"PT1S\",\r\n \"prioritizeUnhealthyInstances\": + true\r\n }\r\n },\r\n \"virtualMachineProfile\": {\r\n \"osProfile\": + {\r\n \"computerNamePrefix\": \"winvm30a7\",\r\n \"adminUsername\": + \"clitest1234\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": + true,\r\n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\": + [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": + true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\n + \ \"osType\": \"Windows\",\r\n \"createOption\": \"FromImage\",\r\n + \ \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n + \ \"storageAccountType\": \"Premium_LRS\"\r\n },\r\n \"diskSizeGB\": + 127\r\n },\r\n \"imageReference\": {\r\n \"publisher\": + \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n + \ \"sku\": \"2012-R2-Datacenter\",\r\n \"version\": \"latest\"\r\n + \ }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"winvm30a7Nic\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"winvm30a7IPConfig\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/virtualNetworks/winvmssVNET/subnets/winvmssSubnet\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/backendAddressPools/winvmssLBBEPool\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vmss_update_policy_000001/providers/Microsoft.Network/loadBalancers/winvmssLB/inboundNatPools/winvmssLBNatPool\"}]}}]}}]},\r\n + \ \"licenseType\": \"Windows_Server\"\r\n },\r\n \"provisioningState\": + \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": + false,\r\n \"uniqueId\": \"702b3fa2-4d97-4d0f-94ae-0a1d29c56eba\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3015' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 06 Apr 2021 08:42:23 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSet3Min;389,Microsoft.Compute/GetVMScaleSet30Min;2544 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py index e416aafb936..6025198a7fd 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py @@ -2253,6 +2253,28 @@ def test_vmss_create_options(self, resource_group): self.check('virtualMachineProfile.storageProfile.dataDisks[0].diskSizeGb', 1) ]) + @ResourceGroupPreparer(name_prefix='cli_test_vmss_create_with_policy_setting') + def test_vmss_create_with_policy_setting(self, resource_group): + + maxBIP, maxUIP, maxUUIP, PTB = 40, 40, 40, 'PT1S' + self.kwargs.update({ + 'vmss': 'vrfvmss', + 'maxBIP': maxBIP, + 'maxUIP': maxUIP, + 'maxUUIP': maxUUIP, + 'PTB': PTB + }) + + self.cmd('vmss create --image Debian --admin-password testPassword0 -g {rg} -n {vmss} --instance-count 1 --generate-ssh-keys --admin-username myadmin --max-batch-instance-percent {maxBIP} --max-unhealthy-instance-percent {maxUIP} --max-unhealthy-upgraded-instance-percent {maxUUIP} --pause-time-between-batches {PTB} --prioritize-unhealthy-instances true') + + self.cmd('vmss show -g {rg} -n {vmss}', checks=[ + self.check('upgradePolicy.rollingUpgradePolicy.maxBatchInstancePercent', maxBIP), + self.check('upgradePolicy.rollingUpgradePolicy.maxUnhealthyInstancePercent', maxUIP), + self.check('upgradePolicy.rollingUpgradePolicy.maxUnhealthyInstancePercent', maxUUIP), + self.check('upgradePolicy.rollingUpgradePolicy.pauseTimeBetweenBatches', PTB), + self.check('upgradePolicy.rollingUpgradePolicy.prioritizeUnhealthyInstances', True) + ]) + @ResourceGroupPreparer(name_prefix='cli_test_vmss_create_ephemeral_os_disk') def test_vmss_create_ephemeral_os_disk(self, resource_group): @@ -2486,6 +2508,29 @@ def test_vmss_update(self, resource_group): # test that cannot try to update protection policy on VMSS itself self.cmd('vmss update -g {rg} -n {vmss} --protect-from-scale-in True --protect-from-scale-set-actions True', expect_failure=True) + @ResourceGroupPreparer(name_prefix='cli_test_vmss_update_policy_') + def test_vmss_update_policy(self, resource_group): + + maxBIP, maxUIP, maxUUIP, PTB = 40, 40, 40, 'PT1S' + self.kwargs.update({ + 'vmss': 'winvmss', + 'maxBIP': maxBIP, + 'maxUIP': maxUIP, + 'maxUUIP': maxUUIP, + 'PTB': PTB, + 'prioritizeUI': True, + }) + + self.cmd('vmss create -g {rg} -n {vmss} --image Win2012R2Datacenter --admin-username clitest1234 --admin-password Test123456789# --license-type Windows_Server --instance-count 1 --generate-ssh-keys') + # test rolling upgrade policy + self.cmd('vmss update -g {rg} -n {vmss} --max-batch-instance-percent {maxBIP} --max-unhealthy-instance-percent {maxUIP} --max-unhealthy-upgraded-instance-percent {maxUUIP} --pause-time-between-batches {PTB} --prioritize-unhealthy-instances true', checks=[ + self.check('upgradePolicy.rollingUpgradePolicy.maxBatchInstancePercent', maxBIP), + self.check('upgradePolicy.rollingUpgradePolicy.maxUnhealthyInstancePercent', maxUIP), + self.check('upgradePolicy.rollingUpgradePolicy.maxUnhealthyInstancePercent', maxUUIP), + self.check('upgradePolicy.rollingUpgradePolicy.pauseTimeBetweenBatches', PTB), + self.check('upgradePolicy.rollingUpgradePolicy.prioritizeUnhealthyInstances', True) + ]) + @ResourceGroupPreparer(name_prefix='cli_test_vmss_update_image_') def test_vmss_update_image(self): self.kwargs.update({