Follow up to node description

The patch fixes several comments left in the node description patch [1].

[1] https://review.openstack.org/#/c/632673

Change-Id: I3b4f4faa205e50c1dccb76e21ac54b17342cd486
Story: 2003089
Task: 23178
This commit is contained in:
Kaifeng Wang 2019-02-18 15:43:00 +08:00
parent ccf2bb1ea1
commit 7a6a6bf69a
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)