From: Jason L. <JL...@me...> - 2004-03-12 21:58:00
|
It is my desire to have a commandline and/or scripting API that can acces= s configuration data without going through WBEM/CIM layers. The WBEM laye= rs will use this very same API to do anything with the configuration file= s. I want to this API to be well documented too. I already have something= like this for Samba: NAME Config4GNU::Samba - Perl interface for accessing/modifying Samba c= on- figuration information. SYNOPSIS use Config4GNU::Samba; my $samba =3D Config4GNU::Samba->new('/etc/samba/smb.conf'); # change the WINS server setting my $global_section =3D $samba->getSection('global'); my $oldvalue =3D $global_section->getPropertyValue('wins server'= ); $global_section->setPropertyValue('wins server', '192.168.0.10')= ; # add a new share my $tmp_share =3D $samba->newSection('tmp'); $tmp_share->setPropertyValue('path', '/tmp'); $tmp_share->setPropertyValue('read only', 'false'); # delete a share $samba->deleteSection('tmp'); # write the changes back to the file $samba->save; I know this code only uses native Perl, so it should run everywhere Perl = does. The modules for this code can be found in the config4gnu CVS reposi= tory as "config4gnu-wbem." I do not know how easy it is to install withou= t OpenWBEM, though. If you want to try this code out, let me know (throu= gh gentle nagging) and I will try to package it up in a way that you can = install it without OpenWBEM. Jason >>> csa...@ui... 3/8/04 4:20:07 AM >>> Ups, I forgot to reply to the list. -Richard ---------- Weitergeleitete Nachricht ---------- Subject: Re: [Config4gnu-developer] New Architecture+WBEM Stuff Date: Montag 08 M=E4rz 2004 07:12 From: Richard Spindler <csa...@ui...> To: Justin Yackoski <ju...@sk...> Zitat von Justin Yackoski <ju...@sk...>: > On 04 Mar 2004 11:51:29 +0100 > > Richard Spindler <csa...@ui...> wrote: > > Hi, > > I have I little Question concerning the future Direction of CFG. > > > > > > Will it be possible with the new architecture, to have full local > > access to the CFG System without the need to run a > > WBEM/CIM/Whatever-Server? > > Do you mean using the fancy GUI or do you just mean being able to have = some > sort of interface to CFG (an API or script-accessible way to get at ALL= the > data)? If you're referring to the first case, no. If its second case, > well, script-accessiblity and an API will satisfy all my needs. > under the proposed method our data will be natively stored in WBEM/CIM > format, so you'll either need to speak that or we may have an alternate > XML-based format, but I don't know how exactly we'd describe our XML > format... right now we use our type definitions, Jason how would we do = this > in the new model? -Richard ------------------------------------------------------- ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=3Dclick _______________________________________________ Config4gnu-developer mailing list Con...@li...=20 https://lists.sourceforge.net/lists/listinfo/config4gnu-developer=20 |