<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"><data_centers></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><data_center id="e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3" href="/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3"></div>
<div class="" style="margin-left:1em"><div class="" style="color:rgb(0,0,0)"><name>datacenter1</name></div><div class="" style="color:rgb(0,0,0)"><description/></div><div class=""><font color="#ff0000"><link rel="storagedomains" href="/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/storagedomains"/></font></div>
<div class="" style="color:rgb(0,0,0)"><link rel="permissions" href="/api/datacenters/e1165cdf-2c42-48a9-87ca-5c3f5cfa8fb3/permissions"/></div></div><div class="" style="color:rgb(0,0,0)"></data_center></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><data_center id="347748d0-b72b-439f-bb2b-bd5c82041158" href="/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158"></div>
<div class="" style="margin-left:1em"><div class="" style="color:rgb(0,0,0)"><name>Default</name></div><div class="" style="color:rgb(0,0,0)"><description/></div><div class=""><font color="#ff0000"><link rel="storagedomains" href="/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/storagedomains"/></font></div>
<div class="" style="color:rgb(0,0,0)"><link rel="permissions" href="/api/datacenters/347748d0-b72b-439f-bb2b-bd5c82041158/permissions"/></div><div class="" style="color:rgb(0,0,0)"></data_center><br>
</div></div></div></div></div><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"></data_centers></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 "Connected to RHEVM Successful"</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"><storage_domains></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><storage_domain id="e3e3b0cd-48a4-4bb8-a75b-07813f2c165e" href="/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e"></div>
<div class="" style="margin-left:1em"><div class=""><name>rhevmiso</name></div><div class=""><link rel="permissions" href="/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/permissions"/></div>
<div class=""><link rel="files" href="/api/storagedomains/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/files"/></div><div class=""><type>iso</type></div><div class=""><master>false</master></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><storage></div><div class="" style="margin-left:1em">
<div class=""><type>nfs</type></div><div class=""><address>*.*.*.*</address></div><div class=""><path>/iso/rhevmisonfs</path></div></div><div class=""></storage></div></div></div>
<div class=""><available>767725404160</available></div><div class=""><used>94489280512</used></div><div class=""><committed>0</committed></div><div class=""><storage_format>v1</storage_format></div>
</div><div class=""></storage_domain></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><storage_domain id="baa46f57-13e0-4159-ace1-f04e61e1e937" href="/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937"></div>
<div class="" style="margin-left:1em"><div class=""><name>rhevmVMdata</name></div><div class=""><link rel="permissions" href="/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/permissions"/></div>
<div class=""><link rel="files" href="/api/storagedomains/baa46f57-13e0-4159-ace1-f04e61e1e937/files"/></div><div class=""><type>data</type></div><div class=""><master>true</master></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><storage></div><div class="" style="margin-left:1em">
<div class=""><type>nfs</type></div><div class=""><address>*.*.*.*</address></div><div class=""><path>/iso/rhevmnfs</path></div></div><div class=""></storage></div></div></div><div class="">
<available>767725404160</available></div><div class=""><used>94489280512</used></div><div class=""><committed>100931731456</committed></div><div class=""><storage_format>v1</storage_format></div>
</div><div class=""></storage_domain></div></div></div></div><div class="" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"></storage_domains></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 & Regards,</b><div><b style="color:rgb(102,102,102)">Romil Gupta<br>
</b><br></div></div>
</div></div>