Merge "virt: Remove 'get_console_pool_info' API"
This commit is contained in:
@@ -1578,7 +1578,7 @@ class ComputeManager(manager.Manager):
|
||||
# TODO(stephenfin): Remove this once we bump the compute API to v6.0
|
||||
@wrap_exception()
|
||||
def get_console_pool_info(self, context, console_type):
|
||||
return self.driver.get_console_pool_info(console_type)
|
||||
raise NotImplementedError()
|
||||
|
||||
# TODO(stephenfin): Remove this as it's nova-network only
|
||||
@wrap_exception()
|
||||
|
||||
@@ -781,6 +781,7 @@ class ComputeAPI(object):
|
||||
return cctxt.call(ctxt, 'get_console_output',
|
||||
instance=instance, tail_length=tail_length)
|
||||
|
||||
# TODO(stephenfin): This is no longer used and can be removed in v6.0
|
||||
def get_console_pool_info(self, ctxt, host, console_type):
|
||||
version = '5.0'
|
||||
cctxt = self.router.client(ctxt).prepare(
|
||||
|
||||
@@ -574,14 +574,6 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase):
|
||||
instance_ref)
|
||||
self.assertIsInstance(mks_console, ctype.ConsoleMKS)
|
||||
|
||||
@catch_notimplementederror
|
||||
def test_get_console_pool_info(self):
|
||||
instance_ref, network_info = self._get_running_instance()
|
||||
console_pool = self.connection.get_console_pool_info(instance_ref)
|
||||
self.assertIn('address', console_pool)
|
||||
self.assertIn('username', console_pool)
|
||||
self.assertIn('password', console_pool)
|
||||
|
||||
@mock.patch(
|
||||
'nova.tests.unit.virt.libvirt.fakelibvirt.Domain.jobStats',
|
||||
new=mock.Mock(return_value={
|
||||
|
||||
@@ -459,12 +459,6 @@ class ComputeDriver(object):
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
# TODO(stephenfin): This was only implemented (properly) for XenAPI and
|
||||
# should be removed.
|
||||
def get_console_pool_info(self, console_type):
|
||||
# TODO(Vek): Need to pass context in for access to auth_token
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_console_output(self, context, instance):
|
||||
"""Get console output for an instance
|
||||
|
||||
|
||||
@@ -488,11 +488,6 @@ class FakeDriver(driver.ComputeDriver):
|
||||
host='fakemksconsole.com',
|
||||
port=6969)
|
||||
|
||||
def get_console_pool_info(self, console_type):
|
||||
return {'address': '127.0.0.1',
|
||||
'username': 'fakeuser',
|
||||
'password': 'fakepassword'}
|
||||
|
||||
def get_available_resource(self, nodename):
|
||||
"""Updates compute manager resource info on ComputeNode table.
|
||||
|
||||
|
||||
@@ -7640,14 +7640,6 @@ class LibvirtDriver(driver.ComputeDriver):
|
||||
'Cannot get block stats for device', instance.name,
|
||||
instance=instance)
|
||||
|
||||
def get_console_pool_info(self, console_type):
|
||||
# TODO(mdragon): console proxy should be implemented for libvirt,
|
||||
# in case someone wants to use it with kvm or
|
||||
# such. For now return fake data.
|
||||
return {'address': '127.0.0.1',
|
||||
'username': 'fakeuser',
|
||||
'password': 'fakepassword'}
|
||||
|
||||
def update_provider_tree(self, provider_tree, nodename, allocations=None):
|
||||
"""Update a ProviderTree object with current resource provider,
|
||||
inventory information and CPU traits.
|
||||
|
||||
Reference in New Issue
Block a user