From bb369b6248d75991428074fda3760c8ede5ae578 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Sat, 16 Aug 2025 13:11:34 -0500 Subject: [PATCH] redfish: process inspection rules during inspection Include the execution of the inspection rules in the redfish inspector to behave more like the agent inspector behaves and allow for feature parity between the two. Change-Id: Ib0e69d361a7336a3f978d948043d651021ba1061 Signed-off-by: Doug Goldstein --- ironic/drivers/modules/redfish/inspect.py | 2 ++ ironic/tests/unit/drivers/modules/redfish/test_inspect.py | 3 ++- releasenotes/notes/redfish-inspection-f8b96425b8758857.yaml | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/redfish-inspection-f8b96425b8758857.yaml diff --git a/ironic/drivers/modules/redfish/inspect.py b/ironic/drivers/modules/redfish/inspect.py index ce36569d38..eb0345fd07 100644 --- a/ironic/drivers/modules/redfish/inspect.py +++ b/ironic/drivers/modules/redfish/inspect.py @@ -20,6 +20,7 @@ import sushy from ironic.common import boot_modes from ironic.common import exception from ironic.common.i18n import _ +from ironic.common.inspection_rules import engine from ironic.common import states from ironic.common import utils from ironic.conf import CONF @@ -185,6 +186,7 @@ class RedfishInspect(base.InspectInterface): inventory, plugin_data, task.context) + engine.apply_rules(task, inventory, plugin_data, 'main') valid_keys = self.ESSENTIAL_PROPERTIES missing_keys = valid_keys - set(inspected_properties) diff --git a/ironic/tests/unit/drivers/modules/redfish/test_inspect.py b/ironic/tests/unit/drivers/modules/redfish/test_inspect.py index 1f0badbb4e..798e4fe871 100644 --- a/ironic/tests/unit/drivers/modules/redfish/test_inspect.py +++ b/ironic/tests/unit/drivers/modules/redfish/test_inspect.py @@ -47,7 +47,8 @@ class RedfishInspectTestCase(db_base.DbTestCase): enabled_management_interfaces=['redfish'], enabled_inspect_interfaces=['redfish']) self.node = obj_utils.create_test_node( - self.context, driver='redfish', driver_info=INFO_DICT) + self.context, driver='redfish', driver_info=INFO_DICT, + provision_state=states.MANAGEABLE) def init_system_mock(self, system_mock, **properties): diff --git a/releasenotes/notes/redfish-inspection-f8b96425b8758857.yaml b/releasenotes/notes/redfish-inspection-f8b96425b8758857.yaml new file mode 100644 index 0000000000..8930e0d681 --- /dev/null +++ b/releasenotes/notes/redfish-inspection-f8b96425b8758857.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The redfish inspection interface can now utilize inspection rules as well + as inspection hooks.