13 Commits

Author SHA1 Message Date
Ivan Kolodyazhny
603c615ae5 Refactor v2 and v3 APIs support
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
2016-12-20 16:29:36 +02:00
scottda
27e6f6f7f8 Add /v3 endpoint support for cinderclient
Add support for Cinder API /v3 endpoint.
A couple of unit tests for /v3 endpoint were added to v3/test_shell.py
to ensure that the v3 shell works, and to also test that modules work
with:
from cinderclient.v2.availability_zones import *
syntax.

Change-Id: I6ae0ada221bebb4ab1850d9c99b10fcbb585201f
Implements: https://blueprints.launchpad.net/python-cinderclient/+spec/add-v3-endpoint-support
2016-04-18 10:49:51 -06:00
Ankit Agrawal
ec65605ede Add request_ids attribute to resource objects
Added request_ids attribute to resource object for all the
cgsnapshots, consistencygroups, qos_specs, quota_classes,
quotas and services APIs by updating following APIs:

cgsnapshots: delete, update
consistencygroups: delete, update, create
qos_specs: delete, associate, disassociate, disassociate_all
quota_classes: update
quotas: update
services: enable, disable, disable_log_reason

These changes are required to return 'request_id' from client to
log request_id mappings of cross projects.

For more details on how request_id will be returned to the caller,
please refer to the approved blueprint [1] discussed with the
cross-project team.
[1] http://specs.openstack.org/openstack/openstack-specs/specs/return-request-id.html

DocImpact
'request-ids' will be returned as an attribute with response object.
User can access it using 'res.request_ids' where 'res' is a
response object.

Change-Id: I7b399512fcec9ecd31938656deb60e325bb76ad4
Partial-Implements: blueprint return-request-id-to-caller
2016-02-16 00:53:50 -08:00
liyingjun
9db3430ccd Fixes quota-class-update commands
The quota-class-update commands for v1 and v2 are both broken,
Fix v1 by returning result for update method in QuotaClassSetManager,
fix v2 by changing arg 'class-name' to 'class_name' for consistent
with v1.

Change-Id: Ic7188f485b914dc55048cf056a0685618134e87a
Closes-bug: #1423884
2015-03-02 23:29:07 +08:00
Chuck Short
b0b8afaf55 python3: Refactor dict for python2/python3 compat
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>
2013-10-11 09:04:49 -04:00
ZhiQiang Fan
5ad95e9fd2 Replace OpenStack LLC with OpenStack Foundation
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
2013-09-28 23:13:54 +08:00
Cory Stone
784f53f0a0 Changes for volume type quotas.
blueprint quotas-limits-by-voltype

Change-Id: I1bb676689c79fe1b14a14a81b21105a02ec117ef
2013-07-15 10:48:21 -05:00
Jenkins
bbf791a1f5 Merge "Add snapshots key support for quota class update" 2013-06-21 00:45:11 +00:00
Chuck Short
3044671b36 python3: Fix traceback while running tests
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>
2013-06-19 20:52:22 -05:00
Dirk Mueller
7359c976d1 Start Gating on Pyflakes and Hacking
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
2013-06-09 13:29:23 +02:00
liyingjun
919db02848 Add snapshots key support for quota class update
Fix bug 1188452

Change-Id: I3db0f3f1191a24571de9631786889ee81af777f6
2013-06-07 13:14:34 +08:00
Alessio Ababilov
7c71fd318e Make ManagerWithFind abstract and fix its descendants
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
2013-05-19 18:25:20 +03:00
Mike Perez
636ec5eccd adding v2 support to cinderclient
This will allow the cinderclient to speak to the v2 rest api if it's
enabled in the cinder config. Includes additional v2 tests as well.

blueprint cinderclient-v2-support

Change-Id: I004134d9f528a6eadefdaa89eb48087bcae2691f
2013-02-13 00:58:17 -08:00