Skip to content

Remove ad-hoc api versions #23389

Description

@jiasli

Several command modules use ad-hoc api versions for azure-mgmt-network SDK (#17816):

# We should avoid using ad hoc API versions,
# use the version in a profile as much as possible.
AD_HOC_API_VERSIONS = {
ResourceType.MGMT_NETWORK: {
'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'
}
}

These API versions are preserved when trimming the azure-mgmt-network SDK:

def remove_unused_network_api_versions():
# Hard-coded API versions
used_network_api_versions = set(AD_HOC_API_VERSIONS[ResourceType.MGMT_NETWORK].values())

This leads to bigger Azure CLI package.

The solution is to migrate to the latest API version:

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

Metadata

Metadata

Labels

Azure CLI TeamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...feature-request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions