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,9 +20,10 @@ def resolve_identifier(repo, identifier):
|
||||||
found_ips = set()
|
found_ips = set()
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
for interface, config in node.metadata.get('interfaces', {}).items():
|
for interface, config in node.metadata.get('interfaces', {}).items():
|
||||||
for ip in config.get('ipv4', set()):
|
for ip in config.get('ips', set()):
|
||||||
found_ips.add(ip_address(ip))
|
if '/' in ip:
|
||||||
for ip in config.get('ipv4', set()):
|
found_ips.add(ip_address(ip.split('/')[0]))
|
||||||
|
else:
|
||||||
found_ips.add(ip_address(ip))
|
found_ips.add(ip_address(ip))
|
||||||
|
|
||||||
if node.metadata.get('external_ipv4', None):
|
if node.metadata.get('external_ipv4', None):
|
||||||
|
|
Loading…
Reference in a new issue