diff options
| author | Davanum Srinivas <davanum@gmail.com> | 2012-10-24 10:15:39 -0400 |
|---|---|---|
| committer | Davanum Srinivas <davanum@gmail.com> | 2012-10-24 10:16:55 -0400 |
| commit | e142d21b47e8895a013c468936e69ba0e7e66041 (patch) | |
| tree | d21560d54052d245ece7b927a013d904571c09a5 /nova/api | |
| parent | df1fb2978c854beb58646406796c2bef2bfb047f (diff) | |
Return empty list when listing servers with bad status value
API indicates the status parameter is a string, hence status=BALONEY is a valid
filter that should return zero records since no records match that status. The
return should be an empty list and 200 OK.
Fixes bug 1061712
Change-Id: If796110a18dd75ab5c5d4ba41e9c3b58180341f8
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index c5e829d52..ef102dc0b 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -490,8 +490,7 @@ class Controller(wsgi.Controller): if status is not None: state = common.vm_state_from_status(status) if state is None: - msg = _('Invalid server status: %(status)s') % locals() - raise exc.HTTPBadRequest(explanation=msg) + return {'servers': []} search_opts['vm_state'] = state if 'changes-since' in search_opts: |
