190 Commits

Author SHA1 Message Date
Alex O'Rourke
b8e118f5c2 Adds v2 replication support
v2 replication has been merged in cinder, but there is no way to call
the api methods. This patch allows the following methods to be called
in order to fully support v2 replication:
  - os-enable_replication
  - os-disable_replication
  - os-list_replication_targets
  - os-failover_replication

Change-Id: Ic3cf082916bdf089de05eebce456dff8cdc11f7c
Implements: blueprint replication-v2
2015-11-24 13:13:23 -08:00
Jenkins
9ae9ac0c5f Merge "Updating volume type 'is_public' status support" 2015-10-01 02:13:29 +00:00
Ankit Agrawal
029b51d378 Use dictionary literal for dictionary creation
Dictionary creation could be rewritten as a dictionary literal.
for example:

body = {}
body['provider'] = args.provider

could be rewritten as

body = {'provider': args.provider}

TrivialFix

Change-Id: Ieae7b33332eca31754cbfe91288ef3001c573eb3
2015-09-24 00:06:30 -07:00
liyingjun
806fa65d84 Updating volume type 'is_public' status support
Cinder supports updating volume type 'is_public' status, it should
be added in cinderclient also. New option 'is_public' will be introduced
for 'cinder type-update'.

DocImpact
Change-Id: Ibfa9ba16c0775e401f6eda0729fcf34a99a14697
Closes-bug: #1493612
2015-09-16 08:53:01 +08:00
Jenkins
c167dda40c Merge "Implement reset-state for attach_status and migration_status" 2015-09-09 21:48:59 +00:00
Jenkins
8e162a0764 Merge "Volume status management for volume migration" 2015-09-02 09:27:45 +00:00
Mitsuhiro Tanino
471aea8e9f Adds command to fetch specified backend capabilities
This change adds a new admin-api to allow admin to fetch
specified backend capabilities which includes volume stats and
vendor unique properties.
With this command, admin can obtain what the current deployed
backend in Cinder is able to do from the endpoint.

DocImpact
Implements: blueprint get-volume-type-extra-specs

Change-Id: I355a5b57994d1407a088c86530d7ef362ecd31ed
2015-09-02 00:53:40 +00:00
Vincent Hou
2d979dc19d Volume status management for volume migration
This patch proposes the following changes
to the 'available' volume:
* Add the --lock-volume flag to cinder migrate
The default value is False, which means the migration is aborted
if the owner of the volume issues commands like attach
or detach during the volume migration. The volume will be in
'available' during migration.
If it is set to True, the migration of this volume will not be
aborted by other commands. The volume will be in 'maintenance'
during migration.

* List migration status for all the volumes
The attribute migration_status will be listed, if the request
is issued by an admin. Otherwise, the migration_status will not
be listed. The option migration_status is added for the admin
to filter the volumes returned via 'cinder list' command.

DocImpact
APIImpact

Partial-implements: blueprint migration-improvement
Change-Id: I5a1a717d1d08f550b45836d958a51f1f3fba5ced
Depends-On: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373
2015-09-01 22:35:28 +08:00
Jenkins
5dbac012e2 Merge "CLI: Non-disruptive backup" 2015-08-29 01:05:06 +00:00
Rajesh Tailor
dc6e82328f Fix help message for reset-state commands
Fixed help messages for reset-state and snapshot-reset-state
commands for v1 as well as v2 api.

Change-Id: I06ca6e33f4e4b486ed29f258325550b89f6dc930
Closes-Bug: 1489285
2015-08-26 23:04:16 -07:00
Jenkins
8b4a5bf6f4 Merge "Show backup and volume info in backup_restore" 2015-08-24 12:13:40 +00:00
Jenkins
5909943cdc Merge "CLI: Clone CG" 2015-08-20 00:32:59 +00:00
Jenkins
b573e90d67 Merge "Add support '--all-tenants' for cinder backup-list" 2015-08-19 17:34:26 +00:00
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