277 Commits

Author SHA1 Message Date
Yuriy Nesenenko
8cc3ee2782 Add support '--all-tenants' for cinder backup-list
Also added support '--name', '--status', '--volume-id' arguments
for cinder backup-list.

DocImpact
Closes-Bug: #1422046
Depends On: I73f6377c7d6fd92d0464d13f9c8dd6682fef78e3
Change-Id: I5f2ab6370a8333a9ee498c6158037b0433f36a23
2015-08-19 18:05:34 +03:00
Xing Yang
2c3169e55e CLI: Non-disruptive backup
This is the CLI change required to support non-disruptive backup
for volumes in 'in-use' status. A force flag is added to the create
backup CLI. The force flag needs to be True when backing up an
'in-use' volume. By default it is False and it is not needed when
backing up an 'available' volume.

The Cinder server side change is merged:
https://review.openstack.org/#/c/193937/

Partial-implements blueprint non-disruptive-backup

Change-Id: I53aff3973cc6365a5b1d40c21b0885c1d8166df5
2015-08-11 10:18:01 -04:00
Xing Yang
a9405b1419 CLI: Clone CG
This patch adds support for clone CG in cinderclient. It uses the
existing create CG from source command and adds an existing CG as a
source, in addition to a CG snapshot.

The server side patch is merged: https://review.openstack.org/#/c/203473/

Change-Id: I2a923de42348c22c6ae5ff5880cdbe6d719ea0ae
Partial-implements: blueprint clone-cg
2015-08-08 05:36:45 -04:00
Jenkins
59fef40f0e Merge "Add response message when volume delete" 2015-07-30 20:23:59 +00:00
Dave Chen
bae0bb3276 Add commands for modifying image metadata
These are Cinder Client specific changes for modifying volume
and snapshot's image metadata.

- cinder image-metadata volume_id set key=value
This command can be used to create a new image metadata associated
with the volume when the key not exists, and update the value for
the existed key.

- cinder image-metadata volume_id unset key
This command can be used to delete image metadata associated
with the volume.

Depends-On: I22792ef7bd49c763d7c130aa8cac9abc3fff2d4c
Partially implements: bp support-modify-volume-image-metadata
Change-Id: I03787563cb3ea4ef96ed145a37fc665f80565a12
2015-07-27 01:28:00 +00:00
lisali
b426b71d7d Show backup and volume info in backup_restore
When no volume is specified in backup_restore command, a new
volume is created with specified name.

If running the same command several times, several volumes
with same name are created, it needs to check logs to find out
which volume is latest.

This update is to show the returned info from api.

Change-Id: I035fc85aa636b716b16c8a543c843ebf4659a96e
Closes-Bug: #1472493
Depends-On: I9f5d8ded993fcf1d351d4c65b6806929693b15d6
2015-07-20 13:21:02 +08:00
Tom Jose Kalapura
dc1186dc44 Add response message when volume delete
When a request is send for deleting a volume it will not print any
success message if it deleted successfully.It will print only error
message if the volume deletion fails. This fix will print response
message if the volume deletion is success.

Change-Id: Icef2045107e1dcc3b7f2abfeb50b3f180ded1a27
Closes-Bug: #1475430
2015-07-16 19:45:08 -07:00
Tomoki Sekiyama
0f1cbc9e1f Implement reset-state for attach_status and migration_status
Currently the reset-state command in the client only handles
the main volume status column. This adds options to set
attach_status and to reset migration_status.

DocImpact: Add new options to cinder reset-state command
Change-Id: Ifaa04c2f8a7ff21100f7c9c51df881313e8babea
Closes-Bug: #1309086
2015-07-16 12:52:36 -04:00
Kuo-tung Kao
075381d0aa Add more details for replication
Show more information when user uses help function to get
more details about replication-promote and replication_reenable.

Change-Id: Icd41bd746c32cdfabbd27a80a818344136e7b71a
Closes-Bug: #1401877
2015-07-15 09:20:48 +08:00
Jenkins
f860668d71 Merge "Fix outdated URLs and some minor fixes" 2015-07-08 01:48:36 +00:00
Jenkins
167a75156d Merge "Set max volume size limit for the tenant" 2015-06-30 16:55:46 +00:00
Jenkins
79145aed9d Merge "Add encryption-type-update to cinderclient" 2015-06-19 17:48:16 +00:00
Peter Hamilton
780936fc57 Add encryption-type-update to cinderclient
This modification adds support for updating volume encryption types. The
encryption-type-update command requires a single argument, the name or
ID of the volume type whose associated encryption type should be
updated, and up to four optional arguments representing new values for
the encryption type attributes. The update implementation supports three
use cases:

1. The user wants to specify new values for attributes of an
   encryption type.
   - include the attribute and its new value at invocation
2. The user wants to preserve the values for attributes of an
   encryption type.
   - exclude the attribute at invocation
3. The user wants to set the values for attributes of an encryption
   type to provider defaults (only valid for cipher and key-size).
   - include the attribute but provide no value at invocation

The encryption type may only be updated if the associated volume type is
unused.

This modification leverages update support for encryption types provided
by the cinder volume encryption type API extension. See the following
patch for more information:

https://review.openstack.org/#/c/58344/

blueprint: encrypt-cinder-volumes
https://blueprints.launchpad.net/nova/+spec/encrypt-cinder-volumes

Change-Id: I8e6a37428e76ba69a422468630fdb66b4fe460ab
DocImpact
2015-06-19 15:59:20 +00:00
Rakesh Mishra
e4359f7897 Set max volume size limit for the tenant
There is a need to limit maximum size of a volume to levels
that the storage infrastructure can handle.
Setting a maximum limit on size of a volume also prevents
a tenant from creating large volumes that have not been tested
and certified to satisfy SLA objectives.

This feature allows admin to set volume size limit
[per_volume_gigabytes] for a tenant.

Change-Id: Iab584c72a34f9171000b20b2200ac12d21fc40ae
Implements: blueprint cinder-quota-define-per-volume
2015-06-18 14:15:39 +05:30
Jenkins
1525d8a270 Merge "Add volume multi attach support" 2015-06-17 09:11:20 +00:00
Jenkins
df3287f192 Merge "Fixes quota-class-update commands" 2015-06-16 19:07:34 +00:00
Jenkins
77d1106dcd Merge "The is_public filter in VolumeTypeManager.list broke the find in VolumeTypeAccessManager, which caused all commands which should have taken a volume_type name to fail. I have choosen to fix this by effectively removing the filter in the client (and the --all argument to type-list). This is OK, since Cinder implements the filtering by user anyway. The consequence of this change is that the Admin user will always see the entire list (including private types) every time they execute type-list" 2015-06-16 19:06:52 +00:00
Ed Balduf
289ab37c79 The is_public filter in VolumeTypeManager.list broke the find in
VolumeTypeAccessManager, which caused all commands which should have taken
a volume_type name to fail.  I have choosen to fix this by effectively
removing the filter in the client (and the --all argument to type-list).
This is OK, since Cinder implements the filtering by user anyway.  The
consequence of this change is that the Admin user will always see the
entire list (including private types) every time they execute type-list

Change-Id: I5c9a693711db2918abbd3bbfae53e48162a01c3c
Closes-Bug: 1462104
2015-06-15 08:06:45 -06:00
Walter A. Boring IV
480afa893a Add volume multi attach support
This patch adds the new multiattach flag during volume
creation time. This patch adds the attachment_uuid
during detach time so cinder knows which
attachment it should detach.

This patch is needed by Cinder's multi-attach-volume
https://review.openstack.org/#/c/85847/

Change-Id: I98c6150cf548e9d1d8557770dbd3f88ec17a9b41
Implements: blueprint multi-attach-volume
2015-06-11 15:57:50 +00:00
Anton Arefiev
9cd42ef3ee Fix condition in CheckSizeArgForCreate parser action
CheckSizeArgForCreate checks that size is specified when snapshot
or source volume aren't. But when size is 0, CheckSizeArgForCreate
action works wrong and generates error: 'Size is a required
parameter if snapshot or source volume is not specified', meanwhile
user expected to see: 'Volume size '0' must be greater than 0'.

Change-Id: I164970a600d6e86bd7076dd485f676a703f5e487
Closes-Bug: #1454276
2015-06-08 19:25:01 +03:00
Jenkins
d936ebaaf6 Merge "Remove "OPTIONAL:" from optional argument help text (v2)" 2015-05-06 08:33:25 +00:00
yatin karel
c15ab5b557 Change --force parameter into boolean
Change --force parameter into boolean, now user can use it as boolean,
without specifying True or False with it. It is still backward
compatible with --force True|False. This can be deprecated in future.

Closes-Bug: #1244453
Change-Id: Id245af1fa0db27912439a420c37aefca530894ba
2015-05-04 15:39:26 -07:00
PranaliDeore
bf9f607f17 V2:cinder create --image option doesn't work
In create volume help, --image optional parameter is allowed to
be passed to create volume, but even after passing valid image ID
or NAME, volume is created without image.

Assigned image  parameter to the image_ref to fix this issue.

Closes-Bug: 1447589
Change-Id: I21b8a51451a2caf230ca04103b2d573d1aa966b4
2015-04-27 02:53:39 -07:00
Xing Yang
3972431d3c Create Consistency Group from CG Snapshot CLI
This patch addressed the following:
* Added a new CLI to support creating a CG from a CG snapshot.

cinder consisgroup-create-from-src [--cgsnapshot <cgsnapshot>]
                                   [--name <name>]
                                   [--description <description>]

API patch: https://review.openstack.org/#/c/145952/

Partial-Implements: blueprint consistency-groups-kilo-update
Change-Id: I03cce04e1d43ea72fc53a8bf614ba4f969f6e32e
2015-04-22 15:42:20 -04:00
Xing Yang
f12aab8035 Kilo Consistency Group CLI update
This patch addresses the following:
* Modify Consistency Group
  * Add CLI to update a consistency group, i.e., changing name and
    description, adding existing volumes to CG and removing volumes
    from CG.

cinder consisgroup-update --name <name> --description <description>
    --add-volumes <uuid1,uuid2,...> --remove-volumes <uuid5,uuid6,...>

Implements: blueprint consistency-groups-kilo-update
Change-Id: I76317dc006c1f80e2e6c83218e9566f1d37d935e
2015-04-22 15:37:40 -04:00
Eric Harney
27a7e8f3b0 Remove "OPTIONAL:" from optional argument help text (v2)
All arguments starting with '--' are optional and listed
under the 'Optional arguments:' header by argparse.  Remove
the extra note shown for each argument.

This mirrors the previous change which cleaned this up for v1:
811af8f Remove "OPTIONAL:" from optional argument help text

Change-Id: Ie8e9544c1544ff5403f1c29e83d528d896957899
2015-04-22 09:55:24 -04:00
Jenkins
8ba6242d64 Merge "Add support to incremental backups in cinder" 2015-04-21 22:01:32 +00:00
Xing Yang
3ee941c1e6 Add support to incremental backups in cinder
Added a new option to "cinder backup-create" to support incremental backups.
Specify --incremental to create an incremental backup. By default, it will
be a full backup.

Co-Authored-By: Xing Yang <xing.yang@emc.com>
Implements: blueprint incremental-backup
Change-Id: Id11ecd2982ea838181b4adaa5a742fc65f864acb
2015-04-21 10:34:35 -04:00
yatin karel
fa8c7e3d84 cinder list now supports filter by tenant
Admin can now filter volumes on the basis of tenant.
Also updated help argument, to be consistent over the
v1 and v2 shell module.

Closes-Bug: #1341411
Change-Id: I647f0c9331ee4cd27acbfada6cdb9a56f80701b4
2015-04-12 17:02:18 +05:30
Gloria Gu
425565b79c Update to change name for volume type client
This continues to update the name for volume type:

* Update a client method for volume type.
  update: to update an existing volume type's name

* Update a command-line operations.
  type-update: (adminitrator only) to update a volume type name

The corresponding cinder APIs change to update volume type name:
https://review.openstack.org/#/c/140906/

Implements: blueprint volume-type-description
Change-Id: I66adb7fd2a433e7443cb609046f64dbab3d9d4c7
2015-03-16 18:45:21 +00:00
yatin karel
f47f973d9b Updated help on cinder reset-state cli
volumes also have 'in-use', 'attaching' and 'detaching' states.
These were missing in cinder help for reset-state cli. I have added
these in help.

Partial-Bug: #1309086

Change-Id: I094a61dd4921bed83e97134a4bfbcdc7d0c9ad63
2015-03-06 01:45:08 +05:30
Jenkins
7fc093b504 Merge "Adopt CLI sorting argument guidelines" 2015-03-02 19:55:44 +00:00
Kallebe Monteiro
020f011ab9 Fix outdated URLs and some minor fixes
A minor commit.
Credit to Jeremy Stanley for findind out this in other projects.

The developer documentation changed. It is now at infra manual, so now
the CONTRIBUTING.md was updated accordingly.

Fixed some other things, like a line break which was not needed
(80 char limit), the help text, and updated URL for jacobian

Change-Id: I3b7cce90f72349a986a5b055fa59e53c089ba308
2015-03-02 16:14:44 -03: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
Jenkins
ae9dd86093 Merge "Make cinderclient metadata CLI output consistent" 2015-03-02 00:21:11 +00:00
Steven Kaufer
fc7ebb1621 Adopt CLI sorting argument guidelines
CLI sorting guidelines are defined in the cross project specs
repository: [1]

This patch deprecates --sort_key and --sort_dir and adds support for
--sort in the 'cinder list' command with the following syntax:

  cinder list --sort <key>[:<direction>]

The --sort parameter is comma-separated and is used to specify
one or more sort keys and directions.

Server-side work for sorting by multiple keys is handled in [2].

[1] https://github.com/openstack/openstack-specs/blob/master/specs/
    cli-sorting-args.rst
[2] https://review.openstack.org/#/c/141915/

Implements: blueprint cinder-pagination

Change-Id: Ie8c2c62b8c129f647f85d66d5bcfe4c8f0f4eedb
2015-02-25 18:51:43 +00:00
liyingjun
c01529fa53 Add missing all-tenants option to transfer-list
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
2015-02-24 16:11:46 +08:00
Jenkins
9dcb38f5f2 Merge "Fix up help message for reset-state call" 2015-02-05 14:56:32 +00:00
Jenkins
6883bffca4 Merge "reset-state should warn that it is DB only" 2015-02-04 23:57:46 +00:00
scottda
ff3e5a4ed6 reset-state should warn that it is DB only
The python-cinderclient command 'reset-state' will only change the state in
the Cinder database, without affecting any connection/export of a volume from
the driver backend to a Nova compute host/instance.
The Doc string should explicitly state that this is the case, and Warn that it
might result in an unusable volume, i.e. a volume is set to 'available' in the
Cinder DB, but is still attached and therefore cannot be attached to another
instance, nor detached.

Change-Id: Iee66570dbb93776490ae8fb663a7f835dc496bc2
Closes-Bug: 1417273
2015-02-04 20:25:14 +00:00
Jenkins
2f1939405a Merge "Add support for os-volume-type-access extension" 2015-02-03 03:55:13 +00:00
John Griffith
e9e8aab2ec Fix up help message for reset-state call
There's some confusion about what the reset-state
call does.  It's not clear to some that this call
simply changes the state of the object in the data-base.

This patch just updates the help message to indicate more
clearly that reset-state ONLY changes state in the DB.

Change-Id: Ia389cfd8b1a821a356706201c009cf3c8dca8419
2015-01-28 13:36:20 -06:00
Jenkins
09bfc76c02 Merge "Allow CG quota to be showed and updated" 2015-01-16 18:34:50 +00:00
Jenkins
da16703e61 Merge "v2 error message grammatical error" 2015-01-16 18:33:06 +00:00
Thang Pham
fdba364b7d Make cinderclient metadata CLI output consistent
cinder metadata-update-all and metadata-show produces
inconsistent output. The following patch makes the output of each
command above consistent, where each metadata property will
be printed on a separate table row.

Change-Id: I42933bc6c0e4f925c19cfd4db6d1a205de06a73d
Closes-Bug: #1366289
2015-01-13 16:09:34 -05:00
Jenkins
fdf6fd1d67 Merge "Add command to show pool information for backends" 2015-01-13 08:38:06 +00:00
git-harry
3a97cb27d3 v2 error message grammatical error
This commit fixes an error that occurs in a number of places in the v2
shell; the word 'the' is missing from a number of the error message
strings.

Change-Id: I6d1026c965f84c9c39fcfd175b5d5cbbbad5ef5c
2015-01-08 12:21:33 +00:00
Mitsuhiro Tanino
1d38426680 Add command to show pool information for backends
An admin-api extension to show pool info was supported at commit
https://review.openstack.org/#/c/119938/.

This change adds a command to show pool information for backends
using the admin-api. This change also closes the gap for end users.

Partial-Bug: 1403902
Change-Id: I20e0828c5403b73bc44d07eebf08e2aa2deb428a
2015-01-05 16:04:43 -05:00
Steven Kaufer
b0e4cc1b63 Client output is not sorted by --sort_key
The cinder client supports invoking the volumes REST API with the
sort_dir and sort_key parameters. However, the client output table
is always sorted by ID even though the REST API is returning in
sorted order based on the sort key/direction provided.

For example, the command below supplies the 'size' sort key but the
output table is still sorted by ID:

cinder list --sort_key size --sort_dir desc

This fix contains:
* Updates to the print_list utility to prevent any re-ordering so
  that the current object order is maintained
* Updates to the shell to disable re-ordering if the user supplies
  sort parameters

Change-Id: I4cc111a8bdd2b89158dfc4bb0d16fa6dbf36cc57
Closes-Bug: 1402846
2014-12-22 02:23:00 +00:00
Mathieu Gagné
6f8c235a92 Add support for os-volume-type-access extension
This change adds the ability to manage volume type access:
- Create non-public volume type
- List volume type access
- Add a project access
- Remove a project access

This change also adds the is_public flag to volume type list.

Note: The volume type access extension is only implemented
in the Cinder API v2.

DocImpact: Add volume type access extension support
Implements: blueprint private-volume-types
Change-Id: Ife966120d9250be8d8149cdec9c1a53405d37027
2014-12-19 13:26:21 -05:00