Get no resource_name when running the list_resource_types function.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Invalid
|
Undecided
|
Soumya Purohit |
Bug Description
If glance does not have any resource type association,we will get IndexError when getting resource_name from list_resource_types function's response body because the function response body does not have any resource_types.
This bug is associated with three cases:
1).api/
2).api/
3).api/
You can recurrence the bug by below actions:
1).[root@controller ~]# glance md-resource-
+------+
| name |
+------+
+------+
2).[root@controller v2]# nosetests -v test_images_
tempest.
Traceback (most recent call last):
File "/root/
resource_name = body['resource_
IndexError: list index out of range
This error happens because the body does not have any resource_types.
We should judge whether the list_resource_types response body contains resource_types before getting the resource_name.If there is no resource_types,we shoule set one initialized resource_name to getting the test going on.
Changed in tempest: | |
assignee: | nobody → Liu Xiaolei (hysen) |
Changed in tempest: | |
assignee: | Liu Xiaolei (hysen) → nobody |
assignee: | nobody → Soumya Purohit (sp545d) |
Fix proposed to branch: master /review. openstack. org/623924
Review: https:/