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
This commit is contained in:
Peter Stachowski 2016-11-17 13:27:57 -05:00
parent 0d514081c9
commit ac2d1bd8bb
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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()