Fix detecting stacks in unstacked switches. (#16384)

Fix #16374
This commit is contained in:
Shane Mc Cormack 2024-09-10 20:54:52 +01:00 committed by GitHub
parent 77fa7573cf
commit 5e9e1e9c95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,7 @@ $repsegmentnumber = 0;
foreach ($tables as $tablevalue) {
//Some switches on 15.x expose this information regardless if they are stacked or not, we try to mitigate that by doing the following.
if (($tablevalue['oid'] == 'cswGlobals' || $tablevalue['oid'] == 'cswSwitchRole' || $tablevalue['oid'] == 'cswSwitchState' || $tablevalue['oid'] == 'cswStackPortOperStatus') && $redundant_data == 'false' && count($role_data) <= 1) {
if (in_array($tablevalue['oid'], ['CISCO-STACKWISE-MIB::cswGlobals', 'CISCO-STACKWISE-MIB::cswSwitchRole', 'CISCO-STACKWISE-MIB::cswSwitchState', 'CISCO-STACKWISE-MIB::cswStackPortOperStatus']) && $redundant_data == 'false' && count($role_data) <= 1) {
continue;
}