diff options
Diffstat (limited to 'doc/source/user/index.rst')
-rw-r--r-- | doc/source/user/index.rst | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst new file mode 100644 index 0000000..2656e42 --- /dev/null +++ b/doc/source/user/index.rst @@ -0,0 +1,62 @@ +========================= + Trove Client User Guide +========================= + +Command-line API +---------------- + +Installing this package gets you a shell command, ``trove``, that you +can use to interact with any OpenStack cloud. + +You'll need to provide your OpenStack username and password. You can do this +with the ``--os-username``, ``--os-password`` and ``--os-tenant-name`` +params, but it's easier to just set them as environment variables:: + + export OS_USERNAME=openstack + export OS_PASSWORD=yadayada + export OS_TENANT_NAME=myproject + +You will also need to define the authentication url with ``--os-auth-url`` and +the version of the API with ``--os-database-api-version`` (default is version +1.0). Or set them as an environment variables as well:: + + export OS_AUTH_URL=http://example.com:5000/v2.0/ + export OS_AUTH_URL=1.0 + +If you are using Keystone, you need to set the OS_AUTH_URL to the keystone +endpoint:: + + export OS_AUTH_URL=http://example.com:5000/v2.0/ + +Since Keystone can return multiple regions in the Service Catalog, you +can specify the one you want with ``--os-region-name`` (or +``export OS_REGION_NAME``). It defaults to the first in the list returned. + +Argument ``--profile`` is available only when the osprofiler lib is installed. + +You'll find complete documentation on the shell by running +``trove help``. + +For more details, refer to :doc:`../cli/index`. + +Python API +---------- + +There's also a complete Python API. + +Quick-start using keystone:: + + # use v2.0 auth with http://example.com:5000/v2.0/ + >>> from troveclient.v1 import client + >>> nt = client.Client(USERNAME, PASSWORD, TENANT_NAME, AUTH_URL) + >>> nt.datastores.list() + [...] + >>> nt.flavors.list() + [...] + >>> nt.instances.list() + [...] + +.. toctree:: + :maxdepth: 2 + + api |