[openstack-dev] [cinder] Attaching extra-spec to vol-type using Cinder py-client

Pradip Mukhopadhyay pradip.interra at gmail.com
Tue Mar 31 04:37:01 UTC 2015


I am trying to create and type-set some parameters to a volume-type as

cinder type-create nfs
cinder type-key nfs set volume_backend_name=myNFSBackend

The same thing I want to achieve through python client.

I can create the type as follows:

from cinderclient import client
cinder = client.Client('2', 'admin', 'pw', 'demo',
'', service_type="volumev2")

However how can I associate the extra-spec through python-client code to
the 'nfs' volume (same impact as the CLI 'cinder type-key nfs set
volume_backend_name=myNFSBackend' does)?

The 'set_keys' etc. methods are there in the "v2/volume_types.py" in
python-cinderclient codebase. How to call it? (it's part of VolumeType
class, not VolumeTypeManager).

Any help would be great.

Thanks, Pradip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150331/be8a83f6/attachment.html>

More information about the OpenStack-dev mailing list