Merge "Add volume type name and description check when update volume type"

This commit is contained in:
Zuul 2019-10-16 13:51:49 +00:00 committed by Gerrit Code Review
commit b8198de09a
2 changed files with 6 additions and 1 deletions

View File

@ -44,7 +44,7 @@ update = {
'volume_type': { 'volume_type': {
'type': 'object', 'type': 'object',
'properties': { 'properties': {
'name': parameter_types.name_allow_zero_min_length, 'name': parameter_types.update_name,
'description': parameter_types.description, 'description': parameter_types.description,
'is_public': parameter_types.boolean, 'is_public': parameter_types.boolean,
}, },

View File

@ -125,6 +125,11 @@ name = {
} }
update_name = {
'type': ['string', 'null'], 'minLength': 1, 'maxLength': 255
}
description = { description = {
'type': ['string', 'null'], 'minLength': 0, 'maxLength': 255, 'type': ['string', 'null'], 'minLength': 0, 'maxLength': 255,
'pattern': valid_description_regex, 'pattern': valid_description_regex,