Merge "doc: some improvements"

This commit is contained in:
Jenkins 2016-05-20 13:09:20 +00:00 committed by Gerrit Code Review
commit cbb7a94cc3
2 changed files with 43 additions and 22 deletions

View File

@ -3,22 +3,22 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Python bindings to the Gnocchi API
Python bindings and command line tool to the Gnocchi API
========================================================
This is a client for gnocchi API. There's :doc:`a Python API
<api>` (the :mod:`gnocchiclient` module), and a :doc:`command-line script
<shell>` (installed as :program:`gnocchi`). Each implements the entire
Gnocchi API.
This is a client for `Gnocchi`_. There's :doc:`a Python API <api>` (the
:mod:`gnocchiclient` module), and a :doc:`command-line script <shell>`
(installed as :program:`gnocchi`). Each implements the entire Gnocchi API.
.. seealso::
You may want to read the `Gnocchi Developer Guide`__ -- the overview, at
least -- to get an idea of the concepts. By understanding the concepts
this library should make more sense.
You may want to read the `Gnocchi documentation`__ to get an idea of the
concepts. By understanding the concepts this library and client should make
more sense.
__ http://docs.openstack.org/developer/gnocchi/
__ http://gnocchi.xyz
.. _Gnocchi: http://gnocchi.xyz
Contents:

View File

@ -4,17 +4,19 @@ The :program:`gnocchi` shell utility
.. program:: gnocchi
.. highlight:: bash
The :program:`gnocchi` shell utility interacts with Gnocchi API
from the command line. It supports the entirety of the Gnocchi API.
The :program:`gnocchi` shell utility interacts with Gnocchi from the command
line. It supports the entirety of the Gnocchi API.
You'll need to provide the authentication method and your credentials to
:program:`gnocchi`.
You'll need to provide :program:`gnocchi` with your OpenStack credentials.
You can do this with the :option:`--os-username`, :option:`--os-password`,
:option:`--os-tenant-id` and :option:`--os-auth-url` options, but it's easier to
just set them as environment variables:
:option:`--os-tenant-id` and :option:`--os-auth-url` options, but it's easier
to just set them as environment variables:
.. envvar:: OS_USERNAME
Your OpenStack username.
Your username.
.. envvar:: OS_PASSWORD
@ -26,19 +28,35 @@ just set them as environment variables:
.. envvar:: OS_AUTH_URL
The OpenStack auth server URL (keystone).
The OpenStack auth server URL (Keystone).
For example, in Bash you would use::
No authentication
~~~~~~~~~~~~~~~~~
If you're using Gnocchi with no authentication, export the following variables
in your environment::
export OS_AUTH_TYPE=gnocchi-noauth
export GNOCCHI_USER_ID=<youruserid>
export GNOCCHI_PROJECT_ID=<yourprojectid>
export GNOCCHI_ENDPOINT=http://urlofgnocchi
OpenStack Keystone authentication
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you're using Gnocchi with Keystone authentication, export the following
variables in your environment with the appropriate values::
export OS_USERNAME=user
export OS_PASSWORD=pass
export OS_TENANT_NAME=myproject
export OS_AUTH_URL=http://auth.example.com:5000/v2.0
The command line tool will attempt to reauthenticate using your provided credentials
for every request. You can override this behavior by manually supplying an auth
token using :option:`--endpoint` and :option:`--os-auth-token`. You can alternatively
set these environment variables::
The command line tool will attempt to reauthenticate using your provided
credentials for every request. You can override this behavior by manually
supplying an auth token using :option:`--endpoint` and
:option:`--os-auth-token`. You can alternatively set these environment
variables::
export GNOCCHI_ENDPOINT=http://gnocchi.example.org:8041
export OS_AUTH_PLUGIN=token
@ -54,7 +72,10 @@ environment variables::
export GNOCCHI_USER_ID=99aae-4dc2-4fbc-b5b8-9688c470d9cc
export GNOCCHI_PROJECT_ID=c8d27445-48af-457c-8e0d-1de7103eae1f
From there, all shell commands take the form::
Usage
=====
Once authentication is set up, all shell commands take the form::
gnocchi <command> [arguments...]