On Thu, 29 Mar 2012 11:59:47 +0200
"Michal Filka" <[email protected]> wrote:

> > There should be always some restriction. All /etc/sysconfig is just
> > sysconfigs, but permission to this files can be really various.
> >
> > My idea is that inside of add/edit action you have something ( you
> > have ruby, so various nice ways ) that map file to lense. And then
> > you just pass map to augeas with given lense.
> >
> > So in code of directory agent can be something like
> >
> > lense = case file
> >     when /ifcfg-.*/ then "sysconfig.lense"
> >     when /scrips/ then "bash.lense"
> >     else raise "unsuported File"
> >     end
> >
> I haven't so much experience with ruby, so I thought about C++ like  
> approach ;-)
> 
> class SysconfigAgent < ConfigAgentService::FileService
> 
> as a generic ancestor of agents accessing sysconfig files (so not
> binded to particular file)
> 
> It can use already implemented API.
> 
> Michal

Well,
to describe current state and plans it is slightly different.
We have FileAgent. There should be ( I hope in near future) augeas
mixin.

so then it should look like

Krb5Conf < ConfigAgentService::FileService
  include AugeasParser # detect that agent use augeas for
  parsing/writingback
  augeas_lense = "something.lns" #and define which lense use
end #and in common case this should be everything for file agent


So it is slightly different and more abstract. Of course you can create
class that brings togethere these three lines and name is then enough.

Josef

-- 
Josef Reidinger
Software Engineer Appliance Department

SUSE LINUX, s. r. o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic

[email protected]
SUSE
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to