Re: [ovirt-users] Ovirt Python library is getting error

2014-07-02 Thread Shahar Havivi
On 02.07.14 10:18, Shanil S wrote:
 Hi Shahar,
Hi,
I just tested your code and it works fine for me.
You can try first to put the url in a web browser and you will be prompt for
username and password.
Try that first and see if all the parameters are set correctly.

Also adding Juan maybe he have other idea.

Shahar.
 
 I have downloaded the ovirt Python library from
 http://www.ovirt.org/Python-sdk and trying to list out the vms but i am
 getting the following error
 
 ---
  File build/bdist.linux-x86_64/egg/ovirtsdk/api.py, line 145, in __init__
   File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
 line 118, in request
   File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
 line 144, in __doRequest
   File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
 line 157, in __xml2py
 ovirtsdk.infrastructure.errors.FormatError: [ERROR]::Server reply is in
 inappropriate format.
 --
 
 The following code is used for displaying the vms
 
 api = API('http://ip:443/api', 'usernamel','password')
 
 vms1 = api.vms.list()
 print vms1
 
 Could you please check it if any issues with it ? Also is it necessary to
 give secure connection ?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Ovirt Python library is getting error

2014-07-02 Thread Juan Hernandez
On 07/02/2014 10:37 AM, Shahar Havivi wrote:
 On 02.07.14 10:18, Shanil S wrote:
 Hi Shahar,
 Hi,
 I just tested your code and it works fine for me.
 You can try first to put the url in a web browser and you will be prompt for
 username and password.
 Try that first and see if all the parameters are set correctly.
 
 Also adding Juan maybe he have other idea.
 
 Shahar.

Most probably you need to use HTTPS:

  api = API('https://ip:443/api', 'usernamel','password')

Note that the protocol is https, not http.

Also, if you still have problems, try to put the SDK in debug mode, so
we can see what is the actual exchange of data with the server:

  api = API('https://ip:443/api', 'usernamel','password', debug=True)


 I have downloaded the ovirt Python library from
 http://www.ovirt.org/Python-sdk and trying to list out the vms but i am
 getting the following error

 ---
  File build/bdist.linux-x86_64/egg/ovirtsdk/api.py, line 145, in __init__
   File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
 line 118, in request
   File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
 line 144, in __doRequest
   File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
 line 157, in __xml2py
 ovirtsdk.infrastructure.errors.FormatError: [ERROR]::Server reply is in
 inappropriate format.
 --

 The following code is used for displaying the vms

 api = API('http://ip:443/api', 'usernamel','password')

 vms1 = api.vms.list()
 print vms1

 Could you please check it if any issues with it ? Also is it necessary to
 give secure connection ?


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Ovirt Python library is getting error

2014-07-02 Thread Alon Bar-Lev


- Original Message -
 From: Juan Hernandez jhern...@redhat.com
 To: Shahar Havivi shah...@redhat.com, Shanil S xielessha...@gmail.com
 Cc: users@ovirt.org
 Sent: Wednesday, July 2, 2014 11:43:29 AM
 Subject: Re: [ovirt-users] Ovirt Python library is getting error
 
 On 07/02/2014 10:37 AM, Shahar Havivi wrote:
  On 02.07.14 10:18, Shanil S wrote:
  Hi Shahar,
  Hi,
  I just tested your code and it works fine for me.
  You can try first to put the url in a web browser and you will be prompt
  for
  username and password.
  Try that first and see if all the parameters are set correctly.
  
  Also adding Juan maybe he have other idea.
  
  Shahar.
 
 Most probably you need to use HTTPS:
 
   api = API('https://ip:443/api', 'usernamel','password')
 
 Note that the protocol is https, not http.
 
 Also, if you still have problems, try to put the SDK in debug mode, so
 we can see what is the actual exchange of data with the server:
 
   api = API('https://ip:443/api', 'usernamel','password', debug=True)

Hi,

Please use the new URI of api (since 3.4):

https://host/ovirt-engine/api

All ovirt-engine resources are under /ovirt-engine now.

Thanks!

 
 
  I have downloaded the ovirt Python library from
  http://www.ovirt.org/Python-sdk and trying to list out the vms but i am
  getting the following error
 
  ---
   File build/bdist.linux-x86_64/egg/ovirtsdk/api.py, line 145, in
   __init__
File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
  line 118, in request
File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
  line 144, in __doRequest
File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
  line 157, in __xml2py
  ovirtsdk.infrastructure.errors.FormatError: [ERROR]::Server reply is in
  inappropriate format.
  --
 
  The following code is used for displaying the vms
 
  api = API('http://ip:443/api', 'usernamel','password')
 
  vms1 = api.vms.list()
  print vms1
 
  Could you please check it if any issues with it ? Also is it necessary to
  give secure connection ?
 
 
 --
 Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
 3ºD, 28016 Madrid, Spain
 Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[ovirt-users] Ovirt Python library is getting error

2014-07-02 Thread Shanil S
Hi Shahar,

I have downloaded the ovirt Python library from
http://www.ovirt.org/Python-sdk and trying to list out the vms but i am
getting the following error

---
 File build/bdist.linux-x86_64/egg/ovirtsdk/api.py, line 145, in __init__
  File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
line 118, in request
  File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
line 144, in __doRequest
  File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py,
line 157, in __xml2py
ovirtsdk.infrastructure.errors.FormatError: [ERROR]::Server reply is in
inappropriate format.
--

The following code is used for displaying the vms

api = API('http://ip:443/api', 'usernamel','password')

vms1 = api.vms.list()
print vms1

Could you please check it if any issues with it ? Also is it necessary to
give secure connection ?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Ovirt Python library is getting error

2014-07-02 Thread Alon Bar-Lev


- Original Message -
 From: Shanil S xielessha...@gmail.com
 To: Shahar Havivi shah...@redhat.com, users@ovirt.org
 Sent: Wednesday, July 2, 2014 7:48:41 AM
 Subject: [ovirt-users] Ovirt Python library is getting error
 
 Hi Shahar,
 
 I have downloaded the ovirt Python library from
 http://www.ovirt.org/Python-sdk and trying to list out the vms but i am
 getting the following error
 
 ---
 File build/bdist.linux-x86_64/egg/ovirtsdk/api.py, line 145, in __init__
 File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py, line
 118, in request
 File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py, line
 144, in __doRequest
 File build/bdist.linux-x86_64/egg/ovirtsdk/infrastructure/proxy.py, line
 157, in __xml2py
 ovirtsdk.infrastructure.errors.FormatError: [ERROR]::Server reply is in
 inappropriate format.
 --
 
 The following code is used for displaying the vms
 
 api = API('http://ip:443/api', 'usernamel','password')

s/http/https/

 
 vms1 = api.vms.list()
 print vms1
 
 Could you please check it if any issues with it ? Also is it necessary to
 give secure connection ?
 
 
 
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users