Hello , <div><br></div><div>I am having a CENTOS machine over tht i have installed ovirt-sdk using following command :</div><div><br></div><div>$ git clone http<span style="background-color:rgb(255,255,255);font-family:sans-serif;font-size:13px;line-height:19.03333282470703px">://<a href="http://gerrit.ovirt.org/ovirt-engine-sdk">gerrit.ovirt.org/ovirt-engine-sdk</a></span></div>
<div><span style="background-color:rgb(255,255,255);font-family:sans-serif;font-size:13px;line-height:19.03333282470703px">$ </span><span style="background-color:rgb(249,249,249);line-height:1.1em">yum install -y rpm-build python-devel python-setuptools</span></div>
<div><span style="background-color:rgb(249,249,249);line-height:1.1em">$ </span><span style="background-color:rgb(249,249,249);line-height:1.1em">make rpm</span></div><div><span style="background-color:rgb(249,249,249);line-height:1.1em">$ </span><span style="background-color:rgb(249,249,249);line-height:1.1em">yum localinstall rpmtop/RPMS/noarch/ovirt-engine-sdk-x.y-z.noarch.rpm</span></div>
<div><span style="background-color:rgb(249,249,249);line-height:1.1em"><br></span></div><div><span style="background-color:rgb(249,249,249);line-height:1.1em"><br></span></div><div><span style="background-color:rgb(249,249,249);line-height:1.1em">thn i have written one script rhevmtest.py :</span></div>
<div><span style="background-color:rgb(249,249,249);line-height:1.1em"><br></span></div><div><span style="background-color:rgb(249,249,249);line-height:1.1em"><br></span></div><div><span style="background-color:rgb(249,249,249);line-height:14.300000190734863px"><div>
from ovirtsdk.api import API</div><div>from ovirtsdk.xml import params</div><div>import time</div><div><br></div><div>rhevm_uri = "<a href="http://rhevm301.abc.xyz.com:8080/api">http://rhevm301.abc.xyz.com:8080/api</a>"</div>
<div>rhevm_username = "<a href="mailto:admin@rhevm301.abc.xyz.com">admin@rhevm301.abc.xyz.com</a>"</div><div>rhevm_password = "password"</div><div><br></div><div><br></div><div>rhevmAPI = API(url=rhevm_uri, username=rhevm_username, password=rhevm_password)</div>
<div><br></div><div>print "Connected to RHEVM Successful"</div><div>instances = rhevmAPI.vms.list()</div><div><br></div><div>I got following errror :</div><div><br></div><div>$ python rhevmtest.py</div><div><br>
</div><div><span style="background-color:transparent">Connected to RHEVM Successful</span></div></span><div>Traceback (most recent call last):</div><div> File "romil_test.py", line 13, in <module></div><div>
instances = rhevmAPI.vms.list()</div><div> File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/brokers.py", line 6615, in list</div><div> headers={"Filter":contextmanager.get('filter')}).get_vm()</div>
<div>AttributeError: 'str' object has no attribute 'get_vm'</div></div><div><br></div><div><span style="background-color:rgb(249,249,249);line-height:1.1em"><br></span></div><div><span style="background-color:rgb(249,249,249);line-height:1.1em"><br>
</span></div><div><span style="background-color:rgb(249,249,249);line-height:1.1em"><br></span></div><div>Regards </div><div>Romil Gupta <br clear="all"><div><br></div><br>
</div>