Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions src/azure-cli/azure/cli/command_modules/vm/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ def _parse_image_argument(cmd, namespace):
namespace.os_offer = matched['offer']
namespace.os_sku = matched['sku']
namespace.os_version = matched['version']
if not any([namespace.plan_name, namespace.plan_product, namespace.plan_publisher]):
image_plan = _get_image_plan_info_if_exists(cmd, namespace)
if image_plan:
namespace.plan_name = image_plan.name
namespace.plan_product = image_plan.product
namespace.plan_publisher = image_plan.publisher
return 'urn'
except requests.exceptions.ConnectionError:
pass
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ interactions:
- -g --name --validate --image --disable-overprovision --instance-count --single-placement-group
--admin-username --generate-ssh-keys
User-Agent:
- AZURECLI/2.34.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
- AZURECLI/2.34.1 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-02-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-03-01T06:33:02Z"},"properties":{"provisioningState":"Succeeded"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2022-03-16T12:16:10Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
Expand All @@ -28,7 +28,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 01 Mar 2022 06:33:09 GMT
- Wed, 16 Mar 2022 12:16:14 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -111,11 +111,11 @@ interactions:
content-type:
- text/plain; charset=utf-8
date:
- Tue, 01 Mar 2022 06:33:11 GMT
- Wed, 16 Mar 2022 12:16:15 GMT
etag:
- W/"d5acead0b38a79d988c245a7a15ec01f999da9244c97bbdc1fa2ec70d9e433f5"
expires:
- Tue, 01 Mar 2022 06:38:11 GMT
- Wed, 16 Mar 2022 12:21:15 GMT
source-age:
- '0'
strict-transport-security:
Expand All @@ -131,20 +131,130 @@ interactions:
x-content-type-options:
- nosniff
x-fastly-request-id:
- 65d852a501b6b20c90032de9c02a0606c9c543e9
- ba20cea8a6a5e461886fc3aef32ed4dd4d64fadb
x-frame-options:
- deny
x-github-request-id:
- 598A:3ED3:B34EBB:DB74B0:621DBE26
- 62D6:4BBE:190F29:200F32:6231CBF1
x-served-by:
- cache-qpg1242-QPG
- cache-itm18830-ITM
x-timer:
- S1646116391.879097,VS0,VE253
- S1647432976.791044,VS0,VE1
x-xss-protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmss create
Connection:
- keep-alive
ParameterSetName:
- -g --name --validate --image --disable-overprovision --instance-count --single-placement-group
--admin-username --generate-ssh-keys
User-Agent:
- AZURECLI/2.34.1 azsdk-python-azure-mgmt-compute/25.0.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/UbuntuServer/skus/18.04-LTS/versions?$top=1&$orderby=name%20desc&api-version=2017-03-30
response:
body:
string: "[\r\n {\r\n \"name\": \"18.04.202203080\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/UbuntuServer/Skus/18.04-LTS/Versions/18.04.202203080\",\r\n
\ \"location\": \"westus\"\r\n }\r\n]"
headers:
cache-control:
- no-cache
content-length:
- '286'
content-type:
- application/json; charset=utf-8
date:
- Wed, 16 Mar 2022 12:16:16 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/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43971
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- vmss create
Connection:
- keep-alive
ParameterSetName:
- -g --name --validate --image --disable-overprovision --instance-count --single-placement-group
--admin-username --generate-ssh-keys
User-Agent:
- AZURECLI/2.34.1 azsdk-python-azure-mgmt-compute/25.0.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/UbuntuServer/skus/18.04-LTS/versions/18.04.202203080?api-version=2017-03-30
response:
body:
string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n \"architecture\":
\"x64\",\r\n \"replicaType\": \"Unmanaged\",\r\n \"disallowed\": {\r\n
\ \"vmDiskType\": \"None\"\r\n },\r\n \"automaticOSUpgradeProperties\":
{\r\n \"automaticOSUpgradeSupported\": true\r\n },\r\n \"imageDeprecationStatus\":
{\r\n \"imageState\": \"Active\"\r\n },\r\n \"features\": [\r\n
\ {\r\n \"name\": \"IsAcceleratedNetworkSupported\",\r\n \"value\":
\"True\"\r\n }\r\n ],\r\n \"osDiskImage\": {\r\n \"operatingSystem\":
\"Linux\",\r\n \"sizeInGb\": 31,\r\n \"sizeInBytes\": 32213303808\r\n
\ },\r\n \"dataDiskImages\": []\r\n },\r\n \"location\": \"westus\",\r\n
\ \"name\": \"18.04.202203080\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/UbuntuServer/Skus/18.04-LTS/Versions/18.04.202203080\"\r\n}"
headers:
cache-control:
- no-cache
content-length:
- '873'
content-type:
- application/json; charset=utf-8
date:
- Wed, 16 Mar 2022 12:16:18 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/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73985
status:
code: 200
message: OK
- request:
body: null
headers:
Expand All @@ -160,7 +270,7 @@ interactions:
- -g --name --validate --image --disable-overprovision --instance-count --single-placement-group
--admin-username --generate-ssh-keys
User-Agent:
- AZURECLI/2.34.0 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
- AZURECLI/2.34.1 azsdk-python-azure-mgmt-network/19.3.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks?api-version=2017-10-01
response:
Expand All @@ -174,7 +284,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 01 Mar 2022 06:33:10 GMT
- Wed, 16 Mar 2022 12:16:18 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -225,11 +335,11 @@ interactions:
{"storageProfile": {"osDisk": {"createOption": "FromImage", "caching": "ReadWrite",
"managedDisk": {"storageAccountType": null}}, "imageReference": {"publisher":
"Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": "latest"}},
"osProfile": {"computerNamePrefix": "vmss15260", "adminUsername": "ubuntuadmin",
"osProfile": {"computerNamePrefix": "vmss1d7f9", "adminUsername": "ubuntuadmin",
"linuxConfiguration": {"disablePasswordAuthentication": true, "ssh": {"publicKeys":
[{"path": "/home/ubuntuadmin/.ssh/authorized_keys", "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCyHIxtehmSa4iZExLrQ4pc7bklBKwAR865F9LEWNd8SIgFCYy2s+vA5Sofj2cMD06HqCAPeM+VJvjwImCmGhO3GQU816Zo7AOX21dKGUZLbGQ35lxXPMsd0aCx8J8Ncq1sReBPlZs9BT2X0pR2jkalCJQKFWXXkwXyj8l05PunQm2lnggijrnLAMjdI7+6S6rNUs4oA54egfrKIXSQiqjfSNMySytJzJkGYdbQzUrGrL47qNEy0keAPi1VGlijs/m3khFQAd2Bdb1Nhp1k8QC0OQ5BccKPVfFRyz/EoRMFvjzfNQrR75D6f2q+XZIrlee1Z7MX/KpYx1IOI2ATlfRqUoIlM7O1hWsQr9rGek+D10BtBJ4uZsrUOHs+llQo5fQXzVunZEzaYUBulRwPO1kBHjSkD0NNCO5490EnaCIFot41Wh/bDTWFNDZkZHxXhbrXRaA/d0vzrlAiLDUkUEtOKP0jc9o9vz/vSbEth6u8df06cq9yYVbn+1j93lX5vJ0=
cxznmhdcxz\n"}]}}}, "networkProfile": {"networkInterfaceConfigurations": [{"name":
"vmss15260Nic", "properties": {"ipConfigurations": [{"name": "vmss15260IPConfig",
"vmss1d7f9Nic", "properties": {"ipConfigurations": [{"name": "vmss1d7f9IPConfig",
"properties": {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vmss1VNET/subnets/vmss1Subnet"},
"loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/loadBalancers/vmss1LB/backendAddressPools/vmss1LBBEPool"}],
"loadBalancerInboundNatPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/loadBalancers/vmss1LB/inboundNatPools/vmss1LBNatPool"}]}}],
Expand All @@ -255,19 +365,19 @@ interactions:
- -g --name --validate --image --disable-overprovision --instance-count --single-placement-group
--admin-username --generate-ssh-keys
User-Agent:
- AZURECLI/2.34.0 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
- AZURECLI/2.34.1 azsdk-python-azure-mgmt-resource/20.0.0 Python/3.10.0 (Windows-10-10.0.19043-SP0)
method: POST
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/validate?api-version=2018-02-01
response:
body:
string: "{\"error\":{\"code\":\"InvalidTemplateDeployment\",\"message\":\"The
template deployment 'vmss_deploy_0ig97twWI7WZ01a65CxmJ7Jy2q78JwTz' is not
valid according to the validation procedure. The tracking id is '9b7a9887-67a4-4699-a211-acbe3be91168'.
template deployment 'vmss_deploy_BrGqihuwf2rsJIPC2MNiaYLESiOZn9NK' is not
valid according to the validation procedure. The tracking id is '0634093d-f2f1-4704-97a0-7eeee21216c6'.
See inner errors for details.\",\"details\":[{\"code\":\"QuotaExceeded\",\"message\":\"Operation
could not be completed as it results in exceeding approved Total Regional
Cores quota. Additional details - Deployment Model: Resource Manager, Location:
westus, Current Limit: 100, Current Usage: 1, Additional Required: 101, (Minimum)
New Limit Required: 102. Submit a request for Quota increase at https://aka.ms/ProdportalCRP/#blade/Microsoft_Azure_Capacity/UsageAndQuota.ReactView/Parameters/%7B%22subscriptionId%22:%220b1f6471-1bf0-4dda-aec3-cb9272f09590%22,%22command%22:%22openQuotaApprovalBlade%22,%22quotas%22:[%7B%22location%22:%22westus%22,%22providerId%22:%22Microsoft.Compute%22,%22resourceName%22:%22cores%22,%22quotaRequest%22:%7B%22properties%22:%7B%22limit%22:102,%22unit%22:%22Count%22,%22name%22:%7B%22value%22:%22cores%22%7D%7D%7D%7D]%7D
westus, Current Limit: 100, Current Usage: 0, Additional Required: 101, (Minimum)
New Limit Required: 101. Submit a request for Quota increase at https://aka.ms/ProdportalCRP/#blade/Microsoft_Azure_Capacity/UsageAndQuota.ReactView/Parameters/%7B%22subscriptionId%22:%220b1f6471-1bf0-4dda-aec3-cb9272f09590%22,%22command%22:%22openQuotaApprovalBlade%22,%22quotas%22:[%7B%22location%22:%22westus%22,%22providerId%22:%22Microsoft.Compute%22,%22resourceName%22:%22cores%22,%22quotaRequest%22:%7B%22properties%22:%7B%22limit%22:101,%22unit%22:%22Count%22,%22name%22:%7B%22value%22:%22cores%22%7D%7D%7D%7D]%7D
by specifying parameters listed in the \u2018Details\u2019 section for deployment
to succeed. Please read more about quota limits at https://docs.microsoft.com/en-us/azure/azure-supportability/regional-quota-requests\"}]}}"
headers:
Expand All @@ -278,7 +388,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Tue, 01 Mar 2022 06:33:21 GMT
- Wed, 16 Mar 2022 12:16:27 GMT
expires:
- '-1'
pragma:
Expand All @@ -290,7 +400,7 @@ interactions:
x-ms-failure-cause:
- gateway
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
- '1197'
status:
code: 400
message: Bad Request
Expand Down
Loading