Merge "Remove unused method from compute manager"

This commit is contained in:
Zuul 2018-02-20 11:07:38 +00:00 committed by Gerrit Code Review
commit 90a658ba2b
2 changed files with 0 additions and 25 deletions

View File

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

View File

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