Blame SOURCES/bz1622229-1-fence_aliyun-list-instance-names.patch

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