~ubuntu-branches/ubuntu/saucy/python-cinderclient/saucy-proposed

« back to all changes in this revision

Viewing changes to README.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-06-27 13:32:14 UTC
  • Revision ID: package-import@ubuntu.com-20120627133214-n2gx1yxu97efvhg8
Tags: upstream-2012.2~f1~20120621.8
ImportĀ upstreamĀ versionĀ 2012.2~f1~20120621.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Python bindings to the OpenStack Volume API
 
2
===========================================
 
3
 
 
4
This is a client for the OpenStack Volume API. There's a Python API (the
 
5
``cinderclient`` module), and a command-line script (``cinder``). Each
 
6
implements 100% of the OpenStack Volume API.
 
7
 
 
8
[PENDING] `Full documentation is available`__.
 
9
 
 
10
__ http://packages.python.org/python-cinderclient/
 
11
 
 
12
You'll also probably want to read `OpenStack Compute Developer Guide API`__ --
 
13
the first bit, at least -- to get an idea of the concepts. Rackspace is doing
 
14
the cloud hosting thing a bit differently from Amazon, and if you get the
 
15
concepts this library should make more sense.
 
16
 
 
17
__ http://docs.openstack.org/api/
 
18
 
 
19
The project is hosted on `Launchpad`_, where bugs can be filed. The code is
 
20
hosted on `Github`_. Patches must be submitted using `Gerrit`_, *not* Github
 
21
pull requests.
 
22
 
 
23
.. _Github: https://github.com/openstack/python-cinderclient
 
24
.. _Launchpad: https://launchpad.net/python-cinderclient
 
25
.. _Gerrit: http://wiki.openstack.org/GerritWorkflow
 
26
 
 
27
This code a fork of `Jacobian's python-cloudservers`__ If you need API support
 
28
for the Rackspace API solely or the BSD license, you should use that repository.
 
29
python-client is licensed under the Apache License like the rest of OpenStack.
 
30
 
 
31
__ http://github.com/jacobian/python-cloudservers
 
32
 
 
33
.. contents:: Contents:
 
34
   :local:
 
35
 
 
36
Command-line API
 
37
----------------
 
38
 
 
39
Installing this package gets you a shell command, ``cinder``, that you
 
40
can use to interact with any Rackspace compatible API (including OpenStack).
 
41
 
 
42
You'll need to provide your OpenStack username and password. You can do this
 
43
with the ``--os_username``, ``--os_password`` and  ``--os_tenant_name``
 
44
params, but it's easier to just set them as environment variables::
 
45
 
 
46
    export OS_USERNAME=openstack
 
47
    export OS_PASSWORD=yadayada
 
48
    export OS_TENANT_NAME=myproject
 
49
 
 
50
You will also need to define the authentication url with ``--os_auth_url``
 
51
and the version of the API with ``--version``.  Or set them as an environment
 
52
variables as well::
 
53
 
 
54
    export OS_AUTH_URL=http://example.com:8774/v1.1/
 
55
    export OS_COMPUTE_API_VERSION=1.1
 
56
 
 
57
If you are using Keystone, you need to set the CINDER_URL to the keystone
 
58
endpoint::
 
59
 
 
60
    export OS_AUTH_URL=http://example.com:5000/v2.0/
 
61
 
 
62
Since Keystone can return multiple regions in the Service Catalog, you
 
63
can specify the one you want with ``--os_region_name`` (or
 
64
``export OS_REGION_NAME``). It defaults to the first in the list returned.
 
65
 
 
66
You'll find complete documentation on the shell by running
 
67
``cinder help``::
 
68
 
 
69
    usage: cinder [--debug] [--os_username OS_USERNAME] [--os_password OS_PASSWORD]
 
70
                [--os_tenant_name OS_TENANT_NAME] [--os_auth_url OS_AUTH_URL]
 
71
                [--os_region_name OS_REGION_NAME] [--service_type SERVICE_TYPE]
 
72
                [--service_name SERVICE_NAME] [--endpoint_type ENDPOINT_TYPE]
 
73
                [--version VERSION] [--username USERNAME]
 
74
                [--region_name REGION_NAME] [--apikey APIKEY]
 
75
                [--projectid PROJECTID] [--url URL]
 
76
                <subcommand> ...
 
77
 
 
78
    Command-line interface to the OpenStack Nova API.
 
79
 
 
80
    Positional arguments:
 
81
      <subcommand>
 
82
        create              Add a new volume.
 
83
        credentials         Show user credentials returned from auth
 
84
        delete              Remove a volume.
 
85
        endpoints           Discover endpoints that get returned from the
 
86
                            authenticate services
 
87
        list                List all the volumes.
 
88
        show                Show details about a volume.
 
89
        snapshot-create     Add a new snapshot.
 
90
        snapshot-delete     Remove a snapshot.
 
91
        snapshot-list       List all the snapshots.
 
92
        snapshot-show       Show details about a snapshot.
 
93
        type-create         Create a new volume type.
 
94
        type-delete         Delete a specific flavor
 
95
        type-list           Print a list of available 'volume types'.
 
96
        bash-completion     Prints all of the commands and options to stdout so
 
97
                            that the
 
98
        help                Display help about this program or one of its
 
99
                            subcommands.
 
100
 
 
101
    Optional arguments:
 
102
      --debug               Print debugging output
 
103
      --os_username OS_USERNAME
 
104
                            Defaults to env[OS_USERNAME].
 
105
      --os_password OS_PASSWORD
 
106
                            Defaults to env[OS_PASSWORD].
 
107
      --os_tenant_name OS_TENANT_NAME
 
108
                            Defaults to env[OS_TENANT_NAME].
 
109
      --os_auth_url OS_AUTH_URL
 
110
                            Defaults to env[OS_AUTH_URL].
 
111
      --os_region_name OS_REGION_NAME
 
112
                            Defaults to env[OS_REGION_NAME].
 
113
      --service_type SERVICE_TYPE
 
114
                            Defaults to compute for most actions
 
115
      --service_name SERVICE_NAME
 
116
                            Defaults to env[CINDER_SERVICE_NAME]
 
117
      --endpoint_type ENDPOINT_TYPE
 
118
                            Defaults to env[CINDER_ENDPOINT_TYPE] or publicURL.
 
119
      --os_compute_api_version VERSION
 
120
                            Accepts 1.1, defaults to env[OS_COMPUTE_API_VERSION].
 
121
      --username USERNAME   Deprecated
 
122
      --region_name REGION_NAME
 
123
                            Deprecated
 
124
      --apikey APIKEY, --password APIKEY
 
125
                            Deprecated
 
126
      --projectid PROJECTID, --tenant_name PROJECTID
 
127
                            Deprecated
 
128
      --url URL, --auth_url URL
 
129
                            Deprecated
 
130
 
 
131
    See "cinder help COMMAND" for help on a specific command.
 
132
 
 
133
Python API
 
134
----------
 
135
 
 
136
[PENDING] There's also a `complete Python API`__.
 
137
 
 
138
__ http://packages.python.org/python-cinderclient/
 
139
 
 
140
Quick-start using keystone::
 
141
 
 
142
    # use v2.0 auth with http://example.com:5000/v2.0/")
 
143
    >>> from cinderclient.v1 import client
 
144
    >>> nt = client.Client(USER, PASS, TENANT, AUTH_URL, service_type="compute")
 
145
    >>> nt.flavors.list()
 
146
    [...]
 
147
    >>> nt.servers.list()
 
148
    [...]
 
149
    >>> nt.keypairs.list()
 
150
    [...]
 
151
 
 
152
What's new?
 
153
-----------
 
154
 
 
155
[PENDING] See `the release notes <http://packages.python.org/python-cinderclient/releases.html>`_.