Merge "Fix spice channel type"

This commit is contained in:
Jenkins 2017-03-03 17:46:21 +00:00 committed by Gerrit Code Review
commit d3fd4b9d5a
2 changed files with 3 additions and 0 deletions

View File

@ -3581,6 +3581,7 @@ class LibvirtConnTestCase(test.NoDBTestCase):
vconfig.LibvirtConfigMemoryBalloon)
self.assertEqual(cfg.devices[4].target_name, "com.redhat.spice.0")
self.assertEqual(cfg.devices[4].type, 'spicevmc')
self.assertEqual(cfg.devices[5].type, "spice")
self.assertEqual(cfg.devices[6].type, "qxl")
@ -4167,6 +4168,7 @@ class LibvirtConnTestCase(test.NoDBTestCase):
self.assertEqual(cfg.devices[4].type, "tablet")
self.assertEqual(cfg.devices[5].target_name, "com.redhat.spice.0")
self.assertEqual(cfg.devices[5].type, 'spicevmc')
self.assertEqual(cfg.devices[6].type, "vnc")
self.assertEqual(cfg.devices[7].type, "spice")

View File

@ -4686,6 +4686,7 @@ class LibvirtDriver(driver.ComputeDriver):
if (CONF.spice.enabled and CONF.spice.agent_enabled and
virt_type not in ('lxc', 'uml', 'xen')):
channel = vconfig.LibvirtConfigGuestChannel()
channel.type = 'spicevmc'
channel.target_name = "com.redhat.spice.0"
guest.add_device(channel)