changed docs about using project id

This commit is contained in:
Lvov Maxim 2011-06-13 16:16:58 +04:00
parent 882a266387
commit ff7e725f92
2 changed files with 13 additions and 6 deletions

@ -36,11 +36,12 @@ Installing this package gets you a shell command, ``nova``, that you
can use to interact with any Rackspace compatible API (including OpenStack). can use to interact with any Rackspace compatible API (including OpenStack).
You'll need to provide your OpenStack username and API key. You can do this You'll need to provide your OpenStack username and API key. You can do this
with the ``--username`` and ``--apikey`` params, but it's easier to just with the ``--username``, ``--apikey`` and ``--projectid`` params, but it's easier to just
set them as environment variables:: set them as environment variables::
export NOVA_USERNAME=openstack export NOVA_USERNAME=openstack
export NOVA_API_KEY=yadayada export NOVA_API_KEY=yadayada
export NOVA_PROJECT_ID=myproject
You will also need to define the authentication url with ``--url``. Or set it as You will also need to define the authentication url with ``--url``. Or set it as
an environment variable as well:: an environment variable as well::
@ -51,7 +52,7 @@ You'll find complete documentation on the shell by running
``nova help``:: ``nova help``::
usage: nova [--username USERNAME] [--apikey APIKEY] usage: nova [--username USERNAME] [--apikey APIKEY]
[--url AUTH_URL] <subcommand> ... [--projectid PROJECTID] [--url AUTH_URL] <subcommand> ...
Command-line interface to the OpenStack Nova API. Command-line interface to the OpenStack Nova API.
@ -93,6 +94,7 @@ You'll find complete documentation on the shell by running
Optional arguments: Optional arguments:
--username USERNAME Defaults to env[NOVA_USERNAME]. --username USERNAME Defaults to env[NOVA_USERNAME].
--apikey APIKEY Defaults to env[NOVA_API_KEY]. --apikey APIKEY Defaults to env[NOVA_API_KEY].
--apikey PROJECTID Defaults to env[NOVA_PROJECT_ID].
--url AUTH_URL Defaults to env[NOVA_URL] or --url AUTH_URL Defaults to env[NOVA_URL] or
https://auth.api.rackspacecloud.com/v1.0 https://auth.api.rackspacecloud.com/v1.0
if undefined. if undefined.
@ -109,7 +111,7 @@ __ http://packages.python.org/python-novaclient/
By way of a quick-start:: By way of a quick-start::
>>> import novaclient >>> import novaclient
>>> nt = novaclient.OpenStack(USERNAME, API_KEY [, AUTH_URL]) >>> nt = novaclient.OpenStack(USERNAME, API_KEY,PROJECT_ID [, AUTH_URL])
>>> nt.flavors.list() >>> nt.flavors.list()
[...] [...]
>>> nt.servers.list() >>> nt.servers.list()

@ -11,9 +11,9 @@ First, you'll need an OpenStack Nova account and an API key. You get this
by using the `nova-manage` command in OpenStack Nova. by using the `nova-manage` command in OpenStack Nova.
You'll need to provide :program:`nova` with your OpenStack username and You'll need to provide :program:`nova` with your OpenStack username and
API key. You can do this with the :option:`--username` and :option:`--apikey` API key. You can do this with the :option:`--username`, :option:`--apikey`
options, but it's easier to just set them as environment variables by setting and :option:`--projectid` options, but it's easier to just set them as
two environment variables: environment variables by setting two environment variables:
.. envvar:: NOVA_USERNAME .. envvar:: NOVA_USERNAME
@ -23,6 +23,10 @@ two environment variables:
Your API key. Your API key.
.. envvar:: NOVA_PROJECT_ID
Project for work.
.. envvar:: NOVA_URL .. envvar:: NOVA_URL
The OpenStack API server URL. The OpenStack API server URL.
@ -31,6 +35,7 @@ For example, in Bash you'd use::
export NOVA_USERNAME=yourname export NOVA_USERNAME=yourname
export NOVA_API_KEY=yadayadayada export NOVA_API_KEY=yadayadayada
export NOVA_PROJECT_ID=myproject
export NOVA_URL=http://... export NOVA_URL=http://...
From there, all shell commands take the form:: From there, all shell commands take the form::