Adds network labels to the fixed ips in usages

Change-Id: Ib5990a7f5d7869c862ec3dd3299772e421574ae6
This commit is contained in:
Matt Dietz
2012-07-10 09:29:26 +00:00
committed by Gerrit Code Review
parent a586861ae3
commit 003663efe5

View File

@@ -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)