diff options
| author | Rick Harris <rick.harris@rackspace.com> | 2011-08-03 15:50:29 +0000 |
|---|---|---|
| committer | Rick Harris <rick.harris@rackspace.com> | 2011-08-03 15:50:29 +0000 |
| commit | 6166415d03db8f7af93778bdf7a735fb81e63fc5 (patch) | |
| tree | 5d34b4b16dd9d1c143e544d77180354cb06ca0fd | |
| parent | 65ba8bda43aa79080f6fec9c396f412c294718b8 (diff) | |
Default dns to '' if not present
| -rw-r--r-- | nova/virt/xenapi/vm_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 60ef0df43..e08acbedc 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -1092,6 +1092,8 @@ def _prepare_injectables(inst, networks_info): ip_v6 = info['ip6s'][0] if len(info['dns']) > 0: dns = info['dns'][0] + else: + dns = '' interface_info = {'name': 'eth%d' % ifc_num, 'address': ip_v4 and ip_v4['ip'] or '', 'netmask': ip_v4 and ip_v4['netmask'] or '', |
