2010-02-13 21:45:39 +00:00
|
|
|
<?php
|
|
|
|
|
2017-12-20 15:48:35 -06:00
|
|
|
$hardware = snmp_get($device, 'sysObjectID.0', '-Oqvs', 'FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB');
|
2010-02-13 21:45:39 +00:00
|
|
|
|
2011-03-15 11:59:47 +00:00
|
|
|
$hardware = rewrite_ironware_hardware($hardware);
|
2010-02-13 21:45:39 +00:00
|
|
|
|
2017-12-20 15:48:35 -06:00
|
|
|
$version = snmp_get($device, 'snAgBuildVer.0', '-Oqvs', 'FOUNDRY-SN-AGENT-MIB:FOUNDRY-SN-ROOT-MIB');
|
2010-02-13 21:45:39 +00:00
|
|
|
|
2018-04-25 21:59:04 +02:00
|
|
|
if (strpos($version, '.')) {
|
|
|
|
$version = str_replace('V', '', $version);
|
|
|
|
$version = str_replace('"', '', $version);
|
|
|
|
} else {
|
|
|
|
// Brocade NetIron CER, Extended route scalability, IronWare Version V5.6.0fT183 Compiled on Mar 27 2015 at 02:13:25 labeled as V5.6.00fb
|
|
|
|
// Brocade MLXe (System Mode: XMR), IronWare Version V5.6.0gT163 Compiled on Aug 27 2015 at 23:23:54 labeled as V5.6.00g
|
2018-11-27 21:31:26 -06:00
|
|
|
preg_match('/IronWare Version (.*) Compiled on/', $device['sysDescr'], $regexp_result);
|
2018-04-25 21:59:04 +02:00
|
|
|
$version = $regexp_result[1];
|
|
|
|
$version = str_replace('V', '', $version);
|
|
|
|
}
|
2016-03-27 21:46:21 +02:00
|
|
|
|
2017-12-20 15:48:35 -06:00
|
|
|
$serial = snmp_get($device, 'snChasSerNum.0', '-Ovq', 'FOUNDRY-SN-AGENT-MIB');
|