Added HPE iLO Version Polling (#9146)

* Add HPE iLO Version Polling

* Added json test data

* Fix style
This commit is contained in:
Søren Rosiak
2018-09-07 00:06:23 +02:00
committed by Neil Lathwood
parent 6ac9980c20
commit b9898273c7
3 changed files with 50 additions and 4 deletions

View File

@@ -1,8 +1,7 @@
<?php
$oids = 'cpqSiProductName.0 cpqSiSysSerialNum.0';
$data = snmp_get_multi($device, $oids, '-OQUs', 'CPQSINFO-MIB');
$data = snmp_get_multi($device, 'cpqSiProductName.0 cpqSiSysSerialNum.0 cpqHoFwVerVersion.0', '-OQUs', 'CPQSINFO-MIB:CPQHOST-MIB');
$hardware = trim($data[0]['cpqSiProductName'], '"');
$serial = trim($data[0]['cpqSiSysSerialNum'], '"');
$version = stristr($data[0]['cpqHoFwVerVersion'], ' ', true);
unset($data);

40
tests/data/hpe-ilo.json Normal file
View File

@@ -0,0 +1,40 @@
{
"os": {
"discovery": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.232.9.4.10",
"sysDescr": "Integrated Lights-Out 4 2.50 Sep 23 2016",
"sysContact": null,
"version": null,
"hardware": null,
"features": null,
"location": null,
"os": "hpe-ilo",
"type": "appliance",
"serial": null,
"icon": "hpe.svg"
}
]
},
"poller": {
"devices": [
{
"sysName": "<private>",
"sysObjectID": ".1.3.6.1.4.1.232.9.4.10",
"sysDescr": "Integrated Lights-Out 4 2.50 Sep 23 2016",
"sysContact": "<private>",
"version": "2.50",
"hardware": "ProLiant ML350 Gen9",
"features": null,
"location": "<private>",
"os": "hpe-ilo",
"type": "appliance",
"serial": "AB123456CD",
"icon": "hpe.svg"
}
]
}
}
}

View File

@@ -1,2 +1,9 @@
1.3.6.1.2.1.1.1.0|4|Integrated Lights-Out 4 2.50 Sep 23 2016
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.232.9.4.10
1.3.6.1.2.1.1.3.0|67|3282141998
1.3.6.1.2.1.1.4.0|4|<private>
1.3.6.1.2.1.1.5.0|4|<private>
1.3.6.1.2.1.1.6.0|4|<private>
1.3.6.1.4.1.232.2.2.2.1.0|4|AB123456CD
1.3.6.1.4.1.232.2.2.4.2.0|4|ProLiant ML350 Gen9
1.3.6.1.4.1.232.11.2.14.1.1.5.0|4|2.50 Sep 23 2016