Commit bf2ace9f authored by Michael Hanselmann's avatar Michael Hanselmann

cmdlib: Fix type of “name” parameter for tag operations

The parameter “name” is be None for cluster tags.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 5313eed7
......@@ -9739,7 +9739,8 @@ class LUGetTags(TagsLU):
"""
_OP_PARAMS = [
("kind", _NoDefault, _TElemOf(constants.VALID_TAG_TYPES)),
("name", _NoDefault, _TNonEmptyString),
# Name is only meaningful for nodes and instances
("name", _NoDefault, _TMaybeString),
]
REQ_BGL = False
......@@ -9798,7 +9799,8 @@ class LUAddTags(TagsLU):
"""
_OP_PARAMS = [
("kind", _NoDefault, _TElemOf(constants.VALID_TAG_TYPES)),
("name", _NoDefault, _TNonEmptyString),
# Name is only meaningful for nodes and instances
("name", _NoDefault, _TMaybeString),
("tags", _NoDefault, _TListOf(_TNonEmptyString)),
]
REQ_BGL = False
......@@ -9831,7 +9833,8 @@ class LUDelTags(TagsLU):
"""
_OP_PARAMS = [
("kind", _NoDefault, _TElemOf(constants.VALID_TAG_TYPES)),
("name", _NoDefault, _TNonEmptyString),
# Name is only meaningful for nodes and instances
("name", _NoDefault, _TMaybeString),
("tags", _NoDefault, _TListOf(_TNonEmptyString)),
]
REQ_BGL = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment