fix: allow the inventory of several hp controller of the same model #262

Merged
cyrinux merged 1 commit from fix/cle/hp-inventory-fix-3 into master 2023-01-16 15:06:55 +01:00

View file

@ -51,8 +51,9 @@ def _parse_ctrl_output(lines):
continue
ctrl = REGEXP_CONTROLLER_HP.search(line)
if ctrl is not None:
current_ctrl = ctrl.group(1)
controllers[current_ctrl] = {'Slot': ctrl.group(2)}
slot = ctrl.group(2)
current_ctrl = "{} - Slot {}".format(ctrl.group(1), slot)
controllers[current_ctrl] = {'Slot': slot}
if 'Embedded' not in line:
controllers[current_ctrl]['External'] = True
continue