[openstack-dev] [cinder][python-client-api] Retrieve host-name attribute of Cinder Volume

Pradip Mukhopadhyay pradip.interra at gmail.com
Wed Jan 6 15:44:56 UTC 2016


Hello,


>From CLI, I can see the host-name in the cinder show command as follows:

|         os-vol-host-attr:host         |  openstack4 at mySCSIBackend#pool1
|

How this info can be accessed from the cinder python client?

I can access other information (id, size, name etc.) as follows:

>>> volumes = cinder.volumes.list()

>>> volumes

[<Volume: e8be1df5-64fb-43fa-aacd-9bebba17fba5>]

>>> volumes[0].id

u'e8be1df5-64fb-43fa-aacd-9bebba17fba5'

>>> volumes[0].volume_type

u'iscsi_1'



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


More information about the OpenStack-dev mailing list