diff --git a/netbox_agent/lshw.py b/netbox_agent/lshw.py index c7841a1..6e11fb7 100644 --- a/netbox_agent/lshw.py +++ b/netbox_agent/lshw.py @@ -129,7 +129,7 @@ class LSHW(): d["id"] = dimm.get("id") d["serial"] = dimm.get("serial", 'N/A') d["vendor"] = dimm.get("vendor", 'N/A') - d["product"] = dimm.get("product", 'N/A') + d["product"] = dimm.get("product") d["size"] = dimm.get("size", 0) / 2 ** 20 / 1024 self.memories.append(d) diff --git a/netbox_agent/raid/hp.py b/netbox_agent/raid/hp.py index 40a9a27..144e73b 100644 --- a/netbox_agent/raid/hp.py +++ b/netbox_agent/raid/hp.py @@ -54,6 +54,13 @@ def _get_dict(lines, start_index, indentation): continue current_line_indentation = _get_indentation(current_line) + # This check ignore some useless information that make + # crash the parsing + product_name = REGEXP_CONTROLLER_HP.search(current_line) + if current_line_indentation == 0 and not product_name: + i = i + 1 + continue + if current_line_indentation == indentation: current_item = current_line.lstrip(' ')