Discussion:
[rancid] F5 GTM specific commands
Ian Stong
2012-10-19 11:42:56 UTC
Permalink
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
Ian Stong
2012-10-19 13:06:45 UTC
Permalink
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-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Ian Stong
Sent: Friday, October 19, 2012 7:43 AM
To: rancid-***@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

Loading...