Remove unused methods from VirtAPI
The instance_get_all_by_host() and instance_get_by_uuid() methods are no longer needed by any virt drivers, so remove them from the virtapi.. Related to blueprint unified-object-model Change-Id: Ib51bf3b3e068d69e7a75f7312f03db6c85e7cf49
This commit is contained in:
parent
d431218f6a
commit
a9aa1a402b
@ -304,14 +304,6 @@ class ComputeVirtAPI(virtapi.VirtAPI):
|
|||||||
instance_uuid,
|
instance_uuid,
|
||||||
**updates)
|
**updates)
|
||||||
|
|
||||||
def instance_get_by_uuid(self, context, instance_uuid):
|
|
||||||
return self._compute.conductor_api.instance_get_by_uuid(
|
|
||||||
context, instance_uuid)
|
|
||||||
|
|
||||||
def instance_get_all_by_host(self, context, host):
|
|
||||||
return self._compute.conductor_api.instance_get_all_by_host(
|
|
||||||
context, host)
|
|
||||||
|
|
||||||
def aggregate_get_by_host(self, context, host, key=None):
|
def aggregate_get_by_host(self, context, host, key=None):
|
||||||
return self._compute.conductor_api.aggregate_get_by_host(context,
|
return self._compute.conductor_api.aggregate_get_by_host(context,
|
||||||
host, key=key)
|
host, key=key)
|
||||||
|
@ -45,12 +45,6 @@ class VirtAPIBaseTest(test.TestCase, test.APICoverage):
|
|||||||
self.assertExpected('instance_update', 'fake-uuid',
|
self.assertExpected('instance_update', 'fake-uuid',
|
||||||
dict(host='foohost'))
|
dict(host='foohost'))
|
||||||
|
|
||||||
def test_instance_get_by_uuid(self):
|
|
||||||
self.assertExpected('instance_get_by_uuid', 'fake-uuid')
|
|
||||||
|
|
||||||
def test_instance_get_all_by_host(self):
|
|
||||||
self.assertExpected('instance_get_all_by_host', 'fake-host')
|
|
||||||
|
|
||||||
def test_aggregate_get_by_host(self):
|
def test_aggregate_get_by_host(self):
|
||||||
self.assertExpected('aggregate_get_by_host', 'fake-host', key=None)
|
self.assertExpected('aggregate_get_by_host', 'fake-host', key=None)
|
||||||
|
|
||||||
|
@ -444,12 +444,6 @@ class FakeVirtAPI(virtapi.VirtAPI):
|
|||||||
instance_uuid,
|
instance_uuid,
|
||||||
updates)
|
updates)
|
||||||
|
|
||||||
def instance_get_by_uuid(self, context, instance_uuid):
|
|
||||||
return db.instance_get_by_uuid(context, instance_uuid)
|
|
||||||
|
|
||||||
def instance_get_all_by_host(self, context, host):
|
|
||||||
return db.instance_get_all_by_host(context, host)
|
|
||||||
|
|
||||||
def aggregate_get_by_host(self, context, host, key=None):
|
def aggregate_get_by_host(self, context, host, key=None):
|
||||||
return db.aggregate_get_by_host(context, host, key=key)
|
return db.aggregate_get_by_host(context, host, key=key)
|
||||||
|
|
||||||
|
@ -26,20 +26,6 @@ class VirtAPI(object):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def instance_get_by_uuid(self, context, instance_uuid):
|
|
||||||
"""Look up an instance by uuid
|
|
||||||
:param context: security context
|
|
||||||
:param instance_uuid: uuid of the instance to be fetched
|
|
||||||
"""
|
|
||||||
raise NotImplementedError()
|
|
||||||
|
|
||||||
def instance_get_all_by_host(self, context, host):
|
|
||||||
"""Find all instances on a given host
|
|
||||||
:param context: security context
|
|
||||||
:param host: host running instances to be returned
|
|
||||||
"""
|
|
||||||
raise NotImplementedError()
|
|
||||||
|
|
||||||
def aggregate_get_by_host(self, context, host, key=None):
|
def aggregate_get_by_host(self, context, host, key=None):
|
||||||
"""Get a list of aggregates to which the specified host belongs
|
"""Get a list of aggregates to which the specified host belongs
|
||||||
:param context: security context
|
:param context: security context
|
||||||
|
Loading…
Reference in New Issue
Block a user