]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Validate name and description for volume type
authorPranaliDeore <pranali11.deore@nttdata.com>
Wed, 29 Apr 2015 09:35:52 +0000 (02:35 -0700)
committerPranaliDeore <pranali11.deore@nttdata.com>
Wed, 20 May 2015 13:24:36 +0000 (06:24 -0700)
commitaeed2a788608b7b93bcdd70826ff0a3102c15027
tree3d53aa038ee965bf0c964abb1c53537a3c94ffac
parent0acf257464bbb8a4528bea4d125ca0b053880d0c
Validate name and description for volume type

If you pass name parameter with long string of more than
255 characters to type-create and type-update api, then
it returns 500 error code.

Added a check in _create() and _update() methods of 'types_manage'
extension to validate string limit and returned 400 if limit exceeds.

Closes-Bug: 1450388
Change-Id: I68c607df90a3dfeae7a841a1dddee5416fa42d13
cinder/api/contrib/types_manage.py
cinder/tests/unit/api/contrib/test_types_manage.py