summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2013-05-04 16:07:03 -0700
committerDan Smith <danms@us.ibm.com>2013-05-04 16:07:03 -0700
commitcf2df80daab0df4104368ccc1a62c6e313ac6c8b (patch)
tree0dd7d65312a7d0c627907c559081e11c3bf76c02
parent685dc4895d0a0d1df6d29b53bf7db60839a6bf41 (diff)
downloadnova-cf2df80daab0df4104368ccc1a62c6e313ac6c8b.tar.gz
nova-cf2df80daab0df4104368ccc1a62c6e313ac6c8b.tar.xz
nova-cf2df80daab0df4104368ccc1a62c6e313ac6c8b.zip
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
-rw-r--r--nova/tests/api/openstack/fakes.py9
1 files changed, 8 insertions, 1 deletions
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)