[Engine-devel] open-ovf

Keith Robertson kroberts at redhat.com
Wed Aug 7 20:29:13 UTC 2013


On 08/07/2013 03:28 AM, Yedidyah Bar David wrote:
> Hi all,
>
> While reviewing a change to allow using an ovf image in hosted-engine, I
> searched and found that there is a project called "open-ovf". It's a
> python library to work with ovf images.
>
> Using it might make sense in hosted engine and image-uploader, perhaps
> other places.
>
> Did we ever discuss using it? Are there any obvious obstacles?
I have never used it though and it doesn't look very active.

What I did in the Image Uploader was generate Python bindings from the 
OVF XSD using GenerateDS.  GenerateDS has a fairly active community and 
a wildly helpful maintainer.

The Python binder is similar to the Java binder (JAXB).  You feed it an 
XML schema and it will generate bindings that enable you to marshal XML 
into objects vice-versa.  There is no need to muck around with LXML and 
ugly looping which is typical for XML parsers. You work with nice clean 
objects.

My recommendation would be to create an oVirt OVF library which is based 
off bindings from GenerateDS.  You implement the methods that make sense 
to oVirt and skip the *very* large subset of the OVF standard that is 
not applicable to oVirt OVF images.  Such a library could be used by the 
Image Uploader and any other components that require OVF processing 
capabilities.

I would be happy to work with you on abstracting the binder away from 
the Image Uploader so that it could be re-used in other components if 
you are interested.

Keith

>
> Best regards,




More information about the Engine-devel mailing list