[rancid] F5 GTM specific commands
Ian Stong
istong at costar.com
Fri Oct 19 13:06:45 UTC 2012
I figured out how to do some of the GTM specific commands and added them to the f5rancid script. The additions below capture the contents of the wideip.conf file and the named.conf file which are GTM specific (versus LTM). If you know of other content that would be valuable to capture from the GTM please let me know.
# This routine parses "cat /config/gtm/wideip.conf"
sub ShowWideip {
my($line) = (0);
print STDERR " In ShowWideip: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
# v9 software license does not have CR at EOF
s/^#-+($prompt.*)/$1/;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
return(1) if /^\s*\^\s*$/;
return(1) if /(Invalid input detected|Type help or )/;
return(-1) if (/command authorization failed/i);
if (!$line++) {
ProcessHistory("LICENSE","","","#\n#/config/gtm/wideip.conf:\n");
}
ProcessHistory("LICENSE","","","# $_") && next;
}
return(0);
}
# This routine parses "cat /var/named/config/named.conf"
sub ShowNamed {
my($line) = (0);
print STDERR " In ShowNamed: $_" if ($debug);
while (<INPUT>) {
tr/\015//d;
# v9 software license does not have CR at EOF
s/^#-+($prompt.*)/$1/;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
return(1) if /^\s*\^\s*$/;
return(1) if /(Invalid input detected|Type help or )/;
return(-1) if (/command authorization failed/i);
if (!$line++) {
ProcessHistory("LICENSE","","","#\n#/var/named/config/named.conf:\n");
}
ProcessHistory("LICENSE","","","# $_") && next;
}
return(0);
}
# added the following two lines to the command history section
{'cat /config/gtm/wideip.conf' => 'ShowWideip'},
{'cat /var/named/config/named.conf' => 'ShowNamed'},
Thanks,
Ian
-----Original Message-----
From: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Ian Stong
Sent: Friday, October 19, 2012 7:43 AM
To: rancid-discuss at shrubbery.net
Subject: [rancid] F5 GTM specific commands
Hi,
I have the basic f5rancid working against an F5 GTM. Does anyone have a customized version or a sample of what they are using specific to the f5 GTM?
Thanks,
Ian Stong
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
More information about the Rancid-discuss
mailing list