From ac2d1bd8bbe8a39e18dffbcc8f9eb45548b594ea Mon Sep 17 00:00:00 2001 From: Peter Stachowski Date: Thu, 17 Nov 2016 13:27:57 -0500 Subject: [PATCH] Have cluster-show list all ips When you do a cluster-show, the instance list contains all ips. The summary (which is the one displayed and used for tests) only lists the first ip from each instance. It should list them all, so the user could potentially chose which one they wanted (i.e. an IPV4 address vs. an IPV6 one). Depends-On: I54edc4acac09ca2278f525c08ad0d87576f0549e Change-Id: I2ede074eb9bdf26420750f19f3aa4b8d057c5d7d Closes-Bug: 1642695 --- .../notes/cluster_list_show_all_ips-3547635440.yaml | 6 ++++++ trove/cluster/views.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/cluster_list_show_all_ips-3547635440.yaml diff --git a/releasenotes/notes/cluster_list_show_all_ips-3547635440.yaml b/releasenotes/notes/cluster_list_show_all_ips-3547635440.yaml new file mode 100644 index 0000000000..cb6ec4b207 --- /dev/null +++ b/releasenotes/notes/cluster_list_show_all_ips-3547635440.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - The payload for cluster GET now returns ips + for all networks, not just the first one + found for each instance. + Bug 1642695 diff --git a/trove/cluster/views.py b/trove/cluster/views.py index 6b2856c728..f60ac0b7c1 100644 --- a/trove/cluster/views.py +++ b/trove/cluster/views.py @@ -88,7 +88,7 @@ class ClusterView(object): if self.load_servers and instance_ips: instance_dict["ip"] = instance_ips if instance.type in ip_to_be_published_for: - ip_list.append(instance_ips[0]) + ip_list.extend(instance_ips) if instance.type in instance_dict_to_be_published_for: instances.append(instance_dict) ip_list.sort()