summaryrefslogtreecommitdiffstats
path: root/nova/notifications.py
diff options
context:
space:
mode:
authorMatt Dietz <matt.dietz@rackspace.com>2012-07-10 09:29:26 +0000
committerGerrit Code Review <review@openstack.org>2012-07-11 16:45:44 +0000
commit8f5e83c90e62a6dc6a3397e370e52f724a90939d (patch)
treec6f65bf2475fcf8e496fdc2090ee109c8379b47f /nova/notifications.py
parent0c8d9c749a5d697c49ba45c08ba716c47809e2ab (diff)
downloadnova-8f5e83c90e62a6dc6a3397e370e52f724a90939d.tar.gz
nova-8f5e83c90e62a6dc6a3397e370e52f724a90939d.tar.xz
nova-8f5e83c90e62a6dc6a3397e370e52f724a90939d.zip
Adds network labels to the fixed ips in usages
Change-Id: Ib5990a7f5d7869c862ec3dd3299772e421574ae6
Diffstat (limited to 'nova/notifications.py')
-rw-r--r--nova/notifications.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/notifications.py b/nova/notifications.py
index 7ab0f045b..3a761920c 100644
--- a/nova/notifications.py
+++ b/nova/notifications.py
@@ -269,7 +269,12 @@ def usage_from_instance(context, instance_ref, network_info,
)
if network_info is not None:
- usage_info['fixed_ips'] = network_info.fixed_ips()
+ fixed_ips = []
+ for vif in network_info:
+ for ip in vif.fixed_ips():
+ ip["label"] = vif["network"]["label"]
+ fixed_ips.append(ip)
+ usage_info['fixed_ips'] = fixed_ips
# add image metadata
image_meta_props = image_meta(system_metadata)