[rancid] Re: Menu-only and/or TFTP-only equipment

john heasley heas at shrubbery.net
Fri Aug 6 00:17:56 UTC 2010

Wed, Aug 04, 2010 at 06:20:39PM +0200, "Peter Valdemar M?rch (Lists)":
> I'm evaluating Rancid's suitability for our purposes and have a few 
> questions:
> Some equipment (e.g. some HP equipment as far as I remember and 
> definitely some Nortel/BayStack equipment) only supports ncurses menus 
> where one has to send arrow-up, arrow-down, "Enter" etc and sift through 
> the ncurses output.
> We're ok to expand RANCID's functionality (and send patches back! :-) 
> but we need menu navigation to be possible. Are there any of the 
> existing equipment types that succesfully navigate a menu?

the screen manipulation stuff really creates some headaches.  the hp
procurves are a good example of that and is the reason for the hpuifilter
program that attempts to strip that junk.  hpuifilter MIGHT would work
for your device; it used for a few besides the procurves.

> It doesn't look to me like RANCID's split into a Tcl/expect based *login 
> and a perl based *rancid is well suited for scripting this sort of 
> interaction. (In fact hpuifilter seems to have been written exactly to 
> avoid this nastiness)

nothing prevents the perl side from calling the expect side multiple
times, though that takes wall-clock time.

> Also, we have some equipment that only supports getting the 
> configuration via a TFTP server:
> * Telnet to equipment
> * Navigate through menus to send config to TFTP server
> * exit telnet
> * Retreive info via TFTP
> Has anybody succesfully needed/done that?

no, but its not beyond possibility.  maybe add a tftpboot base dir
variable to rancid.conf, use a subdir of that to receive files
($tftp/rancid/$hostconf), parse the config from there.  or $tftp/rancid/
$rancidgroup/$hostconf to avoid locking/contention.

the perl side could recurse on itself; ie: if the -f option is not
supplied, collect the config to the tftp dir, just proceed as the
other rancid-perl scripts do - process the config.

there is certainly a degree of ugliness to this.

More information about the Rancid-discuss mailing list