700 Commits

Author SHA1 Message Date
Jenkins
bf7b86748a Merge "Add clone volume support to cinderclient." 2012-12-21 08:46:11 +00:00
john-griffith
9a49690096 Add list-extensions capability to cinderclient.
Implements the list extension functionality from novaclient
written by harlowja (Change-Id: I5b72f5ea73c00f1c1a0f09f670d744c820e05837)

This provides a mechanism to view available extensions, and also
starts actually using the cinderclient contrib dir.

Original Author: harlowja

Change-Id: I4f9d04cb8a2aa05c978a2a5a926c9175ee3614bb
2012-12-19 13:07:02 -07:00
Dean Troyer
82e47d0866 Use requests module for HTTP/HTTPS
* Implement correct certificate verification
* Add --os-cacert
* Rework tests for requests

Pinned requests module to < 1.0 as 1.0.2 is now current in pipi
as of 17Dec2012.

Blueprint: tls-verify

Change-Id: I71066ff7297f3b70c08b7ae1c8ae8b6a1b82bbae
2012-12-18 13:58:05 -06:00
Dean Troyer
d3603535d2 Port some additional logging changes from novaclient
* Allows capture of timestamps prior to and after request for timing
  https://review.openstack.org/11519
* Add -X to DELETE and PUT in debug mode
  https://review.openstack.org/12069
* Show request body in curl command
  https://review.openstack.org/12203

Change-Id: I0d87ab6b3c2b35ff843323cb818915e03993a844
2012-12-13 16:44:07 -06:00
Dean Troyer
e30724df5b Bring back the output from client.http_log()
Ported from novaclient https://review.openstack.org/9241
Support CINDERCLIENT_DEBUG as synonym for --debug

Change-Id: Ic03b9e7d84c8db14f6e193ca2b478fd0d70d1299
2012-12-13 15:56:00 -06:00
John Griffith
24733119fe Add clone volume support to cinderclient.
Adds the option to create a clone of a volume, using --source-volid xxx

relies on Change-Id: I72bf90baf22bec2d4806d00e2b827a594ed213f4

Change-Id: Iad2178deb66c328625fbff747e123044f9d86a88
2012-12-13 21:24:00 +00:00
Monty Taylor
9201cee6ef Update to swapped versioninfo logic.
Change-Id: I6a8dd1c84df0a92c21f468c7dcad1ce79f69c463
2012-11-30 14:30:27 -08:00
Monty Taylor
5adf791360 Align cinderclient version code.
Change-Id: I81d6a279a52656720626357a1c4ca8bb382ef1f8
2012-11-30 14:05:54 -08:00
Jenkins
3ca2c99958 Merge "Adding bootable column to volume list view" 2012-11-22 06:13:15 +00:00
Mike Perez
c01e7822f9 Adding bootable column to volume list view
displays whether a volume is bootable based on cinder's api response for
/volumes

Change-Id: I8f6cc6e02be8226914f65717dcb2e0367553e51f
2012-11-21 21:50:18 -08:00
Christian Berendt
79dc21d171 show help when calling without arguments
When calling cinder without arguments you'll receive the following
output:

error: too few arguments
Try 'cinder help ' for more information.

With this change the help is also shown when calling cinder
without arguments. I think that's the expected behavior.

Change-Id: I8f46f67b7fef472ac344bb74f80cf1b77c4c4745
2012-11-08 23:33:14 +01:00
Cory Stone
112bd60d4e Add retries to cinderclient.
HTTPClient now supports a retries argument. It will reissue requests
for any 5xx or socket (400 with n/a) errors. This retry loop was
"inspired" by swiftclient's loop. It reauths one extra time if
necessary.  It uses backoff times of 1, 2, 4... seconds.

The default is 0 retries. It is also exposed to the shell as well with
a --retries arg.

Change-Id: I67bed02d65155f4a4d5d879bb233f56cc78849fa
2012-11-07 11:11:54 -06:00
Alessandro Pilotti
1abc0b4edf Fixes setup compatibility issue on Windows
Fixes Bug #1052161

"python setup.py build" fails on Windows due to a hardcoded shell path:
/bin/sh

setup.py updated using openstack-common/update.py

Change-Id: Iafae444a43c76560020a84e3a1c5c8cb4b6860da
2012-11-06 19:38:28 +02:00
John Griffith
dcbebd7b78 Revert "Add retries to cinderclient."
This reverts commit 3b1eda3b3bb6678e9c9ec3e783e3e12b0c42f0a4
2012-11-02 22:17:03 +00:00
Cory Stone
3b1eda3b3b Add retries to cinderclient.
HTTPClient now supports a retries argument. It will reissue requests
for any 5xx or socket (400 with n/a) errors. This retry loop was
"inspired" by swiftclient's loop. It reauths one time if necessary.
It uses backoff times of 1, 2, 4... seconds.

The default is 0 retries. It is also exposed to the shell as well with
a --retries arg.

Change-Id: I75d9a13d6c4ba16a5da13d4bf5cad78a777d67d7
2012-11-01 14:42:09 -05:00
Jenkins
7d3749e7c3 Merge "Remove extra-specs from types-list command output" 2012-11-01 19:04:42 +00:00
Jenkins
0288e7fd09 Merge "Remove attach/detach code from cinderclient" 2012-11-01 18:59:45 +00:00
John Griffith
a8be1b2a20 Remove extra-specs from types-list command output
type-list was including the extra-specs info in it's response,
however extra-specs are admin accessible only. As a result only admin
users could run type-list which is not what we want.

Add a seperate admin only call to provide volume-types with associated
extra-specs info (extra-specs-list).

Change-Id: I2a716cd7076fb17fd5f2ceb94363eef0009e9bce
2012-11-01 10:13:06 -06:00
Jenkins
92bd08b9e1 Merge "Add volume_type extra_specs support to client" 2012-10-31 20:24:16 +00:00
John Griffith
28d4d6bfd0 Remove attach/detach code from cinderclient
Attach and Detach actions are done in the novaclient, however
during the creation of Cinder a number of these methods were copied into
the Cinder client.  This is dead code and just adds confusion, so let's
rip it out.

Change-Id: Ib96fe0cac26f19e7d9f2aa01c71ba9762e4f8b8e
Fixes: bug #1071003
2012-10-30 10:28:09 -06:00
Eric Harney
01dad32c07 Fix support for Unicode volume names
It is possible to create a Unicode volume from the command line,
but it cannot be manipulated by name for operations such as delete.
This is because the find_resource function tries to match the
Unicode string to a regular byte string, and a UnicodeWarning is
issued, failing the match.  Fix by decoding the Unicode name when
trying to match.

Fixes bug 1065275.

Change-Id: I8e19a78bbc1ccb503ccd39dc3b904fc4f6f77858
2012-10-23 15:50:33 -04:00
John Griffith
942ab5c7fe Add volume_type extra_specs support to client
Adds ability to set/clear volume_type extra_specs
via python-cinderclient.

* Adds extra_specs info to the list-types output
* Adds missing tests for volume_types features
* Fixes unset loop so it actually iterates through all of the supplied keys

Change-Id: I3552de722f76389cfef6d4f12320720e022ebfac
2012-10-10 10:02:30 -06:00
Clay Gerrard
7cba8eb786 add rename and snapshot-rename commands
Change-Id: I06549f19b846d886fabd611d2167b894c4d02df8
2012-09-20 14:45:34 -05:00
Vishvananda Ishaya
2e6be694c1 Show volume and snapshot data on create
cinder create and cinder snapshot-create do not display the data
returned from the api. This makes it difficult to find the id of
of the newly created object.

Fixes bug 1053432

Change-Id: I1defafff3fd08f9b3510f70a455d49d470322d82
2012-09-20 14:31:27 +00:00
Jenkins
6313c9347e Merge "Fixes bug 1045777." 2012-09-12 23:48:50 +00:00
Jenkins
9e69ce1a75 Merge "Implement volume quota support in the cinderclient" 2012-09-12 23:43:35 +00:00
Jenkins
6e7156f0a6 Merge "add tenant_id and make projectid optional" 2012-09-12 21:17:30 +00:00
Jenkins
a416655497 Merge "Add filter options to list and snapshot-list" 2012-09-12 16:40:34 +00:00
Clay Gerrard
2313ddfc8c add tenant_id and make projectid optional
Add a new optional tenant_id keyword argument to the client classes
cinderclient.client.HTTPClient and cinderclient.v1.client.Client to
support authentication with tenant_id instead of projectid (which is
acctually used as "tenantName" in the auth request body).

Keystone can provide tokens without specifiying the tenant in any form,
but a tenantName _or_ tenantId is required to generate the catalog (the
keystone service code seems to prefer tenantName if both are specified).

When using cinderclient programatically, it may be more convienent,
depending on the context to authenticate with out specificying the
tenant, or by tenant_id instead of tenant_name.  Either way it's
impractial to make the requirement in the client for projectid
(tenantName) if the auth system has no such limitation.

The new client signature is backwards compatible.  There is no change in
behavior for the shell client.

Change-Id: I0c1bdbdabd9acc29133a48a798750323011f1f18
2012-09-11 12:38:09 -05:00
Rongze Zhu
a4d4601432 Add begin_detaching and roll_detaching functions
Fixes bug #1004382

If nova call nova.volume.cinder.API.begin_detaching and
nova.volume.cinder.API.roll_detaching, it need python_cinderclient
support the functions.

Change-Id: If5d00a7f7991d78243e76a6e22031c185caee80a
2012-09-11 08:26:59 +00:00
Clay Gerrard
9ba6ed5a90 Add filter options to list and snapshot-list
Change-Id: I9a8b538ad53960700ae7a57d1ceb09b05e3dc468
2012-09-10 12:50:24 -05:00
Avishay Traeger
081cc2e572 Fixes bug 1045777.
Removed conversion from name to ID, now volume type is properly passed
to Cinder.

Change-Id: Idd83af7a5ace58cb062545be221f93db0805438b
2012-09-05 09:58:42 +03:00
John Griffith
f270f22cb0 Implement volume quota support in the cinderclient
* fix for bug 1023311
  * Implements quota extensions in cinderclient
  * Implements absolute limits and rate limits

Change-Id: I7e3f8474476cbc03efb2fefcb8400f5fec85ddcb
2012-08-30 09:30:29 -06:00
Jenkins
a153f10b2b Merge "Change '_' to '-' in options" 2012-08-30 15:15:12 +00:00
Dean Troyer
d7b09bd097 Change '_' to '-' in options
This changes every command-line option with a '_' in its name
and changes them to '-'.  The old option names are maintained
for backward compatibility but are no longer in the help text.

BP command-options

Change-Id: If926bb3b8fa85d628aea197496cf976f71bcdd08
2012-08-23 14:40:09 -05:00
Rongze Zhu
0e1e44733b Correct param comments in docstring
Some methods in cinderclient/v1/volumes.VolumeManager have 'volume'
paramter, but in docstring the paramter is 'server'. So change ":param
server:" to ":param volume:".

Change-Id: I75a86180a830d3ae875ee1aecd45f9a6e39f6e22
2012-08-23 16:55:43 +00:00
John Griffith
0bba3857d1 Add ability to provide metadata on volume creation
Add argument and parser for shell to be able to take
metadata input on volume create.

Change-Id: I64c72df78b8e091e37b8986aea5bd4980a0c7a75
2012-08-15 22:41:03 -06:00
Josh Durgin
75b6589ed0 Add image id arg to create
This works with patch set 7 at https://review.openstack.org/#/c/11028/

Change-Id: I113e0dc557500ea52e64d810409548ed1ffafe90
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-15 22:34:00 -06:00
Jenkins
937e80aa71 Merge "Add availability_zone support for volume creation." 2012-08-14 21:28:52 +00:00
Zhiteng Huang
332a72004f Add availability_zone support for volume creation.
Add '--availability_zone' flag to 'create' sub command in order to allow
user to speicify target availability zone for volume.

Also fix library description in setup.py

Change-Id: Ice3c9a550dcc486208208074730da13c64a6719b
2012-08-10 09:59:39 +08:00
jakedahn
f29d1c8349 Add all_tenants flag to snapshots and volumes.
Adds search_opts functionality for the following branches:
    * https://review.openstack.org/#/c/10750/
    * https://review.openstack.org/#/c/10855/

Change-Id: I8eb69574d3a0510bb6ac8b14b3e2a50a33542f11
2012-08-05 17:42:35 -07:00
John Griffith
778d2d9022 Add missing parameters to volume create body
* Fixes bug 1028684
* Adds metadata and other parameters to volume create

Change-Id: Iaa0c9fd5edac8b48d92ee9722ea5d31d8249cd67
2012-07-25 11:56:50 -06:00
Monty Taylor
55464f7821 Add post-tag versioning.
Change-Id: I527accfa7352ececaabad1213cf2c0b2ef115930
2012-06-25 12:08:55 -05:00
Anthony Young
0daf35ad08 Add support for extended_snapshot_attributes
* Needed for https://review.openstack.org/#/c/8493/

Change-Id: I5beb2638a48776e04bfd95281da838c5b710ea46
2012-06-20 17:09:59 -07:00
Anthony Young
12d162d0ee Add client work for new cinder extensions.
* #5 of blueprint volume-decoupling
 * Fix pep8

Change-Id: Icad4eada0cf16a0f49d9a52e593bede0fc0c5289
2012-06-19 15:22:23 -07:00
Jenkins
7816b3dc31 Merge "Auto generate AUTHORS file for python-cinderclient component." 2012-06-16 23:45:11 +00:00
John Griffith
93f9fa75fa Set pep8 version to 1.1 in test_requires
* Fixes bug 1007520
* Changes in pep8 cause new failures

Change-Id: Ie678f01a5008b0df6ef43a360b599890cab40776
2012-06-15 13:56:39 -06:00
Bhuvan Arumugam
314fa34b75 Auto generate AUTHORS file for python-cinderclient component.
Bug: 976267

Now that git commits are gated by CLA, we shouldn't enforce
committers to add an entry in AUTHORS file. The AUTHORS file
should be generated automatically, based on git commits.

This commit fixes the problem.

* AUTHORS
  Remove this file.

* .gitignore
  Add AUTHORS file.

* cinderclient/shell.py
  pep8 fix.

Change-Id: I4e3c4524fc71a11f11b48fcb6abb99e6c7f33e90
2012-06-02 00:06:01 -07:00
Monty Taylor
1711f1f9bb Align setup.py and tox with standards.
Change-Id: Ic63c6fd4d770303ae5f295c58e43213e88e34b57
2012-05-21 16:44:06 -04:00
Jenkins
471704df64 Initial split from python-novaclient. 2012-05-21 16:32:35 -04:00