libs/tools: adjust resolve_identifier() to new interface config
This commit is contained in:
parent
d90c9edc22
commit
44414f2375
1 changed files with 5 additions and 4 deletions
|
@ -20,10 +20,11 @@ def resolve_identifier(repo, identifier):
|
|||
found_ips = set()
|
||||
for node in nodes:
|
||||
for interface, config in node.metadata.get('interfaces', {}).items():
|
||||
for ip in config.get('ipv4', set()):
|
||||
found_ips.add(ip_address(ip))
|
||||
for ip in config.get('ipv4', set()):
|
||||
found_ips.add(ip_address(ip))
|
||||
for ip in config.get('ips', set()):
|
||||
if '/' in ip:
|
||||
found_ips.add(ip_address(ip.split('/')[0]))
|
||||
else:
|
||||
found_ips.add(ip_address(ip))
|
||||
|
||||
if node.metadata.get('external_ipv4', None):
|
||||
found_ips.add(ip_address(node.metadata.get('external_ipv4')))
|
||||
|
|
Loading…
Reference in a new issue