Merge "Deprecate scheduler prep_resize"
This commit is contained in:
@@ -99,6 +99,8 @@ class SchedulerManager(manager.Manager):
|
||||
'task_state': None},
|
||||
context, ex, request_spec)
|
||||
|
||||
# NOTE(sbauza): Remove this method when the scheduler rpc interface is
|
||||
# bumped to 4.x as it is no longer used.
|
||||
def prep_resize(self, context, image, request_spec, filter_properties,
|
||||
instance, instance_type, reservations):
|
||||
"""Tries to call schedule_prep_resize on the driver.
|
||||
|
||||
@@ -20,7 +20,6 @@ from oslo.config import cfg
|
||||
from oslo import messaging
|
||||
|
||||
from nova.objects import base as objects_base
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova import rpc
|
||||
|
||||
rpcapi_opts = [
|
||||
@@ -106,16 +105,3 @@ class SchedulerAPI(object):
|
||||
cctxt = self.client.prepare()
|
||||
return cctxt.call(ctxt, 'select_destinations',
|
||||
request_spec=request_spec, filter_properties=filter_properties)
|
||||
|
||||
def prep_resize(self, ctxt, instance, instance_type, image,
|
||||
request_spec, filter_properties, reservations):
|
||||
instance_p = jsonutils.to_primitive(instance)
|
||||
instance_type_p = jsonutils.to_primitive(instance_type)
|
||||
reservations_p = jsonutils.to_primitive(reservations)
|
||||
image_p = jsonutils.to_primitive(image)
|
||||
cctxt = self.client.prepare()
|
||||
cctxt.cast(ctxt, 'prep_resize',
|
||||
instance=instance_p, instance_type=instance_type_p,
|
||||
image=image_p, request_spec=request_spec,
|
||||
filter_properties=filter_properties,
|
||||
reservations=reservations_p)
|
||||
|
||||
@@ -63,13 +63,6 @@ class SchedulerRpcAPITestCase(test.NoDBTestCase):
|
||||
retval = getattr(rpcapi, method)(ctxt, **kwargs)
|
||||
self.assertEqual(retval, expected_retval)
|
||||
|
||||
def test_prep_resize(self):
|
||||
self._test_scheduler_api('prep_resize', rpc_method='cast',
|
||||
instance='fake_instance',
|
||||
instance_type='fake_type', image='fake_image',
|
||||
request_spec='fake_request_spec',
|
||||
filter_properties='fake_props', reservations=list('fake_res'))
|
||||
|
||||
def test_select_destinations(self):
|
||||
self._test_scheduler_api('select_destinations', rpc_method='call',
|
||||
request_spec='fake_request_spec',
|
||||
|
||||
Reference in New Issue
Block a user