Skip to content
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ def default_api_version(self):
'vm_default_target_network': '2018-01-01',
'nw_connection_monitor': '2019-06-01',
'container_network': '2018-08-01',
'appservice_network': '2020-04-01',
'appservice_ensure_subnet': '2019-02-01'
'appservice_network': '2021-08-01'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better for us to totally remove adhoc api versions and use

ResourceType.MGMT_NETWORK: '2021-08-01',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense - will make this change , after rebasing, since looks like I need to re-record some tests anyway :)

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _ensure_subnet_service_endpoint(cli_ctx, subnet_id):
' skip validation and manually verify service endpoint.')

vnet_client = network_client_factory(cli_ctx, api_version=AD_HOC_API_VERSIONS[ResourceType.MGMT_NETWORK]
['appservice_ensure_subnet'])
['appservice_network'])
subnet_obj = vnet_client.subnets.get(subnet_resource_group, subnet_vnet_name, subnet_name)
subnet_obj.service_endpoints = subnet_obj.service_endpoints or []
service_endpoint_exists = False
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.

Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ interactions:
ParameterSetName:
- -g -n --address-prefix --subnet-name --subnet-prefix
User-Agent:
- AZURECLI/2.38.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.13 (macOS-12.4-x86_64-i386-64bit)
- AZURECLI/2.39.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.2 (macOS-10.16-x86_64-i386-64bit)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2021-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"japanwest","tags":{"product":"azurecli","cause":"automation","date":"2022-07-15T00:35:26Z"},"properties":{"provisioningState":"Succeeded"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"japanwest","tags":{"product":"azurecli","cause":"automation","date":"2022-08-19T00:10:40Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
Expand All @@ -27,7 +27,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 15 Jul 2022 00:35:29 GMT
- Fri, 19 Aug 2022 00:10:42 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -62,21 +62,21 @@ interactions:
ParameterSetName:
- -g -n --address-prefix --subnet-name --subnet-prefix
User-Agent:
- AZURECLI/2.38.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.13 (macOS-12.4-x86_64-i386-64bit)
- AZURECLI/2.39.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.2 (macOS-10.16-x86_64-i386-64bit)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vnet000005?api-version=2021-08-01
response:
body:
string: "{\r\n \"name\": \"vnet000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vnet000005\",\r\n
\ \"etag\": \"W/\\\"eb187eac-38e9-4e52-b73e-a08b2026afb4\\\"\",\r\n \"type\":
\ \"etag\": \"W/\\\"a347d92a-3485-4ef4-b53c-63b404eb672f\\\"\",\r\n \"type\":
\"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"japanwest\",\r\n
\ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n
\ \"resourceGuid\": \"75e7185a-db85-40b2-af92-b452559a5f8f\",\r\n \"addressSpace\":
\ \"resourceGuid\": \"9600d6ea-0293-4119-b08a-5ea60368a76b\",\r\n \"addressSpace\":
{\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n
\ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n
\ \"subnets\": [\r\n {\r\n \"name\": \"subnet000004\",\r\n \"id\":
\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vnet000005/subnets/subnet000004\",\r\n
\ \"etag\": \"W/\\\"eb187eac-38e9-4e52-b73e-a08b2026afb4\\\"\",\r\n
\ \"etag\": \"W/\\\"a347d92a-3485-4ef4-b53c-63b404eb672f\\\"\",\r\n
\ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n
\ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\":
[],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\":
Expand All @@ -87,15 +87,15 @@ interactions:
azure-asyncnotification:
- Enabled
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/japanwest/operations/fa919d9a-c01a-428e-8d6f-0654ffa872d8?api-version=2021-08-01
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/japanwest/operations/78d71467-0b50-4147-81e4-9a4ab624440a?api-version=2021-08-01
cache-control:
- no-cache
content-length:
- '1314'
content-type:
- application/json; charset=utf-8
date:
- Fri, 15 Jul 2022 00:35:32 GMT
- Fri, 19 Aug 2022 00:10:49 GMT
expires:
- '-1'
pragma:
Expand All @@ -108,9 +108,9 @@ interactions:
x-content-type-options:
- nosniff
x-ms-arm-service-request-id:
- 56b1b6fa-f169-446b-9bc2-c5691b7ad5ae
- bc8198d2-5073-4f46-abad-7b0552864f9a
x-ms-ratelimit-remaining-subscription-writes:
- '1196'
- '1199'
status:
code: 201
message: Created
Expand All @@ -128,9 +128,9 @@ interactions:
ParameterSetName:
- -g -n --address-prefix --subnet-name --subnet-prefix
User-Agent:
- AZURECLI/2.38.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.13 (macOS-12.4-x86_64-i386-64bit)
- AZURECLI/2.39.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.2 (macOS-10.16-x86_64-i386-64bit)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/japanwest/operations/fa919d9a-c01a-428e-8d6f-0654ffa872d8?api-version=2021-08-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/japanwest/operations/78d71467-0b50-4147-81e4-9a4ab624440a?api-version=2021-08-01
response:
body:
string: "{\r\n \"status\": \"Succeeded\"\r\n}"
Expand All @@ -142,7 +142,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 15 Jul 2022 00:35:35 GMT
- Fri, 19 Aug 2022 00:10:52 GMT
expires:
- '-1'
pragma:
Expand All @@ -159,7 +159,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-arm-service-request-id:
- e491e3c8-2a2f-4843-8949-bc689b6b661b
- 7f44068e-d61b-4415-b885-d5013225784f
status:
code: 200
message: OK
Expand All @@ -177,21 +177,21 @@ interactions:
ParameterSetName:
- -g -n --address-prefix --subnet-name --subnet-prefix
User-Agent:
- AZURECLI/2.38.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.13 (macOS-12.4-x86_64-i386-64bit)
- AZURECLI/2.39.0 azsdk-python-azure-mgmt-network/20.0.0 Python/3.8.2 (macOS-10.16-x86_64-i386-64bit)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vnet000005?api-version=2021-08-01
response:
body:
string: "{\r\n \"name\": \"vnet000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vnet000005\",\r\n
\ \"etag\": \"W/\\\"cbc4a409-c4ba-402c-9d38-c15de0ed0ea9\\\"\",\r\n \"type\":
\ \"etag\": \"W/\\\"89fbd0f4-ffb2-4c62-9249-da0f0b5b10f3\\\"\",\r\n \"type\":
\"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"japanwest\",\r\n
\ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n
\ \"resourceGuid\": \"75e7185a-db85-40b2-af92-b452559a5f8f\",\r\n \"addressSpace\":
\ \"resourceGuid\": \"9600d6ea-0293-4119-b08a-5ea60368a76b\",\r\n \"addressSpace\":
{\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n
\ },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": []\r\n },\r\n
\ \"subnets\": [\r\n {\r\n \"name\": \"subnet000004\",\r\n \"id\":
\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vnet000005/subnets/subnet000004\",\r\n
\ \"etag\": \"W/\\\"cbc4a409-c4ba-402c-9d38-c15de0ed0ea9\\\"\",\r\n
\ \"etag\": \"W/\\\"89fbd0f4-ffb2-4c62-9249-da0f0b5b10f3\\\"\",\r\n
\ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n
\ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\":
[],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\":
Expand All @@ -206,9 +206,9 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 15 Jul 2022 00:35:35 GMT
- Fri, 19 Aug 2022 00:10:54 GMT
etag:
- W/"cbc4a409-c4ba-402c-9d38-c15de0ed0ea9"
- W/"89fbd0f4-ffb2-4c62-9249-da0f0b5b10f3"
expires:
- '-1'
pragma:
Expand All @@ -225,7 +225,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-arm-service-request-id:
- af5220bc-dfea-44fb-8c3e-512bcf9e3b1f
- ff175fa0-65b3-4ef7-929e-5880b57012cd
status:
code: 200
message: OK
Expand All @@ -243,12 +243,12 @@ interactions:
ParameterSetName:
- -g -n --sku
User-Agent:
- AZURECLI/2.38.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.13 (macOS-12.4-x86_64-i386-64bit)
- AZURECLI/2.39.0 azsdk-python-azure-mgmt-resource/21.1.0b1 Python/3.8.2 (macOS-10.16-x86_64-i386-64bit)
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2021-04-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"japanwest","tags":{"product":"azurecli","cause":"automation","date":"2022-07-15T00:35:26Z"},"properties":{"provisioningState":"Succeeded"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"japanwest","tags":{"product":"azurecli","cause":"automation","date":"2022-08-19T00:10:40Z"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
Expand All @@ -257,7 +257,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Fri, 15 Jul 2022 00:35:36 GMT
- Fri, 19 Aug 2022 00:10:55 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -291,13 +291,13 @@ interactions:
ParameterSetName:
- -g -n --sku
User-Agent:
- AZURECLI/2.38.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.8.13 (macOS-12.4-x86_64-i386-64bit)
- AZURECLI/2.39.0 azsdk-python-azure-mgmt-web/7.0.0 Python/3.8.2 (macOS-10.16-x86_64-i386-64bit)
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/vnetplan000003?api-version=2022-03-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/vnetplan000003","name":"vnetplan000003","type":"Microsoft.Web/serverfarms","kind":"app","location":"japanwest","properties":{"serverFarmId":57255,"name":"vnetplan000003","sku":{"name":"P1v2","tier":"PremiumV2","size":"P1v2","family":"Pv2","capacity":1},"workerSize":"D1","workerSizeId":3,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"D1","currentWorkerSizeId":3,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-JapanWestwebspace","subscription":"2edc29f4-b81f-494b-a624-cc619903b837","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"Japan
West","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-os1-027_57255","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false},"sku":{"name":"P1v2","tier":"PremiumV2","size":"P1v2","family":"Pv2","capacity":1}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Web/serverfarms/vnetplan000003","name":"vnetplan000003","type":"Microsoft.Web/serverfarms","kind":"app","location":"japanwest","properties":{"serverFarmId":62933,"name":"vnetplan000003","sku":{"name":"P1v2","tier":"PremiumV2","size":"P1v2","family":"Pv2","capacity":1},"workerSize":"D1","workerSizeId":3,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"D1","currentWorkerSizeId":3,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"clitest.rg000001-JapanWestwebspace","subscription":"e483435e-282d-4ac1-92b5-d6123f2aa360","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":0,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"Japan
West","perSiteScaling":false,"elasticScaleEnabled":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"clitest.rg000001","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-os1-027_62933","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null,"kubeEnvironmentProfile":null,"zoneRedundant":false},"sku":{"name":"P1v2","tier":"PremiumV2","size":"P1v2","family":"Pv2","capacity":1}}'
headers:
cache-control:
- no-cache
Expand All @@ -306,9 +306,9 @@ interactions:
content-type:
- application/json
date:
- Fri, 15 Jul 2022 00:35:45 GMT
- Fri, 19 Aug 2022 00:11:05 GMT
etag:
- '"1D897E2D0F2B640"'
- '"1D8B3602BFC8CB5"'
expires:
- '-1'
pragma:
Expand All @@ -326,7 +326,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1194'
- '1199'
x-powered-by:
- ASP.NET
status:
Expand Down
Loading
Loading