Change I1f43c37c2266e43146637beadc027ccf6dec017e adds time-comparison
filtering to the volume list calls (summary and detail) in the Block
Storage API microversion 3.60. The current cinderclient filter
support will pass these filters correctly, so the only change needed
on the client side is to bump the MAX_VERSION so that the client
can make calls to mv 3.60.
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Change-Id: Ib4b7cbc7e527c0524336e139e127f19accfb7568
Partially-Implements: bp support-to-query-cinder-resources-filter-by-time-comparison-operators
Currently ``id`` and ``volume_id`` filters are working
correctly for transfer-list command.
support for filtering by ``name`` is handled in patch
provided in Depends-On.
Since filtering by all parameters is supported by API,
we can happily add the filters option on the client for
volume transfers.
Also adds functional test for transfers.
Related-Bug: #1860100
Depends-On: https://review.opendev.org/#/c/703658/
Change-Id: I2fd3a6a7b9add65a9a21388df44efb6747065a74
Also adds support for py3.6 and py3.7 check and gate jobs.
Co-authored-by: xuanyandong <xuanyandong@inspur.com>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Closes-bug: #1853372
Change-Id: Ia978b692ade23ee6482957f41b17cb879c96fea7
These arguments were deprecated in the kilo release in favor of a
combined --sort argument. This drops support for the deprecated
arguments.
Change-Id: If8f8ac44cc81f553009a15ca67257e86cb925b6f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
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>
These have been deprecated for a very long time now. Switch to only
support the current OS_PROJECT_NAME and OS_PROJECT_ID.
Change-Id: I2fb78768b4308a3aaf12764edadb58d4a307adaa
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
If OS_VOLUME_API_VERSION is not set, use the highest
supported by both the client and the server.
If OS_VOLUME_API_VERSION exceeds that supported by the server,
use the highest supported by both the client and the server.
A warning message is printed for the user indicating that this
happened.
(This is similar to the behavior of the manila CLI, and is
mostly code from manilaclient tweaked to work in cinderclient.)
Change-Id: Ie1403eca2a191f62169e60c0cde1622575327387
The replication 1.0 API os-promote-replica and os-reenable-replica
were removed[1], then remove useless code from
cinderclient.
[1]: https://review.openstack.org/#/c/275797/
Change-Id: Icf98f294c089942e11607786e932abc959f77b3b
Change Idb04f783b2287b2b45d626131648b0005a232fbe to the cinder service
introduced pagination and the ability to sort results for listing volume
transfers. This adds the sort ability to the cinder client.
The service side uses the sort_key and sort_dir that we've deprecated
long ago, but was unfortunately missed when merging this support. Since
we have been giving deprecation warnings for using those for other
operations, this adds support for --sort that internally will convert to
the API's expected sort_key and sort_dir.
Change-Id: I137436c76852cbb974eee87e49712c698cbf081b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The discover_version function was ignoring the max microversion
supported by the client. This patch corrects its behavior to return
the most recent API version, if any, supported by both the client
and the server it is communicating with.
Closes-bug: #1826286
Change-Id: If22b72452065080b24cb1b899c5a5a88b809e986
We are past the deprecation period for these commands and they should
now be removed.
Change-Id: I37f0dc539da5d43f629ea726bb603fa995c1fe6f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This drops compatibility with Cinder services with the V1 API.
Change-Id: Ic7c6bd05a3991c3afce3dec80b29501932c5aac9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This adds a prelude section for a release note to list the major version
changes included in 5.0 and to act as a gate to make sure all changes
requiring the major bump are approved before merging some of them.
Change-Id: I60cc5b62bdad162f8008b60b60e06f793f6b4bb1
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Backup user_id was added with microversion 3.56 but never added to the
client. Added in Rocky with I3ffb544ef3ee65276cee8b1e870d524fd0e57085.
Change-Id: Ib9a4159db0f8af599dcf8315334de4f859be077e
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Handling for the new `no_snapshots` option was incorrectly handling
microversion evaluation that would prevent anything less than the new
microversion from working. This changes the check to only handle the
changed argument for 3.55 and later.
Change-Id: If96889ccde6044706e6a5dcd83fde3c20fe1c1fd
Closes-bug: #1784703
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
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>
The following options were deprecated in Queens or Pike and are now
being removed:
--endpoint-type
--bypass-url
--os-auth-system
Change-Id: I3b951cc4eb3adff23f3d2cbe674971816261ef56
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This patch will support to transfer volumes with or without
snapshots in new V3 api after mircoversion 3.55.
Change-Id: I61a84b5abf386a4073baea57d8820c8fd762ae03
Depends-On: https://review.openstack.org/533564/
Implements: blueprint transfer-snps-with-vols
This adds a release note announcing the availability of the
--mode CLI option to create attachments as RO or RW.
Change-Id: I89e2bdd9b6da2745a793db78450b15e701e23ed1
Since 3.52, new option '--filters' has been
added to 'type-list' command, and it's only
valid for administrator.
Change-Id: I140f6d61a2747d4fcaabfbccea864dcc7eb841d1
Depends-On: I4e6aa7af707bd063e7edf2b0bf28e3071ad5c67a
Partial-Implements: bp support-az-in-volumetype
Add support for microversion 3.51 that allows us to specify the
Availability Zone of the backup service that should create the backup.
New optional parameter available for "backup-create" when using
microversion 3.51 is "--availability-zone".
Depends-On: I595932276088d25abd464025c99dce33a2cc502b
Change-Id: Ia4bab5fcb95f6a8d1adb99c5d7dc1b3f7546c6f6
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
Add 'with_count' parameter in list
volume, snapshot and backup APIs.
Change-Id: I2b7b41b3579c24703a7a67ab5dc6f960a3ccbdc2
Partial-Implements: bp add-amount-info-in-list-api
Cinder volume services will perform cleanup on start, but when we have
multiple volume services grouped in a cluster, we may want to trigger
cleanup of services that are down.
This patch adds command `work-cleanup` to trigger server cleanups and
prints service nodes that will be cleaned and those that didn't have an
alternative service in the cluster to do the cleanup.
This command will only work on servers supporting API version 3.24 or
higher.
New command:
cinder work-cleanup [--cluster <cluster-name>] [--host <hostname>]
[--binary <binary>]
[--is-up <True|true|False|false>]
[--disabled <True|true|False|false>]
[--resource-id <resource-id>]
[--resource-type <Volume|Snapshot>]
Specs: https://specs.openstack.org/openstack/cinder-specs/specs/newton/ha-aa-cleanup.html
Change-Id: I1c33ffbffcb14f34ee2bda9042e706937b1147d7
Depends-On: If336b6569b171846954ed6eb73f5a4314c6c7e2e
Implements: blueprint cinder-volume-active-active-support
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
The attachment_ids in the volume info returned by show volume
were incorrect. It was showing the volume_id, not the actual
attachment_id. This fix changes the attachment_ids returned by show
volume to correctly reflect the attachment_id.
Also, added a unit test for this, and added an attachment_id
to the fake volume so that other tests wouldn't now fail.
Closes-Bug: #1713082
Change-Id: I9ec36af5dd460d03d786aeeb3cc36a869c19ff62
--profile argument can be loaded from OS_PROFILE environment variables
to avoid repeating --profile in client commands.
Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Change-Id: Ia9b469024395327ec0ee082ddaea3234fc3ca5a6
Usage: It adds an optional argument --poll to the cinder
create command which waits while the creation of the volume
is completed and the volume goes to available state. In case
there is an error in volume creation, it throws an error message
and exits with a non zero status. The error message printed here
is the async error message in case it generates one.
Depends-On: Ic3ab32b95abd29e995bc071adc11b1e481b32516
Change-Id: I1a4d361d48a44a0daa830491f415be64f2e356e3
Change Ica4d718b3de31c31da047f07c5154b242e122596 changed the return
type on the cinderclient.client.get_highest_client_server_version
method from a float to a str. Since it's a public API we should
document the change with a release note.
Change-Id: I197c80ef657156261ecbf51cee6300268438b639
Related-Bug: #1705093
Cinder doesn't support to update consistencygroup quota. And
since cg will be deprecated in Queue, there is no value to support it
at server or client side. So this patch removed it.
Change-Id: I5fbfb30611a60d575fedb676119bb0a1564700df
Closes-bug: #1693584
This patch adds CLI support for replication group.
It is built upon the generic volume groups.
Server side patch is here:
https://review.openstack.org/#/c/352228/
Depends-On: I4d488252bd670b3ebabbcc9f5e29e0e4e913765a
Change-Id: I462c3ab8c9c3a6a1b434748f81d208359ffd2431
Implements: blueprint replication-cg
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