Remove unused server_get() method
server_get() from the compute/nova.py file is not used anymore. So remove it. Change-Id: I36308563720c006980c10200d886eb73bd78d666
This commit is contained in:
parent
29d5a10cab
commit
296ca1ba7c
@ -204,19 +204,6 @@ class API(base.Base):
|
||||
raise exception.ManilaException(msg)
|
||||
return _untranslate_server_summary_view(server)
|
||||
|
||||
def server_list(self, context, search_opts=None, all_tenants=False):
|
||||
if search_opts is None:
|
||||
search_opts = {}
|
||||
if all_tenants:
|
||||
search_opts['all_tenants'] = True
|
||||
else:
|
||||
search_opts['project_id'] = context.project_id
|
||||
servers = [_untranslate_server_summary_view(s)
|
||||
for s in novaclient(context).servers.list(True,
|
||||
search_opts)]
|
||||
|
||||
return servers
|
||||
|
||||
@translate_server_exception
|
||||
def server_pause(self, context, instance_id):
|
||||
novaclient(context).servers.pause(instance_id)
|
||||
|
@ -182,10 +182,6 @@ class NovaApiTestCase(test.TestCase):
|
||||
instance_id = 'instance_id'
|
||||
self.assertRaises(manila_e, self.api.server_get, self.ctx, instance_id)
|
||||
|
||||
def test_server_list(self):
|
||||
self.assertEqual([{'id': 'id1'}, {'id': 'id2'}],
|
||||
self.api.server_list(self.ctx))
|
||||
|
||||
def test_server_pause(self):
|
||||
self.mock_object(self.novaclient.servers, 'pause')
|
||||
self.api.server_pause(self.ctx, 'id1')
|
||||
|
@ -73,9 +73,6 @@ class API(object):
|
||||
def instance_volumes_list(self, ctx, server_id):
|
||||
pass
|
||||
|
||||
def server_list(self, ctx, search_opts, all_tenants):
|
||||
pass
|
||||
|
||||
def server_create(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user