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
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
Added request_ids attribute to resource object for all the
volume_backups, volume_encryption_types and volume_transfers
APIs by updating following APIs:
volume_backups: reset_state, delete, export_record, import_record
volume_transfers: delete
volume_encryption_types: list
Returning list with request_ids as attribute in case of 'list' API
for volume_encryption_types.
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: I2197ca38f6c9a8b0ced5c82d29676b49c9700b09
Partial-Implements: blueprint return-request-id-to-caller
There are three resources: VolumeBackup, Snapshot, VolumeTransfer.
None of them can be deleted by using their names on V2.
For example, Snapshot client side filtering fails in the function
findall. The reason is that snapshot object
<class 'cinderclient.v2.volume_snapshots.Snapshot'> does not have
a attribute 'display_name'.
The response of /v2/{tenant_id}/backups/detail does not have
a parameter 'display_name', but have a parameter 'name'.
So class Snapshot does not need to define NAME_ATTR = 'display_name'.
The superclass of Snapshot 'Resource' has defined NAME_ATTR = 'name'.
Closes-Bug: #1497873
Closes-Bug: #1495428
Change-Id: I3c89fd9a82918e8a02385cfccb32dc9c3f4c4095
The 'name' field for some resources is called something different,
for example 'display_name' for volumes, 'name' for volumes type.
So class 'resource' has attribute 'NAME_ATTR' wich contains
attribute name for different resources.
This change removes reduntant call find in resource manager, instead
of it checks NAME_ATTR value.
Related-Bug: #1449444
Change-Id: Ide334d7535c73cbdff72c30319eb539d8f5304d6
cinder transfer-list is missing the --all-tenants option, which makes
it inconsistent with 'cinder list'. Without this fix, when running as
admin horizon will need to make multiple queries to cinder (one for
each tenant present in the volume list) in order to display the transfers
that exist for the volumes being shown.
Change-Id: Ic4d72a54c450876ff24c64efd83678062c93a24e
Closes-bug: 1351084
Make text consistent and clear.
Add periods to end of sentences.
Adjust test suite for change
Closes-Bug: #1275881
Change-Id: I1dfde51636e8dc4b42e4c4810c27c1c4ac513d82
When executing 'encryption-type-create' command using resource
name, it will use the findall() in base.py, then error will
occur because list() in findall() used 'search_opts' argument
which list() in VolumeEncryptionTypeManager did not have. Some
other command like 'transfer-delete' met same issue.
This patch will add 'search_opts' argument in list() function
in child class to avoid the bug.
Closes-Bug: #1248519
Related-Bug: #1252665
Change-Id: If1cd8b812af21335e5d4351766539a927a8fbdf4
Implements support for the volume transfer api added to cinder in
https://review.openstack.org/#/c/29227
Change-Id: Idbcdfdd3ef76a8c516e08d1cf351d549254bc8c0