[augeas-devel] [Matahari] Fwd: Re: Augeas-based configuration agent
David Lutterkort
lutter at redhat.com
Thu May 12 16:17:15 UTC 2011
On Thu, 2011-05-12 at 14:14 +0200, Andrew Beekhof wrote:
> On Thu, May 12, 2011 at 11:13 AM, Radek Novacek <rnovacek at redhat.com> wrote:
> > Forwarded from augeas-devel. I think the suggested API could work for us quite
> > well. Our config agent will be reduced to only one method "run" which will
> > take string (commands separated by \n) or list of strings (augeas commands)
> > and some flags (e.g. bool for suggested AUG_RUN_CONTINUE). This method will
> > return error code and content of "out" file (maybe parsed somehow).
> >
> > Do you agree with this proposal?
>
> I think its pretty close.
>
> Though we may want to keep frun but alter it slightly to look like:
>
> int aug_run_url(augeas *aug,
> char *url, FILE *out,
> unsigned int flags)
>
> and support at least file://, http://, ftp://
>
> Not so interesting for DBus, but highly useful in the cloud.
I don't like the idea of pulling libcurl or similar into augeas - that
functionality is something users of augeas can easily implement
themselves.
> Also, I think we want a dedicated "getter" accessor.
> Something like:
> aug_get(augeas *aug, char *path, unsigned int flags).
There's two calls in the Augeas API to interrogate the tree: aug_match
to find all nodes that match a certain path expression, and aug_get to
get the value associated with an individual node.
David
More information about the augeas-devel
mailing list