upgrade azure mgmt compute to latest version

Fix failures on some subscriptions.
This commit is contained in:
Chi Song 2023-10-05 14:48:23 -07:00 коммит произвёл Chi Song
Родитель b872205080
Коммит 4b51339bc4
4 изменённых файлов: 4 добавлений и 9 удалений

Просмотреть файл

@ -1539,10 +1539,7 @@ def load_environment(
environment_runbook.nodes_raw = []
vms_map: Dict[str, VirtualMachine] = {}
# When lists VMs, it may raise unsupported api version error on "2022-08-01"
# in some subscriptions. This version should be safe for those
# subscriptions. Once the new version is supported, we can remove this.
compute_client = get_compute_client(platform, api_version="2022-03-01")
compute_client = get_compute_client(platform)
vms = compute_client.virtual_machines.list(resource_group_name)
for vm in vms:
node_schema = schema.RemoteNode(name=vm.name)

Просмотреть файл

@ -2213,9 +2213,7 @@ class AzureExtension(AzureFeatureMixin, Feature):
sub="***REDACTED***",
)
self._log.debug(
f"extension_parameters: {extension_parameters.as_dict()}" # type: ignore
)
self._log.debug(f"extension_parameters: {extension_parameters.as_dict()}")
operation = compute_client.virtual_machine_extensions.begin_create_or_update(
resource_group_name=self._resource_group_name,

Просмотреть файл

@ -1048,7 +1048,7 @@ class AzurePlatform(Platform):
log.debug(f"{key}: querying")
all_skus: Dict[str, AzureCapability] = dict()
paged_skus = compute_client.resource_skus.list(
f"location eq '{location}'"
filter=f"location eq '{location}'"
).by_page()
for skus in paged_skus:
for sku_obj in skus:

Просмотреть файл

@ -40,7 +40,7 @@ aws = [
azure = [
"azure-identity ~= 1.9.0",
"azure-mgmt-compute ~= 28.0.0",
"azure-mgmt-compute ~= 30.3.0",
"azure-mgmt-keyvault ~= 10.2.3",
"azure-mgmt-marketplaceordering ~= 1.1.0",
"azure-mgmt-msi ~= 7.0.0",