Skip to content

Commit

Permalink
nxos.pm: add show interface transceiver
Browse files Browse the repository at this point in the history
  • Loading branch information
haussli committed Mar 2, 2018
1 parent 541864e commit 75a825e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rancid/CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
3.99.99
nxos.pm: add show interface transceiver

mrv.pm: add show inventory

ios.pm: filter new "% free" string from dir slot in new ASA code
Expand Down
1 change: 1 addition & 0 deletions rancid/etc/rancid.types.base
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ cisco-nx;command;nxos::ShowModule;show module xbar
#cisco-nx;command;nxos::ShowModule;show module X;add, but wait for show all
#cisco-nx;command;nxos::ShowModule;show module X epld;add, but wait for show all
cisco-nx;command;nxos::ShowInventory;show inventory
cisco-nx;command;nxos::ShowIntTransceiver;show interface transceiver
cisco-nx;command;nxos::ShowVTP;show vtp status;drop?
cisco-nx;command;nxos::ShowVLAN;show vlan
cisco-nx;command;nxos::ShowDebug;show debug
Expand Down
24 changes: 24 additions & 0 deletions rancid/lib/nxos.pm.in
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,30 @@ sub ShowModule {
return(0);
}

# This routine parses "show interface transceiver".
sub ShowIntTransceiver {
my($INPUT, $OUTPUT, $cmd) = @_;
print STDERR " In ShowtTransceiver: $_" if ($debug);

while (<$INPUT>) {
tr/\015//d;
return if (/^\s*\^$/);
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
return(1) if /Line has invalid autocommand /;
return(1) if /(Invalid input detected|Type help or )/;
return(1) if (/\% Invalid command at /);
return(-1) if (/No token match at /); # 1000v
return(-1) if (/\% Permission denied/);
return(-1) if (/command authorization failed/i);

ProcessHistory("COMMENTS","","","!$_");
}
ProcessHistory("COMMENTS","","","!\n");

return(0);
}

# This routine parses "show inventory".
sub ShowInventory {
my($INPUT, $OUTPUT, $cmd) = @_;
Expand Down

0 comments on commit 75a825e

Please sign in to comment.