[rancid] FS switches

heasley heas at shrubbery.net
Wed Aug 11 15:03:25 UTC 2021


Wed, Aug 11, 2021 at 01:48:06PM +0200, Bjørn Skobba:
> On Sun, Aug 8, 2021 at 5:45 PM heasley <heas at shrubbery.net> wrote:
> >
> > Sun, Aug 08, 2021 at 02:11:22PM +0200, Bjørn Skobba:
> > > On Thu, May 7, 2020 at 10:54 PM Troy Beisigl <troy at i2bnetworks.com> wrote:
> > > >
> > > > I was trying to do a google search for anyone using rancid with FS switches. It basically came up with nothing. So I thought I would post here. We are looking to add some FS S5500 switches to rancid. Has anyone written a plugin for these switches?
> > >
> > > Hi,
> > > replying to an old message, but just chipping in to see if you got any
> > > further with FS switches and rancid? We just got in a bunch of FS
> > > S3900-48T4S and are looking to add them to rancid.
> >
> > In general, if it smells like an already supported device, that rancid
> > device type might work or at the least be a good starting point.  Try
> > it; if it does not work, lmk and I'll help.
> 
> Thanks! :) I tested a few device types and it seems like I can use
> dnos9. I added this to rancid.types.conf:
> dnos9fs;script;rancid -t dnos9fs
> dnos9fs;login;clogin
> dnos9fs;module;dnos9
> dnos9fs;inloop;dnos9::inloop
> dnos9fs;command;dnos9::ShowVersion;show version
> dnos9fs;command;dnos9::ShowBoot;show boot
> dnos9bc;command;dnos9::DirSlotN;dir
       ^^ typo?  that will not be included in the collect, obviously.
> dnos9fs;command;dnos9::ShowChassis;show system
> dnos9fs;command;dnos9::ShowVLAN;show vlan all
> dnos9fs;command;dnos9::WriteTerm;show running-config

Does their O/S have a name?

> Seems to give me what I need. The output is quite "airy"(as in lots of
> empty lines ), but so is the output from show running-config on the
> actual switch.
> 
> /bjørn

This would trim all the blank lines in the config.  dell nos does not appear
to output blank lines.

diff --git a/lib/dnos9.pm.in b/lib/dnos9.pm.in
index 1bb52dde..b6950202 100644
--- a/lib/dnos9.pm.in
+++ b/lib/dnos9.pm.in
@@ -363,7 +363,8 @@ sub WriteTerm {
 	# skip crap
  	/^Current Configuration/ && next;
 	/^! (version|last configuration|startup-config last)/i && next;
-
+	# skip empty lines at the beginning
+	next if (/^\s*$/);
 
 	# Dog gone Cool matches to process the rest of the config
 	/^tftp-server flash /   && next; # kill any tftp remains



More information about the Rancid-discuss mailing list