Merge "change the reboot rpc call to local reboot"

This commit is contained in:
Jenkins 2015-04-23 16:13:52 +00:00 committed by Gerrit Code Review
commit 93de6e1d33
2 changed files with 3 additions and 4 deletions

View File

@ -1050,9 +1050,8 @@ class ComputeManager(manager.Manager):
{'task_state': instance.task_state,
'power_state': current_power_state},
instance=instance)
self.compute_rpcapi.reboot_instance(context, instance,
block_device_info=None,
reboot_type=reboot_type)
self.reboot_instance(context, instance, block_device_info=None,
reboot_type=reboot_type)
return
elif (current_power_state == power_state.RUNNING and

View File

@ -981,7 +981,7 @@ class ComputeManagerUnitTestCase(test.NoDBTestCase):
with contextlib.nested(
mock.patch.object(self.compute, '_get_power_state',
return_value=return_power_state),
mock.patch.object(self.compute.compute_rpcapi, 'reboot_instance'),
mock.patch.object(self.compute, 'reboot_instance'),
mock.patch.object(compute_utils, 'get_nw_info_for_instance')
) as (
_get_power_state,