Hi,<div> I've written the following python program after configuring ovirt.</div><div><br></div><div><br></div><div><div>from ovirtsdk.xml import params</div><div>from ovirtsdk.api import API</div><div><br></div><div>
<br></div><div><br></div><div>api=API(url='<a href="http://XYZ:80">http://XYZ:80</a>',username='ABC',password='123')</div><div><br></div><div>print "\n**********************VMS************************\n"</div>
<div><br></div><div>vmlist = api.vms.list()</div><div>hostlist = api.hosts.list()</div><div>evenlist = api.events.list();</div><div><br></div><div><br></div><div>for vm in vmlist:</div><div> print <a href="http://vm.name">vm.name</a>,vm.memory,<a href="http://vm.id">vm.id</a>,vm.os.kernel,<a href="http://vm.cluster.id">vm.cluster.id</a>,vm.start_time</div>
<div> </div><div>print "\n**********************HOSTS ********************\n"</div><div><br></div><div>for host in hostlist:</div><div> print <a href="http://host.name">host.name</a></div><div><br></div><div>
#print "\n**********************EVENTS ********************\n"</div><div><br></div><div>#for evt in evenlist:</div><div> # print evt.description</div></div><div><br></div><div>It prints the output as </div><div>
<br></div><div><div>*********************VMS************************</div><div><br></div><div>fedora18 2147483648 3e4634b7-82a9-4c4f-8599-0f9092a9258e None 99408929-82cf-4dc7-a532-9d998063fa95 None</div><div>testdtop1 536870912 c256a1d9-2e3f-42e8-9020-6d08d21d2d73 None 99408929-82cf-4dc7-a532-9d998063fa95 2013-01-23T09:59:36.726Z</div>
<div>testvm1 268435456 f6b2a97d-34b2-4a62-adae-ac0504b96558 None 99408929-82cf-4dc7-a532-9d998063fa95 2013-01-23T09:55:06.727Z</div><div>testvmfedora18 536870912 25c14ee6-65dd-4785-af0c-a8df3f87573f None 99408929-82cf-4dc7-a532-9d998063fa95 None</div>
<div><br></div><div>**********************HOSTS ********************</div><div><br></div><div><a href="http://omwin.ind.hp.com">omwin.ind.hp.com</a></div></div><div><br></div><div>Now i want to get the statistics for each vm like the memory used and memory installed etc in python. How do i go about getting them ? Do we have something like a header file in C or C++ where i can see the member variables and then get the statistics ?</div>
<div><br></div><div><br></div><div>Regards,</div><div>Navin</div>