[Users] Fwd: issues regarding rhevm

Michael Pasternak mpastern at redhat.com
Tue Sep 11 13:29:15 UTC 2012


Hi,

I believe that issue you're experience caused by connecting to ssl
secured site using http protocol [1], please change protocol to 'https'
in rhevm_uri and use ssl port accordingly,

[1] in this mode, server reply with empty string instead of actual data.
(next version of sdk will not allow connecting to ssl site using http)


> 
> 
> 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
> <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 at rhevm301.abc.xyz.com
> <mailto:admin at 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
> 
> 
> 
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D



More information about the Users mailing list