Remove and deprecate conductor compute_node_create()
Now that the one and only call to create a compute node record in
resource tracker has been converted to objects[1], the old method
in conductor can be cleaned out.
[1] commit 2ef014eb31
Related to blueprint liberty-bump-object-and-rpcapi-versions
Change-Id: I6f8043efcc5928d7e42bc32b638bbd4e782a1e2a
This commit is contained in:
parent
2a461f4160
commit
32c56137b4
|
@ -64,9 +64,6 @@ class LocalAPI(object):
|
|||
def provider_fw_rule_get_all(self, context):
|
||||
return self._manager.provider_fw_rule_get_all(context)
|
||||
|
||||
def compute_node_create(self, context, values):
|
||||
return self._manager.compute_node_create(context, values)
|
||||
|
||||
def object_backport(self, context, objinst, target_version):
|
||||
return self._manager.object_backport(context, objinst, target_version)
|
||||
|
||||
|
|
|
@ -327,6 +327,7 @@ class ConductorManager(manager.Manager):
|
|||
def service_destroy(self, context, service_id):
|
||||
self.db.service_destroy(context, service_id)
|
||||
|
||||
# NOTE(hanlind): This method can be removed in version 3.0 of the RPC API
|
||||
def compute_node_create(self, context, values):
|
||||
result = self.db.compute_node_create(context, values)
|
||||
return jsonutils.to_primitive(result)
|
||||
|
|
|
@ -187,6 +187,7 @@ class ConductorAPI(object):
|
|||
|
||||
* 2.2 - Add object_backport_versions()
|
||||
* 2.3 - Add object_class_action_versions()
|
||||
* Remove compute_node_create()
|
||||
"""
|
||||
|
||||
VERSION_ALIASES = {
|
||||
|
@ -211,10 +212,6 @@ class ConductorAPI(object):
|
|||
cctxt = self.client.prepare()
|
||||
return cctxt.call(context, 'provider_fw_rule_get_all')
|
||||
|
||||
def compute_node_create(self, context, values):
|
||||
cctxt = self.client.prepare()
|
||||
return cctxt.call(context, 'compute_node_create', values=values)
|
||||
|
||||
def object_class_action(self, context, objname, objmethod, objver,
|
||||
args, kwargs):
|
||||
if self.client.can_send_version('2.3'):
|
||||
|
|
|
@ -102,15 +102,6 @@ class _BaseTestCase(object):
|
|||
result = self.conductor.provider_fw_rule_get_all(self.context)
|
||||
self.assertEqual(result, fake_rules)
|
||||
|
||||
def test_compute_node_create(self):
|
||||
self.mox.StubOutWithMock(db, 'compute_node_create')
|
||||
db.compute_node_create(self.context, 'fake-values').AndReturn(
|
||||
'fake-result')
|
||||
self.mox.ReplayAll()
|
||||
result = self.conductor.compute_node_create(self.context,
|
||||
'fake-values')
|
||||
self.assertEqual(result, 'fake-result')
|
||||
|
||||
|
||||
class ConductorTestCase(_BaseTestCase, test.TestCase):
|
||||
"""Conductor Manager Tests."""
|
||||
|
@ -802,6 +793,15 @@ class ConductorTestCase(_BaseTestCase, test.TestCase):
|
|||
self.assertEqual('INFO', msg.priority)
|
||||
self.assertEqual('fake-info', msg.payload)
|
||||
|
||||
def test_compute_node_create(self):
|
||||
self.mox.StubOutWithMock(db, 'compute_node_create')
|
||||
db.compute_node_create(self.context, 'fake-values').AndReturn(
|
||||
'fake-result')
|
||||
self.mox.ReplayAll()
|
||||
result = self.conductor.compute_node_create(self.context,
|
||||
'fake-values')
|
||||
self.assertEqual(result, 'fake-result')
|
||||
|
||||
|
||||
class ConductorRPCAPITestCase(_BaseTestCase, test.TestCase):
|
||||
"""Conductor RPC API Tests."""
|
||||
|
|
Loading…
Reference in New Issue