The server listing API raises a 500 error if you pass an invalid status
filter for admin user. In the case of a non-admin user, it simply
returns an empty list. In the case of an admin user, it fetches extended
server attributes, so a condition was added to get extended server
attributes only when servers list is not empty.
This change simply removes the cause of the 500 exception. A subsequent
patch with a microversion bump will modify the behavior so that a 400
Bad Request will be raised for an invalid status, for both admin and
non-admin alike.
Reviewed: https:/ /review. openstack. org/335648 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ee4d69e28df b3d4764186d0c02 12d53c99bda3ca
Committed: https:/
Submitter: Jenkins
Branch: master
commit ee4d69e28dfb3d4 764186d0c0212d5 3c99bda3ca
Author: EdLeafe <email address hidden>
Date: Wed Jun 29 18:51:34 2016 +0000
Return HTTP 200 on list for invalid status
The server listing API raises a 500 error if you pass an invalid status
filter for admin user. In the case of a non-admin user, it simply
returns an empty list. In the case of an admin user, it fetches extended
server attributes, so a condition was added to get extended server
attributes only when servers list is not empty.
This change simply removes the cause of the 500 exception. A subsequent
patch with a microversion bump will modify the behavior so that a 400
Bad Request will be raised for an invalid status, for both admin and
non-admin alike.
Co-Authored-By: Dinesh Bhor <email address hidden>
Closes-Bug: #1579706
Change-Id: I10bde78f0a9ac5 9b8646d58f62fa5 056f989f54f