547 Commits

Author SHA1 Message Date
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
Jenkins
4649420ca2 Merge "Fix support for Unicode volume names" 2012-10-30 16:15:09 +00:00
Dean Troyer
c20d7d902e Add python_cinderclient.egg-info to .gitignore
Change-Id: I24a7a5f423e99a9b6839b5f3a1b1fbf05297dc53
2012-10-23 15:39:12 -05: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
Doug Hellmann
5a3a18d0cb Add OpenStack trove classifier for PyPI
Add trove classifier to have the client listed among the
other OpenStack-related projets on PyPI.

Change-Id: I904372caf0a8eaa44dd048729b4d87e5333f04cc
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-10-22 18:42:34 -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
1.0.0
2012-09-20 14:31:27 +00:00
Adam Gandelman
45bcdcaa22 Fix some pep8 issues.
Replace a few '== None' comparisons with 'if None' to fix
E711 pep8 failures in test suite.

Change-Id: Ibce88b74cd19233820f9b00a4eacdabff6c71a6b
2012-09-17 16:57:47 -07:00
Rongze Zhu
f2424f2921 Remove unused methods in FakeHTTPClient and unused unittests
Removed unittests:

tests/v1/test_limits.py

Modified methods:

get_os_quota_sets_test
get_os_quota_sets_test_defaults
put_os_quota_sets_test
get_os_quota_class_sets_test
put_os_quota_class_sets_test

Removed methods:

get_limits
post_servers
get_servers_1234
get_servers_5678
put_servers_1234
delete_servers_1234
delete_servers_1234_metadata_test_key
delete_servers_1234_metadata_key1
delete_servers_1234_metadata_key2
post_servers_1234_metadata
get_servers_1234_diagnostics
get_servers_1234_actions
get_servers_1234_ips
get_servers_1234_ips_public
get_servers_1234_ips_private
delete_servers_1234_ips_public_1_2_3_4
post_servers_1234_action
get_os_cloudpipe
post_os_cloudpipe
get_flavors
get_flavors_detail
get_flavors_1
get_flavors_2
get_flavors_3
delete_flavors_flavordelete
post_flavors
get_os_floating_ip_pools
get_os_floating_ips
get_os_floating_ips_1
post_os_floating_ips
post_os_floating_ips
delete_os_floating_ips_1
get_os_floating_ip_dns
get_os_floating_ip_dns_testdomain_entries
get_os_floating_ip_dns_testdomain_entries_testname
put_os_floating_ip_dns_testdomain
put_os_floating_ip_dns_testdomain_entries_testname
delete_os_floating_ip_dns_testdomain
delete_os_floating_ip_dns_testdomain_entries_testname
get_images
get_images_detail
get_images_1
get_images_2
post_images
post_images_1_metadata
delete_images_1
delete_images_1_metadata_test_key
get_os_keypairs
delete_os_keypairs_test
post_os_keypairs
get_servers_1234_os_virtual_interfaces
get_os_security_groups
get_os_security_groups_1
delete_os_security_groups_1
post_os_security_groups
get_os_security_group_rules
delete_os_security_group_rules_1
post_os_security_group_rules
get_os_simple_tenant_usage
get_os_simple_tenant_usage_tenantfoo
get_os_certificates_root
post_os_certificates
get_os_aggregates
_return_aggregate
get_os_aggregates_1
post_os_aggregates
put_os_aggregates_1
put_os_aggregates_2
post_os_aggregates_1_action
post_os_aggregates_2_action
delete_os_aggregates_1
get_os_hosts_host
get_os_hosts_sample_host
put_os_hosts_sample_host_1
put_os_hosts_sample_host_2
put_os_hosts_sample_host_3
get_os_hosts_sample_host_startup
get_os_hosts_sample_host_reboot
get_os_hosts_sample_host_shutdown
put_os_hosts_sample_host

Change-Id: I0207a558edbfae8f5e69913c421c31e35fefcf4c
2012-09-13 02:53:33 +00:00
Jenkins
67b5cba433 Merge "Patch for bug #1004382" 2012-09-12 23:51:34 +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
Rongze Zhu
5997e233e1 Patch for bug #1004382
Related  change is If5d00a7f7991d78243e76a6e22031c185caee80a

Add new action in tests.v1.fakes.FakeHTTPClient, so it allow to test
os-begin_detaching and os-roll_detaching.
Fix typo in tests/v1/test_volumes.py.

Change-Id: I5c4cd9cc56a7235036b6bab6641554b5919ffbb6
2012-09-12 03:03:46 +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
Jenkins
08aa9659c9 Merge "Add nosehtmloutput as a test dependency." 2012-08-30 14:47:04 +00:00
lrqrun
0d0a46b1c2 Fix PEP8 issues.
Fix some pep8 issues in doc/source/conf.py make the code looks pretty.

Change-Id: I4062904dfebf62dddb7ca2cb7b6c547c5026eb54
2012-08-29 13:45:49 +08:00
Jenkins
0a3745db1a Merge "Correct param comments in docstring" 2012-08-25 17:30:19 +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
Vincent Hou
f885e8bade Add the test environment for the virtualenv.
Resolve Bug1037422.

Change-Id: Ib36ff6eff6e84af25a8d799173524ced9e6d5d06
2012-08-22 16:21:29 +08:00
Clark Boylan
d92d0b06a4 Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: I439fc9742762e626610a7b0774ed1274cf38ceb7
2012-08-21 14:32:58 -07: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
Jenkins
8e48619f96 Merge "Rename bash completion file from nova to cinder." 2012-08-14 10:05:28 +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
Chmouel Boudjnah
ac7d98b84f Rename bash completion file from nova to cinder.
Change-Id: I4bcdb482149271253e12f43fb85a663b5c938a14
2012-08-09 14:18:49 +00: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
Chuck Short
1a32f024ce Bump pep8 to 1.2
Align it with outher openstack projects.

Change-Id: I71a4b3303a354c0483c5da6a786ee6ae39388c77
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-07-20 12:24:25 +00: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
Clark Boylan
7547dadf87 Move docs to doc.
To better facilitate the building and publishing of sphinx
documentation by Jenkins we are moving all openstack projects with
sphinx documentation to a common doc tree structure. Documentation
goes in project/doc and build results go in project/doc/build.

Change-Id: I3ae14ac735d9b4c0b534eac9a9c142f8ccaac1b9
2012-06-15 16:28:14 -04: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