Add volume type name and description check when update volume type
when we need to update volume type, currently we can set volume type name to empty string, in API layer we need to check type name,it can not be empty string and cannot be greater than 255, as same volume description cannot be greater than 255, we also need to check. Change-Id: I4b78f3834848db669a86d0f7820ca5da409cf354 Closes-Bug:#1847171
This commit is contained in:
parent
24c9e6db67
commit
15b867c0a9
@ -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,
|
||||||
},
|
},
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user