Openstack CLI


Just install the official OpenStackClient from PyPi:

pip install python-openstackclient python-barbicanclient python-cinderclient python-designateclient python-glanceclient python-heatclient python-neutronclient python-novaclient python-octaviaclient python-magnumclient python-heatclient gnocchiclient

Requires: Python >=3.8

Load the OpenStack Environment File

Now you can source the environment file. After entering the password you can send requests to the OpenStack-CLI.
If you have access to multiple projects you will be asked to choose one of the available projects before you can continue with the CLI commands.

$ source
$ openstack server list

The OpenStack Environment File also has the ability to make project switching easier for you. 
Just source the environment file again and you will be asked if you would like to switch the project.

$ source
Access token is still present. Please choose one of the following options:
1) switch project   2) re-authenticate  3) exit
Enter a number: 1
Selected option: switch project

Please select one of your OpenStack projects.

1) 18-openstack-c4dae  2) 29-openstack-a46f4
Enter a number: 2
Selected project: 29-openstack-a46f4

If you would like to only list your available projects, you can just execute the following command:

$ openstack federation project list

Have a look at the Cheat-Sheet to find commonly used CLI commands or have a look into the official OpenStackClient Docs.

Revision #22
Created 19 December 2022 14:14:20 by Dominik Seidel
Updated 28 April 2023 12:18:29 by Achim Ledermüller