[Open-scap] Importing openscap library in Python

Peter Vrabec pvrabec at redhat.com
Tue Dec 15 14:34:39 UTC 2009


On Tuesday 15 December 2009 02:44:51 pm David Niemoller wrote:
> Peter, As I've been going through the XCCDF code and extending it I have
> adopted the oscap_import/export from terminology as well (Starting from
> Lukas' excellent specification).  I'm all for it.  I'll go ahead and
> make the changes to the Oval API to be included in my next patch update.
thank you David

> -----Original Message-----
> From: Peter Vrabec [mailto:pvrabec at redhat.com]
> Sent: Tuesday, December 15, 2009 05:23
> To: open-scap-list at redhat.com
> Cc: Ed; David Niemoller
> Subject: Re: [Open-scap] Importing openscap library in Python
> 
> On Friday 11 December 2009 09:47:14 pm Ed wrote:
> > Thanks Peter. Just checked it out. Works like a charm. :-)
> >
> > ########  Few quick implementation questions ##########
> >
> > I'm no swig genius, but I noticed I can't access many of the data
> 
> types
> 
> >  that are represented in the C example (like oval_import_source). It
> 
> looks
> 
> >  like these are hidden. (And accessed from the common 'oscap'
> 
> functions??)
> 
> >  Is that correct?
> 
> fixed.
> 
> > I'm able to import an oval file with "oscap_import_source_new(file,
> > encoding)". Is this this intention, or should there be an
> > oval_import_source_new function as well?
> >
> > If going through oscap_import_source object is correct, how would I
> 
> get
> 
> >  from an "oscap_import_source" type to an "oval_import_source" type?
> 
> yeah, sorry for this confusion. We use oscap_import types/functions for
> CPE/CVE/.. and oval_import types/functions for OVAL. These types should
> be
> same, so if you use oscap variant with OVAL it should work fine.
> 
> David, we should make this consistent. There are two ways:
> 1. common oscap import/export functions/types
> 2. specific import/export functions/types per specification
> 
> What do you think? I would say that types and functions are so generic
> that it
> shouldn't make any harm if we use common variant. :)
> 
> Peter.
> 
> > Thanks for all the hard work and help thus far!!
> >
> > ~Ed
> >
> > On Fri, Dec 11, 2009 at 11:42 AM, Peter Vrabec <pvrabec at redhat.com>
> 
> wrote:
> > > Hi Ed
> > >
> > > On Thursday 10 December 2009 10:34:09 pm Ed wrote:
> > > > Although the Python bindings are compiling correctly, when
> 
> importing
> 
> > > there
> > >
> > > > is an error of:
> > > >
> > > > "undefined: oval_object_probe"
> > > >
> > > > Currently there are 3 you need to ignore by adding the following
> 
> lines
> 
> > > > openscap.i (under ifdef WANT_OVAL):
> > > >
> > > > %ignore oval_object_probe;
> > > >
> > > > %ignore oval_definition_model_set_locked;
> > > >
> > > > %ignore oval_syschar_model_get_sysdata;
> > > >
> > > >
> > > > Then it seems to import. (I also use the "--enable-xccdf=no" when
> > > > configuring... since the api is still in development).
> > >
> > > hey this issue is fixed, check git repo
> > >
> > > > I like the example tests provided in C, has anyone done any oval
> > > > implementation examples in python?
> > >
> > > I'm planning to write some but I need to finish some testing first.
> :
> :)
> :
> > > > ~Ed
> > >
> > > Peter.
> 




More information about the Open-scap-list mailing list