summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-07-20 17:42:22 +0000
committerTarmac <>2011-07-20 17:42:22 +0000
commit9f7cbe0c667eb7490b81bb46223ce9ef6acdfebf (patch)
tree45e2f92233190c75999dbe74af7cddcd1caff337
parentb0e74f57ccc75f616f82c31667a9d65435de8048 (diff)
parente65a9fe5827e0d5961e618a3163382c2ad02274c (diff)
downloadnova-9f7cbe0c667eb7490b81bb46223ce9ef6acdfebf.tar.gz
nova-9f7cbe0c667eb7490b81bb46223ce9ef6acdfebf.tar.xz
nova-9f7cbe0c667eb7490b81bb46223ce9ef6acdfebf.zip
correct broken logic for lxc and uml to avoid adding vnc arguments (LP: #812553)
This fixes the logic, so that lxc and uml will not get vnc arguments added to their libvirt xml. It also seems more readable to me.
-rw-r--r--nova/virt/libvirt/connection.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
index 977bb7dfe..4905d931a 100644
--- a/nova/virt/libvirt/connection.py
+++ b/nova/virt/libvirt/connection.py
@@ -1014,10 +1014,9 @@ class LibvirtConnection(driver.ComputeDriver):
'ebs_root': ebs_root,
'volumes': block_device_mapping}
- if FLAGS.vnc_enabled:
- if FLAGS.libvirt_type != 'lxc' or FLAGS.libvirt_type != 'uml':
- xml_info['vncserver_host'] = FLAGS.vncserver_host
- xml_info['vnc_keymap'] = FLAGS.vnc_keymap
+ if FLAGS.vnc_enabled and FLAGS.libvirt_type not in ('lxc', 'uml'):
+ xml_info['vncserver_host'] = FLAGS.vncserver_host
+ xml_info['vnc_keymap'] = FLAGS.vnc_keymap
if not rescue:
if instance['kernel_id']:
xml_info['kernel'] = xml_info['basepath'] + "/kernel"