diff --git a/nova/compute/manager.py b/nova/compute/manager.py index a81e4582c7..f265c62a0a 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -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() diff --git a/nova/compute/rpcapi.py b/nova/compute/rpcapi.py index fb1c7d0018..3b1dc4ce17 100644 --- a/nova/compute/rpcapi.py +++ b/nova/compute/rpcapi.py @@ -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( diff --git a/nova/tests/unit/virt/test_virt_drivers.py b/nova/tests/unit/virt/test_virt_drivers.py index 9b2d1e14f4..673209a62c 100644 --- a/nova/tests/unit/virt/test_virt_drivers.py +++ b/nova/tests/unit/virt/test_virt_drivers.py @@ -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={ diff --git a/nova/virt/driver.py b/nova/virt/driver.py index 86db4b8bd0..a5d71dd882 100644 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -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 diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 4265591b48..f50acdd906 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -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. diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index f82f0095a5..78a47d8165 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -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.