Merge "VMware: Fix return type of get_vnc_console()"
This commit is contained in:
commit
1589545a88
|
@ -1667,9 +1667,9 @@ class VMwareAPIVMTestCase(test.NoDBTestCase):
|
|||
OptionValue = collections.namedtuple('OptionValue', ['key', 'value'])
|
||||
opt_val = OptionValue(key='', value=5906)
|
||||
fake_vm.set(vm_util.VNC_CONFIG_KEY, opt_val)
|
||||
vnc_dict = self.conn.get_vnc_console(self.context, self.instance)
|
||||
self.assertEqual(vnc_dict['host'], self.vnc_host)
|
||||
self.assertEqual(vnc_dict['port'], 5906)
|
||||
vnc_console = self.conn.get_vnc_console(self.context, self.instance)
|
||||
self.assertEqual(self.vnc_host, vnc_console.host)
|
||||
self.assertEqual(5906, vnc_console.port)
|
||||
|
||||
def test_get_vnc_console(self):
|
||||
self._test_get_vnc_console()
|
||||
|
|
|
@ -33,6 +33,7 @@ from nova import compute
|
|||
from nova.compute import power_state
|
||||
from nova.compute import task_states
|
||||
from nova.compute import vm_states
|
||||
from nova.console import type as ctype
|
||||
from nova import context as nova_context
|
||||
from nova import exception
|
||||
from nova.i18n import _, _LE
|
||||
|
@ -1654,4 +1655,4 @@ class VMwareVMOps(object):
|
|||
LOG.debug("VM %(uuid)s is currently on host %(host_name)s",
|
||||
{'uuid': instance.name, 'host_name': host_name},
|
||||
instance=instance)
|
||||
return vnc_console
|
||||
return ctype.ConsoleVNC(**vnc_console)
|
||||
|
|
Loading…
Reference in New Issue