Merge "Follow up to node description"

This commit is contained in:
Zuul 2019-02-25 06:03:42 +00:00 committed by Gerrit Code Review
commit 6a96bfa57e
2 changed files with 3 additions and 3 deletions

View File

@ -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)
--------------------

View File

@ -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)