Fix for slave-ip-list: skip l2 network devices not attached to node

Change-Id: Ifbea974145cf494e9cb8cc6d40beb096b421064a
This commit is contained in:
Dennis Dmitriev 2017-07-18 16:13:48 +03:00
parent c4bc6364eb
commit 88a5d02b3d
1 changed files with 6 additions and 0 deletions

View File

@ -205,6 +205,12 @@ class Shell(object):
ap_slave_ips = []
for node in self.env.get_nodes():
try:
node.get_interface_by_network_name(l2dev.name)
except devops.models.network.Interface.DoesNotExist:
# Skip if l2 network device is not attached to the node
continue
if self.params.ip_only:
ap_slave_ips.append(
node.get_ip_address_by_network_name(l2dev.name))