Merge "Remove unused method from compute manager"
This commit is contained in:
commit
90a658ba2b
|
@ -480,19 +480,6 @@ class Manager(periodic_task.PeriodicTasks):
|
|||
container.security_groups = list(security_groups)
|
||||
container.save(context)
|
||||
|
||||
@translate_exception
|
||||
def container_list(self, context):
|
||||
LOG.debug('Listing container...')
|
||||
try:
|
||||
return self.driver.list(context)
|
||||
except exception.DockerError as e:
|
||||
LOG.error("Error occurred while calling Docker list API: %s",
|
||||
six.text_type(e))
|
||||
raise
|
||||
except Exception as e:
|
||||
LOG.exception("Unexpected exception: %s", six.text_type(e))
|
||||
raise
|
||||
|
||||
@translate_exception
|
||||
def container_show(self, context, container):
|
||||
LOG.debug('Showing container: %s', container.uuid)
|
||||
|
|
|
@ -687,18 +687,6 @@ class TestManager(base.TestCase):
|
|||
mock_fail.assert_called_with(self.context,
|
||||
container, 'Unexpected exception')
|
||||
|
||||
@mock.patch.object(fake_driver, 'list')
|
||||
def test_container_list(self, mock_list):
|
||||
self.compute_manager.container_list(self.context)
|
||||
mock_list.assert_called_once_with(self.context)
|
||||
|
||||
@mock.patch.object(fake_driver, 'list')
|
||||
def test_container_list_failed(self, mock_list):
|
||||
mock_list.side_effect = exception.DockerError
|
||||
self.assertRaises(exception.DockerError,
|
||||
self.compute_manager.container_list,
|
||||
self.context)
|
||||
|
||||
@mock.patch.object(fake_driver, 'show')
|
||||
def test_container_show(self, mock_show):
|
||||
container = Container(self.context, **utils.get_test_container())
|
||||
|
|
Loading…
Reference in New Issue