Remove usage of remotable context parameter in instance* objects

This removes the use of the context parameter in remotable methods
in these objects. This is a precursor to actually removing the
context from the call, but we need to remove dependence on the
argument first. Remotable methods should be using the bundled object
context.

Related to blueprint kilo-objects

Change-Id: If89e6e03d1e15f8ce688166ff2faa4794280c112
This commit is contained in:
Dan Smith
2015-03-13 09:41:09 -07:00
parent 4a91dd323c
commit a284bc973f
2 changed files with 15 additions and 15 deletions

View File

@@ -75,8 +75,8 @@ class InstanceFault(base.NovaPersistentObject, base.NovaObject,
'details': self.details,
'host': self.host,
}
db_fault = db.instance_fault_create(context, values)
self._from_db_object(context, self, db_fault)
db_fault = db.instance_fault_create(self._context, values)
self._from_db_object(self._context, self, db_fault)
self.obj_reset_changes()
# Cells should only try sending a message over to nova-cells
# if cells is enabled and we're not the API cell. Otherwise,
@@ -85,7 +85,7 @@ class InstanceFault(base.NovaPersistentObject, base.NovaObject,
if cells_opts.get_cell_type() == 'compute':
try:
cells_rpcapi.CellsAPI().instance_fault_create_at_top(
context, db_fault)
self._context, db_fault)
except Exception:
LOG.exception(_LE("Failed to notify cells of instance fault"))