diff options
author | Zuul <zuul@review.openstack.org> | 2018-02-01 21:26:22 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-02-01 21:26:22 +0000 |
commit | d2b90c6389281d03022c0b8793623ce703a33bfb (patch) | |
tree | 1694976dc161321b03a2b54c02c709a9c65fdff9 /nova/api | |
parent | 538f47eeca6b6cd8abff88d582ba21df38022ed7 (diff) | |
parent | 999c50b9d9b958f1bd11b44083506050b0ff2e87 (diff) | |
download | nova-d2b90c6389281d03022c0b8793623ce703a33bfb.tar.gz |
Merge "Use util.validate_query_params in list_traits"
Diffstat (limited to 'nova/api')
-rw-r--r-- | nova/api/openstack/placement/handlers/trait.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/nova/api/openstack/placement/handlers/trait.py b/nova/api/openstack/placement/handlers/trait.py index 28e503df71..558020100c 100644 --- a/nova/api/openstack/placement/handlers/trait.py +++ b/nova/api/openstack/placement/handlers/trait.py @@ -148,13 +148,7 @@ def list_traits(req): want_version = req.environ[microversion.MICROVERSION_ENVIRON] filters = {} - try: - jsonschema.validate(dict(req.GET), schema.LIST_TRAIT_SCHEMA, - format_checker=jsonschema.FormatChecker()) - except jsonschema.ValidationError as exc: - raise webob.exc.HTTPBadRequest( - _('Invalid query string parameters: %(exc)s') % - {'exc': exc}) + util.validate_query_params(req, schema.LIST_TRAIT_SCHEMA) if 'name' in req.GET: filters = _normalize_traits_qs_param(req.GET['name']) |