Files
python-cinderclient/doc/source/index.rst
Peter Hamilton 6fd8d8e12e Require ctrl_location for encryption-type-create
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
2014-02-12 21:38:41 +02:00

6.6 KiB

Python API

In order to use the python api directly, you must first obtain an auth token and identify which endpoint you wish to speak to. Once you have done so, you can use the API like so:

>>> from cinderclient import client
>>> cinder = client.Client('1', $OS_USER_NAME, $OS_PASSWORD, $OS_TENANT_NAME, $OS_AUTH_URL)
>>> cinder.volumes.list()
[]
>>> myvol = cinder.volumes.create(display_name="test-vol", size=1)
>>> myvol.id
ce06d0a8-5c1b-4e2c-81d2-39eca6bbfb70
>>> cinder.volumes.list()
[<Volume: ce06d0a8-5c1b-4e2c-81d2-39eca6bbfb70>]
>>>myvol.delete

Command-line Tool

In order to use the CLI, you must provide your OpenStack username, password, tenant, and auth endpoint. Use the corresponding configuration options (--os-username, --os-password, --os-tenant-id, and --os-auth-url) or set them in environment variables:

export OS_USERNAME=user
export OS_PASSWORD=pass
export OS_TENANT_ID=b363706f891f48019483f8bd6503c54b
export OS_AUTH_URL=http://auth.example.com:5000/v2.0

Once you've configured your authentication parameters, you can run cinder help to see a complete listing of available commands.

See also /man/cinder.

Release Notes

MASTER

1.0.8

  • Add support for reset-state on multiple volumes or snapshots at once
  • Add volume retype command

1.0.7

  • Add support for read-only volumes
  • Add support for setting snapshot metadata
  • Deprecate volume-id arg to backup restore in favor of --volume
  • Add quota-usage command
  • Fix exception deprecation warning message
  • Report error when no args supplied to rename cmd

1.0.6

  • Add support for multiple endpoints
  • Add response info for backup command
  • Add metadata option to cinder list command
  • Add timeout parameter for requests
  • Add update action for snapshot metadata
  • Add encryption metadata support
  • Add volume migrate support
  • Add support for QoS specs

1.0.5

  • Add CLI man page
  • Add Availability Zone list command
  • Add support for scheduler-hints
  • Add support to extend volumes
  • Add support to reset state on volumes and snapshots
  • Add snapshot support for quota class

1.0.4

* Added suport for backup-service commands .. _1163546: http://bugs.launchpad.net/python-cinderclient/+bug/1163546 .. _1161857: http://bugs.launchpad.net/python-cinderclient/+bug/1161857 .. _1160898: http://bugs.launchpad.net/python-cinderclient/+bug/1160898 .. _1161857: http://bugs.launchpad.net/python-cinderclient/+bug/1161857 .. _1156994: http://bugs.launchpad.net/python-cinderclient/+bug/1156994

1.0.3

  • Added support for V2 Cinder API
  • Corected upload-volume-to-image help messaging
  • Align handling of metadata args for all methods
  • Update OSLO version
  • Correct parsing of volume metadata
  • Enable force delete of volumes and snapshots in error state
  • Implement clone volume API call
  • Add list-extensions call to cinderclient
  • Add bootable column to list output
  • Add retries to cinderclient operations
  • Add Type/Extra-Specs support

* Add volume and snapshot rename commands .. _1155655: http://bugs.launchpad.net/python-cinderclient/+bug/1155655 .. _1130730: http://bugs.launchpad.net/python-cinderclient/+bug/1130730 .. _1068521: http://bugs.launchpad.net/python-cinderclient/+bug/1068521 .. _1052161: http://bugs.launchpad.net/python-cinderclient/+bug/1052161 .. _1071003: http://bugs.launchpad.net/python-cinderclient/+bug/1071003 .. _1065275: http://bugs.launchpad.net/python-cinderclient/+bug/1065275 .. _1053432: http://bugs.launchpad.net/python-cinderclient/+bug/1053432