73 Commits

Author SHA1 Message Date
Brian Rosmaita
4e1427a418 Add release note for Ussuri cinderclient release.
The official Ussuri release will be 7.0.0.

Change-Id: I4f41291768d06faf0d76f8d8a1c420b765f29b6b
2020-04-07 17:38:42 -04:00
wanghao
26a55de681 Add support for Block Storage API mv 3.60
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
2020-04-06 10:19:39 -04:00
Rajat Dhasmana
8d0d0521c6 Add filters support for volume transfer
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
2020-02-12 17:53:58 +00:00
xuanyandong
658de38c20 Drop support for python 2
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
2020-01-16 08:34:30 -05:00
Sean McGinnis
246040a732 Drop support for --sort_key and --sort_dir
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>
2019-09-11 09:38:34 -04:00
Sean McGinnis
3c1b417959 Drop support for --allow-multiattach
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>
2019-09-11 08:06:43 -04:00
Sean McGinnis
dce8a8ed10 Drop support for OS_TENANT_NAME and OS_TENANT_ID
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>
2019-09-10 15:56:27 -05:00
Zuul
e98585c03d Merge "Drop 'endpoints' and 'credentials' commands" 2019-09-08 05:28:44 +00:00
Zuul
5b811d96d0 Merge "Drop support for Cinder v1 API" 2019-09-08 05:27:59 +00:00
Zuul
e172de897c Merge "Add release note for major version bump" 2019-09-08 03:53:28 +00:00
Zuul
4bd9000edd Merge "Autonegotiate API version for shell" 2019-09-04 23:41:36 +00:00
Zuul
67dcd42291 Merge "Add transfer-list --sort argument" 2019-08-30 18:15:41 +00:00
Eric Harney
d1b044b82a Autonegotiate API version for shell
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
2019-08-28 11:57:02 -04:00
Zuul
fd106c77bf Merge "Add 'is_public' support in '--filters' option" 2019-08-21 11:13:18 +00:00
Minmin Ren
5cd22bb18a Remove promote/reenable replication
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
2019-06-19 03:16:42 +00:00
Sean McGinnis
8b1ed34ec1 Add transfer-list --sort argument
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>
2019-05-04 09:52:51 -05:00
Brian Rosmaita
9976975342 Correct discover_version response
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
2019-04-25 08:13:18 -04:00
Sean McGinnis
f8cc121df0
Drop 'endpoints' and 'credentials' commands
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>
2019-04-18 14:33:55 -05:00
Sean McGinnis
2189e5702b Drop support for Cinder v1 API
This drops compatibility with Cinder services with the V1 API.

Change-Id: Ic7c6bd05a3991c3afce3dec80b29501932c5aac9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-04-18 10:33:06 -05:00
Sean McGinnis
cd64f0b327 Add release note for major version bump
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>
2019-04-18 10:32:15 -05:00
Sean McGinnis
44061cfab2
Add support for backup user ID
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>
2019-04-17 09:59:44 -05:00
whoami-rajat
6a498163e2 Add 'is_public' support in '--filters' option
'--is-public' is a valid argument for cinder type-list command[1]
and cinder group-type-list command but is missing in cinderclient.
This patch adds the support for it.

[1] https://developer.openstack.org/api-ref/block-storage/v3/?expanded=list-all-volume-types-detail#list-all-volume-types

Change-Id: I8af9bb06a28f3cc384c4925b8b52bdeaed52cb15
2019-04-15 08:36:27 +00:00
Sean McGinnis
460229c609
Allow volume-transfer creation < 3.55 microversion
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>
2018-07-31 16:22:17 -05:00
Sean McGinnis
32251f0ea3
Remove replication v1 support
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>
2018-07-26 11:41:57 -05:00
Sean McGinnis
a331f06df0
Remove deprecated CLI options
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>
2018-07-23 11:50:35 -05:00
Zuul
fbf5a70dd1 Merge "Add release note for ability to set attachment mode" 2018-07-20 03:32:53 +00:00
wanghao
a554faa653 Transfer snapshots with volumes
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
2018-07-19 14:02:19 -05:00
Sean McGinnis
826c5fc16d Add release note for ability to set attachment mode
This adds a release note announcing the availability of the
--mode CLI option to create attachments as RO or RW.

Change-Id: I89e2bdd9b6da2745a793db78450b15e701e23ed1
2018-07-19 09:34:48 -05:00
TommyLike
5a1513244c Support availability-zone in volume type
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
2018-05-02 10:25:27 +08:00
Gorka Eguileor
2c774cc015 Support cross AZ backups
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
2018-02-12 15:03:20 +01:00
Zuul
d2cf6e6ddc Merge "Add service cleanup command" 2018-01-16 12:26:57 +00:00
Zuul
24e46d116a Merge "Add cluster support in manage listings" 2018-01-16 07:37:17 +00:00
Sean McGinnis
adb141a262 Deprecate multiattach flag on volume create
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
2017-12-21 16:08:55 -06:00
TommyLike
7aedf4c898 Support create volume from backup in client
This patch adds create volume from backup support
in cinderclient.

Change-Id: I01dbcf6b113d88732c174b848be2127ee7242b3c
Implements: blueprint support-create-volume-from-backup
Depends-On: 58d0fb327f9fc980e0c8b84dcd9f64c093285d13
2017-12-07 11:31:39 +08:00
TommyLike
a0b18d22a4 Support list with 'with_count' in client
Add 'with_count' parameter in list
volume, snapshot and backup APIs.

Change-Id: I2b7b41b3579c24703a7a67ab5dc6f960a3ccbdc2
Partial-Implements: bp add-amount-info-in-list-api
2017-12-05 01:15:19 +00:00
Gorka Eguileor
45eb51eb99 Add service cleanup command
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
2017-10-03 11:03:28 +02:00
Gorka Eguileor
1a4176ad87 Add cluster support in manage listings
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
2017-10-03 11:03:28 +02:00
Gorka Eguileor
8fce74056f Add cluster support in migration and manage
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
2017-10-03 11:03:28 +02:00
Steve Noyes
aab7a587b6 Fix attachment_id returned by create and show volume
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
2017-08-28 08:36:12 -04:00
Jenkins
790303e7b3 Merge "Make --profile load from environment variables" 2017-07-27 04:13:59 +00:00
Tovin Seven
3e235b2b51 Make --profile load from environment variables
--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
2017-07-27 01:33:05 +00:00
Jenkins
48fe3cce36 Merge "Support volume summary command" 2017-07-26 00:24:59 +00:00
Chaynika Saikia
0cb09cc560 Add cinder create --poll
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
2017-07-24 09:06:28 -04:00
Matt Riedemann
72671fffe5 Add release note for get_highest_client_server_version return type change
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
2017-07-20 16:50:59 -04:00
wangxiyuan
f3a1e6e708 Remove consistencygroup quota
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
2017-07-17 02:35:09 +00:00
wangxiyuan
a570f26d97 Support volume summary command
This patch added volume summary command support.

Change-Id: I7cf6e149b9ce9cae21818c60146e6db9cc2904bd
2017-07-12 09:18:31 +08:00
Gorka Eguileor
6a00d30e96 Dynamic log level support
This patch adds support for microversion 3.32 allowing setting and
querying Cinder services' log levels.

Two new commands are available:

cinder service-get-log [--binary {,*,cinder-api,cinder-volume,cinder-scheduler,
                                  cinder-backup}]
                       [--server SERVER] [--prefix PREFIX]

cinder service-set-log [--binary {,*,cinder-api,cinder-volume,cinder-scheduler,
                                  cinder-backup}]
                       [--server SERVER] [--prefix PREFIX]
                       <log-level>

Implements: blueprint dynamic-log-levels
Depends-On: Ia5ef81135044733f1dd3970a116f97457b0371de
Change-Id: I50b5ea93464b15751e45afa0a05475651eeb53a8
2017-07-10 15:11:55 +02:00
xing-yang
da79866e14 Tiramisu: replication group support
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
2017-05-05 02:14:56 -04:00
TommyLike
7dfbb239de Support revert to snapshot in client
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
2017-05-04 20:22:13 -04:00
Jenkins
9ea2e61cc1 Merge "Enabled like filter support in client" 2017-06-21 21:37:14 +00:00