summaryrefslogtreecommitdiff
path: root/cinderclient/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Reuse Resource from osloAndrey Kurilin2014-04-041-85/+4
| | | | | | | | | | Class Resource from oslo is equal to code from cinderclient. In the process of unification of the clients code we should reuse common functionality from Oslo. Related to blueprint common-client-library-2 Change-Id: If39e49ff739d659d145725966192acf81975c90c
* Fix typo in cinderclienthuangtianhua2013-11-281-2/+2
| | | | | | | | | sematics --> semantics hypen-separated --> hyphen-separated typicaly --> typically Change-Id: I5df277ef7036082d0e4b079c23d41da809e5270f Closes-Bug: #1254587
* Enable del of other tenants resources by nameJay S. Bryant2013-10-291-1/+4
| | | | | | | | | | | | | | | | | | | | | Currently, due to the way that resources are being retrieved by the findall() function, an administrator can do a list, snapshot-list, etc. with the --all_tenants option and see other tenants' resources. If the admin then tries to delete the another tenants' resource by name, it fails with a 'No <resource> with a name or ID of <name> exists.' error. The solution to this is to change the call to the list() function in findall() to set the all_tenants search option to 1. This causes the admin to get a list of all the resources that they have access to back when the search is done instead of just a list of their resources. The delete by name is then possible. The server takes care of ensuring that only resources that the user has access to are returned. This will enable delete by name for all resources that use the find_resource function. Closes-bug: 1241682 Change-Id: I4e9957b66c11b7e1081f066d189cedc5a3cb2a6c
* 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>
* Replace OpenStack LLC with OpenStack FoundationZhiQiang Fan2013-09-281-1/+1
| | | | | | | | | | NOTE: * openstack/common/* should be synced from oslo, so i leave them untouched. * add (c) symbol for related lines, leave others untouched. Change-Id: I46a87c7f248d3468b1fdf5661411962faf2fb875 Fixes-Bug: #1214176
* Revert "Use exceptions from oslo"John Griffith2013-07-151-1/+1
| | | | | | This reverts commit a7cce08eab5e2e42275b84bd56127bd09b00f5bf Change-Id: I6c0047adbc33d0d6b5890f11853974578c36c78c
* Use exceptions from osloAlessio Ababilov2013-07-011-1/+1
| | | | | | | | | These exceptions can be used in novaclient, keystoneclient, glanceclient, and other client projects. Partially implements: blueprint common-client-library Change-Id: I43918316622b1c1d722872fe30199db6a3a7bb76
* python3: Fix traceback while running testsChuck Short2013-06-191-3/+3
| | | | | | | | | | | | 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>
* python3: Fix traceback while running tests.Chuck Short2013-06-151-1/+2
| | | | | | | | | | | | Fix: TypeError: Unicode-objects must be encoded before hashing while running tests. This is due to the fact in python3 hashlib.md5 works with bytes and we are passing unicode strings. Change-Id: I0adde942423af28572473030f6685e12cd8f7dae Signed-off-by: Chuck Short <chuck.short@canonical.com>
* python3: Update for metaclassesChuck Short2013-06-121-2/+1
| | | | | | | | Use six.with_metaclass to create a new class with a base class base and metaclass metaclass. Change-Id: Id1e70f8cae0ac3dd075157f57d41a02b15e655f4 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Merge "Start Gating on Pyflakes and Hacking"Jenkins2013-06-121-1/+1
|\
| * Start Gating on Pyflakes and HackingDirk Mueller2013-06-091-1/+1
| | | | | | | | | | | | | | | | 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
* | python3: compatibility for iteritems and iterkeysChuck Short2013-06-111-1/+4
|/ | | | | | | | | | | | | | Use six to allow python2/pyton3 for iteritems and iterkeys. six.iteriems() replaces dictionary.iteritems() (python2) and dictionary.iterms() (python3) six.iterkeys() replaces dictionary.iterkeys (python2) and dictionary.keys() (python3) Change-Id: I26c80b78a7dedf3aa32eedf01a83ff6d1e592ba7 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* Make ManagerWithFind abstract and fix its descendantsAlessio Ababilov2013-05-191-4/+7
| | | | | | | | | ManagerWithFind requires list() method in its descendants. Make it abstract and fix its improper descendants that do not implement list() (QuotaSetManager and others). Change-Id: I691ca389b5fea4c1bb36499a264b578fa825bbbf Fixes: bug #1180393
* Set pep8 version to 1.1 in test_requiresJohn Griffith2012-06-151-2/+2
| | | | | | | * Fixes bug 1007520 * Changes in pep8 cause new failures Change-Id: Ie678f01a5008b0df6ef43a360b599890cab40776
* Initial split from python-novaclient.0.0Jenkins2012-05-211-0/+293