<div dir="ltr">Sorry, of course this <a href="https://github.com/openstack/cinder/blob/master/cinder/volume/utils.py#L575">https://github.com/openstack/cinder/blob/master/cinder/volume/utils.py#L575</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 6, 2016 at 5:57 PM, Yuriy Nesenenko <span dir="ltr"><<a href="mailto:ynesenenko@mirantis.com" target="_blank">ynesenenko@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can use this function <br><a href="https://github.com/openstack/cinder/blob/master/cinder/volume/utils.py#L5" target="_blank">https://github.com/openstack/cinder/blob/master/cinder/volume/utils.py#L5</a><span></span><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Jan 6, 2016 at 5:44 PM, Pradip Mukhopadhyay <span dir="ltr"><<a href="mailto:pradip.interra@gmail.com" target="_blank">pradip.interra@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div>Hello,<br><br><br></div>From CLI, I can see the host-name in the cinder show command as follows:<br><br>| os-vol-host-attr:host | openstack4@mySCSIBackend#pool1 |<br><br></div>How this info can be accessed from the cinder python client?<br><br></div>I can access other information (id, size, name etc.) as follows:<br><br>
<p class="MsoNormal">>>> volumes = cinder.volumes.list()</p>
<p class="MsoNormal">>>> volumes</p>
<p class="MsoNormal">[<Volume: e8be1df5-64fb-43fa-aacd-9bebba17fba5>]</p>
<p class="MsoNormal">>>> volumes[0].id</p>
<p class="MsoNormal">u'e8be1df5-64fb-43fa-aacd-9bebba17fba5'</p>
<p class="MsoNormal">>>> volumes[0].volume_type</p>
<p class="MsoNormal">u'iscsi_1'</p>
<br><br></div><br></div>Thanks,<br></div>Pradip<br><br><br><div><div><div><div><div><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:red"><span></span></span></div></div></div></div></div></div>
<br></div></div>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>