[Open-scap] RE: custom set of objects -> system characteristic

David Niemoller David.Niemoller at g2-inc.com
Tue Nov 10 18:26:37 UTC 2009


You make an interesting point.  Are you saying that all constructors,
destructors and setters should be defined as components of the API, but
oval_object_probe should be specified in the SPI?

-----Original Message-----
From: Peter Vrabec [mailto:pvrabec at redhat.com] 
Sent: Tuesday, November 10, 2009 1:12 PM
To: David Niemoller
Cc: open-scap-list at redhat.com
Subject: Re: custom set of objects -> system characteristic

On Tuesday 10 November 2009 06:16:55 pm David Niemoller wrote:
> Peter, actually oval_syschar_model_get_sysinfo is public: it's
specified
> in src/OVAL/public/oval_agent_api.h.
Ooops, you are right. :)

> I suggest that we create a specification file oval_agent_spi.h that is
> also public but intended primarily for user extensions of the
reference
> implementation.  The specifications in oval_agent_spi.h (and the
> .._spi.h files it includes) will define creators, setters and
> destructors for those structures that are not part of the API
> specification (including 2, 3, and 4).
yeah I agree David. I'm just not sure where is the line between API and
SPI in 
this case. I would expect that everybody will end up in using SPI, so it
will 
basically became API. :) For example oval_object_probe(), is it part of
API or 
SPI? I would say it must be SPI too, since I can't imagine a use case
for this 
function in scope of API. 



> -----Original Message-----
> From: Peter Vrabec [mailto:pvrabec at redhat.com]
> Sent: Tuesday, November 10, 2009 11:34 AM
> To: open-scap-list at redhat.com
> Cc: David Niemoller
> Subject: custom set of objects -> system characteristic
> 
> Hi all,
> 
> I want to return to my discussion with David here. The discussion was
> about
> evaluation of user defined sets of objects and creating system
> characteristic
> from these results. This might essential functionality that we can't
> achieve
> at this moment.
> 
> Why? Because we provide either
> * very high level function oval_syschar_model_probe_objects() that
> evaluates
> all objects one by one, so we can not choose which ones we are
> interested in.
> * or very low level function oval_object_probe() that can evaluate
> single
> objects. Sure we can call it on our favourite objects, but we can not
> create
> system characteristic from these results.
> 
> What are the solutions? When I look at
> oval_syschar_model_probe_objects()
> implementation, I see four functions that are not public:
> 1. oval_syschar_model_get_sysinfo
> 2. oval_syschar_new
> 3. oval_syschar_set_flag
> 4 .oval_syschar_model_add_syschar
> Possible solution might be to have public wrappers for these. That's
my
> first
> idea, but I think there might be more options.
> 
> What would you suggest, David? :)
> 
> Peter.
> 




More information about the Open-scap-list mailing list