cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

CLI parameter supparsers do not accept trailing options: cloud-init devel hotplug-hook query does not accept a trailing -s or --subsystem parmeter on the CLI

Open blackboxsw opened this issue 1 year ago • 1 comments

Bug report

On the CLI, the required --subsystem parameter cannot be passed after the Hotplug Action (query or handle)

# when --subsystem (-s) is before query things work
root@test-n:~# cloud-init devel hotplug-hook -s net  query
disabled
# when --subsystem (-s) is after query our CLI is unhappy
root@test-n:~# cloud-init devel hotplug-hook  query -s net
usage: /usr/bin/cloud-init devel hotplug-hook [-h] -s {net} {query,handle} ...
/usr/bin/cloud-init devel hotplug-hook: error: the following arguments are required: -s/--subsystem
root@test-n:~# 

blackboxsw avatar Jan 30 '24 20:01 blackboxsw

@blackboxsw correct command is cloud-init devel hotplug-hook query -s net

must it work also as cloud-init devel hotplug-hook -s net query ?

AliyevH avatar Feb 29 '24 12:02 AliyevH