|
|
21d5fd |
From c21d60fbcf0b11dcbf4f70006c8ffaeac4ca7dbd Mon Sep 17 00:00:00 2001
|
|
|
21d5fd |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
21d5fd |
Date: Tue, 28 Aug 2018 15:20:10 +0200
|
|
|
21d5fd |
Subject: [PATCH] fence_aliyun: list instance names and show up to 100
|
|
|
21d5fd |
instances
|
|
|
21d5fd |
|
|
|
21d5fd |
---
|
|
|
21d5fd |
agents/aliyun/fence_aliyun.py | 4 +++-
|
|
|
21d5fd |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
21d5fd |
|
|
|
21d5fd |
diff --git a/agents/aliyun/fence_aliyun.py b/agents/aliyun/fence_aliyun.py
|
|
|
21d5fd |
index 2cda6b7f..b3aca12f 100644
|
|
|
21d5fd |
--- a/agents/aliyun/fence_aliyun.py
|
|
|
21d5fd |
+++ b/agents/aliyun/fence_aliyun.py
|
|
|
21d5fd |
@@ -59,13 +59,15 @@ def get_status(conn, instance_id):
|
|
|
21d5fd |
def get_nodes_list(conn, options):
|
|
|
21d5fd |
result = {}
|
|
|
21d5fd |
request = DescribeInstancesRequest()
|
|
|
21d5fd |
+ request.set_PageSize(100)
|
|
|
21d5fd |
response = _send_request(conn, request)
|
|
|
21d5fd |
instance_status = None
|
|
|
21d5fd |
if response is not None:
|
|
|
21d5fd |
instance_list = response.get('Instances').get('Instance')
|
|
|
21d5fd |
for item in instance_list:
|
|
|
21d5fd |
instance_id = item.get('InstanceId')
|
|
|
21d5fd |
- result[instance_id] = ("", None)
|
|
|
21d5fd |
+ instance_name = item.get('InstanceName')
|
|
|
21d5fd |
+ result[instance_id] = (instance_name, None)
|
|
|
21d5fd |
return result
|
|
|
21d5fd |
|
|
|
21d5fd |
def get_power_status(conn, options):
|