python-novaclient/docs/shell.rst

1.4 KiB

The nova shell utility

nova

The nova shell utility interacts with OpenStack Nova API from the command line. It supports the entirety of the OpenStack Nova API.

First, you'll need an OpenStack Nova account and an API key. You get this by using the nova-manage command in OpenStack Nova.

You'll need to provide nova with your OpenStack username and API key. You can do this with the --username, --password and --projectid options, but it's easier to just set them as environment variables by setting two environment variables:

NOVA_USERNAME

Your OpenStack Nova username.

NOVA_PASSWORD

Your password.

NOVA_PROJECT_ID

Project for work.

NOVA_URL

The OpenStack API server URL.

NOVA_VERSION

The OpenStack API version.

For example, in Bash you'd use:

export NOVA_USERNAME=yourname
export NOVA_PASSWORD=yadayadayada
export NOVA_PROJECT_ID=myproject
export NOVA_URL=http://...
export NOVA_VERSION=1.0

From there, all shell commands take the form:

nova <command> [arguments...]

Run nova help to get a full list of all possible commands, and run nova help <command> to get detailed help for that command.