aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nfvbench/chaining.py4
-rw-r--r--nfvbench/compute.py1
-rw-r--r--test/test_chains.py2
3 files changed, 4 insertions, 3 deletions
diff --git a/nfvbench/chaining.py b/nfvbench/chaining.py
index a5ae680..fa9b799 100644
--- a/nfvbench/chaining.py
+++ b/nfvbench/chaining.py
@@ -715,8 +715,8 @@ class InstancePlacer(object):
if req_az:
self.required_az = req_az + ':' + self.requested_hyp
else:
- # no ":" needed
- self.required_az = self.requested_hyp if req_hyp else ''
+ # need to insert a ':' so nova knows this is the hypervisor name
+ self.required_az = ':' + self.requested_hyp if req_hyp else ''
# placement is resolved when both AZ and hypervisor names are known and set
self.resolved = self.requested_az != '' and self.requested_hyp != ''
diff --git a/nfvbench/compute.py b/nfvbench/compute.py
index d5a8119..97fd166 100644
--- a/nfvbench/compute.py
+++ b/nfvbench/compute.py
@@ -107,6 +107,7 @@ class Compute(object):
security_groups = None
# Also attach the created security group for the test
+ LOG.info('Creating instance %s with AZ %s', vmname, avail_zone)
instance = self.novaclient.servers.create(name=vmname,
image=image,
flavor=flavor,
diff --git a/test/test_chains.py b/test/test_chains.py
index e952eb8..36a29dd 100644
--- a/test/test_chains.py
+++ b/test/test_chains.py
@@ -298,7 +298,7 @@ def test_placer_user_az():
def test_placer_user_hyp():
"""Test placement when user provides a hypervisor."""
- check_placer(None, 'comp1', 'comp1')
+ check_placer(None, 'comp1', ':comp1')
check_placer('nova', 'comp1', 'nova:comp1', resolved=True)
check_placer(None, 'nova:comp1', 'nova:comp1', resolved=True)
# hyp overrides az