Changeset 309
- Timestamp:
- Oct 19, 2017, 9:52:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r308 r309 356 356 next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{match}/ms; # option xms break search, why ? 357 357 358 return $SWITCH_KIND{$sw_kind}->{ model};358 return $SWITCH_KIND{$sw_kind}->{'model'}; 359 359 } 360 360 … … 370 370 for my $sw_kind (keys %SWITCH_KIND) { 371 371 next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{match}/ms; # option xms break search, why ? 372 last if not exists $SWITCH_KIND{$sw_kind}->{ revision};373 374 my ($revision) = $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{ revision}/xms;372 last if not exists $SWITCH_KIND{$sw_kind}->{'revision'}; 373 374 my ($revision) = $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{'revision'}/xms; 375 375 return $revision || 'unknow'; 376 376 } … … 411 411 412 412 $sw->{'description'} = $result->{$OID_NUMBER{'sysName'}} || $sw->{'hostname'}; 413 $sw->{ model} = get_switch_model($result->{$OID_NUMBER{'sysDescription'}});414 $sw->{ revision} = get_switch_revision($result->{$OID_NUMBER{'sysDescription'}});415 printf "%-26s 0--------->>>> %-25s %s\n", $sw->{'hostname'}, $sw->{'description'}, $sw->{ model}.'('.$sw->{revision}.')' if $verbose;413 $sw->{'model'} = get_switch_model($result->{$OID_NUMBER{'sysDescription'}}); 414 $sw->{'revision'} = get_switch_revision($result->{$OID_NUMBER{'sysDescription'}}); 415 printf "%-26s 0--------->>>> %-25s %s\n", $sw->{'hostname'}, $sw->{'description'}, $sw->{'model'}.'('.$sw->{'revision'}.')' if $verbose; 416 416 417 417 if ($verb_description) { … … 890 890 $checksum_data .= join ':', 891 891 $switch_db{$sw_name}->{'description'}, 892 $switch_db{$sw_name}->{ model},892 $switch_db{$sw_name}->{'model'}, 893 893 $switch_db{$sw_name}->{'hostname'}, 894 894 "\n"; … … 2954 2954 2955 2955 my $swname = $sw; 2956 $swname .= q{\n-\n} . "$db_switch_global{$sw}->{ model}" if exists $db_switch_global{$sw} and exists $db_switch_global{$sw}->{model};2956 $swname .= q{\n-\n} . "$db_switch_global{$sw}->{'model'}" if exists $db_switch_global{$sw} and exists $db_switch_global{$sw}->{'model'}; 2957 2957 print "\"$sw\" [label=\"$swname\", color=black, fillcolor=palegreen, shape=rect, style=filled];\n"; 2958 2958 print "\"location$b-$l\" -> \"$sw\" [len=2, color=firebrick, arrowtail=dot];\n";
Note: See TracChangeset
for help on using the changeset viewer.