From bbf078a6d95d3434da532040e14b825af1f3bcce Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 8 Mar 2012 11:21:48 -0500 Subject: Convert libvirt connection class to use config APIs for input devices Remove the elements form the Cheetah XML template and make the libvirt connection class use the LibvirtConfigGuestInput class for it instead blueprint libvirt-xml-config-apis Change-Id: I4fba2ddae2d32b0ff49685245fd905651885b61b Signed-off-by: Daniel P. Berrange --- nova/virt/libvirt.xml.template | 3 --- nova/virt/libvirt/connection.py | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nova/virt/libvirt.xml.template b/nova/virt/libvirt.xml.template index 14efd83ca..9c8c2d9a3 100644 --- a/nova/virt/libvirt.xml.template +++ b/nova/virt/libvirt.xml.template @@ -121,8 +121,5 @@ ${dev} #end for -#if $getVar('use_usb_tablet', True) and $type != 'lxc' and $type != 'xen' - -#end if diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py index 44c2af713..35d794548 100644 --- a/nova/virt/libvirt/connection.py +++ b/nova/virt/libvirt/connection.py @@ -1488,6 +1488,12 @@ class LibvirtConnection(driver.ComputeDriver): devs.append(consolepty.to_xml()) if FLAGS.vnc_enabled and FLAGS.libvirt_type not in ('lxc', 'uml'): + if FLAGS.use_usb_tablet: + tablet = config.LibvirtConfigGuestInput() + tablet.type = "tablet" + tablet.bus = "usb" + devs.append(tablet.to_xml()) + graphics = config.LibvirtConfigGuestGraphics() graphics.type = "vnc" graphics.keymap = FLAGS.vnc_keymap -- cgit