[ovirt-users] Running an ovirt phyton scrit on a newly RHEL7 installed system

2015-09-15 Thread Jean-Pierre Ribeauville
Hi,

I'm trying to retrieve datacenters clusters hosts and vms  by using ovirt 
python script needing some imports :

import sys
from ovirtsdk.api import API
from ovirtsdk.xml import params
from threading import Thread
import time
import logging


Then I  got following error :


Ø  python test2.py
Traceback (most recent call last):
  File "test2.py", line 32, in 
from ovirtsdk.api import API
ImportError: No module named ovirtsdk.api

As I run it on a "fresh install" rhel7 server ( python has been added), I'm 
wondering what's the minimum packages list I've to install
on this machine to be able to run this script ?  ( I run it correctly on the 
system where the ovirt engine is installed)

Thanks.

Regards,



J.P. Ribeauville


P: +33.(0).1.47.17.27.87


Puteaux 3 Etage 5  Bureau 4

jpribeauvi...@axway.com
http://www.axway.com



P Pensez à l'environnement avant d'imprimer.



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Running an ovirt phyton scrit on a newly RHEL7 installed system

2015-09-15 Thread Juan Hernández
On 09/15/2015 11:02 AM, Jean-Pierre Ribeauville wrote:
> Hi,
> 
>  
> 
> I’m trying to retrieve datacenters clusters hosts and vms  by using
> ovirt python script needing some imports :
> 
>  
> 
> /import sys/
> 
> /from ovirtsdk.api import API/
> 
> /from ovirtsdk.xml import params/
> 
> /from threading import Thread/
> 
> /import time/
> 
> /import logging/
> 
>  
> 
>  
> 
> Then I  got following error :
> 
>  
> 
> Ø  python test2.py
> 
> /Traceback (most recent call last):/
> 
> /  File "test2.py", line 32, in /
> 
> /from ovirtsdk.api import API/
> 
> /ImportError: No module named ovirtsdk.api/
> 
>  
> 
> As I run it on a “fresh install” rhel7 server ( python has been added),
> I’m wondering what’s the minimum packages list I’ve to install
> on this machine to be able to run this script ?  ( I run it correctly on
> the system where the ovirt engine is installed)
> 

As you are using a fresh install of RHEL 7 you won't probably have the
oVirt repositories configured yet, so you will need to configure them:

  # yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release35.rpm

The you need to install the ovirt-engine-sdk-python package:

  # yum install ovirt-engine-sdk-python

-- 
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] Running an ovirt phyton scrit on a newly RHEL7 installed system

2015-09-15 Thread Jean-Pierre Ribeauville
Hi,

You are totally right.

It's O.K. now.

Thanks for help.

J.P. Ribeauville

-Message d'origine-
De : Juan Hernández [mailto:jhern...@redhat.com] 
Envoyé : mardi 15 septembre 2015 14:04
À : Jean-Pierre Ribeauville; users@ovirt.org
Objet : Re: [ovirt-users] Running an ovirt phyton scrit on a newly RHEL7 
installed system

On 09/15/2015 11:02 AM, Jean-Pierre Ribeauville wrote:
> Hi,
> 
>  
> 
> I'm trying to retrieve datacenters clusters hosts and vms  by using 
> ovirt python script needing some imports :
> 
>  
> 
> /import sys/
> 
> /from ovirtsdk.api import API/
> 
> /from ovirtsdk.xml import params/
> 
> /from threading import Thread/
> 
> /import time/
> 
> /import logging/
> 
>  
> 
>  
> 
> Then I  got following error :
> 
>  
> 
> Ø  python test2.py
> 
> /Traceback (most recent call last):/
> 
> /  File "test2.py", line 32, in /
> 
> /from ovirtsdk.api import API/
> 
> /ImportError: No module named ovirtsdk.api/
> 
>  
> 
> As I run it on a "fresh install" rhel7 server ( python has been 
> added), I'm wondering what's the minimum packages list I've to install 
> on this machine to be able to run this script ?  ( I run it correctly 
> on the system where the ovirt engine is installed)
> 

As you are using a fresh install of RHEL 7 you won't probably have the oVirt 
repositories configured yet, so you will need to configure them:

  # yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release35.rpm

The you need to install the ovirt-engine-sdk-python package:

  # yum install ovirt-engine-sdk-python

--
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