From b2d24aba61ea29050bbdf3b5ef262e5e08f243e8 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Fri, 13 Jun 2014 12:17:42 -0500 Subject: [PATCH] Perform safe normalization of nics to use uuid --- library/cloud/rax_scaling_group | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/cloud/rax_scaling_group b/library/cloud/rax_scaling_group index 84ebfb2756..818c6089c8 100644 --- a/library/cloud/rax_scaling_group +++ b/library/cloud/rax_scaling_group @@ -215,8 +215,12 @@ def rax_asg(module, cooldown=300, disk_config=None, files={}, flavor=None, nics.extend(cnw.get_server_networks(network)) for nic in nics: - nic.update(uuid=nic['net-id']) - del nic['net-id'] + # 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']) + del nic['net-id'] # Handle the file contents personality = []