cli (list/set): add "--comments" argument.
This commit is contained in:
parent
f7c8ebea06
commit
0c785f0934
1 changed files with 9 additions and 0 deletions
|
|
@ -100,6 +100,13 @@ class Set(base.CommandBase):
|
|||
default="auto",
|
||||
help=_("update existing item instead of replacing it (DEFAULT: auto)"),
|
||||
)
|
||||
self.parser.add_argument(
|
||||
"-C",
|
||||
"--comments",
|
||||
choices=("auto", "true", "false"),
|
||||
default="auto",
|
||||
help=_("create comments node (DEFAULT: auto)"),
|
||||
)
|
||||
self.parser.add_argument(
|
||||
"item",
|
||||
nargs="?",
|
||||
|
|
@ -121,6 +128,8 @@ class Set(base.CommandBase):
|
|||
values.setdefault(field_data[0], []).extend(field_data[1:])
|
||||
|
||||
extra = {"update": update}
|
||||
if self.args.comments != "auto":
|
||||
extra["comments"] = bool(self.args.comments)
|
||||
|
||||
try:
|
||||
item_id = await self.host.bridge.list_set(
|
||||
|
|
|
|||
Loading…
Reference in a new issue