Debugging the CLI
When you use python-openstackclient
or the traditional service-based clients (that is, python-novaclient
, python-neturonclient
, or python-swiftclient)
, there is a lot going on behind the scenes! To see the API calls being made, we can use the --debug
flag to see the requests and responses in real time. Let's try using it with the following command. Ensure that you source the openrc
file before running it.
Note
Although understanding the --debug
flag is not required to pass the exam, it is an invaluable tool that can really help you narrow down issues in real-world OpenStack environments.
$ openstack server list --debug
We should see output similar to Figure 10-1. Wow, that's a lot of text!

Figure 10.1: Output from using the --debug flag on the CLI
How can we decipher this? As you already know from the first chapter of this book, we communicate with RESTful APIs via the HTTP protocol. To understand the debug, we can look for the requests and responses being made to the Keystone...