From ea6d089d196e2d71eac17a1b0079788a71522cfd Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Wed, 26 Jun 2013 15:11:54 +0800 Subject: Update instance properties values in child cells to create instance. When using nova cells, in child cell, instance properties dict received from API cell is returned by database that contains instance['name']. We need to pop this from dict before creating a instance entry in child cell. The system metadata also need to be recreated in child cell because instance properties dict is converted to primitive which makes instance['system_metadata'] a list of dicts. Fix bug #1193552 Change-Id: I43a8b4c1673a831b0c87881004eb0a7e5b149d9e --- nova/tests/cells/test_cells_scheduler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/cells/test_cells_scheduler.py b/nova/tests/cells/test_cells_scheduler.py index 46be492cc..38076fb0c 100644 --- a/nova/tests/cells/test_cells_scheduler.py +++ b/nova/tests/cells/test_cells_scheduler.py @@ -94,7 +94,8 @@ class CellsSchedulerTestCase(test.TestCase): inst_type = db.instance_type_get(self.ctxt, 1) image = {'properties': {}} instance_uuids = self.instance_uuids - instance_props = {'hostname': 'meow', + instance_props = {'name': 'instance-00000001', + 'hostname': 'meow', 'display_name': 'moo', 'image_ref': 'fake_image_ref', 'user_id': self.ctxt.user_id, -- cgit