diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-07-21 18:12:56 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-07-21 18:12:56 +0000 |
| commit | 74c399cb2ebb914973c2f0dc6ecf4dd8bbc062d7 (patch) | |
| tree | f7f0d29679c0f8cbb5a34b36b9d544c8b65dfea6 /nova/api | |
| parent | d69bc49db837825608e68e738cf010816f3ad48f (diff) | |
| parent | 10ef948271130db0dcc53b0ea94c3a47313244f4 (diff) | |
Updating the /images and /images/detail OSAPI v1.1 endpoints to match spec w/ regards to query params
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/images.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py index d0317583e..f82b98a38 100644 --- a/nova/api/openstack/images.py +++ b/nova/api/openstack/images.py @@ -35,7 +35,13 @@ from nova.api.openstack import wsgi LOG = log.getLogger('nova.api.openstack.images') FLAGS = flags.FLAGS -SUPPORTED_FILTERS = ['name', 'status'] +SUPPORTED_FILTERS = { + 'name': 'name', + 'status': 'status', + 'changes-since': 'changes-since', + 'server': 'property-instance_ref', + 'type': 'property-image_type', +} class Controller(object): @@ -62,8 +68,9 @@ class Controller(object): filters = {} for param in req.str_params: if param in SUPPORTED_FILTERS or param.startswith('property-'): - filters[param] = req.str_params.get(param) - + # map filter name or carry through if property-* + filter_name = SUPPORTED_FILTERS.get(param, param) + filters[filter_name] = req.str_params.get(param) return filters def show(self, req, id): |
