From 9febf1eec69708d8c54b6348e882da384d8b42a9 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 19 Jul 2011 12:26:41 -0400 Subject: 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. To also seems more readable to me. --- nova/virt/libvirt/connection.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 977bb7dfe..56aaa6c50 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -1014,8 +1014,7 @@ 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': + 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: -- cgit From e65a9fe5827e0d5961e618a3163382c2ad02274c Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 20 Jul 2011 12:17:44 -0400 Subject: correct indentation --- nova/virt/libvirt/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 56aaa6c50..4905d931a 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -1015,8 +1015,8 @@ class LibvirtConnection(driver.ComputeDriver): 'volumes': block_device_mapping} 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 + 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" -- cgit