<div dir="ltr">Hi ,<div><br></div><div><b>I want to fetch the storagedomains details based on the datacenter id using <span style="font-family:Calibri,sans-serif;color:rgb(31,73,125)">ovirt-engine-sdk-3.2.0.2-1.</span></b></div>
<div style><br></div><div style>Datacenter details:</div><div style><br></div><div style><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px">&lt;data_centers&gt;</div><div class="" style="margin-left:1em;font-family:monospace;font-size:13px">
<div class="" id="collapsible1"><div class=""><div class="" style="color:rgb(0,0,0)"><span class="" style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background-repeat:no-repeat no-repeat"></span>&lt;data_center id=&quot;e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3&quot; href=&quot;/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3&quot;&gt;</div>
<div class="" style="margin-left:1em"><div class="" style="color:rgb(0,0,0)">&lt;name&gt;datacenter1&lt;/name&gt;</div><div class="" style="color:rgb(0,0,0)">&lt;description/&gt;</div><div class=""><font color="#ff0000">&lt;link rel=&quot;storagedomains&quot; href=&quot;/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/storagedomains&quot;/&gt;</font></div>
<div class="" style="color:rgb(0,0,0)">&lt;link rel=&quot;permissions&quot; href=&quot;/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/permissions&quot;/&gt;</div></div><div class="" style="color:rgb(0,0,0)">&lt;/data_center&gt;</div>
<div class="" style="color:rgb(0,0,0)"><br></div></div></div><div class="" id="collapsible4"><div class=""><div class="" style="color:rgb(0,0,0)"><span class="" style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background-repeat:no-repeat no-repeat"></span>&lt;data_center id=&quot;347748d0-b72b-439f-bb2b-bd5c82041158&quot; href=&quot;/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158&quot;&gt;</div>
<div class="" style="margin-left:1em"><div class="" style="color:rgb(0,0,0)">&lt;name&gt;Default&lt;/name&gt;</div><div class="" style="color:rgb(0,0,0)">&lt;description/&gt;</div><div class=""><font color="#ff0000">&lt;link rel=&quot;storagedomains&quot; href=&quot;/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/storagedomains&quot;/&gt;</font></div>
<div class="" style="color:rgb(0,0,0)">&lt;link rel=&quot;permissions&quot; href=&quot;/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/permissions&quot;/&gt;</div><div class="" style="color:rgb(0,0,0)">&lt;/data_center&gt;<br>
</div></div></div></div></div><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px">&lt;/data_centers&gt;</div><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><br></div><div class="">
<div class=""><font face="monospace"><div class="" style="color:rgb(0,0,0)">I want to know how I could get the storagedomains details using the above xml ?</div><div class="" style="color:rgb(0,0,0)"><br></div><div class="">
<b><font color="#0000ff">_session = API(url=rhevm_uri, username=rhevm_username, password=rhevm_password, insecure=True)<br></font></b></div><div class=""><b><font color="#0000ff">print &quot;Connected to RHEVM Successful&quot;</font></b></div>
<div><b style="color:rgb(0,0,255)">datacenters = _session.datacenters.list()</b><br></div></font></div><div class=""><font face="monospace" color="#0000ff"><b>for dc in datacenters:</b></font></div><div class=""><font face="monospace" color="#0000ff"><b>   print <a href="http://dc.name">dc.name</a></b></font></div>
<div class=""><font face="monospace" color="#0000ff"><b>   print <a href="http://dc.id">dc.id</a></b></font></div><div class=""><font face="monospace" color="#0000ff"><b>   links = dc.link</b></font></div><div class=""><font face="monospace" color="#0000ff"><b>   for l in links:</b></font></div>
<div class=""><font face="monospace" color="#0000ff"><b>      print l.rel</b></font></div><div class=""><font face="monospace" color="#0000ff"><b>      print l.href</b></font></div><div class=""><b style="color:rgb(0,0,255);font-family:monospace">but this wont give any storagedomain details :(</b><br>
</div><div class="" style><font color="#000000" face="monospace">    </font></div><div class="" style><font color="#000000" face="monospace"><br></font></div><div class="" style><font color="#000000" face="monospace"><br>
</font></div><div class="" style><font face="monospace" color="#38761d">I tried this :</font></div><div class=""><span style="font-family:monospace"><font color="#38761d">storages = _session.storagedomains.list()</font></span></div>
<div class=""><font face="monospace" color="#38761d">for storage in storages:</font></div><div class=""><font face="monospace" color="#38761d">    print <a href="http://storage.name">storage.name</a></font></div><div class="">
<font face="monospace" color="#ff9900"><br></font></div><div class=""><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px">&lt;storage_domains&gt;</div><div class="" style="margin-left:1em;color:rgb(0,0,0);font-family:monospace;font-size:13px">
<div class="" id="collapsible1"><div class=""><div class=""><span class="" style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background-repeat:no-repeat no-repeat"></span>&lt;storage_domain id=&quot;e3e3b0cd-48a4-4bb8-a75b-07813f2c165e&quot; href=&quot;/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e&quot;&gt;</div>
<div class="" style="margin-left:1em"><div class="">&lt;name&gt;rhevmiso&lt;/name&gt;</div><div class="">&lt;link rel=&quot;permissions&quot; href=&quot;/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/permissions&quot;/&gt;</div>
<div class="">&lt;link rel=&quot;files&quot; href=&quot;/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/files&quot;/&gt;</div><div class="">&lt;type&gt;iso&lt;/type&gt;</div><div class="">&lt;master&gt;false&lt;/master&gt;</div>
<div class="" id="collapsible2"><div class=""><div class=""><span class="" style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background-repeat:no-repeat no-repeat"></span>&lt;storage&gt;</div><div class="" style="margin-left:1em">
<div class="">&lt;type&gt;nfs&lt;/type&gt;</div><div class="">&lt;address&gt;*.*.*.*&lt;/address&gt;</div><div class="">&lt;path&gt;/iso/rhevmisonfs&lt;/path&gt;</div></div><div class="">&lt;/storage&gt;</div></div></div>
<div class="">&lt;available&gt;767725404160&lt;/available&gt;</div><div class="">&lt;used&gt;94489280512&lt;/used&gt;</div><div class="">&lt;committed&gt;0&lt;/committed&gt;</div><div class="">&lt;storage_format&gt;v1&lt;/storage_format&gt;</div>
</div><div class="">&lt;/storage_domain&gt;</div></div></div><div class="" id="collapsible3"><div class=""><div class=""><span class="" style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background-repeat:no-repeat no-repeat"></span>&lt;storage_domain id=&quot;baa46f57-13e0-4159-ace1-f04e61e1e937&quot; href=&quot;/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937&quot;&gt;</div>
<div class="" style="margin-left:1em"><div class="">&lt;name&gt;rhevmVMdata&lt;/name&gt;</div><div class="">&lt;link rel=&quot;permissions&quot; href=&quot;/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/permissions&quot;/&gt;</div>
<div class="">&lt;link rel=&quot;files&quot; href=&quot;/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/files&quot;/&gt;</div><div class="">&lt;type&gt;data&lt;/type&gt;</div><div class="">&lt;master&gt;true&lt;/master&gt;</div>
<div class="" id="collapsible4"><div class=""><div class=""><span class="" style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background-repeat:no-repeat no-repeat"></span>&lt;storage&gt;</div><div class="" style="margin-left:1em">
<div class="">&lt;type&gt;nfs&lt;/type&gt;</div><div class="">&lt;address&gt;*.*.*.*&lt;/address&gt;</div><div class="">&lt;path&gt;/iso/rhevmnfs&lt;/path&gt;</div></div><div class="">&lt;/storage&gt;</div></div></div><div class="">
&lt;available&gt;767725404160&lt;/available&gt;</div><div class="">&lt;used&gt;94489280512&lt;/used&gt;</div><div class="">&lt;committed&gt;100931731456&lt;/committed&gt;</div><div class="">&lt;storage_format&gt;v1&lt;/storage_format&gt;</div>
</div><div class="">&lt;/storage_domain&gt;</div></div></div></div><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px">&lt;/storage_domains&gt;</div></div><div class=""><font face="monospace" color="#ff9900">   </font></div>
<div class="" style><font color="#38761d">but it wont contains datacenter ID :(</font></div><div class="" style><br></div><div class="" style>help me out !<br></div><div style="color:rgb(0,0,0);font-family:monospace;font-size:13px">
<br></div></div><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><br></div></div><div>-- <br><div dir="ltr"><b style="color:rgb(102,102,102)">Thanks &amp; Regards,</b><div><b style="color:rgb(102,102,102)">Romil Gupta<br>
</b><br></div></div>
</div></div>