Make servers API use cell-targeted context
This makes the servers API look up the CellMapping for the instance in question and target the context to the appropriate cell for the subsequent call into compute/api. Note that just as with get() and get_all(), we need to avoid going direct to the cell database and thus short-circuiting the replication in the case of cellsv1. Related to blueprint cells-aware-api Change-Id: If63a4fa7349890a6e7ac0fa3fe12917dc53334d0
This commit is contained in:
parent
f4bf11842c
commit
153a11e7e5
@ -291,6 +291,9 @@ class SingleCellSimple(fixtures.Fixture):
|
||||
self.useFixture(fixtures.MonkeyPatch(
|
||||
'nova.context.target_cell',
|
||||
self._fake_target_cell))
|
||||
self.useFixture(fixtures.MonkeyPatch(
|
||||
'nova.context.set_target_cell',
|
||||
lambda c, m: None))
|
||||
|
||||
def _fake_hostmapping_get(self, *args):
|
||||
return {'id': 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user