From e16810d178bf34b8134b0c0377ae24e47a4f1bdb Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Thu, 24 Oct 2019 13:48:14 -0400 Subject: [PATCH] Remove --id option for autohold_delete/autohold_info Since the hold request ID is the only argument, simplify things by removing the need for using the --id option. Change-Id: I0c176dca3cd7e3007348b5aafae812ebb55556d2 --- .../notes/cli-autohold-simplify-c00303e9695fb812.yaml | 5 +++++ zuul/cmd/client.py | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/cli-autohold-simplify-c00303e9695fb812.yaml diff --git a/releasenotes/notes/cli-autohold-simplify-c00303e9695fb812.yaml b/releasenotes/notes/cli-autohold-simplify-c00303e9695fb812.yaml new file mode 100644 index 0000000000..91da1ae395 --- /dev/null +++ b/releasenotes/notes/cli-autohold-simplify-c00303e9695fb812.yaml @@ -0,0 +1,5 @@ +--- +other: + - | + The --id option to both the autohold-delete and autohold-info zuul + CLI commands has been removed. diff --git a/zuul/cmd/client.py b/zuul/cmd/client.py index 0fe3742cd1..9204a925c1 100755 --- a/zuul/cmd/client.py +++ b/zuul/cmd/client.py @@ -204,16 +204,14 @@ class Client(zuul.cmd.ZuulApp): cmd_autohold_delete = subparsers.add_parser( 'autohold-delete', help='delete autohold request') cmd_autohold_delete.set_defaults(func=self.autohold_delete) - cmd_autohold_delete.add_argument('--id', - help='request ID', - required=True) + cmd_autohold_delete.add_argument('id', metavar='REQUEST_ID', + help='the hold request ID') cmd_autohold_info = subparsers.add_parser( 'autohold-info', help='retrieve autohold request detailed info') cmd_autohold_info.set_defaults(func=self.autohold_info) - cmd_autohold_info.add_argument('--id', - help='request ID', - required=True) + cmd_autohold_info.add_argument('id', metavar='REQUEST_ID', + help='the hold request ID') cmd_autohold_list = subparsers.add_parser( 'autohold-list', help='list autohold requests')