Invalid Error message in case of sub-command non-existence.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cliff |
Fix Released
|
Undecided
|
Jaspreet Singh Rawel |
Bug Description
There is an issue while printing the logs when sub command is not exists
-------
root@cinv-
openstack: 'server' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
server add security group
server add volume
-------
While debugging issue , https:/
We found that there is an issue in the cliff code : cliff/app.py.
def run_subcommand(
>>> here always it is printing "argv[0]" in the error message which is misleading information.
Changed in python-cliff: | |
status: | New → Confirmed |
Problem reproduced in cliff version 1.15.0. It is always showing first subcommand of openstack command as invalid command in the log message.
##########
In the below example, I intentionally misspelled "group" as "grou". It is showing "security" subcommand as invalid instead of showing "grou".
##########
root@controller :/usr/lib/ python2. 7/dist- packages# openstack security grou list t.shell" :/usr/lib/ python2. 7/dist- packages#
No handlers could be found for logger "openstackclien
openstack: 'security' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
security group create
security group delete
security group list
security group rule create
security group rule delete
security group rule list
security group rule show
security group set
security group show
secret container create
secret container delete
secret container get
secret container list
secret delete
secret get
secret list
secret order create
secret order delete
secret order get
secret order list
secret store
secret update
root@controller
###########
In the below example, I intentionally misspelled "list" as "lst". It is showing "security" subcommand as invalid instead of showing "lst".
###########
root@controller :/usr/lib/ python2. 7/dist- packages# openstack security group lst t.shell" :/usr/lib/ python2. 7/dist- packages#
No handlers could be found for logger "openstackclien
openstack: 'security' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
security group create
security group delete
security group list
security group rule create
security group rule delete
security group rule list
security group rule show
security group set
security group show
secret container create
secret container delete
secret container get
secret container list
secret delete
secret get
secret list
secret order create
secret order delete
secret order get
secret order list
secret store
secret update
root@controller