Provide Cinder client support to manage volume replication.
Cinder-specs available at https://review.openstack.org/#/c/98308/
Change-Id: Id60bacbcc113d42730e822b29b2fa78be94d3276
Implements: blueprint volume-replication
extra-specs-list used to use the extra-specs cinder extension
to get information on volume type extra specs. This information
is publicly available through the volume-type API [1] thus we
can avoid the extra-lookups of querying the extra-specs extension.
As the extra-spec info is publicly available, remove the part of
the docstring of cinder extra-specs-list that says 'admin only'.
[1] http://docs.openstack.org/api/openstack-block-storage/2.0/content/GET_getVolumeTypes__v2__tenant_id__types_Volume_Types.html
Change-Id: I9a8256a044511ac5233d8170fc57118ccaa1e217
Closes-Bug: 1343876
Since v2 api supports pagination, we should add this support in
cinderclient too.
Change-Id: I9d4cb9e192523c14cf7df043deabe156dbb8e216
Closes-bug: 1325773
Currently, the command reset-state return code is zero if it
failed for any of volumes, it should be nonzero.
Change-Id: Ic6da238861fd003375003399bc6def6bf860a015
Closes-Bug: #1339643
Add manage and unmanage commands.
Cinder code: https://review.openstack.org/#/c/72501
See also adding support for "bootable" flag for volume manage,
and changing the LVM backend to use the source-volume-name key
as part of the existing-ref structure, to make the CLI easier
to use:
https://review.openstack.org/#/c/108488/
Implements: blueprint add-export-import-volumes
Change-Id: I27d0d3396d80063a51b0fe56d2d3c92931fa9c6c
This patch makes optional the parameter size
for creating a volume from a snapshot or other
volume.
The parameter is still required for other
kind of volume creation.
Change-Id: I75dcf0e647f6e82a2407bcf23ef359f5f87323e8
Closes-Bug: #1304463
Add the tenant uuid to the output when running cinder list --all-tenants,
since this is an admin command any way, it would help to list the tenant
UUID so we do not have to run cinder show to see the tenant uuid when we
have further queries to run.
Change-Id: I661789e957fa00947c4d5595f7e0515c27963735
Closes-bug: 1333257
All arguments starting with '--' are optional and listed
under the 'Optional arguments:' header by argparse. Remove
the extra note shown for each argument.
Change-Id: Ic361a3bdbd1f1669458e16b99995f0f108400699
Make text consistent and clear.
Add periods to end of sentences.
Adjust test suite for change
Closes-Bug: #1275881
Change-Id: I1dfde51636e8dc4b42e4c4810c27c1c4ac513d82
In bug 1241941 the delete and force-delete commands were updated to
accept multiple volumes for deleting in the same call. This patch adds
the same behaviour to the snapshot-delete command.
Closes-Bug: #1284540
Change-Id: I5e4bf8641d7fd261fa24b03832bad08007e43c12
Bootable Status is set to "True" automatically when user
create a volume from a image. But user have to set bootable
status manually when creating a bootable volume manually.
blueprint add-bootable-option
this commit is related to https://review.openstack.org/#/c/84057/
Change-Id: Ib4a44334001b7b9e3b896c2e44607c414e75e952
Add the command quota-delete <tenant_id> to the client.
This change depends on the cinder change:
Ia040a20abb831c311eb13624ddecbbf0f12fdd9f
DocImpact
Implements blueprint quota-delete
Change-Id: I1e5c98154dc3c6de168747eb912b45265cd1b9db
Adds cli option to allow users to give reason
for service-disable. Also adds disabled reason
as a column in service list, so any disabled service
can be seen with reason.
A recent cinder change that allows disable-log-reason
allows users to provide reason for disabling service.
This just adds the cli option for the method.
Implements bp record-reason-for-disabling-service
Change-Id: I90f4566764790eeb0c047c4a0fd0108050ab6ad9
Add client code to a new admin API for backup-export and
backup-import allowing an admin to copy the backup metadata
details.
client code for https://review.openstack.org/#/c/69351/
blueprint cinder-backup-recover-api
DocImpact new admin API calls backup-import and backup-export
Change-Id: Id306fc9cf562a87bb6a36eae692852eefc592b74
* service_catalog.py will be used only by nova(cinder.py), it will be removed if nova
uses access instead of service_catalog. Then service_catalog.py and
test_service_catalog.py will be removed from cinderclient if necessary.
* Some unit tests are modified.
* Because of JSON format's modification, functions that process cinder
credentials and cinder endpoints are changed.
* Add dependency for keystoneclient in requirements.txt.
Change-Id: Icf7badfdddcf5f55536d95db7242aff58aa34b6e
Closes-Bug: #1263876
bp: service-catalog
This change addresses bug #1286314, fixing type deletion to allow
deletion by either volume type name or ID. The former implementation
only accepted the volume type ID. Help documentation is also updated
to reflect this change.
Change-Id: I0fc66b54a7bcfa4e00a4d136ac513fa40e628dd2
Closes-Bug: #1286314
DocImpact
These commands originally were only available for v1, but this makes
them available for both v1 and v2 service_type.
Change-Id: I26e3f1997aebafa1eb784273c892397522dbbfe2
Closes-Bug: #1284321
This bug fix addresses bug #1267168, adding a default value to the
optional control_location parameter for the encryption-type-create
command. Prior to this fix, any invocation of encryption-type-create
that omitted the control_location parameter would fail. The failure
arose from the expectations of the cinder volume encryption type
API extension, which expects to always receive a value for the
control_location on encryption type creation.
control_location indicates which service will conduct the volume
encryption for the encryption-type under consideration; valid options
are 'front-end' (i.e., nova) and 'back-end' (i.e., cinder). The new
default value is 'front-end' and is used whenever control_location
is omitted from encryption-type-create invocation. For prior
discussion and information, see the abandoned patch below:
https://review.openstack.org/#/c/58303/
blueprint encrypt-cinder-volumes
https://blueprints.launchpad.net/nova/+spec/encrypt-cinder-volumes
Change-Id: I8db80929adbf5a3d818b9d3a8115067ae8e7d9e2
Closes-Bug: #1267168
DocImpact
This fix addresses an issue where the variable name for image_name
was incorrect, causing the image_name parameter to be sent as null
when using "cinder upload-to-image" from cli with v2 of the API
Change-Id: I62f8bbb4397526fb291a46777d9025318da8e5b3
Closes-Bug: 1274552
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>