summaryrefslogtreecommitdiff
path: root/cinderclient/v2
Commit message (Collapse)AuthorAgeFilesLines
* Fix shell upload-to-image with no volume type4.2.1Eric Harney2019-06-031-0/+2
| | | | | | | | | 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)
* Fix incorrect punctuationyenai2019-03-211-3/+3
| | | | | Change-Id: I70e1ad2d0152e74ab0672a3ac2e7b47f85ee92d7 (cherry picked from commit a8cd90a760c7067b2f4d17051e114a287bf3725a)
* Merge "Fix encoding of query parameters"4.1.0Zuul2018-10-031-3/+2
|\
| * Fix encoding of query parametersGoutham Pacha Ravi2018-09-131-3/+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
* | 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
* | __repr__ crashes when empty dict passedwhoami-rajat2018-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | The Capabilities class __repr__ method crashes when along with any manager object, the info is passed as empty dict. This patch handles the issue. Change-Id: Ife5cfc82137d107b27b011aa83c3a9c89e78d701 Closes-Bug: #1785091
* | 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-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Correct errors in snapshot-manageable-list help textSean McGinnis2018-03-201-10/+11
| | | | | | | | Fixes some copy paste issues with the help text for listing snapshots. Also minor grammar fixes. Closes-bug: #1756358 Change-Id: Idee5e8400d8e7d55e9f9232df55b0dfec3e36c3b
* Update help text for encryption providerBrianna Poulos2018-02-161-3/+3
| | | | | | | | | The volume encryption provider no longer uses class names. Instead, 'luks' and 'plain' are used. This patch updates the help text for the volume encryption provider to use the new encryption provider format constants. Change-Id: I6072e18f8c1945082f421a3bf725a874565d6f80
* Merge "Add snapshot_id param note for backup-create"queens-em3.5.0Zuul2018-01-231-0/+3
|\
| * Add snapshot_id param note for backup-createzhengyin2018-01-111-0/+3
| | | | | | | | Change-Id: Id7c565629aeed6d915b21b8de514afcee42470cf
* | Removes unicode 'u' response for "cinder get-capabilities"Abijitha Nadagouda2018-01-231-1/+2
|/ | | | | | | | | | | | | | | | | The output of "cinder get-capabilities" command returns unicoded response. But it would appear from the utils class that setting formatters will go through the capabilities dict and make sure all values are properly string formatted. Therefore added formatters to return string formatted response. Added formatters=sorted(prop.keys()) line instead of static values as suggested by the reviewer, to avoid tying server knowledge to the client and also any update on the server side would easily reflect here. Closes-bug: #1680444 Change-Id: Ie38236db364d59ddab42cb925d0435777b0ffe86
* 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
* Support create volume from backup in clientTommyLike2017-12-071-2/+3
| | | | | | | | | This patch adds create volume from backup support in cinderclient. Change-Id: I01dbcf6b113d88732c174b848be2127ee7242b3c Implements: blueprint support-create-volume-from-backup Depends-On: 58d0fb327f9fc980e0c8b84dcd9f64c093285d13
* Merge "Remove unused attribute when updating quota_class"Zuul2017-11-021-3/+4
|\
| * Remove unused attribute when updating quota_classTommyLike2017-08-181-3/+4
| | | | | | | | | | | | | | | | | | | | When updating quota class, attribute 'class_name' is neither used in the request nor the response [1]. [1]: https://github.com/openstack/cinder/blob/master/cinder/api/contrib/quota_classes.py#L56 Change-Id: Ic1a743ce36a087f369703f10313d51b79b5cab9c
* | Merge "Correct sphinx source code syntax"Jenkins2017-10-101-0/+1
|\ \
| * | Correct sphinx source code syntaxliuyamin2017-08-091-0/+1
| |/ | | | | | | Change-Id: Ia6763a019dbb89f0944d702ce78be963a7ef8271
* | Fix attachment_id returned by create and show volumeSteve Noyes2017-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The attachment_ids in the volume info returned by show volume were incorrect. It was showing the volume_id, not the actual attachment_id. This fix changes the attachment_ids returned by show volume to correctly reflect the attachment_id. Also, added a unit test for this, and added an attachment_id to the fake volume so that other tests wouldn't now fail. Closes-Bug: #1713082 Change-Id: I9ec36af5dd460d03d786aeeb3cc36a869c19ff62
* | Enable H306Eric Harney2017-08-011-7/+7
|/ | | | | | | | | Enforce ordering of imports with H306. For tests, this is mostly done by grouping test imports after other cinderclient imports. Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
* Merge "cinder show with attachments is a mess"Jenkins2017-07-261-1/+15
|\
| * cinder show with attachments is a messJohn Griffith2017-07-031-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The show command currently just dumps the entire attachments dictionary into the output which is a real mess and completely screws up the displayed output (shell command). There's really no reason to do this, we can just give the attachment ID's and then when you're on the newer versions you can do an attachment-show for all the crazy details if you want. Keep in mind that the list command already shows the server-id we're attached too, but that might also be nice from the show command rather than jumping through multiple commands. To try and accomodate various use cases we'll also add an "attached_servers" field to the show command, but you'll have to coorelate manually from there. Change-Id: I45ac49d8d9a185c52727c5bc24a6a1323be83689 Closes-Bug: #1494941
* | Merge "python-cinderclient doc unclear on Volume.attach"Jenkins2017-07-261-2/+23
|\ \
| * | python-cinderclient doc unclear on Volume.attachnidhimittalhada2017-07-261-2/+23
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 'attach' method, documentation vaguely says "Set attachment metadata." Actually, this method should not be called directly by API users when attempting to attach a Cinder volume to a Nova instance, else the Nova and Cinder databases will become inconsistent. Instead attach function exists solely for use by consumers of Cinder services such as Nova, so that they can inform Cinder that they're now using one of Cinder's volumes. Hence correcting the doc text for attach function. Change-Id: I34af39f857b6b918de1129f5d210326b3e84d8e1 Closes-Bug: #1611613
* | Remove consistencygroup quotawangxiyuan2017-07-171-4/+0
| | | | | | | | | | | | | | | | | | Cinder doesn't support to update consistencygroup quota. And since cg will be deprecated in Queue, there is no value to support it at server or client side. So this patch removed it. Change-Id: I5fbfb30611a60d575fedb676119bb0a1564700df Closes-bug: #1693584
* | Fix output of update commandpoojajadhav2017-07-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | User have no information at all, regarding the update of APIs (Consistency Group, Snapshot and Backup). This patch fixes output issue and displays user friendly message based on operation of update command. Closes-Bug: #1664894 Change-Id: I58f0a3729990e9f90f01b7d84e65a13af799fd97
* | Fix cmd options for updating a quota classjeremy.zhang2017-06-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Actions on updating volume quota class: [1] Add cmd option 'backups, backup-gigabytes, per-volume-gigabytes' [2] Add test cases for cmd quota-class-show and quota-class-update [3] Fix according test cases Now, cmd option '--consistencygroups' is not yet supported for updating quota class. Change-Id: I482ae501f15a103b9e07f4f17d182c853035dca9
* | Merge "Add description for function do_list_extensions in cinderclient"Jenkins2017-06-141-5/+1
|\ \ | |/ |/|
| * Add description for function do_list_extensions in cinderclientzhangdaolong2017-03-251-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the current cinderclient version default use v3 interface. And the do_list_extensions of V3 inherited V2. The do_list_extensions of V2 does not have __doc__.For the cli-reference, there is a specific docs tool used to auto-generate the cli-reference files.The docs tool find the function __doc__ that starts with 'do_',as The do_list_extensions's __doc__ is none,so the subcommand 'list-extensions' no desc. python-cinderclient/cinderclient/shell.py --------------------------------- def _find_actions(self, subparsers, actions_module, version, do_help, input_args): for attr in (a for a in dir(actions_module) if a.startswith('do_')): # I prefer to be hyphen-separated instead of underscores. command = attr[3:].replace('_', '-') callback = getattr(actions_module, attr) desc = callback.__doc__ or '' ....... The OpenStack contributor guide has instructions. The guide has a chapter on how to use the duto-generate docs tools - https://docs.openstack.org/contributor-guide/doc-tools.html Specifically, the chapter on the command line reference explains how the tool works - https://docs.openstack.org/contributor-guide/doc-tools/cli-reference.html Change-Id: I5484d1e25b4ec11182b27c80fc43e816b1a12736 Closes-Bug: #1674934
* | Merge "Cleared type restrictions for metadata option"Jenkins2017-05-251-5/+0
|\ \
| * | Cleared type restrictions for metadata optionAlexey Stupnikov2017-05-241-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that it is impossible to send unicode metadata values with some cinder commands. The reason is a type restriction that demands all values to be a 'str' type. As a result, it is impossible to use unicode. Change-Id: I1213b0d3b8177b670cd3e5d587fee9dabd971923 Closes-bug: #1693151
* | | Merge "Handle dashes in encryption-type-create arguments"Jenkins2017-05-241-9/+16
|\ \ \ | |/ / |/| |
| * | Handle dashes in encryption-type-create argumentsEric Harney2017-05-241-9/+16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encryption-type-create currently takes args "--key_size" and "--control_location". Our standard is to use dashes rather than underscores for arguments like this, because it's easier to type them. Additionally, encryption-type-update already uses "--key-size" and "--control-location" for the same args. This adds the dashed versions to the CLI and makes them the default shown in the help. The underscore versions are retained for compatibility. Also removes redundant "(Optional)" text for arguments listed under "Optional Arguments". This matches other commands. Change-Id: I1bd2b7657ec577b9775eacd163cfdf6eb6b6eab2
* | Merge "Cinder client reset-state improvements"Jenkins2017-05-231-1/+2
|\ \
| * | Cinder client reset-state improvementsTommyLike2017-05-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix client `retries` default value.Georgy Dyuldin2017-05-021-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | In case of constructing Client with session without specifying `retries` value, `cinderclient.client.Client.retries` value become to None, instead of 0. This raises TypeError on python 3 during comparison `attempts > self.retries` on `cinderclient.client.SessionClient._cs_request` Closes-Bug: #1684787 Change-Id: If1ac36acb0d1c92e9779e3e8995606c9b34f2cde
* | Remove duplicate do_upload_to_image() method deflihaijing2017-03-201-41/+0
|/ | | | | | | | In cinderclient/v2/shell.py line348 and line1107, you can find the same method defination: def do_upload_to_image(). It doesn't make sense. So remove one of them. Change-Id: I0b5f2bd0c935d75d873720c9bd38f8cefe31bb30
* Merge "Remove cinder credentials command"Jenkins2017-03-101-7/+3
|\
| * Remove cinder credentials commandJon Bernard2017-02-231-7/+3
| | | | | | | | | | | | | | | | This function has been broken for some time, this patch replaces it with a helpful message. This function can be removed in the next release. Change-Id: Ic0a4177e7818c0a1493c15d9e496dc14c63ae7a3 Close-Bug: #1615695
* | Group show command should be in V3wangxiyuan2017-02-201-13/+0
|/ | | | | | | | | Group feature was introduced in Cinder V3, So the command should be there as well. But the "group show" command is in V2 which is wrong. Change-Id: If3ba44b2b188607542bdadfeb58f8e4b363837b7 Closes-bug: #1663496
* Remove duplicate columns from list outputDinesh Bhor2017-02-141-1/+6
| | | | | | | | | | | | | | | | | | If you specify duplicate fields in --fields, then it prints duplicate columns on the console. By default 'ID' column is added to the output so if you specified it in --fields, then it shouldn't be displayed twice. A user can pass 'NaMe', ' Name ' or 'naMe' in --fields option and it displays same name values three times under the user supplied column names. If a user doesn't pass --fields option, then it shows "Name" column in the list. To maintain consistency between user supplied column and default column names, converted it into title case and removed leading and trailing whitespaces. Kept ID field as capital only('ID') for consistency. Closes-Bug: #1659742 Change-Id: I98999e4c5934b56cd2e5a3fac1fe4d2a73a0d5a1
* Add --metadata option to API v2 cinder list command againMitsuhiro Tanino2017-02-031-4/+3
| | | | | | | | | | | | | | | | | | | | | | | In the commit I90a2b713556e91db69270a03ef6b798e08f93f90, --metadata option of do_list() in v2/shell.py was unexpectedly removed and --image_metadata option was added instead of --metadata option. This is wrong fix because --image_metadata option requires API version >= "3.4" and is not supported at API v2. On the other hands, --metadata option of do_list() is supported from API v1. We should remove --image_metadata option and then add --metadata option to do_list() again. Also comment on API v3 cinder list --metadata should be fixed because this doesn't require API >=3.4. Co-Authored-By: Masaki Kimura <masaki.kimura.kz@hitachi.com> Change-Id: Ic7d5cfa2acb47fbf73776e034d958ad8fb9119a8 Closes-Bug: #1661045
* Merge "Update param docstring to ducument search_opts"Jenkins2017-01-261-1/+2
|\
| * Update param docstring to ducument search_optsmaxinjian2017-01-231-1/+2
| | | | | | | | | | | | | | Param that needs docstring is not volume_types, but search_opts, update the param docstring to document the search_opts. Change-Id: Idef956d6e616988d9dacee227781a85bb60d6ded
* | Removed unnecessary 'service_type' decoratorIvan Kolodyazhny2017-01-232-107/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @utils.service_type was introduced with 'Initial split from python-novaclient' commit and used for CLI. Now both Python and Command-line APIs for each version work well without this decorator. Unused 'get_service_type' function is removed too. 'utils.retype_method' removed as well because everything works well without it. Change-Id: Ic2470d8ca9d581b7c47da8d7e6a414c3c78ad27a Partial-Bug: #1643584 Related-Bug: #1621126
* | Fix spelling of consistency groupsPetr Kovar2017-01-183-13/+13
|/ | | | | | Trivial fixes making the consistency group spelling more consistent. Change-Id: I3716606a5415f2cbf966749de17b512c347b1790