Openstack CLI
Installation
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 OpenstackOpenStack EnviornmentEnvironment File
- download the generic nws-id-openstack-rc.sh file for NWS-ID or
- download the direct access template under 'Get Started' in your Openstack project in the Customer Interface
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 nws-id-openstack-rc.sh
...
$ 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 nws-id-openstack-rc.sh
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
Have a look at the Cheat-Sheet to find commonly used CLI commands or have a look into the official OpenStackClient Docs.