summaryrefslogtreecommitdiff
path: root/cinderclient/apiclient
Commit message (Collapse)AuthorAgeFilesLines
* Add flake8-import-order extensionSean McGinnis2021-03-101-5/+3
| | | | | | | | | | | | | | | | | | This adds the import order extension to match what we have in the cinder repo. This is a linting extension that will check that imports are in the correct order and the correct grouping so they automatically get flagged, and it won't be whether reviewers notice and decide to do anything or not. Cinder change was Ic13ba238a4a45c6219f4de131cfe0366219d722f for a little more wordy reasoning. Also includes updates for noqa tags. Newer version of the linters appear to want these on the function definition line, not on the decorator line. Change-Id: Ibf3f3afbf3bb6ec6613b35f91d4a353c6a391f41 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Remove all usage of six libraryhaixin2021-03-041-3/+2
| | | | | | Replace six with Python 3 style code. Change-Id: I4b97e040f3e790ac114dcd43c68e6b67b1079adf
* Merge "Fix encoding of query parameters"4.1.0Zuul2018-10-031-3/+3
|\
| * Fix encoding of query parametersGoutham Pacha Ravi2018-09-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | refactor the getid method base.pyzhubx0072018-08-081-9/+4
|/ | | | | | | | | | | | Refer to a merged commit. https://review.openstack.org/#/c/588983/ Refactor the getid method both in cinderclient/base.py and in cinderclient/apiclient/base.py TrivialFix Change-Id: I4d1fb81f6876ab072ded3f14004ad064dcc949d3
* Remove unused cinderclient/apiclient/client.py moduleMatt Riedemann2018-02-201-368/+0
| | | | | | | | | This old module was a carry over from the oslo incubator days and is no longer used. Change-Id: I44982d2581e90b781c78f3d2421cd1dcd8e590fd Related-Bug: #1685678 Related-Bug: #1640269
* Remove unused and duplicated fake_client moduleIvan Kolodyazhny2017-03-101-175/+0
| | | | Change-Id: I3d3f335832b8cc44681235c79855a0cdd579894b
* Handle log message interpolation by the loggerGábor Antal2017-02-071-2/+2
| | | | | | | | | | According to OpenStack Guideline[1], logged string message should be interpolated by the logger. [1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages Change-Id: Ib5f86d1f0846e292457813c893b73c6999e554a5 Closes-Bug: #1596829
* Fix adding non-ascii attrs to Resource objects errorMichael Dovgal2017-01-201-1/+2
| | | | | | | | | | | | | | | | | | | Due to these lines of code [0] we don't have an opportunity to add attributes with non-ascii symbols to Resource objects, but information about it will be in _info dict. Example of side effect - quota_show command. Because we don't have such an attr, here [1] it will be added None value instead of real value [2]. This patch fixes this problem. [0] - https://github.com/openstack/python-cinderclient/blob/f8c93ed03b388612ca28b8055debf915ce631cec/cinderclient/apiclient/base.py#L498-L499 [1] - https://github.com/openstack/python-cinderclient/blob/f8c93ed03b388612ca28b8055debf915ce631cec/cinderclient/shell_utils.py#L179 [2] - http://paste.openstack.org/show/593358/ Change-Id: I0493845dafc5dad836e899b9c22d563023c1dab0 Closes-Bug: #1652605
* Merge "Minor refactoring for nested try-block"1.10.0Jenkins2016-12-231-5/+4
|\
| * Minor refactoring for nested try-blockAlexey Ovchinnikov2016-11-231-5/+4
| | | | | | | | | | | | | | | | A minor refactoring for unnecessary try-block nesting. TrivialFix Change-Id: I8bfb2ff10f802594769a53c9c90a47ae21af1f22
* | Replace six.iteritems(iter) with iter.items()xianming mao2016-12-012-5/+3
| | | | | | | | | | | | | | | | | | | | As mentioned in [1], we should avoid using six.iteritems(iter) to achieve iterators. We can use iter.items() instead, as it will return iterators in PY3 as well. [1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html Change-Id: Ic41abf2ca6ec3ecb651b980091b52d0a185c9089
* | Fix typo in set unicode metadata keyRodion Tikunov2016-11-161-1/+1
|/ | | | | | | Fixes typo in commit 0fd11f30f4a06f7b8cb701fa476aae4f193ac963 Change-Id: I50c59b92f6f65f7b6aa23fd530f6c4b105ad6b1d Closes-Bug: #1622631
* Move old oslo-incubator code out of openstack/commondineshbhor2016-11-035-0/+1558
As part of the first community-wide goal, teams were asked to remove the openstack/common package of their projects if one existed. This was a byproduct of the old oslo-incubator form of syncing common functionality. The package, apiclient, was moved to a top level location and cliutils was moved to the common module. There are no oslo specific libraries, the recommended solution is to move it in tree and maintain it there. Change-Id: Iee52004bd33c19d63133577ff466164b85fd6ca6