summaryrefslogtreecommitdiffstats
path: root/nova/tests/integrated
diff options
context:
space:
mode:
authorAndrew Laski <andrew.laski@rackspace.com>2013-02-21 17:30:06 -0500
committerAndrew Laski <andrew.laski@rackspace.com>2013-02-25 19:33:02 -0500
commitab2920726c0e2633c033a31a324f30a97fdce6bd (patch)
tree2c93e8a84654049f3420b19a537a0bd392f68001 /nova/tests/integrated
parent73a58f9cc85bf8d7fc745d4260577d764e8bc81c (diff)
downloadnova-ab2920726c0e2633c033a31a324f30a97fdce6bd.tar.gz
nova-ab2920726c0e2633c033a31a324f30a97fdce6bd.tar.xz
nova-ab2920726c0e2633c033a31a324f30a97fdce6bd.zip
Rework instance actions to work with cells
In a cells setup an instance action is recorded at the global cell level while events try to get recorded in a child cell compute node or scheduler. The event recording fails because it can't find an action to link to. This patch adds the recording of actions at the child cell level, and changes the API extension to query the db in a child cell for the record of actions and events. This does not address the fact that an action is recorded at the global cell level. Bug 1132935 Change-Id: I5831f146397e7afa2d93d26c5d6f9abb9bc6670d
Diffstat (limited to 'nova/tests/integrated')
-rw-r--r--nova/tests/integrated/test_api_samples.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
index aaf22ff9d..d48ef5091 100644
--- a/nova/tests/integrated/test_api_samples.py
+++ b/nova/tests/integrated/test_api_samples.py
@@ -3165,12 +3165,16 @@ class InstanceActionsSampleJsonTest(ApiSampleTestBase):
def fake_instance_get_by_uuid(context, instance_id):
return self.instance
+ def fake_get(self, context, instance_uuid):
+ return {'uuid': instance_uuid}
+
self.stubs.Set(db, 'action_get_by_request_id',
fake_instance_action_get_by_request_id)
self.stubs.Set(db, 'actions_get', fake_instance_actions_get)
self.stubs.Set(db, 'action_events_get',
fake_instance_action_events_get)
self.stubs.Set(db, 'instance_get_by_uuid', fake_instance_get_by_uuid)
+ self.stubs.Set(compute_api.API, 'get', fake_get)
def test_instance_action_get(self):
fake_uuid = fake_instance_actions.FAKE_UUID