cells: don't pass context to instance.save in instance_update_from_api

Commit 1cf0890fdd creates a wedge whenever
someone tries to pass a context to a remotable nova object method, like
instance.save().  There was still an occurrence of this happening in
cells so let's clean it up and make cells happy(ish) again.

Closes-Bug: #1431562

Change-Id: I58e626cb37fe4d34010f6b881f06f0d10f1e6e78
This commit is contained in:
Matt Riedemann 2015-03-12 14:13:15 -07:00
parent b04350e0fb
commit fe1fd82474
2 changed files with 2 additions and 2 deletions

View File

@ -828,7 +828,7 @@ class _TargetedMessageMethods(_BaseMessageMethods):
# NOTE(alaski): A cell should be authoritative for its system_metadata
# and metadata so we don't want to sync it down from the api.
instance.obj_reset_changes(['metadata', 'system_metadata'])
instance.save(message.ctxt, expected_vm_state=expected_vm_state,
instance.save(expected_vm_state=expected_vm_state,
expected_task_state=expected_task_state)
def _call_compute_api_with_obj(self, ctxt, instance, method, *args,

View File

@ -1205,7 +1205,7 @@ class CellsTargetedMethodsTestCase(test.TestCase):
self.assertEqual(set(['user_data']),
instance.obj_what_changed())
instance.save(self.ctxt, expected_task_state='exp_task',
instance.save(expected_task_state='exp_task',
expected_vm_state='exp_vm').WithSideEffects(
_check_object)