277 Commits

Author SHA1 Message Date
Jenkins
8155d453c8 Merge "Extra 'u' in output of cinder cli commands" 2016-02-24 18:32:35 +00:00
Eric Harney
ccacc338a5 Add --cascade to volume delete
This adds the --cascade parameter to the volume
delete command.  Using this will call the volume delete
with an additional parameter that deletes snapshots as
part of the same operation.

The name "cascade" is chosen to be somewhat generic,
so that we can extend this if desired in the future.
(And to hint at the terminology from SQL.)

Depends-On: I33d15b76d4bd0de14c635d404b2c97096c977a58
Change-Id: I05ce61e647c43f9a1e6d74444356a76e5d284673
Blueprint: del-vols-with-snaps
2016-02-24 16:31:32 +00:00
Eric Harney
c4c2c56042 Don't print HTTP codes for non-HTTP errors
This changes:
 $ cinder rename asdf
 ERROR: Must supply either name or description. (HTTP 1)

To:
 $ cinder rename asdf
 ERROR: Must supply either name or description.

Affects rename, snapshot-rename, consisgroup-update,
and consisgroup-create-from-src.
(consisgroup-* previously printed HTTP 400.)

Closes-Bug: #1549020
Closes-Bug: #1549026
Change-Id: Ia920b3b75b53170789b694cbdd49100bd6a72d21
2016-02-24 11:00:05 -05:00
John Griffith
88934c2708 Add replication v2.1 (cheesecake) calls
Cheesecake introduces a host based replication use case.
This change includes the changes needed to support those
implementations in the Cinder API.

Implements: blueprint replication-update

Change-Id: I74dc1a00fb4a2c05510c6159253036ac19706959
2016-02-24 00:47:13 +00:00
Jenkins
13a29b5a32 Merge "Fix sort problem in snapshot and backup list" 2016-02-23 22:04:17 +00:00
Sheel Rana
a26c1e67b6 Extra 'u' in output of cinder cli commands
In output of cinder show command, below fields contains extra 'u'
character being unicode:
1. volume_image_metadata
2. metadata

In output of "cinder credentials", below field contains extra 'u'
1. roles

In output of "cinder qos-create", below field contains extra 'u'
1. specs

In output of "cinder qos-list", below field contains extra 'u'
1. specs

In output of "cinder extra-specs-list", below field contains extra 'u'
1. extra_specs

In output of "cinder qos-show", below field contains extra 'u'
1. specs

Change-Id: I8be32f117ddc29b087ee872ff065c175dd70b372
Closes-Bug: #1538413
Closes-Bug: #1538415
2016-02-19 17:26:24 +00:00
Shilpa Jagannath
a3dca1599f Allow "cinder backup-delete" to delete multiple backups in one request
While "cinder snapshot-delete" and "cinder delete" allow multiple resources to be deleted in a single command, "cinder backup-delete" request can only delete one backup at a time. Adding this capability to backups in cinderclient. Enables "cinder backup-delete" to delete multiple backups in a single command.

With this change the command can be run as below:

cinder backup-delete <backup> [<backup>...]

DocImpact
Closes-Bug: #1543056
Implements: blueprint cli-backup-multiple-deletes

Change-Id: I767710bda3b7c358c6525c9a9f074010084e411d
2016-02-11 10:40:05 +00:00
Jenkins
64138007bd Merge "Bootable filter for listening volumes from CLI" 2016-02-08 16:49:49 +00:00
Sheel Rana
3dec787a52 Bootable filter for listening volumes from CLI
This fix depends upon fix proposed in cinder.

Depends-On: I1f1ec20441b28e01bf07bc4f60d848b653e58d58

DocImpact

Implements : blueprint select-volume-through-bootable-option

Closes-Bug: #1535749

Change-Id: Ibf3eadc95307e0c803ad9fa449578f8ca6f654d0
2016-02-04 15:11:24 +00:00
Jenkins
bdeab3af0e Merge "CLI for backup snapshots" 2016-02-03 16:12:01 +00:00
LisaLi
c18f9073a4 Fix sort problem in snapshot and backup list
The sort in command snapshot-list and backup-list
doesn't work, and they show same results.

The patch is to fix the problem, and transfer
sortby_index as None in utils.print_list.

Closes-Bug: #1536054

Change-Id: I00760fd4b395b04b95a8139224e18ea8d649d377
2016-01-20 08:53:38 +00:00
Herman Ge
0e9e2849f6 Word Misspelling
Word misspelling in following message:

1. shell.py

help='A unqiue identifier that represents a failover target.'

2. volumes.py

:param secondary: A unqiue identifier that represents a failover

Should change the word 'unqiue' to 'unique'.

Change-Id: I44a94b403f0bb71864d03683bdaf3b98f4d73bb1
2016-01-11 10:30:36 -05:00
Jenkins
fa18f8e171 Merge "Fix for 'quota-delete' call to API v2" 2015-12-31 20:08:06 +00:00
Jenkins
77fc5c1717 Merge "Fix help message in backup reset-state" 2015-12-23 23:45:02 +00:00
Jenkins
0b3afcc7d7 Merge "support for snapshot management" 2015-12-21 22:41:35 +00:00
LisaLi
35b5e6f4af Fix help message in backup reset-state
Refer the source code
https://github.com/openstack/cinder/blob/master/cinder/api/contrib/admin_actions.py#L367
backup reset-state only supports valid state as available and error.

Change-Id: I783e08170f4a2e56959918b62b424f43c1c93fb5
2015-12-21 15:11:44 +08:00
Szymon Borkowski
f39a383ed9 Fix for 'quota-delete' call to API v2
Before, when API in cinderclient was set to v2, the issued call
used to fail with an error message, that the call is connecting
to the endpoint compatible to API v1, when other quota calls
were connecting to the proper, v2 enpoint.

Change-Id: I99a16e93ed15e3819d48d193b550c786012462d8
Closes-Bug: 1526829
2015-12-16 16:19:00 +01:00
Jenkins
484c6e3a9c Merge "Add optional argument to list subcommand" 2015-12-09 00:19:40 +00:00
Mitsuhiro Tanino
c38b35cb61 Add optional argument to list subcommand
Cinder list command was intended to show summary of
volumes, but currently the command shows many entries
than we expected.

This patch adds these two fixes to show volume list
more simply.

- Remove 'migration status' and 'multiattach' from
  default list view.

- Add '--field' optional argument to 'list' subcommand.
  This argument allows users to show only specified
  entries. Unavailable fields will be ignored from
  the list result.

DocImpact
Change-Id: Iad4bf76e87f84b6e57ec59d134b9413fcad16ce8
Closes-Bug: #1502639
2015-12-04 11:43:06 -05:00
wanghao
948e90010f support for snapshot management
Add support to manage/unmanage snapshot

cinder snapshot-manage volume identifier
option args is --id-type, --name, --description,
--metadata.

cinder snapshot-unmanage snapshot

DocImpact

Implements: blueprint support-for-snapshot-management
Change-Id: Id4d73fa0ff0c0c05c0c69924968aa2154da64118
2015-12-02 10:07:11 +08:00
Atsushi SAKAI
a2ccc85a73 Fix comma location in comment
comment message effects to CLI-reference message.

Change-Id: I6d76d6bc6077b4915aaa74968e294abbc3f72f30
2015-12-02 10:15:56 +09:00
Jenkins
7f9a81bb1b Merge "Adds v2 replication support" 2015-11-30 20:33:11 +00:00
Jenkins
37ea6acad7 Merge "Use oslo_utils encodeutils and strutils" 2015-11-27 22:58:42 +00:00
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
Ryan McNair
294acfd5c4 Fix v2 qos-key command
As part of commit 0d2bf657ae5271a01e9ec84d379d17910b263b7e,
qos-key command's v2 support got broken again reintroducing
bug #1284321.

Change-Id: I30d60b060bd1b161bc96c4a529f4732b9ceef90d
Closes-Bug: 1284321
2015-11-24 17:01:54 +00:00
Eric Harney
6fe9f20663 Use oslo_utils encodeutils and strutils
With oslo-incubator being deprecated, move
our use of strutils to oslo_utils.

This leaves in place the use of oslo-incubator's
strutils by other oslo-incubator modules for now.

Change-Id: Ic4e50060b42aeca9d1e54424a8a3a123140fbf2a
2015-11-23 10:44:12 -05:00
Xing Yang
8fbbf7be94 CLI for backup snapshots
This adds CLI support for backup snapshots.

Server side change is here:
https://review.openstack.org/#/c/243406/

Depends-on: Ib4ab9ca9dc72b30151154f3f96037f9ce3c9c540
Change-Id: I5b58d872c9b4842fae5f2e7a4ddfc6662a6c8d7a
Implements: blueprint backup-snapshots
2015-11-20 13:47:46 -05:00
Jenkins
e2a64f361d Merge "Adding backup-reset-state to CLI" 2015-11-18 22:58:06 +00:00
Jenkins
5f436b6a6d Merge "Update help message for cinder migrate" 2015-11-15 03:50:38 +00:00
Jenkins
2ca2b96723 Merge "Implement cinder type-show" 2015-11-11 19:37:39 +00:00
Nate Potter
1a3dbfaabb Update help message for cinder migrate
As per the doc bug https://bugs.launchpad.net/openstack-manuals/+bug/1363830
documentation for the cinder CLI should be updated to reflect that the host
needs to be given in the form host@backend#pool, and the docs for the
cli-reference are auto-generated from the client.

Change-Id: I66d41e05436782c3acd24f9633c4b67ca5c56b15
2015-11-06 21:56:10 +00:00
Kurt Martin
cb08ce33eb Fix volume size units to match the API
Both Horizon and the cinder client documents the size paramater in
gigabyes(GBs) but the API docs(both v1 and v2) list the size units as
gibibytes(GiBs). The correct unit should be gibibytes(GiBs). This
should help in clearing up any confusion on what units are used in
Cinder.

Closes-bug: 1511167
Change-Id: I42e15c18d1f084d435a2be9b343fb2f6c3cf377f
2015-11-03 15:24:29 -08:00
Nate Potter
8690e41c22 Adding backup-reset-state to CLI
This patch adds the ability to reset the state of
a backup with the command backup-reset-state.

DocImpact

Change-Id: I5851bb21c62252f61ad6a09f01859582e774a9db
Closes-Bug: #1279764
2015-10-20 19:17:55 +00:00
Nate Potter
428d2ebb7f Implement cinder type-show
This patch adds the type-show command to the
cinder CLI for viewing information on volume
types.

Change-Id: I7b283b120727f2fbd186e6f07a6450795bdf03c3
Closes-Bug: #1505806
2015-10-16 19:58:06 +00:00
Jenkins
92f3d35d5b Merge "Adding pagination to snapshots and backups lists" 2015-10-10 13:09:54 +00:00
Jenkins
497264e8e9 Merge "Add commands to show image metadata" 2015-10-08 15:04:09 +00:00
Sergey Gotliv
e707c7aa9f Adding pagination to snapshots and backups lists
Snapshot and backups pagination was recently implemented in the Cinder
backend. This patch is implementing a pagination for the snapshots and
backups on the client side in the same way that volume pagination works
using limit, marker and sort parameters.

Partial-Implements: blueprint extend-limit-implementations
Change-Id: Ie3660854407a947f7470b4dc0911704c0a31c1b4
2015-10-05 10:38:37 +03:00
Jenkins
9ae9ac0c5f Merge "Updating volume type 'is_public' status support" 2015-10-01 02:13:29 +00:00
Dave Chen
64bf39e93f Add commands to show image metadata
- cinder image-metadata-show volume_id
This command can be used to show the image metadata associated
with the specific volume.

Partially implements: bp support-modify-volume-image-metadata

Change-Id: I960af66038b47c1206619b99a2bb5ae561a59c4f
2015-09-30 13:57:37 +08: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