Traditionally, each OpenStack service has its own commandline program,
developed as a separate project. On Git.OpenStack.org, you find the
Python Nova client, Python Neutron client, and so on.
Since each commandline client is developed by a separate team,
they are not overly consistent. For example, to list all your
networks, you type neutron net-list. To list all your servers,
however, the Nova client team decided that nova list is sufficient.
There is no command nova server list. Another problem is the fact
that users have to remember the nicknames of all the OpenStack services.
You need to know that the Nova client is required to manage servers,
and the Cinder client for volumes.
This is where the OpenStack client comes in.
It aims to provide consistency and simplicity.
Instead of nova list for listing servers, you say openstack server list.
You create a network with openstack network create.
You delete a volume with openstack volume delete.
To download an object, openstack object save, to show details of an
image, openstack image show, and to change properties of a given
project, openstack project set. The OpenStack client aims to be the
single and consistent commandline program for the six core services
and for all other services that want to participate.
At Newton, the OpenStack client can be used for almost all activities
on the OpenStack core, but some features have not yet been implemented
and require the old project-specific client.
Keystone is the only service that uses the OpenStack client for 100%
of its features. The old Keystone client has been deprecated for awhile now.
To find the documentation for the OpenStack client,
just type docs.openstack.org in your browser,
and add python-openstackclient to the URL.
Here you are looking at the Queens version, but there should be little
difference with Newton. The Command List is documented here.
Documentation for server-specific commandline clients can often be
found in the services documentation section.
Nova, for example, is at docs.openstack.org/nova.
Scrolling down a little bit, you find a link to the Nova client.
What do commandline commands look like? First, every client implements help.
So here we have our commandline. The openstack help command generates
around 1000 lines, so I would suggest you redirect that to a file like
I did here as well. You can narrow down the help, so this is the list
of all the server commands or the instance commands.
For example, server list, if you want to know how to list servers,
you just say openstack help server list. Notice the formatting
options here, -f and -c, and further up, we have server-specific options.
So these are not formatting options, but they change the behavior of the command.
In order to use the server list command, I first have to run this
command, I will explain what that is about a bit later.
And now let's do that. Alright, so this is the default format,
table format, and if you want to limit the columns that are printed,
you can use the -c option. And if you want a different format,
for example, you want to put that into a spreadsheet, you could use
the CSV format. We can also try the Nova client.
The content is more or less the same, but the format is a bit different.
The -c option stands for column, the other commandline clients have
similar options, but they are not consistently named, and not all
sub commands implement them. The nova list command, for example,
has minus minus fields. Another useful options is -f,
which modifies the output format. The default is the table format,
but CSV, YAML, JSON, and BEAR values are also available.
They are useful for automatic text processing.
Sadly, the nova list command has nothing equivalent, but neutron net-list does.