diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-05-01 18:27:05 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-05-01 18:27:05 +0000 |
| commit | a4ecf32772feea52b89c7bca3d9299b46e02ac41 (patch) | |
| tree | 93930e51281f4459f1a3b2aa35e1bb7e998d4701 /nova/api | |
| parent | 19e03e95d354c55df4b9c37712ffc4c56b561826 (diff) | |
| parent | b25752b2e742e4bcf872c0dfb9ca59f3e5d51ae9 (diff) | |
| download | nova-a4ecf32772feea52b89c7bca3d9299b46e02ac41.tar.gz nova-a4ecf32772feea52b89c7bca3d9299b46e02ac41.tar.xz nova-a4ecf32772feea52b89c7bca3d9299b46e02ac41.zip | |
Merge "Return a BadRequest on bad flavors param values."
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/flavors.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/flavors.py b/nova/api/openstack/compute/flavors.py index 8c159c586..6757d8b28 100644 --- a/nova/api/openstack/compute/flavors.py +++ b/nova/api/openstack/compute/flavors.py @@ -98,13 +98,15 @@ class Controller(wsgi.Controller): try: filters['min_memory_mb'] = int(req.params['minRam']) except ValueError: - pass # ignore bogus values per spec + msg = _('Invalid minRam filter [%s]') % req.params['minRam'] + raise webob.exc.HTTPBadRequest(explanation=msg) if 'minDisk' in req.params: try: filters['min_root_gb'] = int(req.params['minDisk']) except ValueError: - pass # ignore bogus values per spec + msg = _('Invalid minDisk filter [%s]') % req.params['minDisk'] + raise webob.exc.HTTPBadRequest(explanation=msg) flavors = instance_types.get_all_types(filters=filters) flavors_list = flavors.values() |
