Thanks all. I think we will take the API route similar to what Josh suggested.
Thanks, Wayman On Tue, Nov 16, 2010 at 7:37 AM, <[email protected]> wrote: > Here's a script I have that grabs the raw config file contents... > (You may want to remove the "org" stuff if you only have 1 org) > > I also have that grabs the custom info for a given system. > Let me know if you would like that one as well. > > > > ------------------------------------------------------------------------------------------------------------------ > #!/usr/bin/perl > use Frontier::Client; > > my $orgname = $ARGV[0]; > if (!$orgname) > { > print "Command Syntax: spacewalk-get-cfg-file.pl <org_name> > <config_chan> <file_path>\n"; > exit; > } > > my $cfgchan = $ARGV[1]; > if (!$cfgchan) > { > print "Command Syntax: spacewalk-get-cfg-file.pl $orgname <config_chan> > <file_path>\n"; > exit; > } > > my $file = $ARGV[2]; > if (!$file) > { > print "Command Syntax: spacewalk-get-cfg-file.pl $orgname $cfgchan > <file_path>\n"; > exit; > } > > > my $HOST = 'localhost'; > my $user = "$orgname-apiuser"; > my $pass = 'YOUR_PASS'; > > my $client = new Frontier::Client(url => "http://$HOST/rpc/api"); > my $session = $client->call('auth.login',$user, $pass); > > > @files = ( "$file" ); > > my $filedetails = $client->call('configchannel.lookupFileInfo', $session, > $cfgchan, \...@files); > foreach my $filedetail (@$filedetails) { > print $filedetail->{'contents'}."\n"; > } > > > > $client->call('auth.logout', $session); > > ------------------------------------------------------------------------------------------------------------------- > > > > > ________________________________________ > From: [email protected] [[email protected]] > On Behalf Of Colin Coe [[email protected]] > Sent: Monday, November 15, 2010 7:03 PM > To: [email protected] > Subject: Re: [Spacewalk-list] exporting configuration channel data > > On Tue, Nov 16, 2010 at 6:48 AM, Jan Pazdziora <[email protected]> > wrote: > > On Mon, Nov 15, 2010 at 04:59:43PM -0500, wayne smith wrote: > >> Hello Spacewalk-list, > >> > >> I am a spacewalk user, and I would like to know if there is a way to > export > >> configuration channel data in the same manner software channel data is > >> exported? > > > > No, exporter does not support that. > > > > You might want to check the APIs to see if any backup / restore > > functionality can be built around it. > > > > -- > > Jan Pazdziora > > Principal Software Engineer, Satellite Engineering, Red Hat > > > > My immediate though when I saw this post was how would (potential) > macros in the config files be handled as these introduce 'uniqueness' > in the files. > > Maybe a new API call in the configchannel namespace called > 'getRawFile(String sessionKey, String chanLabel, String fileName)' > returning a structure similar to 'server.config.lookupFileInfo' but > the 'contents' would be raw? > > CC > > -- > RHCE#805007969328369 > > _______________________________________________ > Spacewalk-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/spacewalk-list > > _______________________________________________ > Spacewalk-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/spacewalk-list >
_______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
