Changeset 18
- Timestamp:
- Feb 1, 2008, 9:00:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r17 r18 60 60 my %INTERNAL_PORT_MAP_REV = reverse %INTERNAL_PORT_MAP; 61 61 62 my %SWITCH_CODE = ( 63 J4120A => 'HP J4120A ProCurve Switch 1600M', 64 J4093A => 'HP J4093A ProCurve Switch 2424M', 65 J4813A => 'HP J4813A ProCurve Switch 2524', 66 J4900A => 'HP J4900A ProCurve Switch 2626', 67 J9021A => 'ProCurve J9021A Switch 2810-24G', 68 J4903A => 'HP J4903A ProCurve Switch 2824', 69 J4110A => 'HP J4110A ProCurve Switch 8000M', 70 ); 71 72 my %SWITCH_TYPE = ( 73 J4120A => 'HP1600M ', 74 J4093A => 'HP2424M ', 75 J4813A => 'HP2524 ', 76 J4900A => 'HP2626 ', 77 J9021A => 'HP2810-24', 78 J4903A => 'HP2824 ', 79 J4110A => 'HP8000M ', 80 ); 81 82 my %OID_NUMBER = ( 83 sysDescr => '1.3.6.1.2.1.1.1.0', 84 sysName => '1.3.6.1.2.1.1.5.0', 85 sysContact => '1.3.6.1.2.1.1.4.0', 86 sysLocation => '1.3.6.1.2.1.1.6.0', 87 ) 62 88 63 89 ################ … … 187 213 188 214 my $result = $session->get_request( 189 -varbindlist => ['1.3.6.1.2.1.1.5.0'] 215 -varbindlist => [ 216 $OID_NUMBER{sysDescr}, 217 $OID_NUMBER{sysName}, 218 $OID_NUMBER{sysContact}, 219 $OID_NUMBER{sysLocation}, 220 ] 190 221 ); 191 $sw->{description} = $result->{ "1.3.6.1.2.1.1.5.0"} || $sw->{hostname};222 $sw->{description} = $result->{$OID_NUMBER{sysName}} || $sw->{hostname}; 192 223 #$sw->{location} = $result->{"1.3.6.1.2.1.1.6.0"} || $sw->{hostname}; 193 224 #$sw->{contact} = $result->{"1.3.6.1.2.1.1.4.0"} || $sw->{hostname};
Note: See TracChangeset
for help on using the changeset viewer.