summaryrefslogtreecommitdiff
path: root/cinderclient/v2
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Refactor v2 and v3 APIs supportIvan Kolodyazhny2016-12-2020-67/+4221
| | | | | | | | | | | Now v2 API uses code from v3. It's confusing and logically incorrect. This patch makes v3 API as an extended version of v2. The next patches related to this bug duplicated code between v1 and v2, v2 and v3 will be removed. Change-Id: I90a2b713556e91db69270a03ef6b798e08f93f90 Partial-Bug: #1643584
* List manageable volumes and snapshotsAvishay Traeger2016-07-193-1/+115
| | | | | | | | | | | | | Cinder currently has the ability to take over the management of existing volumes and snapshots ("manage existing") and to relinquish management of volumes and snapshots ("unmanage"). The API to manage an existing volume takes a reference, which is a driver-specific string that is used to identify the volume on the storage backend. This patch adds the client code for APIs for listing volumes and snapshots available for management to make this flow more user-friendly. Change-Id: Icd81a77294d9190ac6dbaa7e7d35e4dedf45e49f Implements: blueprint list-manage-existing
* Enhance help message of upload_to_imageCao Shufeng2016-08-251-1/+2
| | | | | | | | | | | | | Following the commit fb2c434c2461a25193067104de766fc1142a6024 in the cinder repo the --force option to upload-to-image is ignored by default. To enable it the config option enable_force_upload must be set to true. The help text for upload-to-image in the python cinderclient should remind user that --force may not work in some cloud now. Closes-Bug: #1611667 Change-Id: Ib56fb2016d933a9bbbcb0185c50e33d2166b34e6
* Replace OpenStack LLC with OpenStack Foundationdineshbhor2016-07-261-1/+1
| | | | | Change-Id: Icf7d5b9f8887e75532ebf5b17835a2b1b22be3c3 Closes-Bug: #1214176
* Log request-id for each api callAbhishek Kekane2016-06-281-1/+8
| | | | | | | | | | Added new private method to log request-id of each api call for both SessionClient and HTTPClient. Already available ks_logger and client_logger will be used for SessionClient and HTTPClient respectively. Change-Id: I679c57b96071ecd9bcd1ab2ed50692195586ca52 Implements: blueprint log-request-id
* Fix upload_to_image method1.7.1Ivan Kolodyazhny2016-05-202-1/+70
| | | | | | | | | | | Commit Ie639179c5bbbaca4de62b42b368830afcfd8f7ac introduced 'visibility' and 'protected' params. These params should be used only with v3.1 microversion. Also these changes break current v2 users. This patch fixes these issues. Closes-Bug: #1584056 Change-Id: I0574631791c475bbefdb6e7d1647a20d0759df64
* Change api_version to self.api_versionscottda2016-05-101-1/+1
| | | | | | | | | | Call to _construct_http_client uses: api_version=api_version but should be: api_version=self.api_version Change-Id: If2686461bff1ef9afd318e999c9e517e15b1677f Closes-Bug: 1580319
* Support api-microversionsscottda2016-04-191-3/+5
| | | | | | | | | Changes to cinderclient to use microversions. Implements: blueprint api-microversion-support-for-cinderclient api-microversion-support-for-cinderclient Change-Id: I840a1162b88e8ff36fa3fc4e1d6b9317104df3e0
* Add /v3 endpoint support for cinderclientscottda2016-04-1819-4509/+27
| | | | | | | | | | | | Add support for Cinder API /v3 endpoint. A couple of unit tests for /v3 endpoint were added to v3/test_shell.py to ensure that the v3 shell works, and to also test that modules work with: from cinderclient.v2.availability_zones import * syntax. Change-Id: I6ae0ada221bebb4ab1850d9c99b10fcbb585201f Implements: https://blueprints.launchpad.net/python-cinderclient/+spec/add-v3-endpoint-support
* Merge "Fix api v2 so that you can delete more than one volume_type at a time."Jenkins2016-03-311-5/+17
|\
| * Fix api v2 so that you can delete more than one volume_type at a time.zwei2016-03-291-5/+17
| | | | | | | | | | | | | | | | | | This path is also allowing us to delete them by name or ID instead of only by ID. eg: cinder --os-volume-api-version 2 type-delete test01 test02 Closes-bug: #1554794 Change-Id: I54faad2c5b60ab69f4b406310eb8059cf1e8cf76
* | Merge "Removed Extra code"Jenkins2016-03-241-1/+0
|\ \
| * | Removed Extra coderoot2016-03-141-1/+0
| |/ | | | | | | | | | | | | | | Some extra code is present like unused variables, unreachable code after return statement etc. Same is removed. Change-Id: Ifca88a19625c56ed520321ecbdd91739a304be8e