Merge "Default reservations=None in Cells v1 and conductor APIs"
This commit is contained in:
commit
2b4c0f54ac
|
@ -571,7 +571,7 @@ class CellsAPI(object):
|
|||
cctxt.cast(ctxt, 'soft_delete_instance', instance=instance)
|
||||
|
||||
def resize_instance(self, ctxt, instance, extra_instance_updates,
|
||||
scheduler_hint, flavor, reservations,
|
||||
scheduler_hint, flavor, reservations=None,
|
||||
clean_shutdown=True,
|
||||
request_spec=None):
|
||||
# NOTE(sbauza): Since Cells v1 is quite feature-frozen, we don't want
|
||||
|
@ -606,12 +606,12 @@ class CellsAPI(object):
|
|||
host_name=host_name)
|
||||
|
||||
def revert_resize(self, ctxt, instance, migration, host,
|
||||
reservations):
|
||||
reservations=None):
|
||||
cctxt = self.client.prepare(version='1.21')
|
||||
cctxt.cast(ctxt, 'revert_resize', instance=instance)
|
||||
|
||||
def confirm_resize(self, ctxt, instance, migration, host,
|
||||
reservations, cast=True):
|
||||
reservations=None, cast=True):
|
||||
# NOTE(comstud): This is only used in the API cell where we should
|
||||
# always cast and ignore the 'cast' kwarg.
|
||||
# Also, the compute api method normally takes an optional
|
||||
|
|
|
@ -512,6 +512,8 @@ class ComputeAPI(object):
|
|||
instance=instance,
|
||||
data=data)
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 5.0 of the
|
||||
# RPC API.
|
||||
def confirm_resize(self, ctxt, instance, migration, host,
|
||||
reservations=None, cast=True):
|
||||
version = '4.0'
|
||||
|
@ -541,6 +543,8 @@ class ComputeAPI(object):
|
|||
cctxt.cast(ctxt, 'detach_volume',
|
||||
instance=instance, volume_id=volume_id, **extra)
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 5.0 of the
|
||||
# RPC API.
|
||||
def finish_resize(self, ctxt, instance, migration, image, disk_info,
|
||||
host, reservations=None):
|
||||
version = '4.0'
|
||||
|
@ -550,6 +554,8 @@ class ComputeAPI(object):
|
|||
instance=instance, migration=migration,
|
||||
image=image, disk_info=disk_info, reservations=reservations)
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 5.0 of the
|
||||
# RPC API.
|
||||
def finish_revert_resize(self, ctxt, instance, migration, host,
|
||||
reservations=None):
|
||||
version = '4.0'
|
||||
|
@ -744,6 +750,8 @@ class ComputeAPI(object):
|
|||
else:
|
||||
return result
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 5.0 of the
|
||||
# RPC API.
|
||||
def prep_resize(self, ctxt, instance, image, instance_type, host,
|
||||
reservations=None, request_spec=None,
|
||||
filter_properties=None, node=None,
|
||||
|
@ -853,6 +861,8 @@ class ComputeAPI(object):
|
|||
server=_compute_host(None, instance), version=version)
|
||||
cctxt.cast(ctxt, 'reset_network', instance=instance)
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 5.0 of the
|
||||
# RPC API.
|
||||
def resize_instance(self, ctxt, instance, migration, image, instance_type,
|
||||
reservations=None, clean_shutdown=True):
|
||||
msg_args = {'instance': instance, 'migration': migration,
|
||||
|
@ -990,6 +1000,8 @@ class ComputeAPI(object):
|
|||
server=_compute_host(None, instance), version=version)
|
||||
cctxt.cast(ctxt, 'suspend_instance', instance=instance)
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 5.0 of the
|
||||
# RPC API.
|
||||
def terminate_instance(self, ctxt, instance, bdms, reservations=None,
|
||||
delete_type=None):
|
||||
# NOTE(rajesht): The `delete_type` parameter is passed because
|
||||
|
@ -1014,6 +1026,8 @@ class ComputeAPI(object):
|
|||
server=_compute_host(None, instance), version=version)
|
||||
cctxt.cast(ctxt, 'unrescue_instance', instance=instance)
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 5.0 of the
|
||||
# RPC API.
|
||||
def soft_delete_instance(self, ctxt, instance, reservations=None):
|
||||
version = '4.0'
|
||||
cctxt = self.router.client(ctxt).prepare(
|
||||
|
|
|
@ -86,7 +86,7 @@ class ComputeTaskAPI(object):
|
|||
self.conductor_compute_rpcapi = rpcapi.ComputeTaskAPI()
|
||||
|
||||
def resize_instance(self, context, instance, extra_instance_updates,
|
||||
scheduler_hint, flavor, reservations,
|
||||
scheduler_hint, flavor, reservations=None,
|
||||
clean_shutdown=True, request_spec=None):
|
||||
# NOTE(comstud): 'extra_instance_updates' is not used here but is
|
||||
# needed for compatibility with the cells_rpcapi version of this
|
||||
|
|
|
@ -295,6 +295,8 @@ class ComputeTaskAPI(object):
|
|||
cctxt = self.client.prepare(version=version)
|
||||
cctxt.cast(context, 'live_migrate_instance', **kw)
|
||||
|
||||
# TODO(melwitt): Remove the reservations parameter in version 2.0 of the
|
||||
# RPC API.
|
||||
def migrate_server(self, context, instance, scheduler_hint, live, rebuild,
|
||||
flavor, block_migration, disk_over_commit,
|
||||
reservations=None, clean_shutdown=True, request_spec=None):
|
||||
|
|
Loading…
Reference in New Issue