[rancid] Adding JunOS Commands

Baird, Josh jbaird at follett.com
Sun Nov 8 19:19:25 UTC 2015


Ok - getting much further now.  But, it seems that my new command is failing to run.  I tried adding other commands as well:

switch.something.com: missed cmd(s): show configuration | display omit

I'm able to use jlogin to login to the device and manually execute the command(s) with no problem.

Thanks,

Josh
________________________________________
From: Heasley [heas at shrubbery.net]
Sent: Saturday, November 07, 2015 4:54 PM
To: Baird, Josh
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] Adding JunOS Commands

> 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