Add support for power supply on Extreme BOSS switches (#9898)

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Update boss.inc.php

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload
This commit is contained in:
ospfbgp
2019-03-09 15:24:37 -05:00
committed by Tony Murray
parent 569b1f0fb2
commit eb82a153d9
5 changed files with 19767 additions and 4 deletions

View File

@@ -28,23 +28,34 @@ if ($device['os'] === 'boss') {
];
create_state_index($state_name, $states);
// get fans (6) and temp (5) sensor only from walk
$ers_sensors = [];
foreach ($oid as $key => $value) {
if ($key['s5ChasComGrpIndx'] == 5 || $key['s5ChasComGrpIndx'] == 6) {
if ($key['s5ChasComGrpIndx'] == 4 || $key['s5ChasComGrpIndx'] == 5 || $key['s5ChasComGrpIndx'] == 6) {
$ers_sensors[$key] = $value;
}
}
$ps_num = 0;
foreach ($ers_sensors as $index => $entry) {
//Get unit number
$unit_array = explode(".", $index);
$unit = floor($unit_array[1]/10);
$descr = "Unit $unit: $entry[s5ChasComDescr]";
//Set description with Power Supply number
if ($unit_array[0] == 4) {
if ($unit != $temp_unit) {
$ps_num = 1;
} else {
$ps_num++;
}
$descr = "BOSS Unit $unit: Power Supply $ps_num";
} else {
$descr = "BOSS Unit $unit: $entry[s5ChasComDescr]";
}
//Discover Sensors
discover_sensor($valid['sensor'], 'state', $device, $cur_oid.$index, "s5ChasComOperState.$index", $state_name, $descr, 1, 1, null, null, null, null, $entry['s5ChasComOperState']);
//Create Sensor To State Index
create_sensor_to_state_index($device, $state_name, "s5ChasComOperState.$index");
$temp_unit = $unit;
}
}
}

3117
tests/data/boss_ers3510.json Normal file
View File

File diff suppressed because it is too large Load Diff

12172
tests/data/boss_ers4950.json Normal file
View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff