In revert_to_snapshot method, snapshot param must be a object and
also has 'id' attribute, so before use the method, we have to use
snapshot.get method to get snapshot information.
But revert_to_snaoshot only use id of snapshot, we can use snapshot
instead of snapshot.id.
Change-Id: Ifbdbae3ee66d72f9d34cf4a8fdf2bde388b2b6f0
The ability to enable multiattach on the command line was deprecated in
Queens with the full implementation of multiattach enabling it through
volume type extra specs. This removes the command line arg and handling
for specifying it with volume creation.
Change-Id: Ifc0c874657f959266050cd1a7a40e6ecccc8c114
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Upload-to-image would error after launching
the operation if the volume type is None.
Closes-Bug: #1821818
Change-Id: I015e0ddfa98d62f25334e2df5effaee72a3988ab
The replication v1 implementation in Cinder was deprecated in the Mitaka
release in favor of the v2 "Cheesecake" version. Support was kept in the
client for backwards compatibility, but it has now been several releases
and these options should be removed.
Closes-bug: #1705470
Change-Id: I978a39a552fffc9ac7ba6e4726d1df2072fa45ba
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
As per Cinder code, following parameters are not required to be
passed in the request body of create volume API.
* status
* user_id
* attach_status
* project_id
* source_replica
If you pass these parameters, previously it was ignored but in the
schema validation changes[1] we don't allow additionalProperties to be
passed in the request body. If user passes additional parameters which
are not as per API specs[2], then it will be rejected with 400 error.
On patch[3], tempest tests: test_volume_snapshot_create_get_list_delete,
test_volume_create_get_delete" are failing because of these unnecessary
parameters.
This patch removes these unnecessary parameters passed to the create
Volume API.
[1]https://blueprints.launchpad.net/cinder/+spec/json-schema-validation
[2]https://review.openstack.org/#/c/507386/
[3]https://review.openstack.org/#/c/573093/
Change-Id: I37744bfd0b0bc59682c3e680c1200f608ad3991b
The 'cluster' paramter is wrongly provided for v3 volume manage, as it
should be included in the 'volume' object.
Change-Id: I12440aa6ada9c0e058138e8da7f7bc12359847bb
This form of multiattach was never fully supported and is now being
replaced by the new mutliattach workflow with Nova. As part of this,
volume type extra specs will be used to indicate multiattach ability
and will allow retyping between volume types to change the flag after
creation.
That work is still in progress and has some potential to change. But
we know we are not going to support this old style, so we should get
that deprecated now so we can remove it and not cause any confusion.
Change-Id: Icbb9c0ca89b25620cedff6cac7a4723e7126eca6
This patch adds create volume from backup support
in cinderclient.
Change-Id: I01dbcf6b113d88732c174b848be2127ee7242b3c
Implements: blueprint support-create-volume-from-backup
Depends-On: 58d0fb327f9fc980e0c8b84dcd9f64c093285d13
This patch adds support for API microversion 3.17, which allows us to
pass --cluster optional argument to volume and snapshot manage listings.
Implements: blueprint cinder-volume-active-active-support
Change-Id: I97b5f2e9960d5a1f140fc638804dbc631d63ff9d
This patch adds support for API microversion 3.16, which allows us to
pass --cluster optional argument to migration and manage operations.
For this, a new type of CLI argument is added, the mutually exclusive
arguments that can be used similarly to the utils.arg decorator, but
with utils.exclusive_arg decorator.
Implements: blueprint cinder-volume-active-active-support
Change-Id: If004715b9887d2a0f9fc630b44d6e11a4a8b778d
F811 is a little noisy with api_versions.wraps()
decorated methods, but opting to disable it in these
cases seems better than missing problems in the rest
of the code.
Change-Id: I9c46938ab2a442e55f96b5ab6c119c4475afaecd
Enforce ordering of imports with H306.
For tests, this is mostly done by grouping test
imports after other cinderclient imports.
Change-Id: Ie40fda014d1aedb057e5b4ea1f27f999c84e6373
This patch added revert to snapshot support in
cinder client, also fix two pylint errors.
Change-Id: I20d8df8d7bcf763f6651f44901a98f6d853b27ce
Partial-Implements: blueprint revert-volume-to-snapshot
Depends-On: cca9e1ac54d123da8859ff918b2355606bfa474e
Attempting to call the "delete_metadata" method with a client
at version 3.0 gives versioning error.
closes bug: 1659670
Change-Id: I839d405f02bcb6cb6bf6ed91dba972809b9916f7
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
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
Deleting multiple volume metadata keys with a single request
to improve performance. To delete multiple metadata items without
affecting the remaining ones, just update the metadata items with
the updated complete list of ones (without items to delete)
in the body of the request. This patch uses etags to avoid the
lost update problem with volume metadata. The command isn't changed:
$ cinder metadata volume_id unset k1 k2 k3
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Depends-On: I575635258c10f299181b8e4cdb51a7ad1f1be764
Implements: blueprint delete-multiple-metadata-keys
Change-Id: I8e18133ffee87c240a7af4b8177683ab99330d9e
Cinder currently has the ability to take over the management of
existing volumes and snapshots ("manage existing") and to relinquish
management of volumes and snapshots ("unmanage"). The API to manage an
existing volume takes a reference, which is a driver-specific string
that is used to identify the volume on the storage backend. This
patch adds the client code for APIs for listing volumes and snapshots
available for management to make this flow more user-friendly.
Change-Id: Icd81a77294d9190ac6dbaa7e7d35e4dedf45e49f
Implements: blueprint list-manage-existing
Manager's api_version property is used by api_version.wraps. It
should not be an "empty" class and the real api_version can be
read from Client class.
The 3.0 version's upload-to-image doesn't work as excepted because
of this useless api_version of VolumeManager class. This patch also
fix it and update some unit tests for it, because the changes are
co-dependent on one another.
Co-Authored-By: Nate Potter <nathaniel.potter@intel.com>
Change-Id: I398cbd02b61f30918a427291d1d3ae00435e0f4c
Closes-Bug: #1573414
Closes-Bug: #1589040
Commit Ie639179c5bbbaca4de62b42b368830afcfd8f7ac introduced 'visibility'
and 'protected' params. These params should be used only with
v3.1 microversion. Also these changes break current v2 users.
This patch fixes these issues.
Closes-Bug: #1584056
Change-Id: I0574631791c475bbefdb6e7d1647a20d0759df64
In case of failed volume migration, status of the volume is
still in-use and the migration status is set to error.
Current reset-migration-status command resets not only
migration status but also volume status. However the volume
status should not reset because the volume is still attached.
Closes-Bug #1552058
Change-Id: I9a8a5ed6a00bdcffecbf98862fe60aee373f5e9b
Added --visibility and --protected options
when uploading volumes to the image service.
DocImpact
Change-Id: Ie639179c5bbbaca4de62b42b368830afcfd8f7ac
Closes-Bug: #1288131
Depends-On: I6e6b2276af22b7809ea88289427c6873211b3faf
Signed-off-by: Nathaniel Potter <nathaniel.potter@intel.com>
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