[rancid] Adding JunOS Commands
Heasley
heas at shrubbery.net
Sat Nov 7 22:54:56 UTC 2015
> Am 07.11.2015 um 11:16 schrieb Baird, Josh <jbaird at follett.com>:
>
> Ok - I think I am misunderstanding.
>
> My rancid.types.conf:
>
> juniper2;script;rancid -t juniper
juniper2;script;rancid -t juniper2
> juniper2;login;jlogin
> juniper2;module;junos2
Not junos2, unless youve written your own pm. You can also import junos and your own pm so as not to duplicate functions
Otherwise, you havent said what is not working.
> juniper2;inloop;junos2::inloop
> juniper2;command;junos2::ShowChassisClocks;show chassis clocks
> juniper2;command;junos2::ShowChassisEnvironment;show chassis environment
> juniper2;command;junos2::ShowChassisFirmware;show chassis firmware
> juniper2;command;junos2::ShowChassisFpcDetail;show chassis fpc detail
> juniper2;command;junos2::ShowChassisHardware;show chassis hardware detail
> juniper2;command;junos2::ShowChassisHardware;show chassis hardware models
> juniper2;command;junos2::ShowChassisRoutingEngine;show chassis routing-engine
> juniper2;command;junos2::ShowChassisSCB;show chassis scb
> juniper2;command;junos2::ShowChassisSCB;show chassis sfm detail
> juniper2;command;junos2::ShowChassisSCB;show chassis ssb
> juniper2;command;junos2::ShowChassisSCB;show chassis feb detail
> juniper2;command;junos2::ShowChassisSCB;show chassis feb
> juniper2;command;junos2::ShowChassisSCB;show chassis cfeb
> juniper2;command;junos2::ShowChassisAlarms;show chassis alarms
> juniper2;command;junos2::ShowSystemLicense;show system license
> juniper2;command;junos2::ShowSystemBootMessages;show system boot-messages
> juniper2;command;junos2::ShowSystemCoreDumps;show system core-dumps
> juniper2;command;junos2::ShowVersion;show version detail
> juniper2;command;junos2::ShowConfiguration;show configuration
> juniper2;command;junos2::ShowConfigurationOmit;show configuration | display omit
>
> My router.db:
>
> hostname;juniper2;up
>
> What am I missing here? I appreciate you trying to help.
>
> Thanks
>
>> -----Original Message-----
>> From: Baird, Josh
>> Sent: Monday, October 05, 2015 11:32 AM
>> To: 'heasley'
>> Cc: rancid-discuss at shrubbery.net
>> Subject: RE: [rancid] Adding JunOS Commands
>>
>> 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.
>>
>> Thanks,
>>
>> Josh
>>
>>> -----Original Message-----
>>> From: heasley [mailto:heas at shrubbery.net]
>>> Sent: Monday, October 05, 2015 11:23 AM
>>> To: Baird, Josh
>>> Cc: rancid-discuss at shrubbery.net
>>> Subject: Re: [rancid] Adding JunOS Commands
>>>
>>> Mon, Oct 05, 2015 at 03:00:13PM +0000, Baird, Josh:
>>>> Hi,
>>>>
>>>> I use configuration groups in JunOS, so I would like to add 'show
>>> configuration | display inheritance no comments' to the list of
>>> commands that gets executed against Juniper devices. Can someone
>>> point me in the right direction?
>>>
>>> use rancid 3.2, see rancid.type.conf(5).
More information about the Rancid-discuss
mailing list