Bug 1041032 - [RFE][nova]: Add common framework to validate every API parameters
Summary: [RFE][nova]: Add common framework to validate every API parameters
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: Upstream M3
: 5.0 (RHEL 7)
Assignee: Jakub Ruzicka
QA Contact: Ami Jeain
URL: https://blueprints.launchpad.net/nova...
Whiteboard: upstream_milestone_icehouse-3 upstrea...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 13:27 UTC by RHOS Integration
Modified: 2019-09-09 16:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Technology Preview
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-10 00:51:29 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2013-12-12 13:27:36 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/nova/+spec/nova-api-validation-fw.

Description:

Nova has many RESTful APIs, and not all API parameters are completely validated.
We would like to propose an API validation framework to implement comprehensive validation.
The benefits of this framework will be the followings:
* Validate every API parameters.
* Unify both message format and HTTP code of error response, if the same cause.
  ex) ".. is too short.", ".. is too long.", ".. is not integer."
* Clarify the API parameter definitions.
* Clean up codes by merging error handling methods.

This framework target is Nova v3 API, because it is new and the API compatibility issues would not happen.
On Havana release, Nova v3 API is experimental and the API will become generic in Icehouse.
There are two options for common validation feature. The one is WSME validation, the other is JSONSchema validation. Through the Icehouse summit session(https://etherpad.openstack.org/p/icehouse-summit-nova-pecan-wsme), we have gotten a consensus that Nova v3 API will be moved to Pecan + JSONSchema validation.

JSONSchema validation can work for both JSON parameters and XML parameter because
* JSONSchema library validate againste dict data(not JSON data)
* the validation is executed after the deserialization.


Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.