summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>2011-03-23 16:36:54 +0000
committerTarmac <>2011-03-23 16:36:54 +0000
commit6afe9f0576532b90ef2d5891f06b8bd04401db5b (patch)
tree684e1456e392a53b2786aec4709cf1260837b6f1
parent916bec73fd9b0c8e138aa44d9923071de6572b7f (diff)
parent3362be7e9f2feda33e14ab4fb7c6f70277df1cf5 (diff)
downloadnova-6afe9f0576532b90ef2d5891f06b8bd04401db5b.tar.gz
nova-6afe9f0576532b90ef2d5891f06b8bd04401db5b.tar.xz
nova-6afe9f0576532b90ef2d5891f06b8bd04401db5b.zip
This branch contains the fix for bug #740929
It makes sure cidr_v6 is not null before building the 'ip6s' key in the network info dictionary. This way utils.to_global_ipv6 does not fail because of cidr==None.
-rw-r--r--nova/virt/xenapi/vmops.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
index 499c6d8a1..b51489ebc 100644
--- a/nova/virt/xenapi/vmops.py
+++ b/nova/virt/xenapi/vmops.py
@@ -723,8 +723,9 @@ class VMOps(object):
'mac': instance.mac_address,
'rxtx_cap': flavor['rxtx_cap'],
'dns': [network['dns']],
- 'ips': [ip_dict(ip) for ip in network_IPs],
- 'ip6s': [ip6_dict(ip) for ip in network_IPs]}
+ 'ips': [ip_dict(ip) for ip in network_IPs]}
+ if network['cidr_v6']:
+ info['ip6s'] = [ip6_dict(ip) for ip in network_IPs]
network_info.append((network, info))
return network_info