The openstack shell is missing autocompletion and sub-subcommands

Bug #1823020 reported by Andrea Ieri
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Clients Snap
New
Undecided
Unassigned

Bug Description

When using the standard python3-openstackclient package, it is possible to enter the openstack shell by invoking the openstack binary without any subcommand. Within the shell, subcommands can be autocompleted.

Doing the above with the snap openstack client yields a semi-functional shell. Autocompletion is not available, and any 2nd level subcommand fails:

(openstack) server list
usage: server list [-h] [-f {csv,df-to-csv,json,table,value,yaml}] [-c COLUMN]
                   [--format-config-file FORMAT_CONFIG]
                   [--max-width <integer>] [--fit-width] [--print-empty]
                   [--quote {all,minimal,none,nonnumeric}] [--noindent]
                   [--sort-column SORT_COLUMN]
                   [--reservation-id <reservation-id>]
                   [--ip <ip-address-regex>] [--ip6 <ip-address-regex>]
                   [--name <name-regex>] [--instance-name <server-name>]
                   [--status <status>] [--flavor <flavor>] [--image <image>]
                   [--host <hostname>] [--all-projects] [--project <project>]
                   [--project-domain <project-domain>] [--user <user>]
                   [--user-domain <user-domain>] [--long] [-n]
                   [--marker <server>] [--limit <num-servers>] [--deleted]
                   [--changes-since <changes-since>]
server list: error: unrecognized arguments: list

Double tapping TAB within the shell normally lists all the available commands, but when using the snap only the following is shown:

(openstack)
alias edit exit help history load py pyscript quit set shell shortcuts unalias

Running full openstack commands from bash (e.g. `openstack server list`) works as expected.

Revision history for this message
Benjamin Allot (ballot) wrote :

Hello,

I was going to open a new bug but this is related.
You cannot also load the auto completion in your shell (bash in this case)

$ . <(openstack complete)
No module named 'vitrageclient.v1.cli.webhook.WebhookShow'; 'vitrageclient.v1.cli.webhook' is not a package

Revision history for this message
James Page (james-page) wrote :

I've added support for auto-completion from outside of the openstack CLI shell but I'm a bit stumped as to why its not working from within the shell.

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.