[rancid] Adding JunOS Commands

heasley heas at shrubbery.net
Mon Oct 5 15:39:14 UTC 2015


Mon, Oct 05, 2015 at 03:32:10PM +0000, Baird, Josh:
> Thanks, I copied the following block from /etc/rancid/rancid.types.base to /etc/rancid/rancid.types.conf:
> 
> juniper;script;rancid -t juniper
> juniper;login;jlogin
> juniper;module;junos
> juniper;inloop;junos::inloop
> juniper;command;junos::ShowChassisClocks;show chassis clocks
> juniper;command;junos::ShowChassisEnvironment;show chassis environment
> juniper;command;junos::ShowChassisFirmware;show chassis firmware
> juniper;command;junos::ShowChassisFpcDetail;show chassis fpc detail
> juniper;command;junos::ShowChassisHardware;show chassis hardware detail
> juniper;command;junos::ShowChassisHardware;show chassis hardware models
> juniper;command;junos::ShowChassisRoutingEngine;show chassis routing-engine
> juniper;command;junos::ShowChassisSCB;show chassis scb
> juniper;command;junos::ShowChassisSCB;show chassis sfm detail
> juniper;command;junos::ShowChassisSCB;show chassis ssb
> juniper;command;junos::ShowChassisSCB;show chassis feb detail
> juniper;command;junos::ShowChassisSCB;show chassis feb
> juniper;command;junos::ShowChassisSCB;show chassis cfeb
> juniper;command;junos::ShowChassisAlarms;show chassis alarms
> juniper;command;junos::ShowSystemLicense;show system license
> juniper;command;junos::ShowSystemBootMessages;show system boot-messages
> juniper;command;junos::ShowSystemCoreDumps;show system core-dumps
> juniper;command;junos::ShowVersion;show version detail
> juniper;command;junos::ShowConfiguration;show configuration
> 
> Then, I added the following line to the bottom of /etc/rancid/rancid.types.conf:
> 
> juniper;command;junos::ShowConfigurationOmit;show configuration | display omit
> 
> Does this look correct?  The new command is not being ran.

you must name it something else; the definition in rancid.types.base will
override it - this is intentional; its a clear signal to us that you have
altered things.

and, you must definte ShowConfigurationOmit the function somewhere and
import it. eg

myjuniper;module;junos
myjuniper;module;myjunos
	...
myjuniper;command;myjunos::ShowConfigurationOmit;show configuration | display omit


More information about the Rancid-discuss mailing list