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

Juan Hernández jhernand at redhat.com
Tue Sep 15 12:03:30 UTC 2015


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 <module>/
> 
> /    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.



More information about the Users mailing list