summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
c0ef57f)
Need to add a leading ":" to the hypervisor name
Change-Id: Id5d02e14a73a2e278848ffccd7a0c60165dbf509
Signed-off-by: ahothan <ahothan@cisco.com>
if req_az:
self.required_az = req_az + ':' + self.requested_hyp
else:
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 != ''
# placement is resolved when both AZ and hypervisor names are known and set
self.resolved = self.requested_az != '' and self.requested_hyp != ''
security_groups = None
# Also attach the created security group for the test
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,
instance = self.novaclient.servers.create(name=vmname,
image=image,
flavor=flavor,
def test_placer_user_hyp():
"""Test placement when user provides a hypervisor."""
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
check_placer('nova', 'comp1', 'nova:comp1', resolved=True)
check_placer(None, 'nova:comp1', 'nova:comp1', resolved=True)
# hyp overrides az