When disable/enable a cinder service, there is no output, this
caused end user does not know if the service was disabled/enabled
successfully.
It is better add some output for the command just like nova to tell
end user the service status.
Change-Id: I9d440ab7437c268b17627e255f152db0b3bf4f53
Closes-Bug: #1261120
With change https://review.openstack.org/64945 cinder V2 API now
returns volume details. Updated do_create in cinderclient
to remove additional GET call.
Change-Id: I2a36f2fa865b52f228bad44e0a9c67d49228321e
Partial-Bug: #1265893
The new_size attribute was misspelled, causing the volume extend
operation to fail with:
ERROR: 'Namespace' object has no attribute 'new_size'
This happens only with the v2 API, v1 works fine.
Change-Id: Icb6b5008dad229f21e7906d9b5342d41f5e760cd
Closes-Bug: #1259552
This allows a user to call reset-state or snapshot-reset-state on a
list of objects. The behavior is modeled after a similar change to
delete multiple volumes.
$ cinder reset-state good_volume good_volume_2
<no output>
Error behavior is as follows:
One success/one failure:
$ cinder reset-state good_volume asdf
Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.
One failure:
$ cinder reset-state asdf
ERROR: Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.
Two failures:
$ cinder reset-state asdf qwert
Reset state for volume asdf failed: No volume with a name or ID of 'asdf' exists.
Reset state for volume qwert failed: No volume with a name or ID of 'qwert' exists.
ERROR: Unable to reset the state for any of the specified volumes.
Related-Bug: 1241941
Closes-Bug: 1256069
Change-Id: Id0a36fb7de0d69be0dac98ea04e4708775250b7a
This modification adds support for deleting volume encryption types.
The encryption-type-delete command accepts a single argument, the
name or ID of the volume type whose associated encryption type should
be deleted. The encryption type may only be deleted if the associated
volume type is unused.
blueprint encrypt-cinder-volumes
Change-Id: Ie189e7ec91f5a8adc9d3496911de2811ad40f282
Adding volume readonly-mode-update interface to shell and client object
(v1 and v2) to allow end user update volume read-only access mode flag.
blueprint read-only-volumes
Related-Id: I4c84614d6541d5f7c358abadb957da7b8c3d9c48
Change-Id: I2d587f301a21c0d42b8940465862da25a70ed5a8
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
"nova delete" can delete multiple servers in one request but
"cinder delete" can only delete one volume in one request, it is
better to enhance cinder client to support remove multiple volumes
in one request.
Change-Id: I6a63aa3d7e4c152ae5e45bf2b36d862bdcd6df33
Closes-Bug: #1241941
This patch deprecates the --volume-id arg of backup-restore
when using the v2 api and adds (preferred) --volume arg.
Both args are still usable but the former is now listed as
"Deprecated" in the help message.
Change-Id: I2575d93041b26f971c59bc04828b356556617b62
Fixes: bug 1242816
Added below CLIs:-
1. Set or Delete metadata of a snapshot
2. Show metadata of a snapshot
3. Show metadata of a volume
4. Update all metadata of volume
5. Update all metadata of snapshot
Implements blueprint: add-metadata-cli
Change-Id: Ic2b5f3fce6104d1756879718f666a42549458ad3
In Python 3.3, hash randomization is enabled by default. It causes the
iteration order of dicts and sets to be unpredictable and differ
across Python runs.
Sort the metadata.keys() in reverse order to keep the test cases as is.
Change-Id: I233ada4dae4e9c0bc97bf8fd7d912a0eff9dd5b8
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Python3 changed the behavior of dict.keys such that it is now
returns a dict_keys object, which is iterable but not indexable.
You can get the python2 result back with an explicit call to list.
Refactor list(*.keys()) so that it just uses list().
Change-Id: Ib2e9646ac967e9bd7cc4f47e2099f5d1358808a9
Signed-off-by: Chuck Short <chuck.short@canonical.com>
NOTE:
* openstack/common/* should be synced from oslo, so i leave them
untouched.
* add (c) symbol for related lines, leave others untouched.
Change-Id: I46a87c7f248d3468b1fdf5661411962faf2fb875
Fixes-Bug: #1214176
This changes behavior from:
$ cinder rename volume1
$
to
$ cinder rename volume1
ERROR: Must supply either display-name or display-description.
for both 'rename' and 'snapshot-rename'.
Change-Id: I675a3b1428a7fe10653394c80e4a5a473e14c740
This patch adds volume name arguments to the following subcommands:
* snapshot-create
* backup-create
* backup-restore
* transfer-create
Fixes bug #1220590
Change-Id: Ib0ff6e62d45abb14fa8c7313511ef6f72befe0d5
Implements ability to call migrate_volume and migrate_volume_completion
APIs. The former includes shell code while the latter is called by Nova
and should not be invoked via shell.
Change-Id: I6e81d7a6321f367a356f0a0dee385221363a4227
Users can specify the name of an instance as the argument, which are
passed through find_resource(), instead of the id.
This patch changes some help messages for explaining this behavior.
Related-Bug: #1220590
Change-Id: I9af1259af4319b82b94d7b28536def3107ec5dd5
This modification adds support for volume type encryption to
python-cinderclient, supporting two Cinder API extensions.
The first support set provides accessors to python-cinderclient for
retrieving volume encryption metadata from Cinder. These changes
provide other services (e.g., Nova) access to encryption
metadata (e.g., encryption key UUIDs). See the volume encryption
key API extension in Cinder for more information.
The second support set creates a new python-cinderclient resource
manager, along with matching shell commands, that provides creation
and accessor operations for encryption type information. These
operations allow users and services to define encryption information
(e.g., cipher, key size, encryption provider) for a pre-existing
volume type. See the volume type encryption API extension in Cinder
for more information.
blueprint encrypt-cinder-volumes
Change-Id: Id4b2425d699678eb1997863362ddb9bf5ba6f033
Before v1 and v2 were set to the same service_type, so you could only
have one set at a time. This assumes the catalog is setup for v1
service_type 'volume' and v2 service_type 'volumev2'.
For backwards compatibility, we will allow v2 to be setup with
service_type 'volume' for existing installations.
Change-Id: Ife6d2cdb12d894b84ea3b276767fb93d487355d5
This reverts commit 854740c4c793444c955180e7c0c96977e3e06c56
What we should've caught here is that the args actually passes in a Bool, which then fails the .lower().
Also, if we want to do things like check for strings representing bools we should use the utils.bool_from_str() method rather than write it inline like this.
Raise BadRequest Exception if value of --force parameter in
snapshot-create is invalid
Fixes: bug #1014689
Change-Id: If4858dc17cedf027112defb935016137727681cc
This is client-side support for the os-availability-zone extension added in
https://review.openstack.org/34813. As /os-availability-zone/detail is not
yet implemented, adjustments were made to accomodate the lack of hosts
in the returned zone list.
Added for both v1 and v2, basically a copy of the equivalent novaclient command.
Change-Id: Iae806a2b5ea3a2d3c984a138d9c27e169160766e