diff options
| author | Daniel P. Berrange <berrange@redhat.com> | 2012-03-08 11:21:48 -0500 |
|---|---|---|
| committer | Daniel P. Berrange <berrange@redhat.com> | 2012-03-23 19:23:12 +0000 |
| commit | bbf078a6d95d3434da532040e14b825af1f3bcce (patch) | |
| tree | 32d4207b7439406a7d9030b7ab5657944c811349 /nova | |
| parent | 7dfa07713aaf6200eba225ccee936277410835d5 (diff) | |
| download | nova-bbf078a6d95d3434da532040e14b825af1f3bcce.tar.gz nova-bbf078a6d95d3434da532040e14b825af1f3bcce.tar.xz nova-bbf078a6d95d3434da532040e14b825af1f3bcce.zip | |
Convert libvirt connection class to use config APIs for input devices
Remove the <input> 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 <berrange@redhat.com>
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/virt/libvirt.xml.template | 3 | ||||
| -rw-r--r-- | 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' - <input type='tablet' bus='usb'/> -#end if </devices> </domain> 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 |
