1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Perform safe normalization of nics to use uuid

This commit is contained in:
Matt Martz 2014-06-13 12:17:42 -05:00
parent 3fb3e7e6dc
commit b2d24aba61

View file

@ -215,8 +215,12 @@ def rax_asg(module, cooldown=300, disk_config=None, files={}, flavor=None,
nics.extend(cnw.get_server_networks(network)) nics.extend(cnw.get_server_networks(network))
for nic in nics: for nic in nics:
nic.update(uuid=nic['net-id']) # pyrax is currently returning net-id, but we need uuid
del nic['net-id'] # this check makes this forward compatible for a time when
# pyrax uses uuid instead
if nic.get('net-id'):
nic.update(uuid=nic['net-id'])
del nic['net-id']
# Handle the file contents # Handle the file contents
personality = [] personality = []