fixes as @laf indications

This commit is contained in:
crcro
2016-09-24 17:58:16 +03:00
parent 34978945ea
commit e2a017d14f
10 changed files with 16 additions and 20 deletions

View File

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

View File

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

View File

@@ -12,6 +12,6 @@
$ibmtl_snmpget = snmp_get($device, 'SML-MIB::product-Name.0', '-Oqv', '');
if (str_contains($ibmtl_snmpget, 'IBM System Storage TS3500 Tape Library')) {
if (str_contains($ibmtl_snmpget, 'IBM System Storage TS3500 Tape Library', true)) {
$os = 'ibmtl';
}

View File

@@ -4,14 +4,6 @@ if (str_contains($sysDescr, array('Cisco Internetwork Operating System Software'
$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",

View File

@@ -0,0 +1,5 @@
<?php
if (str_contains($sysDescr, 'IOS-XE')) {
$os = 'iosxe';
}

View File

@@ -0,0 +1,5 @@
<?php
if (str_contains($sysDescr, 'IOS XR')) {
$os = 'iosxr';
}

View File

@@ -2,8 +2,6 @@
if (str_contains($sysDescr, array('JETDIRECT', 'HP ETHERNET MULTI-ENVIRONMENT'))) {
$os = 'jetdirect';
}
if (starts_with($sysObjectId, '.1.3.6.1.4.1.11.1')) {
} elseif (starts_with($sysObjectId, '.1.3.6.1.4.1.11.1')) {
$os = 'jetdirect';
}

View File

@@ -2,8 +2,6 @@
if (starts_with($sysObjectId, '.1.3.6.1.4.1.2636')) {
$os = 'junos';
}
if (str_contains($sysDescr, 'kernel JUNOS')) {
} elseif (str_contains($sysDescr, 'kernel JUNOS', true)) {
$os = 'junos';
}

View File

@@ -2,9 +2,7 @@
if (str_contains($sysDescr, 'EMC SOHO-NAS Storage.')) {
$os = 'lenovoemc';
}
if (!empty($os)) {
$lenovoemc_mibs = array(
"fanValue" => "IOMEGANAS-MIB",
"tempValue" => "IOMEGANAS-MIB",

View File

@@ -1,5 +1,5 @@
<?php
if (str_contains($sysObjectId, '.33049.1.1.1.')) {
if (starts_with($sysObjectId, '.1.3.6.1.4.1.33049.1.1.1.')) {
$os = 'mellanox';
}