Changeset 170
- Timestamp:
- Jul 18, 2016, 6:11:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r169 r170 1 1 #!/usr/bin/perl -w 2 2 # 3 # Copyright (C) 2005-2016 Gabriel Moreau .3 # Copyright (C) 2005-2016 Gabriel Moreau 4 4 # 5 5 # $Id$ … … 103 103 J4903A => { type => 1, model => 'HP2824', match => 'J4903A.+?Switch 2824,' }, 104 104 J4110A => { type => 1, model => 'HP8000M', match => 'HP J4110A ProCurve Switch 8000M' }, 105 JE074A => { type => 2, model => 'HP5120-24G', match => 'HP Comware.+?A5120-24G EI '},106 JE069A => { type => 2, model => 'HP5120-48G', match => 'HP Comware.+?A5120-48G EI Switch with 2 Interface Slots' },107 JD377A => { type => 2, model => 'HP5500-24G', match => 'HP Comware.+?A5500-24G EI '},108 JD374A => { type => 2, model => 'HP5500-24F', match => 'HP Comware.+?A5500-24G-SFP EI '},105 JE074A => { type => 2, model => 'HP5120-24G', match => 'HP Comware.+?A5120-24G EI Switch with 2 Interface Slots' }, 106 JE069A => { type => 2, model => 'HP5120-48G', match => 'HP Comware.+?A5120-48G EI Switch with 2 Interface Slots' }, 107 JD377A => { type => 2, model => 'HP5500-24G', match => 'HP Comware.+?A5500-24G EI Switch with 2 Interface Slots' }, 108 JD374A => { type => 2, model => 'HP5500-24F', match => 'HP Comware.+?A5500-24G-SFP EI Switch with 2 Interface Slots' }, 109 109 # BayStack 110 110 BS350T => { type => 1, model => 'BS350T', match => 'BayStack 350T HW' }, … … 293 293 # va rechercher le nom des switchs pour savoir qui est qui 294 294 sub init_switch_names { 295 my $verbose = shift;295 my ($verbose, $verb_description) = @_; 296 296 297 297 printf "%-26s %-25s %s\n",'Switch','Description','Type' if $verbose; … … 324 324 ); 325 325 $sw->{description} = $result->{$OID_NUMBER{sysName}} || $sw->{hostname}; 326 $sw->{model} = get_switch_model( $result->{$OID_NUMBER{sysDescription}}); 326 $sw->{model} = get_switch_model($result->{$OID_NUMBER{sysDescription}}); 327 if ($verb_description) { 328 my $desc = $result->{$OID_NUMBER{sysDescription}}; 329 $desc =~ s/[\n\r]/ /g; 330 print " description: $desc\n" 331 } 327 332 #$sw->{location} = $result->{"1.3.6.1.2.1.1.6.0"} || $sw->{hostname}; 328 333 #$sw->{contact} = $result->{"1.3.6.1.2.1.1.4.0"} || $sw->{hostname}; … … 866 871 867 872 sub cmd_updatedb { 868 my @network = @_; 873 @ARGV = @_; 874 875 my ($verbose, $verb_description); 876 877 GetOptions( 878 'verbose|v' => \$verbose, 879 'verb_description|d' => \$verb_description, 880 ); 881 882 my @network = @ARGV; 869 883 @network = get_list_network() if not @network; 870 884 … … 884 898 my $detected_computer = 0; 885 899 886 init_switch_names('yes' ); #nomme les switchs900 init_switch_names('yes', $verb_description); #nomme les switchs 887 901 888 902 { # Remplis le champs portignore des ports d'inter-connection pour chaque switch
Note: See TracChangeset
for help on using the changeset viewer.