fence-agents/bz1732766-fence_aliyun-2-import-EcsRamRoleCredential.patch

40 lines
1.2 KiB
Diff
Raw Permalink Normal View History

From b5f1bd2a257ce868b6845d77abdfc741c19d4d3e Mon Sep 17 00:00:00 2001
From: chen dong <51401223+dongchen126@users.noreply.github.com>
Date: Thu, 11 Jul 2019 15:30:10 +0800
Subject: [PATCH] Update fence_aliyun.xml
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add ram role for security
Add region provider for private zone functionality
Update fence_aliyun.py
delet paramater “m”
Update fence_aliyun.xml
delete "m" parameter
Update fence_aliyun.py
add "EcsRamRoleCredential" class from aliyun SDK
---
agents/aliyun/fence_aliyun.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py
index 3bc825fe..aa0b741d 100644
--- a/agents/aliyun/fence_aliyun.py
+++ b/agents/aliyun/fence_aliyun.py
@@ -10,7 +10,7 @@
try:
from aliyunsdkcore import client
-
+ from aliyunsdkcore.auth.credentials import EcsRamRoleCredential
from aliyunsdkecs.request.v20140526.DescribeInstancesRequest import DescribeInstancesRequest
from aliyunsdkecs.request.v20140526.StartInstanceRequest import StartInstanceRequest
from aliyunsdkecs.request.v20140526.StopInstanceRequest import StopInstanceRequest