cinder/cinder/tests/unit/api/v2
PranaliDeore a1bb185a1f Validate name and description string
If you pass name or description parameters with more than 255
characters to create and update apis of volume and snapshot
and create api of backup, then it returns 500 error code.

Added new method validate_name_and_description() in
cinder.api.openstack.wsgi.Controllera to validate string limit and
returned 400 if limit exceeds and also removing leading or trailing
whitespaces and string containing only whitespaces.

APIImpact
1. For all above APIs 400 response will be returned.
2. Earlier it was possible to pass only whitespaces or leading-trailing
   spaces to 'name' parameter.
   Now it will raise 400 error if only whitespaces are passed and will
   remove leading-trailing spaces if present in other cases.

Closes-Bug: 1454244
Change-Id: Iaf7159e816f69fd776a09828c3bc1d27fc9fdcdb
2015-08-10 01:31:02 -07:00
..
__init__.py Move unit tests into dedicated directory 2015-04-21 18:40:40 -06:00
stubs.py Refactor api.v2.volumes unit tests 2015-08-05 11:14:19 +05:30
test_limits.py Merge "Fix order of arguments in assertEqual" 2015-08-04 15:24:22 +00:00
test_snapshot_metadata.py Avoid race condition at snapshot deletion stage 2015-07-02 15:50:01 +03:00
test_snapshots.py Validate name and description string 2015-08-10 01:31:02 -07:00
test_types.py Fix order of arguments in assertEqual 2015-08-03 19:26:08 -07:00
test_volume_metadata.py set/unset volume image metadata 2015-07-11 12:13:58 +08:00
test_volumes.py Validate name and description string 2015-08-10 01:31:02 -07:00