Fix spice channel type

nova generate wrong spice channel type 'pty', which should be 'spicevmc'
Closes-Bug: #1634495
Change-Id: I58e9a8df9f40f900eeabd9d40429663cbbedb8d6
This commit is contained in:
m4cr0v 2016-12-13 16:17:34 +08:00
parent 90f01d5ebb
commit f4be97d8cf
2 changed files with 3 additions and 0 deletions

View File

@ -3623,6 +3623,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")
@ -4209,6 +4210,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

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