VMware: Fix return type of get_vnc_console()

Change I8f6a857b88659ee30b4aa1a25ac52d7e01156a68 changed the return type of
get_vnc_console(), but didn't update it in VMwareVCVMOps.

Closes-Bug: #1364849
Change-Id: I25edf0a19fa79439ed375ad128d0050718d04cb3
This commit is contained in:
Matthew Booth 2014-09-03 10:21:51 +01:00 committed by Gary Kotton
parent 8beb3651c9
commit c4d0e55098
2 changed files with 5 additions and 4 deletions

View File

@ -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()

View File

@ -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)