summaryrefslogtreecommitdiff
path: root/cinderclient/shell_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Move print operations to shell_utilsEric Harney2022-11-151-16/+114
| | | | | | | | | | | Move more code to shell_utils that is only used for shell operations. The benefit of this is that the cinderclient library becomes lighter-weight, because users of the lib no longer have to import prettytable and extra code. Change-Id: I7bf6bd91ee5746d1ad4bd4504f3a056d03ae86a9
* Remove all usage of six libraryhaixin2021-03-041-2/+2
| | | | | | Replace six with Python 3 style code. Change-Id: I4b97e040f3e790ac114dcd43c68e6b67b1079adf
* Stop to use the __future__ module.Hervé Beraud2020-06-021-2/+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
* Fix: Quota update successfully executes with no paramsRajat Dhasmana2019-06-241-0/+3
| | | | | | | | | | Since all params of quota update command are optional (except project_id), when no quota field is supplied the command shouldn't execute successfully. This patch shows an error in this case. Change-Id: I22e5ef7900631d1394e0ab5b57c4e4444f0d5a50 Closes-Bug: #1778975
* Fix shell upload-to-image with no volume typeEric Harney2019-04-031-6/+7
| | | | | | | | Upload-to-image would error after launching the operation if the volume type is None. Closes-Bug: #1821818 Change-Id: I015e0ddfa98d62f25334e2df5effaee72a3988ab
* Unreadable output of upload-to-image.deepak_mourya2018-05-281-0/+4
| | | | | | | | | The output of upload-to-image is not readable due to volume type is printed in output as a whole. Printing volume type name only cleans up the output. Change-Id: Ia588cf7ccc0873a8cf956c551afcccf4b6ddaa39 Closes-Bug: #1557486
* Merge "Enable H306"Jenkins2017-08-221-1/+1
|\
| * Enable H306Eric Harney2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | Enforce ordering of imports with H306. For tests, this is mostly done by grouping test imports after other cinderclient imports. Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
* | Merge "Support skip-validation for quota update"Jenkins2017-08-081-0/+3
|\ \
| * | Support skip-validation for quota updatewangxiyuan2017-07-181-0/+3
| | | | | | | | | | | | | | | | | | Support skip-validation parameter for quota update. Change-Id: Iec4f1598987c632f45ad6eee751f78bedbf3ec26
* | | Added missing column 'Allocated'TommyLike2017-07-311-1/+1
| |/ |/| | | | | | | | | | | Added missing column 'Allocated' for quota usage command. Change-Id: Ic2656e2f849e834c7a576b0462d6e8a399a95006
* | Add cinder create --pollChaynika Saikia2017-07-241-0/+34
|/ | | | | | | | | | | | | 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
* Remove consistencygroup quotawangxiyuan2017-07-171-2/+1
| | | | | | | | | 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
* UnboundLocalError on message-listChaynika Saikia2017-06-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | This bug for 'cinder message-list' has been fixed such that now if the user gives wrong filters, then the command properly prints WARNING message saying it is ignoring that filter. Previously, for wrong filters which were not passed in the correct usage format, the 'cinder message-list --filters' command was giving UnboundLocalError exception. The extract_filters() method was previously assuming that all the message filters passed were in the format "<filter_name>=<value>", because of which if the user passed something like: 'cinder message-list --filters event_id:VOLUME_000002' an UnboundLocalError was thrown. The changes are made to the method such that if the user passes a filter in invalid format, the cinder CLI ignores that filter while providing the output. Closes-Bug: #1696556 Change-Id: I545b3f28e545b380842ea003dc38ad70cb413aee
* Merge "Support list-volume for group show"Jenkins2017-06-141-2/+3
|\
| * Support list-volume for group showwangxiyuan2017-05-251-2/+3
| | | | | | | | | | | | | | | | | | | | V3.25 support query groups with volumes, this patch add the client support. Partial-Implements: blueprint improvement-to-query-consistency-group-detail Partial-Bug: #1663474 Change-Id: Ic0d86b9265f295877eebca97ff450f5efd73b184
* | Support generalized resource filter in clientTommyLike2017-05-311-0/+25
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new command 'list-filters' to retrieve enabled resource filters. ``` command: cinder list-filters --resource=volume output: +----------------+-------------------------------+ | Resource | Filters | +----------------+-------------------------------+ | volume | name, status, image_metadata | +----------------+-------------------------------+ ``` Also Added new option '--filters' to these list commands: 1. list 2. snapshot-list 3. backup-list 4. attachment-list 5. message-list 6. group-list 7. group-snapshot-list 8. get-pools Change-Id: I062e6227342ea0d940a8333e84014969c33b49df Partial: blueprint generalized-filtering-for-cinder-list-resource Depends-On: 04bd22c1eb371805a3ce9f6c8915325bc0da2d36 Depends-On: 7fdc4688fea373afb85d929e649d311568d1855a
* Add print_function importMichael Dovgal2017-01-271-0/+2
| | | | | | | | As in PY2 and PY3 we have different result after calling print, add print_function import to have the same behaviour when using empty print. Change-Id: I59c644d196805bb8a2592fc84a839c7a75d78f1a
* Merge "Fix spelling of consistency groups"Jenkins2017-01-201-1/+1
|\
| * Fix spelling of consistency groupsPetr Kovar2017-01-181-1/+1
| | | | | | | | | | | | Trivial fixes making the consistency group spelling more consistent. Change-Id: I3716606a5415f2cbf966749de17b512c347b1790
* | Add convertation of query parameters to stringMykhailo Dovgal2016-12-301-2/+4
|/ | | | | | | | | | | | | There are some problems with non-ascii chars and special symbols during using cinderclient. This patch closes bug connected with parse.urlencode py27 unicode encode bug by adding convertation of query parameters before creating query string in manager._build_list_url method. Also it fix the problems with encoding in quota commands. Change-Id: I96269cca7ad203eaad02d87b30c16d970b26b25f Closes-Bug: #1636621 Closes-Bug: #1518141
* Refactor v2 and v3 APIs supportIvan Kolodyazhny2016-12-201-0/+247
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