summaryrefslogtreecommitdiff
path: root/cinderclient/exceptions.py
Commit message (Collapse)AuthorAgeFilesLines
* Don't print HTTP codes for non-HTTP errorsEric Harney2016-02-241-1/+4
| | | | | | | | | | | | | | | | | | This changes: $ cinder rename asdf ERROR: Must supply either name or description. (HTTP 1) To: $ cinder rename asdf ERROR: Must supply either name or description. Affects rename, snapshot-rename, consisgroup-update, and consisgroup-create-from-src. (consisgroup-* previously printed HTTP 400.) Closes-Bug: #1549020 Closes-Bug: #1549026 Change-Id: Ia920b3b75b53170789b694cbdd49100bd6a72d21
* Fix ClientException init when there is no message on py34Matt Riedemann2015-08-041-3/+5
| | | | | | | | | | | | | | | | | | | | | BaseException.message was removed in python 3 per PEP 0352 so if no message is passed to the ClientException __init__ it will blow up: AttributeError: type object 'ClientException' has no attribute 'message' So this change does two things: 1. Default to 'n/a' for message and details when body['keys'] doesn't have a message or details in it (which should be fine since from_response defaults to n/a if 'keys' is not in body). 2. Use getattr for self.__class__.message and default to None if that attribute is not set. Arguably we could just remove this and make the message kwarg default to 'n/a' in ClientException.__init__ but I figured that was more invasive. Closes-Bug: #1481478 Change-Id: I738cb9c8d4f015048c45a1df16bf18e29190e392
* Fix typo in comment messageLin Yang2015-07-021-3/+3
| | | | | | | | | | an request => a request rest => resp exception_from_response() => exceptions.from_response() '.' operator means call from_response() in exceptions module. Change-Id: I5e780dd2882b39d1b39f7c64bf274e90934c09ec Signed-off-by: Lin Yang <lin.a.yang@intel.com>
* Fixed typos found by RETF rulesChristian Berendt2014-09-081-1/+1
| | | | | | | Rules are available at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos Change-Id: I8de0631346b703870ce8ebe9ce728a0360f1ba7f
* Merge "When there is no error body return the HTTP reason"Jenkins2014-04-181-1/+2
|\
| * When there is no error body return the HTTP reasonRussell Sim2014-03-041-1/+2
| | | | | | | | | | | | | | | | Return the response reason when there is no message body to return. DocImpact Change-Id: Ia60da4f04b059a13fcbe0059bb42fd77f272d8aa Closes-Bug: 1248773
* | Add auth_plugin support to cinderclientCory Stone2014-02-141-0/+9
|/ | | | | | | | | | | With CINDER_RAX_AUTH being rightfully removed, cinderclient is no longer compatible with Rackspace/any non-keystone auth. To fix this, I stole auth_system/auth_plugin from novaclient's implementation. See https://review.openstack.org/#/c/23820/. Change-Id: If5f84003f868ef02bb7eb7da67cf62018602e8f0 Closes-Bug: 1280393
* python3: Refactor dict for python2/python3 compatChuck Short2013-10-111-1/+1
| | | | | | | | | | | Python3 changed the behavior of dict.keys such that it is now returns a dict_keys object, which is iterable but not indexable. You can get the python2 result back with an explicit call to list. Refactor list(*.keys()) so that it just uses list(). Change-Id: Ib2e9646ac967e9bd7cc4f47e2099f5d1358808a9 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Merge "convert third-party exception to ConnectionError"Jenkins2013-08-121-0/+5
|\
| * convert third-party exception to ConnectionErrorChristian Berendt2013-08-061-0/+5
| | | | | | | | | | | | fixes bug #1207635 Change-Id: I37da522e812286e72706409b8a6d4652515f720f
* | Sync with global requirementsMonty Taylor2013-08-061-0/+14
|/ | | | Change-Id: Iccc824fef7dc7ae5675d6528a1ea33566e5f7eef
* Revert "Use exceptions from oslo"John Griffith2013-07-151-3/+153
| | | | | | This reverts commit a7cce08eab5e2e42275b84bd56127bd09b00f5bf Change-Id: I6c0047adbc33d0d6b5890f11853974578c36c78c
* Use exceptions from osloAlessio Ababilov2013-07-011-153/+3
| | | | | | | | | These exceptions can be used in novaclient, keystoneclient, glanceclient, and other client projects. Partially implements: blueprint common-client-library Change-Id: I43918316622b1c1d722872fe30199db6a3a7bb76
* Merge "Connectivity between the endpoint version and OS_VOLUME_API_VERSION."Jenkins2013-06-251-0/+4
|\
| * Connectivity between the endpoint version and OS_VOLUME_API_VERSION.Anastasia Latynskaya2013-06-251-0/+4
| | | | | | | | | | | | | | | | | | | | Adds functionality which allows user to work with that cinder API version which is the same as the endpoint version. Fixes: bug #1169455 Change-Id: I9bb46e602d15856d2da502a6ac2b6c25e76f4fa3
* | python3: Fix traceback while running testsChuck Short2013-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The testsuite is full of the following: TypeError: 'dict_keys' object does not support indexing This is due to the fact in python3 dict methods dict.keys(), dict.items() and dict.values() return “views” instead of lists. Change-Id: Ifa5383e6485fdbabf363fd1442877b2452346c1c Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | Start Gating on Pyflakes and HackingDirk Mueller2013-06-091-2/+4
|/ | | | | | | | Instead of globally ignoring Pyflakes and Hacking warnings, only blacklist those that occur frequently and fix the others. Start gating on those checks. Change-Id: Ice032c16d445ef08ef018bcdc5c221ab3c323755
* Use requests module for HTTP/HTTPSDean Troyer2012-12-181-8/+11
| | | | | | | | | | | | | * Implement correct certificate verification * Add --os-cacert * Rework tests for requests Pinned requests module to < 1.0 as 1.0.2 is now current in pipi as of 17Dec2012. Blueprint: tls-verify Change-Id: I71066ff7297f3b70c08b7ae1c8ae8b6a1b82bbae
* Set pep8 version to 1.1 in test_requiresJohn Griffith2012-06-151-1/+2
| | | | | | | * Fixes bug 1007520 * Changes in pep8 cause new failures Change-Id: Ie678f01a5008b0df6ef43a360b599890cab40776
* Initial split from python-novaclient.0.0Jenkins2012-05-211-0/+146