summaryrefslogtreecommitdiff
path: root/cinderclient/v3/shell.py
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-031-12/+13
| | | | | | | | | 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 "[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
* | 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-261-5/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Transfer snapshots with volumes"Zuul2018-07-201-1/+36
|\ \
| * | Transfer snapshots with volumeswanghao2018-07-191-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-1/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | 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 "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
* | Support availability-zone in volume typeTommyLike2018-05-021-0/+21
|/ | | | | | | | | | 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-271-18/+20
|\
| * Support cross AZ backupsGorka Eguileor2018-02-121-18/+20
| | | | | | | | | | | | | | | | | | | | | | 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
* 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 service cleanup command"Zuul2018-01-161-0/+46
|\ \
| * | Add service cleanup commandGorka Eguileor2017-10-031-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-10/+33
|\ \ \ | |/ / | | / | |/ |/|
| * Add cluster support in manage listingsGorka Eguileor2017-10-031-10/+33
| | | | | | | | | | | | | | | | 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
* | 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
* | | Backup create is not available from 3.0 to 3.42TommyLike2017-12-141-9/+19
|/ / | | | | | | | | | | | | | | Backup create command is shielded by patch [1]. [1]: 2255fc99da9752737dcaa96ae4507b646074afb2 Change-Id: I100b8734ee2df4d81e16e2bfdafd81227c20d25e
* | Merge "Remove 'end_version' parameter in backup update"Zuul2017-12-111-1/+1
|\ \
| * | Remove 'end_version' parameter in backup updateTommyLike2017-12-041-1/+1
| |/ | | | | | | | | | | | | | | | | Remove unnecessary 'end_version' which was added in patch [1]. [1]: 2255fc99da9752737dcaa96ae4507b646074afb2 Change-Id: If014ba9c12bf662ef23ebf17decfa59273c63944
* | Support create volume from backup in clientTommyLike2017-12-071-1/+9
| | | | | | | | | | | | | | | | | | This patch adds create volume from backup support in cinderclient. Change-Id: I01dbcf6b113d88732c174b848be2127ee7242b3c Implements: blueprint support-create-volume-from-backup Depends-On: 58d0fb327f9fc980e0c8b84dcd9f64c093285d13
* | Support list with 'with_count' in clientTommyLike2017-12-051-12/+76
|/ | | | | | | | Add 'with_count' parameter in list volume, snapshot and backup APIs. Change-Id: I2b7b41b3579c24703a7a67ab5dc6f960a3ccbdc2 Partial-Implements: bp add-amount-info-in-list-api
* Add cluster support in migration and manageGorka Eguileor2017-10-031-0/+126
| | | | | | | | | | | | This patch adds support for API microversion 3.16, which allows us to pass --cluster optional argument to migration and manage operations. For this, a new type of CLI argument is added, the mutually exclusive arguments that can be used similarly to the utils.arg decorator, but with utils.exclusive_arg decorator. Implements: blueprint cinder-volume-active-active-support Change-Id: If004715b9887d2a0f9fc630b44d6e11a4a8b778d
* Implement UserID in snapshot list responsej-griffith2017-09-211-3/+9
| | | | | | | | | | | | | We have a gap in the microversions implemented in the cinderclient and the MAX version being reported by the client. One of those is the addition of "user_id" in the snapshot list response. This patch adds that with the appropriate version checking. Note that the Max version has already been updated, but there are a few implementations missing. Change-Id: Ia8bdb46b46091a89996e404825466430b8906d18 Partial-Bug: #1715759
* Implement metadata for backup create/updatej-griffith2017-09-091-1/+76
| | | | | | | | | | | We have a gap in the micro versions implemented in the cinderclient and the MAX version being reported by the client. This patch addresses the missing changes for micro version 3.43 which adds support for metadata for backup create and update. Change-Id: I14c7205784c53ec3ab0985a4460a88f59de171fb Partial-Bug: #1715759
* Add an attachment_complete API callJohn Griffith2017-08-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new attachment_update method in Cinder's API creates an attachment object and populates it with the provided connector info. In addition, we set the volumes status to in-use and update the attachment object status to "attached". This isn't really accurate though, because we don't know if the volume is actually attached (connected) by the consumer or not. Also a big side effect here is that currently all of our tests and automation use volume-status to determine if a volume is fully connected/ready for use and that everything went well. It's used as an ack in most cases. This change goes back to using multiple states to signify where a an attachment is in it's life-cycle: 1. attachment_create We've created an empty attachment record but haven't done anything with it yet. 2. attachment_update We provided a connector and set up the TGT so that everything is ready for a consumer to connect/use it. 3. attachment_complete An ACK back from the consumer letting us know that they connected it successfully and are doing their thing. It would be cool to just key all these checks of the attachment object itself, and just use attachment_update to do so, maybe in the future? Change-Id: I3b28d2cb89a8d81c7cdec425f355c78bfdfe3450 Related-Bug: #1710295
* Merge "Support skip-validation for quota update"Jenkins2017-08-081-0/+4
|\
| * Support skip-validation for quota updatewangxiyuan2017-07-181-0/+4
| | | | | | | | | | | | Support skip-validation parameter for quota update. Change-Id: Iec4f1598987c632f45ad6eee751f78bedbf3ec26
* | Merge "Fix support for Unicode value filters"Jenkins2017-07-261-1/+1
|\ \
| * | Fix support for Unicode value filtersjunboli2017-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Cinder supports Unicode value filters for API get-pools, therefore, Here needs to support Unicode value filters as well. Change-Id: I51df61f9465d84c408fc057443a37834c453de41 Closes-Bug: #1701427
* | | Merge "Support volume summary command"Jenkins2017-07-261-0/+21
|\ \ \
| * | | Support volume summary commandwangxiyuan2017-07-121-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | This patch added volume summary command support. Change-Id: I7cf6e149b9ce9cae21818c60146e6db9cc2904bd
* | | | Add cinder create --pollChaynika Saikia2017-07-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: It adds an optional argument --poll to the cinder create command which waits while the creation of the volume is completed and the volume goes to available state. In case there is an error in volume creation, it throws an error message and exits with a non zero status. The error message printed here is the async error message in case it generates one. Depends-On: Ic3ab32b95abd29e995bc071adc11b1e481b32516 Change-Id: I1a4d361d48a44a0daa830491f415be64f2e356e3
* | | | Merge "Cinder attachment-* does not support names"Jenkins2017-07-181-1/+2
|\ \ \ \ | |_|_|/ |/| | |
| * | | Cinder attachment-* does not support namesnidhimittalhada2017-07-131-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Added capability to recognize volume name too in command. It can work with both name and id now. Change-Id: If0fc63042d76beb354e6961e1f2d2936021c3d8e Closes-Bug: #1661043
* | | 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