summaryrefslogtreecommitdiff
path: root/cinderclient/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | Drop support for OS_TENANT_NAME and OS_TENANT_IDSean McGinnis2019-09-101-2/+2
| | | | | | | | | | | | | | | | These have been deprecated for a very long time now. Switch to only support the current OS_PROJECT_NAME and OS_PROJECT_ID. Change-Id: I2fb78768b4308a3aaf12764edadb58d4a307adaa Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Merge "Drop 'endpoints' and 'credentials' commands"Zuul2019-09-081-8/+0
|\ \
| * | Drop 'endpoints' and 'credentials' commandsSean McGinnis2019-04-181-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | We are past the deprecation period for these commands and they should now be removed. Change-Id: I37f0dc539da5d43f629ea726bb603fa995c1fe6f Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | Merge "Drop support for Cinder v1 API"Zuul2019-09-0824-2698/+6
|\ \ \ | |/ /
| * | Drop support for Cinder v1 APISean McGinnis2019-04-1824-2698/+6
| | | | | | | | | | | | | | | | | | | | | This drops compatibility with Cinder services with the V1 API. Change-Id: Ic7c6bd05a3991c3afce3dec80b29501932c5aac9 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | Merge "Add custom CA support for get_server_version"Zuul2019-09-051-0/+35
|\ \ \ | |_|/ |/| |
| * | Add custom CA support for get_server_versionIvan Kolodyazhny2019-08-281-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_server_version fails when self-signed CA cert is used. This patch adds: * insecure option to ignore SSL certificate validation * cacert to add ability to provide a custom SSL certificate Change-Id: Ib1d34a5a6b595c53473ddd3acb182ab5a39cbba5 Related-Bug: 1744670
* | | Merge "Autonegotiate API version for shell"Zuul2019-09-041-1/+15
|\ \ \
| * | | Autonegotiate API version for shellEric Harney2019-08-281-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If OS_VOLUME_API_VERSION is not set, use the highest supported by both the client and the server. If OS_VOLUME_API_VERSION exceeds that supported by the server, use the highest supported by both the client and the server. A warning message is printed for the user indicating that this happened. (This is similar to the behavior of the manila CLI, and is mostly code from manilaclient tweaked to work in cinderclient.) Change-Id: Ie1403eca2a191f62169e60c0cde1622575327387
* | | | Merge "Migrate the functional job to Zuul v3"Zuul2019-09-031-53/+0
|\ \ \ \
| * | | | Migrate the functional job to Zuul v3Luigi Toscano2019-08-081-53/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rename it so that it follows the documented pattern (<project>-<specifier>); - remove the old job, including the hooks, hoping that no 3rd-party CI uses them. Change-Id: Ib690c4fa96354dc422576d76c1296b1d5ba3494d
* | | | Merge "Add transfer-list --sort argument"Zuul2019-08-301-0/+21
|\ \ \ \
| * | | | Add transfer-list --sort argumentSean McGinnis2019-05-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Idb04f783b2287b2b45d626131648b0005a232fbe to the cinder service introduced pagination and the ability to sort results for listing volume transfers. This adds the sort ability to the cinder client. The service side uses the sort_key and sort_dir that we've deprecated long ago, but was unfortunately missed when merging this support. Since we have been giving deprecation warnings for using those for other operations, this adds support for --sort that internally will convert to the API's expected sort_key and sort_dir. Change-Id: I137436c76852cbb974eee87e49712c698cbf081b Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | | | Merge "Add 'is_public' support in '--filters' option"Zuul2019-08-211-1/+25
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | Add 'is_public' support in '--filters' optionwhoami-rajat2019-04-151-1/+25
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '--is-public' is a valid argument for cinder type-list command[1] and cinder group-type-list command but is missing in cinderclient. This patch adds the support for it. [1] https://developer.openstack.org/api-ref/block-storage/v3/?expanded=list-all-volume-types-detail#list-all-volume-types Change-Id: I8af9bb06a28f3cc384c4925b8b52bdeaed52cb15
* | | | Merge "Remove promote/reenable replication"Zuul2019-07-103-36/+0
|\ \ \ \
| * | | | Remove promote/reenable replicationMinmin Ren2019-06-193-36/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The replication 1.0 API os-promote-replica and os-reenable-replica were removed[1], then remove useless code from cinderclient. [1]: https://review.openstack.org/#/c/275797/ Change-Id: Icf98f294c089942e11607786e932abc959f77b3b
* | | | Add missed 'Server ID' output in attachment-listMinmin Ren2019-06-042-9/+29
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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, }, ... ] } Change-Id: Ica5d278cb7455befe1db4be0ab65114fd606ea0a
* | | Merge "Fix shell upload-to-image with no volume type"Zuul2019-05-231-0/+28
|\ \ \
| * | | Fix shell upload-to-image with no volume typeEric Harney2019-04-031-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upload-to-image would error after launching the operation if the volume type is None. Closes-Bug: #1821818 Change-Id: I015e0ddfa98d62f25334e2df5effaee72a3988ab
* | | | Correct discover_version responseBrian Rosmaita2019-04-251-1/+6
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | The discover_version function was ignoring the max microversion supported by the client. This patch corrects its behavior to return the most recent API version, if any, supported by both the client and the server it is communicating with. Closes-bug: #1826286 Change-Id: If22b72452065080b24cb1b899c5a5a88b809e986
* | | Handle auth redirectsSean McGinnis2019-04-181-2/+23
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Our checking for keystone v2 and v3 was causing v2 tests to go down the v1 code path. Fixing this surfaced a couple of long standing issues with our v2/v3 handling of redirects and getting auth info. This fixes our version identification, fixes extracting redirect location for response headers, and returning the auth_url to calling code. Change-Id: I939ff027bf43e513e338bff1e99ca41fa52637b6 Closes-bug: #1825372 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Merge "Tests: Don't write bash-completion cache files"Zuul2019-04-025-0/+31
|\ \ | |/ |/|
| * Tests: Don't write bash-completion cache filesEric Harney2019-02-265-0/+31
| | | | | | | | | | | | | | | | | | Mock out writing of bash-completion cache files during unit tests. Related-Bug: #1817782 Change-Id: I944862c30fb4684dd034eba6953e9302d2d22439
* | Merge "Fix: cinder group-list not working with non-admin user"Zuul2019-02-251-8/+8
|\ \ | |/ |/|
| * Fix: cinder group-list not working with non-admin userwhoami-rajat2019-02-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | 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
* | Fix max version handling for help outputSean McGinnis2019-01-301-0/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | Commit fefe331f218d73ba6d1d7acf81b5eb02609c953e incorrectly set the default API version to the max the client knew about in order to get the full help output, including all microversioned commands. The original intent was to have help print out information for all versions, but still require the user to specify a version if they wanted to use any microversioned version of an API. The code accidentally made it so all commands would request the max version the client knew about. This meant an unspecified request would get the newer functionality rather than the default v3 functionality, and also meant the client could request a microversion higher than what the server knew about, resulting in an unexpected error being returned. To keep the originally intended functionality, but keep all help output, this only uses the max API version for the help command unless the user specifies otherwise. Closes-bug: #1813967 Change-Id: I20f6c5471ffefe5524a4d48c967e2e8db53233f1 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Merge "Replace assertRaisesRegexp with assertRaisesRegex"Zuul2018-11-102-10/+10
|\
| * Replace assertRaisesRegexp with assertRaisesRegexzhangyangyang2018-08-292-10/+10
| | | | | | | | | | | | | | This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex(). Change-Id: I85025ad141f8436913ba192716435ce63e1e2d05
* | Merge "Fix encoding of query parameters"4.1.0Zuul2018-10-034-35/+38
|\ \
| * | Fix encoding of query parametersGoutham Pacha Ravi2018-09-134-35/+38
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-022-27/+65
|\ \
| * | Fix backwards compat for volume transfer < 3.55Sean McGinnis2018-08-042-27/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Fix functional error check for invalid volume create size"Zuul2018-10-021-2/+2
|\ \ \
| * | | Fix functional error check for invalid volume create sizeSean McGinnis2018-09-111-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | With the api-schema enforcement on the Cinder API side, the error message returned when specifying a volume creation of 0 has changed. This results in our functional tests failing. Change-Id: I1a9a13f683134faa01ad50f7f073db8b1845a901
* | | Merge "Fix endpoint identification for api-version query"Zuul2018-10-021-3/+14
|\ \ \ | |/ / |/| |
| * | Fix endpoint identification for api-version querySean McGinnis2018-08-061-3/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The api-version query is a GET against the root endpoint of cinder. Determining this root endpoint had a flaw with the newer wsgi deployment URLs that would cause it to find the root endpoint of the web server and not cinder. This updates the logic to work with legacy, wsgi, and custom URLs for the Cinder endpoint. Change-Id: Iaeba1f8d50ee8cc9410cc9f638770a56796871fb Closes-bug: #1785594 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | __repr__ crashes when empty dict passedwhoami-rajat2018-08-131-0/+5
|/ | | | | | | | | | 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
* Allow volume-transfer creation < 3.55 microversion4.0.1Sean McGinnis2018-07-312-10/+21
| | | | | | | | | | | 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>
* Remove unnecessary parameters from volume create APIsNeha Alhat2018-07-264-56/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-203-0/+115
|\
| * Transfer snapshots with volumeswanghao2018-07-193-0/+115
| | | | | | | | | | | | | | | | | | 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-1/+45
|/ | | | | | | | | | | | 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 "Use api version 3 for functional test"Zuul2018-06-252-4/+11
|\
| * Use api version 3 for functional testjunboli2018-06-192-4/+11
| | | | | | | | | | | | | | | | | | switch to use OS_VOLUME_API_VERSION = 3 to run functional tests. Closes-bug: #1775354 Co-Authored-By: liuyamin <liuyamin@fiberhome.com> Change-Id: If6c4291aa7d8e85a4f8c1d5665a0e4a72aa1f1d1
* | Keep is_public usage backwards compatible3.6.1Sean McGinnis2018-06-222-7/+22
| | | | | | | | | | | | | | | | | | | | | | 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-202-7/+8
|/ | | | | | | | | | | 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
* Fix failing functional test casesPooja Jadhav2018-06-131-2/+4
| | | | | | | | | | | | | | After applying schema validation to volume actions APIs[1], error messages are formatted as per the standards. So the tests are failing because of error messages. This patch fixes failed functional tests by correcting error messages. [1]https://review.openstack.org/#/c/559042/ Change-Id: Id05bf637d77ab401fc0aec5be09eee423bf1a223
* Merge "Add the parameter service-id for service cleanup command"Zuul2018-05-281-2/+4
|\
| * Add the parameter service-id for service cleanup commandliuyamin2018-05-251-2/+4
| | | | | | | | | | | | | | | | 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