mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update IOS with 4948 variant hardware detection (#12685)
* Update IOS with 4948 variant hardware detection * Use entPhysicalModelName if Switch System match * Add test data for 4948e and 4948-10ge variants Signed-off-by: Misha Komarovskiy <zombah@gmail.com> * Fix bracket error Signed-off-by: Misha Komarovskiy <zombah@gmail.com> * Add json test data Signed-off-by: Misha Komarovskiy <zombah@gmail.com>
This commit is contained in:
committed by
GitHub
parent
339227280a
commit
61b4c35ab1
@@ -100,7 +100,7 @@ class Cisco extends OS implements OSDiscovery, ProcessorDiscovery, MempoolsDisco
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($hardware) && ! empty($data[1000]['entPhysicalModelName'])) {
|
||||
if ((empty($hardware) || preg_match('/Switch System/', $hardware)) && ! empty($data[1000]['entPhysicalModelName'])) {
|
||||
$hardware = $data[1000]['entPhysicalModelName'];
|
||||
} elseif (empty($hardware) && ! empty($data[1000]['entPhysicalContainedIn'])) {
|
||||
$hardware = $data[$data[1000]['entPhysicalContainedIn']]['entPhysicalName'];
|
||||
|
Reference in New Issue
Block a user