yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #08400
[Bug 1270811] [NEW] Wrong option is used in test_availability.py
Public bug reported:
I found a testcase bug in
nova/tests/api/openstack/compute/plugins/v3/test_availability_zone.py
def test_create_instance_with_availability_zone(self):
def create(*args, **kwargs):
self.assertIn('availability_zone', kwargs)
return old_create(*args, **kwargs)
old_create = compute_api.API.create
self.stubs.Set(compute_api.API, 'create', create)
image_href = '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6'
flavor_ref = 'http://localhost/v3/flavors/3'
body = {
'server': {
'name': 'config_drive_test',
'image_ref': image_href,
'flavor_ref': flavor_ref,
'metadata': {
'hello': 'world',
'open': 'stack',
},
★ 'availability_zone': "nova",★
},
}
req = fakes.HTTPRequestV3.blank('/v3/servers')
req.method = 'POST'
req.body = jsonutils.dumps(body)
req.headers["content-type"] = "application/json"
admin_context = context.get_admin_context()
service1 = db.service_create(admin_context, {'host': 'host1_zones',
'binary': "nova-compute",
'topic': 'compute',
'report_count': 0})
agg = db.aggregate_create(admin_context,
{'name': 'agg1'}, {'availability_zone': 'nova'})★
db.aggregate_host_add(admin_context, agg['id'], 'host1_zones')
The create request for availability option is 'os-availability-
zone:availability_zone'.
** Affects: nova
Importance: Undecided
Assignee: Haiwei Xu (xu-haiwei)
Status: New
** Changed in: nova
Assignee: (unassigned) => Haiwei Xu (xu-haiwei)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1270811
Title:
Wrong option is used in test_availability.py
Status in OpenStack Compute (Nova):
New
Bug description:
I found a testcase bug in
nova/tests/api/openstack/compute/plugins/v3/test_availability_zone.py
def test_create_instance_with_availability_zone(self):
def create(*args, **kwargs):
self.assertIn('availability_zone', kwargs)
return old_create(*args, **kwargs)
old_create = compute_api.API.create
self.stubs.Set(compute_api.API, 'create', create)
image_href = '76fa36fc-c930-4bf3-8c8a-ea2a2420deb6'
flavor_ref = 'http://localhost/v3/flavors/3'
body = {
'server': {
'name': 'config_drive_test',
'image_ref': image_href,
'flavor_ref': flavor_ref,
'metadata': {
'hello': 'world',
'open': 'stack',
},
★ 'availability_zone': "nova",★
},
}
req = fakes.HTTPRequestV3.blank('/v3/servers')
req.method = 'POST'
req.body = jsonutils.dumps(body)
req.headers["content-type"] = "application/json"
admin_context = context.get_admin_context()
service1 = db.service_create(admin_context, {'host': 'host1_zones',
'binary': "nova-compute",
'topic': 'compute',
'report_count': 0})
agg = db.aggregate_create(admin_context,
{'name': 'agg1'}, {'availability_zone': 'nova'})★
db.aggregate_host_add(admin_context, agg['id'], 'host1_zones')
The create request for availability option is 'os-availability-
zone:availability_zone'.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1270811/+subscriptions
Follow ups
References