[rancid] SOLVED: Nexus 1000v switch-router

Charles T. Brooks Charles.Brooks at hbcs.org
Wed Jul 6 15:11:01 UTC 2016


Oh, OK, problem between keyboard and chair at this end.

Here's my diff, which correctly incorporates both your changes:

--- /usr/share/perl5/vendor_perl/rancid/nxos.pm 2016-07-06 10:21:50.751459854 -0400
+++ /usr/share/perl5/vendor_perl/rancid/nxos.pm.2016-06-21      2016-07-01 14:35:46.974429589 -0400
@@ -101,5 +101,5 @@
     $E0 = 0;
     $H0 = 0;
-    $DO_SHOW_VLAN = 1;
+    $DO_SHOW_VLAN = 0;

     # add content lines and separators
@@ -373,5 +373,5 @@
        return(1) if /(Invalid input detected|Type help or )/;
        return(1) if (/No token match at /);    # 1000v
-       return(1) if (/\% Invalid command at /); ;# 1000v has no support
+       return(-1) if (/\% Invalid command at /);
        return(-1) if (/\% Permission denied/);
        return(-1) if (/command authorization failed/i);
@@ -661,6 +661,6 @@
        }

-       if (!/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {
-           $DO_SHOW_VLAN = 0;
+       if (/^VTP Operating Mode\s+:\s+(Transparent|Server)/) {
+           $DO_SHOW_VLAN = 1;
        }
        ProcessHistory("COMMENTS","","","!VTP: $_");

I apologize for not figuring this out myself and sending a patch.  Thank you for your patience and support!

I will rebuild the RHEL7 rpm package I've created to include this patch.  If anybody wants the spec file and patch set, let me know at <unspoilt at hbcs.org>.

--Charlie


________________________________________
From: heasley [heas at shrubbery.net]
Sent: Tuesday, July 05, 2016 8:28 PM
To: Charles T. Brooks
Cc: heasley; rancid-discuss at shrubbery.net
Subject: Re: [rancid] Nexus 1000v switch-router

Tue, Jul 05, 2016 at 04:42:17PM +0000, Charles T. Brooks:
> Correction to previous email:  inverting the VTP logic *does* result in the 5Ks having "show vlan" output in their rancid config files.  So, since that's apparently the desired behavior you'll probably want to keep that.

great.

> The other change, though, (return -1 on invalid command) broke all Nexus backups.  You don't want that one!

I think that you misread the diff; i should be to change the -1 to 1.

Index: lib/nxos.pm.in
===================================================================
--- lib/nxos.pm.in      (revision 3413)
+++ lib/nxos.pm.in      (working copy)
@@ -325,7 +325,7 @@
        return(1) if /Line has invalid autocommand /;
        return(1) if /(Invalid input detected|Type help or )/;
        return(1) if (/No token match at /);    # 1000v
-       return(-1) if (/\% Invalid command at /);
+       return(1) if (/\% Invalid command at /);# 1000v has no support
        return(-1) if (/\% Permission denied/);
        return(-1) if (/command authorization failed/i);
       ------------------  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