summaryrefslogtreecommitdiff
path: root/cinderclient
Commit message (Collapse)AuthorAgeFilesLines
* Fix undesirable raw Python errorEduardo Santos2020-10-292-0/+15
| | | | | | | | | | | | | | Using the cinderclient without a subcommand while passing an optional argument triggers the raw Python error `ERROR: 'Namespace' object has no attribute 'func'`. This bug can be reproduced by issuing the command `cinder --os-volume-api-version 3.40`. Added a default value to `func` and an empty value to `command` as placeholders so that a help message is shown instead of the Python error. Change-Id: Idb51e8635b97f0da2976f3268d5e19100ec77203 Closes-Bug: #1867061
* Merge "Add commands for default type overrides"Zuul2020-09-169-1/+271
|\
| * Add commands for default type overrideswhoami-rajat2020-09-169-1/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds command for set,get and delete default volume types for projects. This patch adds 3 commands : 1) Set Set a default volume type for a project cinder --os-volume-api-version 3.62 default-type-set <vol-type-id> <project-id> 2) Get Get the default volume type for a project cinder --os-volume-api-version 3.62 default-type-list --project-id <project-id> Get all default types cinder --os-volume-api-version 3.62 default-type-list 3) Unset Unset default volume type for a project cinder --os-volume-api-version 3.62 default-type-unset <project-id> Implements: Blueprint multiple-default-volume-types Change-Id: Id2fb00c218edbb98df3193577dba6a897c6e73f6
* | Merge "Use importlib to take place of imp module"Zuul2020-09-091-2/+11
|\ \ | |/ |/|
| * Use importlib to take place of imp modulezhoulinhui2020-09-021-2/+11
| | | | | | | | | | | | | | | | | | The imp module is deprecated[1] since version 3.4, use importlib to instead [1]: https://docs.python.org/3/library/imp.html Change-Id: Ie250592bc183e8db1758b6cfa4681a45f4c489ab
* | Merge "[goal] Migrate python-cinderclient jobs to focal"Zuul2020-09-047-16/+19
|\ \ | |/ |/|
| * [goal] Migrate python-cinderclient jobs to focalGhanshyam Mann2020-08-177-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per victoria cycle testing runtime and community goal[1] we need to migrate upstream CI/CD to Ubuntu Focal(20.04). Fixing: - bug#1886298 Bump the lower constraints for required deps which added python3.8 support in their later version. - pep8 error - Set bionic nodeset for py36 and py37 job. [1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-fo$ Story: #2007865 Task: #40179 Change-Id: Ibab96807a7747738282732fe0069b9bc197da0ee
* | Merge "Add support for Cinder API mv3.61"Zuul2020-09-021-1/+1
|\ \
| * | Add support for Cinder API mv3.61Ivan Kolodyazhny2020-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Microversion 3.61 adds cluster_name attribute to volume details output for admin users. Change-Id: I13f85c8ddd4cb238a245c263151123fd271a9927 Depends-On: https://review.opendev.org/742991
* | | Merge "Clean up some old v1 API references"Zuul2020-08-211-5/+2
|\ \ \ | |_|/ |/| |
| * | Clean up some old v1 API referencesSean McGinnis2020-06-021-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes some code that was still pointing to the V1 API. No need to add release note or additional announcements since this was all removed long ago, and if anyone would have gone down this code path it would have just blown up trying to import the v1 code that is no longer there. Change-Id: I7d239d3fe3d879e4c391e83cae1e394cf1f5e6eb Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | Merge "use stevedore to load util plugins"Zuul2020-08-051-6/+11
|\ \ \
| * | | use stevedore to load util pluginsDoug Hellmann2020-07-051-6/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Importing pkg_resources has a side-effect of scanning all of the installed python modules looking for entrypoints to build an in-memory cache. Stevedore will be adding an on-disk cache to speed that process up, which should provide significant performance benefits for client applications such as python-openstackclient. This change introduces stevedore to replace pkg_resources. Change-Id: I66decf6d5a4f79ddaa6617737e9334a56dbbbad4 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* | | Merge "Stop to use the __future__ module."Zuul2020-08-057-14/+0
|\ \ \
| * | | Stop to use the __future__ module.Hervé Beraud2020-06-027-14/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The __future__ module [1] was used in this context to ensure compatibility between python 2 and python 3. We previously dropped the support of python 2.7 [2] and now we only support python 3 so we don't need to continue to use this module and the imports listed below. Imports commonly used and their related PEPs: - `division` is related to PEP 238 [3] - `print_function` is related to PEP 3105 [4] - `unicode_literals` is related to PEP 3112 [5] - `with_statement` is related to PEP 343 [6] - `absolute_import` is related to PEP 328 [7] [1] https://docs.python.org/3/library/__future__.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html [3] https://www.python.org/dev/peps/pep-0238 [4] https://www.python.org/dev/peps/pep-3105 [5] https://www.python.org/dev/peps/pep-3112 [6] https://www.python.org/dev/peps/pep-0343 [7] https://www.python.org/dev/peps/pep-0328 Change-Id: Id785793c36b3a6819a7522525252c3fef15ebe2b
* | | Bump hacking to 3.1.0Eric Harney2020-07-164-5/+11
| |/ |/| | | | | | | | | | | | | | | | | | | pycodestyle does not know about "importutils.try_import" calls, so we have to either a) put them inside a "try" block or b) add "# noqa: E402" to each import after the try_import call Change-Id: Ia545bb689cfdfb57962d74e3957dfb372fd3782b
* | Merge "Use unittest.mock instead of third party mock"Zuul2020-06-2212-33/+32
|\ \
| * | Use unittest.mock instead of third party mockSean McGinnis2020-06-0512-33/+32
| | | | | | | | | | | | | | | | | | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: Ia41326a601dfd72750bd81c3ebee9ec5884ad91b Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | | Fix typo: dow -> downLuigi Toscano2020-06-161-1/+1
|/ / | | | | | | | | Closes-Bug: #1883674 Change-Id: I4f4468b23d04ecf74fb6347bfb518377127b563d
* | Add directive to document CLISean McGinnis2020-06-032-3/+3
|/ | | | | | | | | | | | | | | | Our CLI docs are very out of date. These used to be generated by the docs team with some tooling they had. Since the docs moved in-repo, that tooling has gone away, and for the most part no one has done any updates to the CLI docs. This adds a sphinx directive that will generate these docs every time the docs are built. This way, whenever someone makes a CLI change, they do not need to have to know to also edit a documentation file to match their change. Any code changes will automatically be picked up and reflected in the docs. Change-Id: I4406872ab6e9335e338b710e492171580df74fa5 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Merge "Replace bypass_url with os_endpoint"Zuul2020-04-076-20/+21
|\
| * Replace bypass_url with os_endpointIan Wienand2020-03-256-20/+21
| | | | | | | | | | | | | | | | The --bypass-url argument was removed with I3b951cc4eb3adff23f3d2cbe674971816261ef56 so this name does not make sense now. Replace with os_endpoint. Change-Id: Ifa889cc2e885e9c621c8494995b2020195b696ca
* | Merge "Add support for Block Storage API mv 3.60"Zuul2020-04-062-1/+19
|\ \ | |/ |/|
| * Add support for Block Storage API mv 3.60wanghao2020-04-062-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Change I1f43c37c2266e43146637beadc027ccf6dec017e adds time-comparison filtering to the volume list calls (summary and detail) in the Block Storage API microversion 3.60. The current cinderclient filter support will pass these filters correctly, so the only change needed on the client side is to bump the MAX_VERSION so that the client can make calls to mv 3.60. Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com> Change-Id: Ib4b7cbc7e527c0524336e139e127f19accfb7568 Partially-Implements: bp support-to-query-cinder-resources-filter-by-time-comparison-operators
* | Remove --bypass-url documentationIan Wienand2020-03-241-3/+2
| | | | | | | | | | | | | | This was removed with I3b951cc4eb3adff23f3d2cbe674971816261ef56; cleanup old references. Change-Id: I71e6da99dff04d86b9dd67a754764b1e742d366a
* | Pass os_endpoint to keystone sessionIan Wienand2020-03-242-1/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The os_endpoint should be passed to the keystone session as the endpoint_override argument. This is particularly imprtant for talking to Rackspace, who seem to have an odd situation where the endpoint is V2 compatible [1], but the API is still at /v1/ [2] (i think?). To use the RAX API you need to find your account number, then something like: OS_USERNAME=xyz OS_PASSWORD=abc OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/ OS_VOLUME_API_VERSION=2 CINDER_ENDPOINT=https://dfw.blockstorage.api.rackspacecloud.com/v1/<account#> cinder volume list Should work Honestly I'm not 100% what's up with the unit test. I think endpoint override was not being processed previously, and now it is so it drops the "admin"? Story: #2007459 Task: #39138 [1] https://developer.rackspace.com/docs/cloud-block-storage/v1/general-api-info/cbsv1-methods-vs-cinderv2-methods/ [2] https://developer.rackspace.com/docs/cloud-block-storage/v1/general-api-info/service-access/ Change-Id: I6b9a1f088c84676ddf9894cf9524d3239f3cf3a9
* Add filters support for volume transferRajat Dhasmana2020-02-124-1/+79
| | | | | | | | | | | | | | | | | | Currently ``id`` and ``volume_id`` filters are working correctly for transfer-list command. support for filtering by ``name`` is handled in patch provided in Depends-On. Since filtering by all parameters is supported by API, we can happily add the filters option on the client for volume transfers. Also adds functional test for transfers. Related-Bug: #1860100 Depends-On: https://review.opendev.org/#/c/703658/ Change-Id: I2fd3a6a7b9add65a9a21388df44efb6747065a74
* Merge "Update revert_to_snapshot params"6.0.0Zuul2020-02-121-3/+3
|\
| * Update revert_to_snapshot paramsArmstrong Liu2019-12-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | In revert_to_snapshot method, snapshot param must be a object and also has 'id' attribute, so before use the method, we have to use snapshot.get method to get snapshot information. But revert_to_snaoshot only use id of snapshot, we can use snapshot instead of snapshot.id. Change-Id: Ifbdbae3ee66d72f9d34cf4a8fdf2bde388b2b6f0
* | Merge "Raise hacking version to 2.0.0"Zuul2020-02-125-60/+59
|\ \
| * | Raise hacking version to 2.0.0Sean McGinnis2019-12-215-60/+59
| |/ | | | | | | | | | | | | | | | | We've kept hacking capped for a long time now. This raises the hacking package version to the latest release and fixes the issues that it found. Change-Id: I69e41a340c815090f25677607e971a8e75791f6d Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Merge "Add test for subcommands"Zuul2020-02-122-0/+119
|\ \
| * | Add test for subcommandsEric Harney2019-11-122-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests that the expected subcommands register in the shell client, by looking at the output that would show up in "cinder help". The purpose of this is to help prevent us from accidentally deleting some commands when refactoring shell code. TODO: cover commands post-3.0 Change-Id: Ifcbc08ae9184fa33049b18f8ad7ef5d92003a7b8
* | | Merge "Fix: --poll inconsistency"Zuul2020-02-122-1/+2
|\ \ \ | |_|/ |/| |
| * | Fix: --poll inconsistencywhoami-rajat2019-12-052-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we use `--poll` parameter with cinder create command, it waits for the volume to become available but doesn't update the data displayed to the user. Due to this, there are inconsistency between several parameters in the output after 'poll' and 'cinder show' command. Eg: cinder create 1 --image <image-id> --poll shows 'bootable' flag as false whereas, cinder show <vol-id> shows 'bootable' as true Change-Id: I1502e88f1cd84d225b75c07313e4eb252cc2d645 Closes-Bug: #1855224
* | Merge "Update hacking version"Zuul2019-12-122-2/+3
|\ \ | |/ |/|
| * Update hacking versionjacky062019-10-302-2/+3
| | | | | | | | | | | | Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: I1ae708f0753249226ceb47610a1a4d0b558c1d0e
* | Merge "Drop support for --sort_key and --sort_dir"5.0.0Zuul2019-09-119-162/+19
|\ \ | |/ |/|
| * Drop support for --sort_key and --sort_dirSean McGinnis2019-09-119-162/+19
| | | | | | | | | | | | | | | | | | These arguments were deprecated in the kilo release in favor of a combined --sort argument. This drops support for the deprecated arguments. Change-Id: If8f8ac44cc81f553009a15ca67257e86cb925b6f Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Merge "Drop support for --allow-multiattach"Zuul2019-09-1111-70/+15
|\ \ | |/
| * Drop support for --allow-multiattachSean McGinnis2019-09-1111-70/+15
| | | | | | | | | | | | | | | | | | | | The ability to enable multiattach on the command line was deprecated in Queens with the full implementation of multiattach enabling it through volume type extra specs. This removes the command line arg and handling for specifying it with volume creation. Change-Id: Ifc0c874657f959266050cd1a7a40e6ecccc8c114 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* | Merge "Optional filters parameters should be passed only once"Zuul2019-09-114-21/+136
|\ \ | |/ |/|
| * Optional filters parameters should be passed only oncewhoami-rajat2019-09-054-21/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does the following : 1) Errors out if similar type of filters args are passed Eg : cinder list --name abc --name xyz cinder list --name abc --filters name=xyz 2) Allows multiple filter parameters of different type cinder list --filters name=abc --filters size=1 Change-Id: I2f8662555f830b0821147324849d04e7a29d0580
* | Drop support for OS_TENANT_NAME and OS_TENANT_IDSean McGinnis2019-09-102-22/+6
| | | | | | | | | | | | | | | | 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-082-27/+0
|\ \
| * | Drop 'endpoints' and 'credentials' commandsSean McGinnis2019-04-182-27/+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-0844-5819/+19
|\ \ \ | |/ /
| * | Drop support for Cinder v1 APISean McGinnis2019-04-1844-5819/+19
| | | | | | | | | | | | | | | | | | | | | 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-052-4/+50
|\ \ \ | |_|/ |/| |
| * | Add custom CA support for get_server_versionIvan Kolodyazhny2019-08-282-4/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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