Merge "Fix spice channel type" into stable/newton

This commit is contained in:
Jenkins 2017-03-07 12:44:55 +00:00 committed by Gerrit Code Review
commit e34137fb0f
2 changed files with 3 additions and 0 deletions

View File

@ -3584,6 +3584,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")
@ -4116,6 +4117,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

@ -4520,6 +4520,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)