Welcome, Guest. Please login or register.

Author Topic: Def for Cisco MD S9124 under SAN-OS  (Read 2602 times)

richard.lajaunie

  • Newbie
  • *
  • Posts: 26
    • View Profile
Def for Cisco MD S9124 under SAN-OS
« on: February 23, 2010, 06:58:09 PM »
Hello,
I continue integrating SAN switches, this time is for MDS 9124.

So, first the def. file and at the end a diff style of the modifcation in the libcli-netssh.pl.
This diff was made against the original 1.0.5 libcli-netssh.pl

Remo, i will check the new libcli in 1.0.6 version


# Definition for 1.3.6.1.4.1.9.12.3.1.3.587 created by Defgen 1.5 on 16.Feb 10 18:34 (admin)

# General
SNMPv   2HC
Type   MDS-9124
OS   SAN-OS
Icon   w3rd
Bridge   VLX
Dispro   CDP
Serial   1.3.6.1.2.1.47.1.1.1.1.11.22
Bimage   1.3.6.1.4.1.9.9.195.1.2.1.3.22

# Vlan Specific
VLnams   
VTPdom   
VTPmod   

# Interfaces
IFalia   1.3.6.1.2.1.31.1.1.1.18
IFalix   1.3.6.1.2.1.2.2.1.1
IFvlan   
IFvlix   
IFdupl   
IFduix   
Halfdp   
Fulldp   

# Modules
Modesc   1.3.6.1.2.1.47.1.1.1.1.2
Moclas   1.3.6.1.2.1.47.1.1.1.1.5
Movalu   9
Moslot   1.3.6.1.2.1.47.1.1.1.1.7
Modhw   1.3.6.1.2.1.47.1.1.1.1.8
Modsw   1.3.6.1.2.1.47.1.1.1.1.9
Modfw   1.3.6.1.2.1.47.1.1.1.1.10
Modser   1.3.6.1.2.1.47.1.1.1.1.11
Momodl   1.3.6.1.2.1.47.1.1.1.1.13

# RRD Graphing
CPUutl   
Temp   
MemCPU   
Custom      


Code: [Select]
--- ../download/nedi/inc/libcli-netssh.pl 2009-12-08 18:13:54.000000000 +0100
+++ ../cci/dublin/opt/nedi/inc/libcli-netssh.pl 2010-02-17 12:40:07.000000000 +0100
@@ -56,6 +56,17 @@
 $cmd{'IOS-fv'}{'conf'} = 'show run';
 $cmd{'IOS-fv'}{'page'} = 'terminal pager 0';
 $cmd{'IOS-fv'}{'paus'} = '0.3';
+
+$cmd{'NX-OS'}{'prom'} = '/.+?[#>]\s?$/';
+$cmd{'NX-OS'}{'conf'} = 'show run';
+$cmd{'NX-OS'}{'page'} = 'terminal length 0';
+$cmd{'NX-OS'}{'paus'} = '0.3';
+
+$cmd{'SAN-OS'}{'prom'} = '/.+?[#>]\s?$/';
+$cmd{'SAN-OS'}{'conf'} = 'show run';
+$cmd{'SAN-OS'}{'page'} = 'terminal length 0';
+$cmd{'SAN-OS'}{'paus'} = '0.3';
+
 $cmd{'CatOS'}{'prom'} = '/.+[#>]\s?\(enable\)\s*$/';
 $cmd{'CatOS'}{'conf'} = 'show conf';
 $cmd{'CatOS'}{'page'} = 'set length 0';
@@ -159,8 +170,14 @@
  print "-OK" if $main::opt{d};
  return 0;
  }else{
- print "Te";
- return 1;
+ ($pre, $block) = $_[0]->waitfor('/#\s{0,1}$|\(enable\)\s{0,1}$/');    # between the password entry and the prompt there's some text display so we have to wait the prompt
+ if ($block =~ /#\s{0,1}$|\(enable\)\s{0,1}$/){ # Make sure we are enabled now
+ print "-OK" if $main::opt{d};
+ return 0;
+ }else{
+ print "Te";
+ return 1;
+ }
  }
  }
 }
@@ -426,8 +443,8 @@
  }
  foreach my $line (@run){
  $line =~ s/[\r\n]//g;
- if ($line =~ /^(Running|Current|PIX|FWSM|ASA|Building)\s|^begin$|\*\*\* CORE|<config>/){$go = 1}
- if ($go and $line !~ /--More--|^$/){ # --More-- should only be seen on Cat1900s
+ if ($line =~ /^(version|!Command:|Running|Current|PIX|FWSM|ASA|Building)\s|^begin$|\*\*\* CORE|<config>/){$go = 1}
+ if ($go and $line !~ /--More--|^$/ and $line !~ /^!Time:\s/){ # --More-- should only be seen on Cat1900s
  print "\n CFG:$line" if $main::opt{v};
  push @misc::curcfg,$line;
  }