From cf2df80daab0df4104368ccc1a62c6e313ac6c8b Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sat, 4 May 2013 16:07:03 -0700 Subject: Fix stub_instance() to include missing attributes The stub_instance() function aims to create a fake instance dict, but omits several attributes present on the real database object. This patch adds them. While they're not used anywhere (obviously) at the moment, some WIP code I'm working on expects them to look like the DB object, and thus fails. Change-Id: I71fb596f8b0a80de21ee58ef378440da8eea1777 --- nova/tests/api/openstack/fakes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py index 9e7b99bea..386d27618 100644 --- a/nova/tests/api/openstack/fakes.py +++ b/nova/tests/api/openstack/fakes.py @@ -504,7 +504,14 @@ def stub_instance(id, user_id=None, project_id=None, host=None, "disable_terminate": False, "security_groups": security_groups, "root_device_name": root_device_name, - "system_metadata": utils.dict_to_metadata(sys_meta)} + "system_metadata": utils.dict_to_metadata(sys_meta), + "vm_mode": "", + "default_swap_device": "", + "default_ephemeral_device": "", + "launched_on": "", + "cell_name": "", + "architecture": "", + "os_type": ""} instance.update(info_cache) -- cgit