summaryrefslogtreecommitdiff
path: root/cinderclient/v3
Commit message (Collapse)AuthorAgeFilesLines
* Add missed 'Server ID' output in attachment-liststein-em4.2.2Minmin Ren2020-01-211-0/+2
| | | | | | | | | | | | | | | | | | | | | 'server_id' is not Attachment attribute, should be set by 'instance' attribute. v3/attachments respond body: {"attachments": [{"status": "attached", "instance": INSTANCE_UUID, "id": ATTACHMENT_UUID, "volume_id": VOLUME_UUID, }, ... ] } Closes-Bug: #1860393 Change-Id: Ica5d278cb7455befe1db4be0ab65114fd606ea0a (cherry picked from commit 03f228c11e0d88dcc396b30b7544b5cfde894750)
* Fix shell upload-to-image with no volume type4.2.1Eric Harney2019-06-032-12/+14
| | | | | | | | | Upload-to-image would error after launching the operation if the volume type is None. Closes-Bug: #1821818 Change-Id: I015e0ddfa98d62f25334e2df5effaee72a3988ab (cherry picked from commit 274fa111696783e846561d12f670967ed01ebcbc)
* Add support for backup user IDSean McGinnis2019-05-091-0/+3
| | | | | | | | | Backup user_id was added with microversion 3.56 but never added to the client. Added in Rocky with I3ffb544ef3ee65276cee8b1e870d524fd0e57085. Change-Id: Ib9a4159db0f8af599dcf8315334de4f859be077e Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> (cherry picked from commit 44061cfab2dc74dca054546af955d12e13d6e6d2)
* Merge "More shell completion cache additions" into stable/steinZuul2019-03-261-0/+40
|\
| * More shell completion cache additionsEric Harney2019-03-211-0/+40
| | | | | | | | | | | | Closes-Bug: #1712835 Change-Id: I9326d5d92ff2e93dd0398d9a115210b376059064 (cherry picked from commit e40166740ea78d4a1eb2a7040afe3a502374af51)
* | Merge "Re-enable shell UUID completion cache" into stable/steinZuul2019-03-261-0/+24
|\ \ | |/
| * Re-enable shell UUID completion cacheEric Harney2019-03-211-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables writing ids to a local completion cache when using the cinderclient shell, which allows tools/cinder.bash_completion to complete commands such as cinder delete a<tab> Volume ids are recorded on "cinder list" and "cinder create" operations, similar for backup ids. This functionality was unintentionally removed in changes some time ago. Labeled as Partial-Bug because I haven't added name caching yet, which also used to exist. Partial-Bug: #1712835 Change-Id: Id56aa43b061758a00a2a8c9c92a5a33ab9f7ab84 (cherry picked from commit c4b37c2830fdd90b57383a93e09a8bd40ca41221) (cherry picked from commit 7319a40767641aa83d75cc99a807fd231f52f1ac)
* | Fix: cinder group-list not working with non-admin userwhoami-rajat2019-03-211-5/+3
|/ | | | | | | | | | | | The all_tenants filter is passed to API when it's value is 0 (when not specified) which shouldn't be the case. This patch only allows adding of all_tenants when specified manually by user. Change-Id: Ic7810c4d6e9f4be7c28c7a8778d57bb5ccb996a0 Closes-Bug: #1808621 Closes-Bug: #1808622 (cherry picked from commit 532aef0c738edc937dbfa1b54efd8d7773af2204)
* Merge "Fix encoding of query parameters"4.1.0Zuul2018-10-032-9/+3
|\
| * Fix encoding of query parametersGoutham Pacha Ravi2018-09-132-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fix backwards compat for volume transfer < 3.55"Zuul2018-10-021-4/+63
|\ \
| * | Fix backwards compat for volume transfer < 3.55Sean McGinnis2018-08-041-4/+63
| |/ | | | | | | | | | | | | | | | | | | All volume transfer v3 calls were being sent to the endpoint introduced with microversion 3.55. This fixes backwards compatibility by routing calls less than 3.55 to the original API extension endpoint. Change-Id: I7205033ddd5be126b8614372a9fc82a2bc555f48 Closes-bug: #1785330 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Merge "[Optimize] Update help text for hint argument"Zuul2018-10-011-1/+3
|\ \
| * | [Optimize] Update help text for hint argumentTommyLike2018-07-171-1/+3
| | | | | | | | | | | | | | | | | | | | | Update scheduler_hint's help text to describe how to specify multiple hints and array value. Change-Id: If975e06b6e9914848498fa2c3ab27c2f41d7860b
* | | [Trivial] Add backup-id to 'size' param infowhoami-rajat2018-09-191-1/+1
| |/ |/| | | | | | | | | | | | | | | | | Specifying size is not required while providing --backup-id. Also When we don't provide the size the output turns out to be error: Size is a required parameter if snapshot or source volume or backup is not specified. which should be modified in 'size' info too. Change-Id: Ia250df37db9170757d5f834d516781e04582f08b
* | Allow volume-transfer creation < 3.55 microversion4.0.1Sean McGinnis2018-07-311-53/+3
| | | | | | | | | | | | | | | | | | | | | | Handling for the new `no_snapshots` option was incorrectly handling microversion evaluation that would prevent anything less than the new microversion from working. This changes the check to only handle the changed argument for 3.55 and later. Change-Id: If96889ccde6044706e6a5dcd83fde3c20fe1c1fd Closes-bug: #1784703 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Merge "Reflect multiattach deprecation in help text"4.0.0Zuul2018-07-271-1/+1
|\ \
| * | Reflect multiattach deprecation in help textSean McGinnis2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Icbb9c0ca89b25620cedff6cac7a4723e7126eca6 notified that the ``multiattach`` argument was deprecated, but nothing was added to the args help text to indicate this, relying on a user to have read the release notes. In preparation of removing this option, this updates the help text so there is at least some indication that it is going away. Change-Id: I9e767a3f1411fbfc0bf0e433b45560e451d547d5 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | Remove replication v1 supportSean McGinnis2018-07-262-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The replication v1 implementation in Cinder was deprecated in the Mitaka release in favor of the v2 "Cheesecake" version. Support was kept in the client for backwards compatibility, but it has now been several releases and these options should be removed. Closes-bug: #1705470 Change-Id: I978a39a552fffc9ac7ba6e4726d1df2072fa45ba Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | Remove unnecessary parameters from volume create APIsNeha Alhat2018-07-261-7/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per Cinder code, following parameters are not required to be passed in the request body of create volume API. * status * user_id * attach_status * project_id * source_replica If you pass these parameters, previously it was ignored but in the schema validation changes[1] we don't allow additionalProperties to be passed in the request body. If user passes additional parameters which are not as per API specs[2], then it will be rejected with 400 error. On patch[3], tempest tests: test_volume_snapshot_create_get_list_delete, test_volume_create_get_delete" are failing because of these unnecessary parameters. This patch removes these unnecessary parameters passed to the create Volume API. [1]https://blueprints.launchpad.net/cinder/+spec/json-schema-validation [2]https://review.openstack.org/#/c/507386/ [3]https://review.openstack.org/#/c/573093/ Change-Id: I37744bfd0b0bc59682c3e680c1200f608ad3991b
* | Merge "Transfer snapshots with volumes"Zuul2018-07-202-2/+103
|\ \
| * | Transfer snapshots with volumeswanghao2018-07-192-2/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will support to transfer volumes with or without snapshots in new V3 api after mircoversion 3.55. Change-Id: I61a84b5abf386a4073baea57d8820c8fd762ae03 Depends-On: https://review.openstack.org/533564/ Implements: blueprint transfer-snps-with-vols
* | | Add mode option to attachment-createJohn Griffith2018-07-172-2/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | We introduce a mode option in attachment-create starting with microversion 3.54. The mode option is the new/preferred way of setting ro mode (as opposed to admin-metadata). This patch adds the support for the mode option to the client for endpoints that support 3.54. Depends-on: https://review.openstack.org/532702/ Change-Id: I22cfddd0192c4a72b8f844f23d1fa51b96c57e06
* | Merge "Remove initialization of logger if logger is None"Zuul2018-07-031-5/+0
|\ \
| * | Remove initialization of logger if logger is NoneNeha Alhat2018-06-261-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If default_log_level=keystoneauth=WARN is enabled in nova.conf, then these log messages [1][2][3] are logged using cinderclient.v3.client logger name instead of keystoneauth.session. This is because cinderclient initializes logger if not passed by nova and since debug=True is set in nova.conf it’s uses root logger log level. This patch removes initialization of logger code to ensure log messages[1][2][3] are logged only when keystoneauth=DEBUG is enabled in nova.conf. This will also enable us to consume split_logger config option [4] when enabled in nova without making any additional changes in client code. [1] REQ: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@391 [2] RESP: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@422 [3] RESP BODY: https://review.openstack.org/#/c/505764/8/keystoneauth1/session.py@454 [4] https://review.openstack.org/#/c/568878/ Change-Id: I937c6ac2f6e254c438ee2f36eb6c291f62c0f411
* | | Keep is_public usage backwards compatible3.6.1Sean McGinnis2018-06-221-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5a1513244caf7acbd41e181419bc8b62bf4bcaba added the ability to filter by AZ, but it changed the existing behavior if is_public was not specified. This adds handling to make sure we are still consistent with the previous behavior. Co-Authored-by: Alan Bishop <abishop@redhat.com> Change-Id: I5000aab092c1b434c8dc17bbe4b2d3d632f528c3 Closes-bug: #1778055
* | | 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
* | Merge "Add the parameter service-id for service cleanup command"Zuul2018-05-281-1/+8
|\ \
| * | Add the parameter service-id for service cleanup commandliuyamin2018-05-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | There isn't service_id param in cinderclient. We have this param in cinder, so add this param in the cinderclient. Change-Id: I579741595f91802bcf117029889567f234b5b14c Closes-bug: #1771721
* | | 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
* | Support availability-zone in volume typeTommyLike2018-05-022-4/+29
|/ | | | | | | | | | Since 3.52, new option '--filters' has been added to 'type-list' command, and it's only valid for administrator. Change-Id: I140f6d61a2747d4fcaabfbccea864dcc7eb841d1 Depends-On: I4e6aa7af707bd063e7edf2b0bf28e3071ad5c67a Partial-Implements: bp support-az-in-volumetype
* Merge "Support cross AZ backups"Zuul2018-03-272-28/+58
|\
| * Support cross AZ backupsGorka Eguileor2018-02-122-28/+58
| | | | | | | | | | | | | | | | | | | | | | Add support for microversion 3.51 that allows us to specify the Availability Zone of the backup service that should create the backup. New optional parameter available for "backup-create" when using microversion 3.51 is "--availability-zone". Depends-On: I595932276088d25abd464025c99dce33a2cc502b Change-Id: Ia4bab5fcb95f6a8d1adb99c5d7dc1b3f7546c6f6
* | Add api_version wraps for group snapshot list in v3/shell.pyjeremy.zhang2018-03-121-0/+1
|/ | | | | | | | The API 'do_group_snapshot_list' in v3/shell.py misses api_version wraps, and the cmd 'cinder group-snapshot-list' can be used even not specifing the param 'os-volume-api-version'. This patch just to fix it. Change-Id: I6a46e587b1aab692fe6b81b46fa3d95ab66c0625
* Add api_version wraps for some v3 volume APIsjeremy.zhang2018-01-254-0/+13
| | | | | | This patch is mainly to add api_version wraps for some v3 volume APIs. Change-Id: Iea8b9b68930548156749da3f98629e3602ffca83
* Merge "Add snapshot_id param note for backup-create"queens-em3.5.0Zuul2018-01-231-0/+6
|\
| * Add snapshot_id param note for backup-createzhengyin2018-01-111-0/+6
| | | | | | | | Change-Id: Id7c565629aeed6d915b21b8de514afcee42470cf
* | Merge "Support for reporting backend state in service list"Zuul2018-01-181-0/+2
|\ \
| * | Support for reporting backend state in service listwanghao2018-01-091-0/+2
| |/ | | | | | | | | | | | | | | | | | | This patch will support the feature: report backend state in service list in client side. Depends-On: I561dca3ef7c1901401621bc112389dbd178a907e Change-Id: If15e1fa50b5feecd74c7394c918f4fc9d87bcf3e Implements: blueprint report-backend-state-in-service-list
* | Merge "Add api_version wraps for generic volume groups"Zuul2018-01-181-0/+10
|\ \
| * | 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
* | | Merge "Add service cleanup command"Zuul2018-01-163-0/+92
|\ \ \
| * | | Add service cleanup commandGorka Eguileor2017-10-033-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cinder volume services will perform cleanup on start, but when we have multiple volume services grouped in a cluster, we may want to trigger cleanup of services that are down. This patch adds command `work-cleanup` to trigger server cleanups and prints service nodes that will be cleaned and those that didn't have an alternative service in the cluster to do the cleanup. This command will only work on servers supporting API version 3.24 or higher. New command: cinder work-cleanup [--cluster <cluster-name>] [--host <hostname>] [--binary <binary>] [--is-up <True|true|False|false>] [--disabled <True|true|False|false>] [--resource-id <resource-id>] [--resource-type <Volume|Snapshot>] Specs: https://specs.openstack.org/openstack/cinder-specs/specs/newton/ha-aa-cleanup.html Change-Id: I1c33ffbffcb14f34ee2bda9042e706937b1147d7 Depends-On: If336b6569b171846954ed6eb73f5a4314c6c7e2e Implements: blueprint cinder-volume-active-active-support
* | | | Merge "Add cluster support in manage listings"Zuul2018-01-163-18/+44
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | Add cluster support in manage listingsGorka Eguileor2017-10-033-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for API microversion 3.17, which allows us to pass --cluster optional argument to volume and snapshot manage listings. Implements: blueprint cinder-volume-active-active-support Change-Id: I97b5f2e9960d5a1f140fc638804dbc631d63ff9d
* | | Fix 'cluster' paramter using for v3 volume managejeremy.zhang2018-01-051-1/+1
| |/ |/| | | | | | | | | | | The 'cluster' paramter is wrongly provided for v3 volume manage, as it should be included in the 'volume' object. Change-Id: I12440aa6ada9c0e058138e8da7f7bc12359847bb
* | Deprecate multiattach flag on volume createSean McGinnis2017-12-211-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This form of multiattach was never fully supported and is now being replaced by the new mutliattach workflow with Nova. As part of this, volume type extra specs will be used to indicate multiattach ability and will allow retyping between volume types to change the flag after creation. That work is still in progress and has some potential to change. But we know we are not going to support this old style, so we should get that deprecated now so we can remove it and not cause any confusion. Change-Id: Icbb9c0ca89b25620cedff6cac7a4723e7126eca6
* | Merge "Fix the way to get backup metadata"Zuul2017-12-201-3/+3
|\ \
| * | Fix the way to get backup metadatalihaijing2017-12-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In v3/shell.py do_backup_update(), the metadata through 'args.metadata' is a list, like this: 'metadata': [u'k1=v1']. But we need a metadata dict like this: 'metadata': {"k1": "v1"}. So call the right method shell_utils.extract_metadata() to get metadata from args. Change-Id: I82cb96b1f89b4009d4b3f4a0e64db076a7a04977
* | | Merge "Backup create is not available from 3.0 to 3.42"Zuul2017-12-152-10/+45
|\ \ \