Add Serialnumber for some Dell ForceTen devices (#12960)

* Add Serialnumber for some Dell Force devices

* Also in entity-physical

* fix style

* fix style

* add testdata
This commit is contained in:
Kevin Zink
2021-06-18 04:16:09 +02:00
committed by GitHub
parent d0d8a9024b
commit 4ec609bccf
4 changed files with 21314 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ modules:
- Dell-Vendor-MIB::productIdentificationVersion.0
- DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitCodeVersion.1
serial:
- Dell-Vendor-MIB::productIdentificationServiceTag.1
- Dell-Vendor-MIB::productIdentificationSerialNumber.0
- DELL-NETWORKING-CHASSIS-MIB::dellNetStackUnitSerialNumber.1
processors:

View File

@@ -117,6 +117,7 @@ if ($device['os'] == 'saf-cfm') {
}
}
}
if ($device['os'] == 'ios' or $device['os'] == 'iosxe') {
$tables = [
['num_oid' => '.1.3.6.1.4.1.9.9.661.1.3.1.1.1.', 'oid' => 'c3gImsi', 'state_name' => 'c3gImsi', 'mib' => 'CISCO-WAN-3G-MIB', 'descr' => 'IMSI', 'entPhysicalIndex' => '9999'],
@@ -250,6 +251,10 @@ foreach ($entity_array as $entPhysicalIndex => $entry) {
$entPhysicalAssetID = array_key_exists('entPhysicalAssetID', $entry) ? $entry['entPhysicalAssetID'] : '';
}//end if
if ($device['os'] == 'dnos' && $entPhysicalSerialNum == 'NA' && preg_match('/Unit/', $entPhysicalName)) {
$entPhysicalSerialNum = snmp_get($device, '.1.3.6.1.4.1.674.10895.3000.1.2.100.8.1.4.' . preg_replace('/Unit (\d+)/', '$1', $entPhysicalName), '-Oqv', '');
}
if (isset($entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'])) {
$ifIndex = $entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'];
if (! strpos($ifIndex, 'fIndex') || $ifIndex == '') {

15540
tests/data/dnos_z9100-on.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff