OpenStack Command Line
openstack [<global-options>] <command> [<command-arguments>]
openstack help <command>
openstack –help
openstack provides a common command-line interface to OpenStack APIs. It is generally equivalent to the CLIs provided by the OpenStack project client libraries, but with a distinct and consistent command structure.
openstack uses a similar authentication scheme as the OpenStack project CLIs, with the credential information supplied either as environment variables or as options on the command line. The primary difference is the use of ‘project’ in the name of the options OS_PROJECT_NAME/OS_PROJECT_ID over the old tenant-based names.
export OS_AUTH_URL=<url-to-openstack-identity>
export OS_PROJECT_NAME=<project-name>
export OS_USERNAME=<user-name>
export OS_PASSWORD=<password> # (optional)
openstack takes global options that control overall behaviour and command-specific options that control the command operation. Most global options have a corresponding environment variable that may also be used to set the value. If both are present, the command-line option takes priority. The environment variable names are derived from the option name by dropping the leading dashes (‘–’), converting each embedded dash (‘-‘) to an underscore (‘_’), and converting to upper case.
openstack recognizes the following global topions:
To get a list of the available commands:
openstack --help
To get a description of a specific command:
openstack help <command>
The command list displayed in help output reflects the API versions selected. For example, to see Identity v3 commands OS_IDENTITY_API_VERSION must be set to 3.
Show the detailed information for server appweb01:
openstack \
--os-project-name ExampleCo \
--os-username demo --os-password secrete \
--os-auth-url http://localhost:5000:/v2.0 \
server show appweb01
The same command if the auth environment variables (OS_AUTH_URL, OS_PROJECT_NAME, OS_USERNAME, OS_PASSWORD) are set:
openstack server show appweb01
Create a new image:
openstack image create \
--disk-format=qcow2 \
--container-format=bare \
--public \
--copy-from http://somewhere.net/foo.img \
foo
The following environment variables can be set to alter the behaviour of openstack. Most of them have corresponding command-line options that take precedence if set.
Bug reports are accepted at the python-openstackclient LaunchPad project “https://bugs.launchpad.net/python-openstackclient/+bugs”.
Please refer to the AUTHORS file distributed with OpenStackClient.
Copyright 2011-2014 OpenStack Foundation and the authors listed in the AUTHORS file.
The OpenStackClient page in the OpenStack Wiki contains further documentation.
The individual OpenStack project CLIs, the OpenStack API references.