validation of input parameters through jsonSchemaValidation
I could see in nova and keystone that they are validating input parameters in start of operation itself instead of going ahead and reported error after error occurs.
This is in reference of 4 byte unicode character handling at API layer itseld instead of going to db layer and then reporting error.
We should follow same in cinder as well for better optimized flow of operations with less cpu cycles.
Some nova code taken for example:
##Validation:
def validate(self, *args, **kwargs):
try:
except jsonschema.
# NOTE: For whole OpenStack message consistency, this error
# message has been written as the similar format of WSME.
if len(ex.path) > 0:
else:
raise exception.
except TypeError as ex:
# NOTE: If passing non string value to patternProperties parameter,
# TypeError happens. Here is for catching the TypeError.
detail = six.text_type(ex)
raise exception.
##At API layer,
https:/
@validation
def _create_
"""Backup a server instance.
https:/
This is just and idea fro now specifically for 4 byte unicode handling at API layer instead of going to database layer.
I need to further analyze different other requirements or use cases for this feature.
Blueprint information
- Status:
- Started
- Approver:
- Sean McGinnis
- Priority:
- Low
- Drafter:
- Sheel Rana
- Direction:
- Approved
- Assignee:
- Dinesh Bhor
- Definition:
- Approved
- Series goal:
- Accepted for rocky
- Implementation:
- Started
- Milestone target:
- rocky-2
- Started by
- Jay Bryant
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Add json schema validation for V3 API's
Addressed by: https:/
V3 jsonschema validation: base schema framework
Addressed by: https:/
V3 jsonschema validation: Attachments
Addressed by: https:/
V3 jsonschema validation: Group types
Addressed by: https:/
V3 jsonschema validation: Group type specs
Addressed by: https:/
V3 jsonschema validation: Volume-types
Addressed by: https:/
V3 jsonschema validation: snapshots
Addressed by: https:/
V3 jsonschema validation: Group Snapshots
Addressed by: https:/
V3 jsonschema validation: Group types
Addressed by: https:/
V3 jsonschema validation: Volume metadata
Addressed by: https:/
V2/V3 jsonschema validation: snapshots
Addressed by: https:/
V3 jsonschema validation: Clusters
Addressed by: https:/
V2/V3 json schema validation: snapshot manage
Addressed by: https:/
V3 json schema validation: workers
Addressed by: https:/
V3 jsonschema validation: Backups
Addressed by: https:/
V3 jsonschema validation: volume_type_access
Addressed by: https:/
V3 jsonschema validation: qos-specs
Addressed by: https:/
V3 jsonschema validation: volume_
Addressed by: https:/
Move json schema validation for V3 API's to Rocky
Addressed by: https:/
V3 jsonschema validation: snapshot_actions
Addressed by: https:/
V3 jsonschema validation: types_extra_specs
Addressed by: https:/
V3 json schema validation: volume manage
Addressed by: https:/
V3 jsonschema validation: volume actions
Addressed by: https:/
V3 jsonschema validation: volume_transfer
Addressed by: https:/
V3 jsonschema validation: volume_
Addressed by: https:/
V3 jsonschema validation: Quotas
Addressed by: https:/
V3 jsonschema validation: Quota classes
Addressed by: https:/
V3 jsonschema validation: scheduler_hints
Addressed by: https:/
V3 jsonschema validation: os-services
Addressed by: https:/
V3 json schema validation: generic volume groups
Addressed by: https:/
V3 jsonschema validation: admin_actions
Gerrit topic: https:/
Addressed by: https:/
V3 jsonschema validation: Volumes
Addressed by: https:/
Update api-ref and release notes for schema validation