summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Handle error response for webob>=1.6.0newton-eolstable/newtonAkira KAMIO2017-05-031-3/+8
| | | | | | | | | | | | | | | | | | | | WebOb change https://github.com/Pylons/webob/pull/230 changed the way in which the error response body is formatted such that it's no longer a nested dict. So we have to handle both the old convention of an error message key to the response body error dict and the new way with just the error body dict. This was reported upstream: https://github.com/Pylons/webob/issues/235 But given this was apparently implemented as a long-overdue change in WebOb the behavior is not likely to change.Handle error response for webob>=1.6.0 Change-Id: I7d589415aa024588faf77c8234ac026110f6c3cd Closes-Bug: #1559072 (cherry picked from commit 19befa69651a41534c7d25b1a0d3a0cd407afb44)
* Fix test_version_discovery testIvan Kolodyazhny2017-02-162-2/+2
| | | | | | | | | | | | | Something changed in requests/urllib3 library and now it sends requests with url in a lower-case. It affects test_version_discovery test because we use url in camel-case. This patch changes test url to lower-case to be compatible with old and new behaviours. Change-Id: I4ae9715b124adb0a2e0115c9b00ab16576665f72 Closes-Bug: #1643874 (cherry picked from commit d3b6d542ddce4bc9029df2325440cce5b0dbe245)
* Update .gitreview for stable/newtonDoug Hellmann2016-09-021-0/+1
| | | | Change-Id: I3e3c25cde6afd60ba80b860e9452b15e5847ee3e
* Deleting volume metadata keys with a single request1.9.0Yuriy Nesenenko2016-09-019-6/+58
| | | | | | | | | | | | | | | | Deleting multiple volume metadata keys with a single request to improve performance. To delete multiple metadata items without affecting the remaining ones, just update the metadata items with the updated complete list of ones (without items to delete) in the body of the request. This patch uses etags to avoid the lost update problem with volume metadata. The command isn't changed: $ cinder metadata volume_id unset k1 k2 k3 Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info> Depends-On: I575635258c10f299181b8e4cdb51a7ad1f1be764 Implements: blueprint delete-multiple-metadata-keys Change-Id: I8e18133ffee87c240a7af4b8177683ab99330d9e
* Merge "Add v3 user messages with pagination"Jenkins2016-09-019-6/+349
|\
| * Add v3 user messages with paginationAlex Meade2016-09-019-6/+349
| | | | | | | | | | | | | | | | | | | | GET /messages GET /messages/{id} DELETE /message/{id} Partially-Implements: blueprint summarymessage Depends-On: I398cbd02b61f30918a427291d1d3ae00435e0f4c Change-Id: Ic057ab521c048a376d2a6bed513b8eb8118810d1
* | Merge "Remove self.__dict__ for formatting strings"Jenkins2016-09-011-1/+6
|\ \
| * | Remove self.__dict__ for formatting stringshaobing12016-09-011-1/+6
| |/ | | | | | | | | | | | | | | | | Following OpenStack Style Guidelines: http://docs.openstack.org/developer/hacking/#dictionaries-lists It is not clear as using explicit dictionaries and help avoid some errors during refactoring. Change-Id: If29fa568b757e8e08ec2bd8986d08e422db9eee4
* | Merge "Wrap GroupType class's function with api_version"Jenkins2016-09-012-2/+9
|\ \
| * | Wrap GroupType class's function with api_versionCao Shufeng2016-09-012-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GroupType class's functions only support 3.11 microversion or higher. So it should be wrapped like like one[1], otherwise these fuctions may be exposed to lib users with old microversion. [1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/services.py#L82 Closes-bug: #1619105 Change-Id: I08563898cb1a1eb212973e88a87ed1248f43fa77
* | | Merge "Make Resource class's function can be wraped by api_version"Jenkins2016-09-012-0/+14
|\ \ \ | |/ / | | / | |/ |/|
| * Make Resource class's function can be wraped by api_versionCao Shufeng2016-09-012-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | api_verson.wraps() function requires the object to have an api_version attribute[1]. This change add api_version attribute to Resource class, so that we can use api_version to wrap functions in Resource class. [1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/api_versions.py#L346 Partial-Bug: #1619105 Change-Id: I0fce855768a4a5165ce08274214d4907b4d2fb66
* | Merge "Wrap cluster related function with api_version"Jenkins2016-09-012-1/+14
|\ \ | |/ |/|
| * Wrap cluster related function with api_versionCao Shufeng2016-09-012-1/+14
| | | | | | | | | | | | | | | | | | | | | | Cluster related functions only support 3.11 microversion or higher. So it should be wrapped like like one[1], otherwise these fuctions may be exposed to lib users with old microversion. [1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/services.py#L82 Change-Id: I20d508c2694cf7e052d709548b9709df0561e2c3
* | Merge "Wrap group type and group spec with api_version"Jenkins2016-09-012-1/+16
|\ \
| * | Wrap group type and group spec with api_versionCao Shufeng2016-08-302-1/+16
| |/ | | | | | | | | | | | | | | | | | | Group type and group sepc functions only support 3.11 microversion or higher. So it should be wrapped like like one[1], otherwise these fuctions may be exposed to lib users with old microversion. [1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/services.py#L82 Change-Id: I2ddac90cd483c456a5e88a3952017a77a543f995
* | Merge "Wrap volume_backup's update function with api_version"Jenkins2016-09-012-3/+11
|\ \
| * | Wrap volume_backup's update function with api_versionCao Shufeng2016-08-302-3/+11
| |/ | | | | | | | | | | | | | | | | | | | | Volume backup's update function only supports 3.9 microversion or higher. So it should be wrapped like like this one[1], otherwise these fuctions may be exposed to lib users with old microversion. [1]: https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v3/services.py#L82 Change-Id: I2c800099e8ae707135417f9821f14d1a9e69586e
* | List manageable volumes and snapshotsAvishay Traeger2016-07-1913-3/+425
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add support for group snapshotsxing-yang2016-07-199-1/+549
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-199-5/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Make APIVersion's null check more pythonic"Jenkins2016-08-304-38/+44
|\ \ | |/ |/|
| * Make APIVersion's null check more pythonicGorka Eguileor2016-08-294-38/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our current APIVersion object has an is_null method to check when the version instance is null (major=0 and minor=0). While this works it is not very pythonic, since you have to write expressions such as: if not min_version and not max_version: return True elif ((min_version and max_version) and max_version.is_null() and min_version.is_null()): return True This patch removes the is_null method and instead implements the truth value testing to simplify expressions and make code more pythonic. So previous code would just look like: if not min_version and not max_version: return True Because this will work with min_version being None or being an APIVersion instance with major=0 and minor=0. Change-Id: I7497c5dc940c1e726507117cadbad232d8c1d80d
* | Merge "Replace functions 'Dict.get' and 'del' with 'Dict.pop'"Jenkins2016-08-302-7/+2
|\ \
| * | Replace functions 'Dict.get' and 'del' with 'Dict.pop'bhagyashris2016-08-292-7/+2
| |/ | | | | | | | | | | | | | | | | | | Refactoring code: Making dicts to use single instruction: pop() rather than two instructions: get() and del, giving the codes a format that carries through. TrivialFix Change-Id: Ie404888ccf257978e0ac491165926dfde9a3e6d6
* | Merge "Fix NoneType error for cinderclient v1"Jenkins2016-08-292-4/+10
|\ \ | |/ |/|
| * Fix NoneType error for cinderclient v1Rui Chen2016-08-252-4/+10
| | | | | | | | | | | | | | | | | | | | Request-id log is recorded in SessionClient.request() method, but None is used as logger, that causes all the v1 commands to be broken. This patch fixes the issue and updates the related unit tests. Change-Id: I46b973f2baca8d7402a39e0d15dbd8da38f4e590 Closes-Bug: #1616070
* | Merge "Update the home-page with developer documentation"Jenkins2016-08-281-1/+1
|\ \
| * | Update the home-page with developer documentationvenkatamahesh2016-08-181-1/+1
| | | | | | | | | | | | Change-Id: I22e1e72077d1fe277678f85592dcf1bfb798edfe
* | | Merge "Changed backup-restore to accept backup name"Jenkins2016-08-262-4/+8
|\ \ \
| * | | Changed backup-restore to accept backup nameEllen Leahy2016-08-252-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Beckup-restore does not currently accept the name of the backup, however other backup actions do and according to its description backup-restore should as well. Change-Id: I26d8d2f1fe6cf7362d23d9b9668936dbb0509251 Closes-Bug: #1604892
* | | | Enhance help message of upload_to_imageCao Shufeng2016-08-252-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Fix useless api_version of Manager class"Jenkins2016-08-247-19/+142
|\ \ \ \ | |_|_|/ |/| | |
| * | | Fix useless api_version of Manager classCao ShuFeng2016-08-237-19/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manager's api_version property is used by api_version.wraps. It should not be an "empty" class and the real api_version can be read from Client class. The 3.0 version's upload-to-image doesn't work as excepted because of this useless api_version of VolumeManager class. This patch also fix it and update some unit tests for it, because the changes are co-dependent on one another. Co-Authored-By: Nate Potter <nathaniel.potter@intel.com> Change-Id: I398cbd02b61f30918a427291d1d3ae00435e0f4c Closes-Bug: #1573414 Closes-Bug: #1589040
* | | | Add group types and group specsxing-yang2016-07-147-1/+494
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for group types and group specs in the client. Server patch is merged: https://review.openstack.org/#/c/320165/ Current microversion is 3.11. The following CLI's are supported. cinder --os-volume-api-version 3.11 group-type-create my_test_group cinder --os-volume-api-version 3.11 group-type-list cinder --os-volume-api-version 3.11 group-type-show my_test_group cinder --os-volume-api-version 3.11 group-type-key my_test_group set test_key=test_val cinder --os-volume-api-version 3.11 group-specs-list cinder --os-volume-api-version 3.11 group-type-key my_test_group unset test_key cinder --os-volume-api-version 3.11 group-type-update <group type uuid> --name "new_group" --description "my group type" cinder --os-volume-api-version 3.11 group-type-delete new_group Change-Id: I161a96aa53208e78146cb115d500fd6b2c42d046 Partial-Implements: blueprint generic-volume-group
* | | Merge "deprecate command `cinder endpoints`"Jenkins2016-08-193-0/+17
|\ \ \
| * | | deprecate command `cinder endpoints`Steve Martinelli2016-08-173-0/+17
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command `cinder endpoints` will now print a warning message, indicating that users should use openstackclient instead. This has already been done in nova's CLI [1]. Related-Bug: 1608166 [1] https://github.com/openstack/python-novaclient/blob/master/novaclient/v2/shell.py#L4071-L4072 Change-Id: If68b40cf8116aa0ec386d8067c58703cb7b7c0da
* | | Add "start_version" and "end_version" support to argparseCao Shufeng2016-08-166-14/+354
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, "cinder help subcommand" can not show whether an argument is supported for a specific microversion. With this change, developers only need to add a start_version or end_version in the utils.arg wrap, cinderclient will support the microversion for that arguement. @utils.arg( '--foo', start_version='3.1') @utils.arg( '--bar', start_version='3.2', end_version='3.5') def do_some_action(): ...... In previous example, an exception will be raised for such command: $ cinder --os-volume-api-version 3.6 --bar some-ation And only "--foo" will show up for such help command: $ cinder --os-volume-api-version 3.1 help some-ation Change-Id: I74137486992846bbf9fdff53c009851db2356eef Partial-Bug: #1600567 Co-Authored-By: Nate Potter <nathaniel.potter@intel.com>
* | Merge "Tests for testing volume-create command"Jenkins2016-08-161-0/+37
|\ \
| * | Tests for testing volume-create commandSergii Turivnyi2016-08-091-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | Positive tests for the cinder CLI commands which check actions with volume create command like create volume from snapshot, create volume from volume. Change-Id: I77912d413ac061eb8376233dfef772c55265d135
* | | Merge "Add backup-update"Jenkins2016-08-165-2/+127
|\ \ \
| * | | Add backup-updatelisali2016-08-055-2/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add backup-update command to update name and description of a backup. DocImpact Change-Id: Ie24b2a13f8d1132b65f30e95059479e532fad41a
* | | | Merge "Change api-version help to indicate server API"Jenkins2016-08-091-1/+1
|\ \ \ \
| * | | | Change api-version help to indicate server APIscottda2016-08-041-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The help for the 'api-version' command should state that it is displaying the api-version info for the server, not the client: Display the server API version information. Change-Id: Ia4380871ddca1b7ff41a5e6c8cf86488626e69fc
* | | | Updated from global requirementsOpenStack Proposal Bot2016-08-081-2/+2
| | | | | | | | | | | | | | | | Change-Id: I0b41e0ab210da31590ff21280bc5b9f342659302
* | | | Use 'six' instead of oslo_utils.strutils.sixdineshbhor2016-08-081-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | 'six' is an independent third party module so it doesn't need to be imported and used from oslo_utils.strutils. TrivialFix Change-Id: Icb3232bb1ebae0e8332e66c5806474d7f9dfd6df
* | | Merge "Add cluster related commands"Jenkins2016-08-049-2/+473
|\ \ \ | |_|/ |/| |
| * | Add cluster related commandsGorka Eguileor2016-06-219-2/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates client to support cluster related changes on the API done on microversion 3.7. Service listing will include "cluster_name" field and we have 4 new commands, "cluster-list", "cluster-show", "cluster-enable" and "cluster-disable". Specs: https://review.openstack.org/327283 Implements: blueprint cinder-volume-active-active-support Depends-On: If1ef3a80900ca6d117bf854ad3de142d93694adf Change-Id: I824f46b876e21e552d9f0c5cd3e836f35ea31837
* | | Merge "Changed backup-restore to accept backup name"Jenkins2016-08-032-4/+15
|\ \ \
| * | | Changed backup-restore to accept backup nameEllen Leahy2016-07-292-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Edited do_backup_restore function to accept the name of the backup as well as its id. Changed the test to comply with this. DocImpact Closes-Bug: #1604892 Change-Id: Iaec69dd053a119366fa5a8437701a6f7c3da2235