Merge "Follow up to node description"
This commit is contained in:
commit
6a96bfa57e
@ -38,7 +38,7 @@ Also added a new field ``allocation_uuid`` to the node resource.
|
||||
--------------------
|
||||
|
||||
Added ``description`` field to the node object to enable operators to store
|
||||
any information relates to the node. The field is up to 4096 characters.
|
||||
any information relates to the node. The field is limited to 4096 characters.
|
||||
|
||||
1.50 (Stein, master)
|
||||
--------------------
|
||||
|
@ -2029,7 +2029,7 @@ class NodesController(rest.RestController):
|
||||
|
||||
if (node.description is not wtypes.Unset and
|
||||
len(node.description) > _NODE_DESCRIPTION_MAX_LENGTH):
|
||||
msg = _("Cannot create node with description exceeds %s "
|
||||
msg = _("Cannot create node with description exceeding %s "
|
||||
"characters") % _NODE_DESCRIPTION_MAX_LENGTH
|
||||
raise exception.Invalid(msg)
|
||||
|
||||
@ -2095,7 +2095,7 @@ class NodesController(rest.RestController):
|
||||
|
||||
description = api_utils.get_patch_values(patch, '/description')
|
||||
if description and len(description[0]) > _NODE_DESCRIPTION_MAX_LENGTH:
|
||||
msg = _("Cannot create node with description exceeds %s "
|
||||
msg = _("Cannot update node with description exceeding %s "
|
||||
"characters") % _NODE_DESCRIPTION_MAX_LENGTH
|
||||
raise exception.Invalid(msg)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user