summaryrefslogtreecommitdiff
path: root/nova/tests/unit/test_metadata.py
diff options
context:
space:
mode:
authorDan Smith <dansmith@redhat.com>2017-03-01 10:09:39 -0800
committerDan Smith <dansmith@redhat.com>2017-03-23 09:30:43 -0700
commit9f7bac2845e81db3a54dbb3f39c2cf871a11918d (patch)
tree896aca36e6a39edc1658fad212b12e8c53be71a1 /nova/tests/unit/test_metadata.py
parent03b4c67b22f49d325386bc3ebd2ade79b44fa699 (diff)
downloadnova-9f7bac2845e81db3a54dbb3f39c2cf871a11918d.tar.gz
Get instance availability_zone without hitting the api db
This would be an upcall from the cell to the api db, which we don't want. We store the availability_zone on the instance now, and even use it for pre-scheduled instances, so just use that instead of the extra lookup. Related to blueprint cells-aware-api Change-Id: I73c3b10e52ab4cfda9dacc0c0ba92d1fcb60bcc9
Diffstat (limited to 'nova/tests/unit/test_metadata.py')
-rw-r--r--nova/tests/unit/test_metadata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/tests/unit/test_metadata.py b/nova/tests/unit/test_metadata.py
index d043f58abb..f1d8fac370 100644
--- a/nova/tests/unit/test_metadata.py
+++ b/nova/tests/unit/test_metadata.py
@@ -94,7 +94,7 @@ def fake_inst_obj(context):
default_swap_device=None,
system_metadata={},
security_groups=objects.SecurityGroupList(),
- availability_zone=None)
+ availability_zone='fake-az')
inst.keypairs = objects.KeyPairList(objects=[
fake_keypair_obj(inst.key_name, inst.key_data)])