"server create" accepts undocumented --key argument

Bug #1741023 reported by Julie Pichon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Praveen N

Bug Description

Some users are reporting confusion that setting the keypair with --key in "openstack server create" works, even though it should result an argument error according to the help documentation:

$ openstack help server create
usage: openstack server create [-h] [-f {json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>]
                               [--fit-width] [--print-empty] [--noindent]
                               [--prefix PREFIX]
                               (--image <image> | --volume <volume>) --flavor
                               <flavor> [--security-group <security-group>]
                               [--key-name <key-name>]
                               [--property <key=value>]
                               [--file <dest-filename=source-filename>]
                               [--user-data <user-data>]
                               [--availability-zone <zone-name>]
                               [--block-device-mapping <dev-name=mapping>]
                               [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid,auto,none>]
                               [--network <network>] [--port <port>]
                               [--hint <key=value>]
                               [--config-drive <config-drive-volume>|True]
                               [--min <count>] [--max <count>] [--wait]
                               <server-name>

Despite this using the following works and sets the ke ycorrectly:
$ openstack server create --image cirros --flavor m1.tiny --key test cirrostest

From my understanding, the source of confusion is that when debugging an issue with server creation, the user notices that --key wasn't an option and thought this was the source of the problem, when it was actually fine. It sounds like either adding --key as a documented option in the --help, or removing the option altogether would help to alleviate the confusion.

Praveen N (praveenn)
Changed in python-openstackclient:
assignee: nobody → Praveen N (praveenn)
Revision history for this message
Praveen N (praveenn) wrote :

This seems to be valid.
Also noticed, this holds similar with "openstack server create --security" instead of --security-group parameter.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.