代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/fence-agents 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 40a71a94e80da3bfce2607aaa584d57183cbaa35 Mon Sep 17 00:00:00 2001
From: devanshjain <devanshjain@microsoft.com>
Date: Thu, 13 Jun 2024 18:00:49 +0000
Subject: [PATCH] fence_azure: fix pinning client api versions for
compatibility across different azure sdk versions
---
lib/azure_fence.py.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/lib/azure_fence.py.py b/lib/azure_fence.py.py
index fcbc40ab0..5b26bd346 100644
--- a/lib/azure_fence.py.py
+++ b/lib/azure_fence.py.py
@@ -14,6 +14,8 @@
IP_TYPE_DYNAMIC = "Dynamic"
MAX_RETRY = 10
RETRY_WAIT = 5
+COMPUTE_CLIENT_API_VERSION = "2021-11-01"
+NETWORK_MGMT_CLIENT_API_VERSION = "2021-05-01"
class AzureSubResource:
Type = None
@@ -366,17 +368,20 @@ def get_azure_compute_client(config):
base_url=cloud_environment.endpoints.resource_manager,
profile=client_profile,
credential_scopes=[credential_scope],
+ api_version=COMPUTE_CLIENT_API_VERSION
)
except TypeError:
compute_client = ComputeManagementClient(
credentials,
config.SubscriptionId,
- base_url=cloud_environment.endpoints.resource_manager
+ base_url=cloud_environment.endpoints.resource_manager,
+ api_version=COMPUTE_CLIENT_API_VERSION
)
else:
compute_client = ComputeManagementClient(
credentials,
- config.SubscriptionId
+ config.SubscriptionId,
+ api_version=COMPUTE_CLIENT_API_VERSION
)
return compute_client
@@ -404,16 +409,19 @@ def get_azure_network_client(config):
base_url=cloud_environment.endpoints.resource_manager,
profile=client_profile,
credential_scopes=[credential_scope],
+ api_version=NETWORK_MGMT_CLIENT_API_VERSION
)
except TypeError:
network_client = NetworkManagementClient(
credentials,
config.SubscriptionId,
- base_url=cloud_environment.endpoints.resource_manager
+ base_url=cloud_environment.endpoints.resource_manager,
+ api_version=NETWORK_MGMT_CLIENT_API_VERSION
)
else:
network_client = NetworkManagementClient(
credentials,
- config.SubscriptionId
+ config.SubscriptionId,
+ api_version=NETWORK_MGMT_CLIENT_API_VERSION
)
return network_client
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。