This commit is contained in:
crcro
2016-09-24 16:24:07 +03:00
parent 97b632e915
commit 97e9a7f692
10 changed files with 36 additions and 65 deletions

View File

@@ -10,8 +10,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (stristr($sysDescr, 'BladeCenter Advanced Management Module')) {
$os = 'ibm-amm';
}
if (str_contains($sysDescr, 'BladeCenter Advanced Management Module')) {
$os = 'ibm-amm';
}

View File

@@ -10,8 +10,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (strstr($sysObjectId, '1.3.6.1.4.1.2.3.51.3')) {
$os = 'ibm-imm';
}
if (starts_with($sysObjectId, '1.3.6.1.4.1.2.3.51.3')) {
$os = 'ibm-imm';
}

View File

@@ -10,8 +10,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (stristr($sysDescr, 'IBM Networking Operating System') || stristr($sysDescr, 'IBM Flex System Fabric') || stristr($sysDescr, 'IBM Networking OS')) {
$os = 'ibmnos';
}
if (str_contains($sysDescr, array('IBM Networking Operating System', 'IBM Flex System Fabric', 'IBM Networking OS'))) {
$os = 'ibmnos';
}

View File

@@ -10,9 +10,8 @@
* the source code distribution for details.
*/
if (!$os) {
$ibmtl_snmpget = snmp_get($device, 'SML-MIB::product-Name.0', '-Oqv', '');
if (stristr($ibmtl_snmpget, 'IBM System Storage TS3500 Tape Library')) {
$os = 'ibmtl';
}
$ibmtl_snmpget = snmp_get($device, 'SML-MIB::product-Name.0', '-Oqv', '');
if (str_contains($ibmtl_snmpget, 'IBM System Storage TS3500 Tape Library')) {
$os = 'ibmtl';
}

View File

@@ -1,7 +1,5 @@
<?php
if (!$os) {
if (strstr($sysDescr, 'IES-') && !strstr($sysDescr, 'Cisco Systems')) {
$os = 'ies';
}
if (str_contains($sysDescr, 'IES-') && !str_contains($sysDescr, 'Cisco Systems')) {
$os = 'ies';
}

View File

@@ -10,8 +10,6 @@
* the source code distribution for details.
*/
if (!$os) {
if (preg_match('/^NFT 2N/', $sysDescr)) {
$os = 'infinity';
}
if (starts_with($sysDescr, 'NFT 2N')) {
$os = 'infinity';
}

View File

@@ -1,32 +1,20 @@
<?php
if (empty($os)) {
if (strstr($sysDescr, 'Cisco Internetwork Operating System Software')) {
$os = 'ios';
} elseif (strstr($sysDescr, 'IOS (tm)')) {
$os = 'ios';
} elseif (strstr($sysDescr, 'Cisco IOS Software')) {
$os = 'ios';
} elseif (strstr($sysDescr, 'Global Site Selector')) {
$os = 'ios';
}
if (strstr($sysDescr, 'IOS-XE')) {
$os = 'iosxe';
}
if (strstr($sysDescr, 'IOS XR')) {
$os = 'iosxr';
}
if (!empty($os)) {
$extra_mibs = array(
"ciscoAAASessionMIB" => "CISCO-AAA-SESSION-MIB",
);
register_mibs($device, $extra_mibs, "includes/discovery/os/ios.inc.php");
}
if (str_contains($sysDescr, array('Cisco Internetwork Operating System Software', 'IOS (tm)', 'Cisco IOS Software', 'Global Site Selector'))) {
$os = 'ios';
}
// Fallback case
// If we don't have an OS yet and if the object is in Cisco tree it's most likely an IOS device
// if (empty($os) and substr($sysObjectId, 0, 17) == ".1.3.6.1.4.1.9.1.") { $os = "ios"; }
if (str_contains($sysDescr, 'IOS-XE')) {
$os = 'iosxe';
}
if (str_contains($sysDescr, 'IOS XR')) {
$os = 'iosxr';
}
if (!empty($os)) {
$extra_mibs = array(
"ciscoAAASessionMIB" => "CISCO-AAA-SESSION-MIB",
);
register_mibs($device, $extra_mibs, "includes/discovery/os/ios.inc.php");
}

View File

@@ -1,7 +1,5 @@
<?php
if (!$os) {
if (strstr($sysObjectId, '1.3.6.1.4.1.2468.1.4.2.1')) {
$os = 'ipoman';
}
if (starts_with($sysObjectId, '.1.3.6.1.4.1.2468.1.4.2.1')) {
$os = 'ipoman';
}

View File

@@ -1,7 +1,5 @@
<?php
if (!$os) {
if (preg_match('/IronWare/', $sysDescr)) {
$os = 'ironware';
}
if (str_contains($sysDescr, 'IronWare')) {
$os = 'ironware';
}

View File

@@ -1,7 +1,5 @@
<?php
if (!$os) {
if ((strstr($sysObjectId, '.1.3.6.1.4.1.9.1.2139')) || (strstr($sysObjectId, '.1.3.6.1.4.1.9.1.1426'))) {
$os = 'ise';
}
if (starts_with($sysObjectId, array('.1.3.6.1.4.1.9.1.2139', '.1.3.6.1.4.1.9.1.1426'))) {
$os = 'ise';
}