Perform safe normalization of nics to use uuid

reviewable/pr18780/r1
Matt Martz 11 years ago
parent de94863eb1
commit b29535c981

@ -215,6 +215,10 @@ 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:
# pyrax is currently returning net-id, but we need uuid
# 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']) nic.update(uuid=nic['net-id'])
del nic['net-id'] del nic['net-id']

Loading…
Cancel
Save