[rancid] Nexus 1000v switch-router
Charles T. Brooks
Charles.Brooks at hbcs.org
Fri Jul 1 21:55:49 UTC 2016
OK, I'm not sure what's going on, so bear with me.... I made these changes to rancid 3.4.1 on RHEL 7:
[root at git ~]# diff /usr/share/perl5/vendor_perl/rancid/nxos.pm /usr/share/perl5/vendor_perl/rancid/nxos.pm.2016-06-29
103c103
< $DO_SHOW_VLAN = 1;
---
> $DO_SHOW_VLAN = 0;
339c339
< return(-1) if (/\% Invalid command at /); # CTB for Heasley
---
> return(1) if (/\% Invalid command at /);
663,664c663,664
< if (!/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {
< $DO_SHOW_VLAN = 0;
---
> if (/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {
> $DO_SHOW_VLAN = 1;
I then changed the device-type for the Cisco 1000v from "cisco" to "cisco-nx" and let it run the usual hourly scheduled stuff.
Rancid correctly reported the change of device type via email, and /var/log/maillog is all copacetic. However, it does not show any changes in the archive other than the line in router.db, nor have I been mailed any diffs.
I will let it run over the weekend and report back Tuesday.
--Charlie
________________________________________
From: heasley [heas at shrubbery.net]
Sent: Friday, July 01, 2016 12:55 AM
To: Charles T. Brooks
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] Nexus 1000v switch-router
Thu, Jun 30, 2016 at 10:46:52PM +0000, Charles T. Brooks:
> Hmmmm... I'll answer the second question first. No, neither the nexus 5K nor the 1000v has "show vtp status". It's possible that we don't have a feature licensed/loaded that would enable this, I don't really know. The NX-OS version on the 5K I looked at is not the very latest greatest but it's not terribly old, either.
>
Does this restore the show vlan output?
Index: lib/nxos.pm.in
===================================================================
--- lib/nxos.pm.in (revision 3417)
+++ lib/nxos.pm.in (working copy)
@@ -53,7 +53,7 @@
$C0 = 0; # output formatting control
$E0 = 0;
$H0 = 0;
- $DO_SHOW_VLAN = 0;
+ $DO_SHOW_VLAN = 1;
# add content lines and separators
ProcessHistory("","","","!RANCID-CONTENT-TYPE: $devtype\n!\n");
@@ -613,8 +613,8 @@
s/^$1\s{$len}//;
}
- if (/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {
- $DO_SHOW_VLAN = 1;
+ if (!/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {
+ $DO_SHOW_VLAN = 0;
}
ProcessHistory("COMMENTS","","","!VTP: $_");
}
------------------ CONFIDENTIALITY NOTICE ---------------
This message, including any attachments, is for the sole use of the
intended recipient(s) and may contain privileged confidential information
protected by law. Any unauthorized review, use, disclosure or distribution
of this message is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of this message.
------------------ CONFIDENTIALITY NOTICE ---------------
More information about the Rancid-discuss
mailing list