Hey,
Your script worked in my environment (Fedora 17 with latest SDK RPM built as you mentioned
below, and latest engine).
IMO, the error doesn't seem related to the OS change between our environments.
Are you testing it with the latest SDK and engine?
Oved
----- Original Message -----
From: "Romil Gupta" <romilgupta19(a)gmail.com>
To: mburns(a)redhat.com, users(a)ovirt.org
Sent: Tuesday, September 11, 2012 12:37:49 PM
Subject: [Users] issues regarding rhevm
Hello ,
I am having a CENTOS machine over tht i have installed ovirt-sdk
using following command :
$ git clone http ://
gerrit.ovirt.org/ovirt-engine-sdk
$ yum install -y rpm-build python-devel python-setuptools
$ make rpm
$ yum localinstall
rpmtop/RPMS/noarch/ovirt-engine-sdk-x.y-z.noarch.rpm
thn i have written one script rhevmtest.py :
from ovirtsdk.api import API
from ovirtsdk.xml import params
import time
rhevm_uri = "
http://rhevm301.abc.xyz.com:8080/api "
rhevm_username = " admin(a)rhevm301.abc.xyz.com "
rhevm_password = "password"
rhevmAPI = API(url=rhevm_uri, username=rhevm_username,
password=rhevm_password)
print "Connected to RHEVM Successful"
instances = rhevmAPI.vms.list()
I got following errror :
$ python rhevmtest.py
Connected to RHEVM Successful
Traceback (most recent call last):
File "romil_test.py", line 13, in <module>
instances = rhevmAPI.vms.list()
File
"/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/brokers.py",
line 6615, in list
headers={"Filter":contextmanager.get('filter')}).get_vm()
AttributeError: 'str' object has no attribute 'get_vm'
Regards
Romil Gupta
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users