Tony Murray 9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00

26 lines
708 B
PHP

<?php
// ArubaOS (MODEL: Aruba3600), Version 6.1.2.2 (29541)
$badchars = array( '(', ')', ',',);
list(,,$hardware,,$version,) = str_replace($badchars, '', explode(' ', $poll_device['sysDescr']));
// Build SNMP Cache Array
// stuff about the controller
$switch_info_oids = array(
'wlsxSwitchRole',
'wlsxSwitchMasterIp',
);
echo 'Caching Oids: ';
foreach ($switch_info_oids as $oid) {
echo "$oid ";
$aruba_info = snmpwalk_cache_oid($device, $oid, $aruba_info, 'WLSX-SWITCH-MIB');
}
echo "\n";
if ($aruba_info[0]['wlsxSwitchRole'] == 'master') {
$features = 'Master Controller';
} else {
$features = 'Local Controller for '.$aruba_info[0]['wlsxSwitchMasterIp'];
}