Ask Your Question

How can I manually pass a token to Nova command line?

asked 2013-05-14 16:58:29 -0500

Nelson gravatar image

updated 2013-05-15 08:33:47 -0500


I'd like to know if it is possible to reuse a token directly in the Nova command line, like in Glance or Keystone:

keystone --token ... --endpoint ... user-list
glance --os_auth_token ... --host ... index

It would be something like:

nova --token ... --endpoint ... [action]

Is it necessary to use cURL or something similar? I could not find anything like this in the command line help and documentation.

$ nova --help
usage: nova [--debug] [--os_username OS_USERNAME] [--os_password OS_PASSWORD]
            [--os_tenant_name OS_TENANT_NAME] [--os_auth_url OS_AUTH_URL]
            [--os_region_name OS_REGION_NAME] [--service_type SERVICE_TYPE]
            [--service_name SERVICE_NAME] [--endpoint_type ENDPOINT_TYPE]
            [--version VERSION] [--username USERNAME]
            [--region_name REGION_NAME] [--apikey APIKEY]
            [--projectid PROJECTID] [--url URL]

Command-line interface to the OpenStack Nova API.

Optional arguments:
  --debug               Print debugging output
  --os_username OS_USERNAME
                        Defaults to env[OS_USERNAME].
  --os_password OS_PASSWORD
                        Defaults to env[OS_PASSWORD].
  --os_tenant_name OS_TENANT_NAME
                        Defaults to env[OS_TENANT_NAME].
  --os_auth_url OS_AUTH_URL
                        Defaults to env[OS_AUTH_URL].
  --os_region_name OS_REGION_NAME
                        Defaults to env[OS_REGION_NAME].
  --service_type SERVICE_TYPE
                        Defaults to compute for most actions
  --service_name SERVICE_NAME
                        Defaults to env[NOVA_SERVICE_NAME]
  --endpoint_type ENDPOINT_TYPE
                        Defaults to env[NOVA_ENDPOINT_TYPE] or publicURL.
  --version VERSION     Accepts 1.1, defaults to env[NOVA_VERSION].
  --username USERNAME   Deprecated
  --region_name REGION_NAME
  --apikey APIKEY, --password APIKEY
  --projectid PROJECTID, --tenant_name PROJECTID
  --url URL, --auth_url URL

See "nova help COMMAND" for help on a specific command.

Thanks in advance,


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-05-15 02:32:12 -0500

You can send requests passing X-Auth-Token using curl. Also if you want to see what is happening in background when you run nova command use debug parameter. E.g:

nova --debug usage-list
edit flag offensive delete link more


Thanks Alen! I'm aware that you can send the token using curl, but I'd prefer to use some command line API (such as nova-client) rather than manually creating the URLs, because in this case I would also have to generate the rest of the URL (which is what nova-client already does, right?).

Nelson gravatar imageNelson ( 2013-05-15 08:27:50 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-05-14 16:58:29 -0500

Seen: 988 times

Last updated: May 15 '13