From 528ecc09b05de23188f6e6bf4397c9c29a12446f Mon Sep 17 00:00:00 2001 From: Cyril Levis Date: Fri, 13 Jan 2023 17:12:25 +0100 Subject: [PATCH] fix: allow the inventory of several hp controller of the same model --- netbox_agent/raid/hp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netbox_agent/raid/hp.py b/netbox_agent/raid/hp.py index c1235c5..aff1f2f 100644 --- a/netbox_agent/raid/hp.py +++ b/netbox_agent/raid/hp.py @@ -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 -- 2.47.0