Welcome, Guest. Please login or register.

Author Topic: Def for DS-HP-FC-K9 (AKA Cisco MDS 9124e Fabric Switch for HP c-Class BladeSys)  (Read 3851 times)

richard.lajaunie

  • Newbie
  • *
  • Posts: 26
    • View Profile
Hello,
Recently, our admins transmit the control all the fiber switch we have,
and i ask to my self if Nedi could do the job? Of course it does, with some little modifications
So this is the first part of the integration

First de Def file for the MDS 9124e under Nexus OS
Second ,at the end, a diff style of the modifcation in the libcli-netssh.pl



# Definition for 1.3.6.1.4.1.9.12.3.1.3.606 created by Defgen 1.5 on 12.Feb 10 12:18 (admin)

# General
SNMPv   2HC
Type   DS-HP-FC-K9
OS   NX-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      



--- ../download/nedi/inc/libcli-netssh.pl   2009-12-08 18:13:54.000000000 +0100
+++ ../cci/dublin/opt/nedi/inc/libcli-netssh.pl   2010-02-16 12:21:24.000000000 +0100
@@ -56,6 +56,12 @@
 $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{'CatOS'}{'prom'} = '/.+[#>]\s?\(enable\)\s*$/';
 $cmd{'CatOS'}{'conf'} = 'show conf';
 $cmd{'CatOS'}{'page'} = 'set length 0';
@@ -159,8 +165,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 +438,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 =~ /^(!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;
       }


Hope this is usefull an din the way of Nedi
Richard

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2701
    • View Profile
    • NeDi
Yepp, it's indeed. Except for that I'm rewriting the CLI lib right now. Would be great, if you can recheck with the new one...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo