summaryrefslogtreecommitdiff
path: root/cinderclient/v3/groups.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix encoding of query parametersGoutham Pacha Ravi2018-09-131-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | IETF RFC 3986 classifies "~" as a reserved character [1], however until python3.7 [2], python's url parsing used to encode this character. urllib has seen a lot of churn in various python releases, and hence we were using a six wrapper to shield ourselves, however, this backwards-incompatible change in encoding norms forces us to deal with the problem at our end. Cinder's API accepts "~" in both, its encoded or un-encoded forms. So, let's stop encoding it within cinderclient, regardless of the version of python running it. Also fix an inconsitency around the use of the generic helper method in utils added in I3a3ae90cc6011d1aa0cc39db4329d9bc08801904 (cinderclient/utils.py - build_query_param) to allow for False as a value in the query. [1] https://tools.ietf.org/html/rfc3986.html [2] https://docs.python.org/3/library/urllib.parse.html#url-quoting Change-Id: I89809694ac3e4081ce83fd4f788f9355d6772f59 Closes-Bug: #1784728
* unable to create group from src in cinderclientwanghao2018-06-201-2/+12
| | | | | | | | | | | According the api schema of cinder, create_group_from_src should only specify one of arguments from [group_snapshot_id, source_group_id]. Now cinderclient specified them both even if one of them is None. This patch fix this issue to just pass one argument. Change-Id: Idef51ab9a1452dd5eb3be4d4b6dca095a777d611 Closes-Bug: #1777555
* Remove useless args in create_group_from_srcwanghao2018-05-221-4/+1
| | | | | | | | | | | Remove status, project_id and user_id args from create_group_from_src. Those args will cause error when using cinderclient since schema validation in Cinder side. Change-Id: Iba9a45625f9e6423e8e582425605ca184238cde9 Closes-Bug: #1772375
* Add api_version wraps for generic volume groupsjeremy.zhang2018-01-111-0/+10
| | | | | | This patch is mainly to add api_verion wraps for volume group APIs. Change-Id: I1f71ef67c482410b9a671226f68160afde98ae5d
* Removed unnecessary parameters from group and group_snapshots create APIspooja jadhav2017-12-141-3/+0
| | | | | | | | | | | As per code, the 'status', 'user_id' and 'project_id' parameter is not required to be passed in the request body in case of group and group_snapshot create APIs. Even if you pass these parameter, it is silently ignored in the code. This patch removes those parameters passed in the request body. Change-Id: I29e7d4c8a3eee52f4ea7278d2edf2c7deec40628
* Enable H306Eric Harney2017-08-011-1/+1
| | | | | | | | | Enforce ordering of imports with H306. For tests, this is mostly done by grouping test imports after other cinderclient imports. Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
* Tiramisu: replication group supportxing-yang2017-05-051-0/+71
| | | | | | | | | | | | This patch adds CLI support for replication group. It is built upon the generic volume groups. Server side patch is here: https://review.openstack.org/#/c/352228/ Depends-On: I4d488252bd670b3ebabbcc9f5e29e0e4e913765a Change-Id: I462c3ab8c9c3a6a1b434748f81d208359ffd2431 Implements: blueprint replication-cg
* Support list-volume for group showwangxiyuan2017-05-251-3/+15
| | | | | | | | | | V3.25 support query groups with volumes, this patch add the client support. Partial-Implements: blueprint improvement-to-query-consistency-group-detail Partial-Bug: #1663474 Change-Id: Ic0d86b9265f295877eebca97ff450f5efd73b184
* Cinder client reset-state improvementsTommyLike2017-05-191-0/+15
| | | | | | | | | | | | Now we can use 'cinder reset-state' command for 'volume', 'snapshot', 'backup', 'group' and 'group-snapshot'. Also change volume's default status from 'available' to 'None' when not any status is specified. Co-Authored-By: Eric Harney <eharney@redhat.com> Change-Id: I0aefeaf5ece74f1f2bc4b72d5705c8c088921e20 Partial-implements: blueprint client-reset-state-improvements
* Optimize: add build_query_param method to clean codeTommyLike2016-11-071-14/+3
| | | | | | | | Currently the client build query params in respective method this patch intends to use 'utils.build_query_param' to make the code clean. Change-Id: I3a3ae90cc6011d1aa0cc39db4329d9bc08801904
* Move old oslo-incubator code out of openstack/commondineshbhor2016-11-031-1/+1
| | | | | | | | | | | | | | As part of the first community-wide goal, teams were asked to remove the openstack/common package of their projects if one existed. This was a byproduct of the old oslo-incubator form of syncing common functionality. The package, apiclient, was moved to a top level location and cliutils was moved to the common module. There are no oslo specific libraries, the recommended solution is to move it in tree and maintain it there. Change-Id: Iee52004bd33c19d63133577ff466164b85fd6ca6
* Add support for group snapshotsxing-yang2016-07-191-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for group snapshots. Server side API patch was merged: https://review.openstack.org/#/c/361369/ Current microversion is 3.14. The following CLI's are supported: cinder --os-volume-api-version 3.14 group-create-from-src --name my_group --group-snapshot <group snapshot uuid> cinder --os-volume-api-version 3.14 group-create-from-src --name my_group --source-group <source group uuid> cinder --os-volume-api-version 3.14 group-snapshot-create --name <name> <group uuid> cinder --os-volume-api-version 3.14 group-snapshot-list cinder --os-volume-api-version 3.14 group-snapshot-show <group snapshot uuid> cinder --os-volume-api-version 3.14 group-snapshot-delete <group snapshot uuid> Depends-on: I2e628968afcf058113e1f1aeb851570c7f0f3a08 Partial-Implements: blueprint generic-volume-group Change-Id: I5c311fe5a6aeadd1d4fca60493f4295dc368944c
* Add generic volume groupsxing-yang2016-07-191-0/+139
This patch adds support to generic volume groups. Server patch is here: https://review.openstack.org/#/c/322459/ Current microversion is 3.13. The following CLI's are supported: cinder --os-volume-api-version 3.13 group-create --name my_group <group type uuid> <volume type uuid> cinder --os-volume-api-version 3.13 group-list cinder --os-volume-api-version 3.13 create --group-id <group uuid> --volume-type <volume type uuid> <size> cinder --os-volume-api-version 3.13 group-update <group uuid> --name new_name description new_description --add-volumes <uuid of volume to add> --remove-volumes <uuid of volume to remove> cinder --os-volume-api-version 3.13 group-show <group uuid> cinder --os-volume-api-version 3.13 group-delete --delete-volumes <group uuid> Depends-on: I35157439071786872bc9976741c4ef75698f7cb7 Change-Id: Icff2d7385bde0a7c023c2ca38fffcd4bc5460af9 Partial-Implements: blueprint generic-volume-group