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', |
Several command modules use ad-hoc api versions for
azure-mgmt-networkSDK (#17816):azure-cli/src/azure-cli-core/azure/cli/core/profiles/_shared.py
Lines 406 to 416 in 3e26929
These API versions are preserved when trimming the
azure-mgmt-networkSDK:azure-cli/build_scripts/windows/scripts/remove_unused_api_versions.py
Lines 18 to 20 in fcbce97
This leads to bigger Azure CLI package.
The solution is to migrate to the latest API version:
azure-cli/src/azure-cli-core/azure/cli/core/profiles/_shared.py
Line 155 in 3e26929