From 81e881bc36e89e054c74a146b04b3c9b64a669c2 Mon Sep 17 00:00:00 2001 From: Jacob Anders Date: Thu, 13 Nov 2025 06:14:16 +1000 Subject: [PATCH] Add support for node health status field This commit adds client-side support for displaying Redfish hardware health status field (health) in baremetal node list commands: * Update API version to 1.109 to support health field * Add 'health' to node resource field definitions * Update node list command to display health field by default * Fix unit tests to expect health field in node listings * Add comprehensive release note documenting the new functionality The health field is now displayed in both standard and long listing formats, providing operators with real-time visibility into hardware health status synchronized from BMCs. Depends-on: https://review.opendev.org/c/openstack/ironic/+/966946 Change-Id: Idc36942f8962df68582b37e2c8d2ff3caa079f4f Assisted-by: Claude (Anthropic) version 4.5 Signed-off-by: Jacob Anders Partial-Bug: #2133522 --- ironicclient/common/http.py | 2 +- ironicclient/tests/unit/osc/v1/test_baremetal_node.py | 5 ++++- ironicclient/v1/resource_fields.py | 3 +++ ...d-node-health-fields-support-c8f3d2a9b7e4f1a5.yaml | 11 +++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/add-node-health-fields-support-c8f3d2a9b7e4f1a5.yaml diff --git a/ironicclient/common/http.py b/ironicclient/common/http.py index afae176ad..feba1405e 100644 --- a/ironicclient/common/http.py +++ b/ironicclient/common/http.py @@ -37,7 +37,7 @@ from ironicclient import exc # http://specs.openstack.org/openstack/ironic-specs/specs/kilo/api-microversions.html # noqa # for full details. DEFAULT_VER = '1.9' -LAST_KNOWN_API_VERSION = 104 +LAST_KNOWN_API_VERSION = 109 LATEST_VERSION = '1.{}'.format(LAST_KNOWN_API_VERSION) LOG = logging.getLogger(__name__) diff --git a/ironicclient/tests/unit/osc/v1/test_baremetal_node.py b/ironicclient/tests/unit/osc/v1/test_baremetal_node.py index f8eb87296..e34341909 100644 --- a/ironicclient/tests/unit/osc/v1/test_baremetal_node.py +++ b/ironicclient/tests/unit/osc/v1/test_baremetal_node.py @@ -1106,7 +1106,8 @@ class TestBaremetalList(TestBaremetal): "Instance UUID", "Power State", "Provisioning State", - "Maintenance" + "Maintenance", + "Health" ) self.assertEqual(collist, columns) datalist = (( @@ -1116,6 +1117,7 @@ class TestBaremetalList(TestBaremetal): baremetal_fakes.baremetal_power_state, baremetal_fakes.baremetal_provision_state, baremetal_fakes.baremetal_maintenance, + '', # health ), ) self.assertEqual(datalist, tuple(data)) @@ -1168,6 +1170,7 @@ class TestBaremetalList(TestBaremetal): 'Extra', 'Fault', 'Firmware Interface', + 'Health', 'Inspect Interface', 'Inspection Finished At', 'Inspection Started At', diff --git a/ironicclient/v1/resource_fields.py b/ironicclient/v1/resource_fields.py index 0e8a4f43e..a85c2eb16 100644 --- a/ironicclient/v1/resource_fields.py +++ b/ironicclient/v1/resource_fields.py @@ -161,6 +161,7 @@ class Resource(object): 'parent_node': 'Parent Node', 'children': 'Child Nodes', 'firmware_interface': 'Firmware Interface', + 'health': 'Health', 'public': 'Public', 'disable_power_off': 'Disable Power Off', 'priority': 'Priority', @@ -272,6 +273,7 @@ NODE_DETAILED_RESOURCE = Resource( 'extra', 'fault', 'firmware_interface', + 'health', 'inspect_interface', 'inspection_finished_at', 'inspection_started_at', @@ -335,6 +337,7 @@ NODE_RESOURCE = Resource( 'power_state', 'provision_state', 'maintenance', + 'health', ]) VENDOR_PASSTHRU_METHOD_RESOURCE = Resource( ['name', diff --git a/releasenotes/notes/add-node-health-fields-support-c8f3d2a9b7e4f1a5.yaml b/releasenotes/notes/add-node-health-fields-support-c8f3d2a9b7e4f1a5.yaml new file mode 100644 index 000000000..ec97da0b4 --- /dev/null +++ b/releasenotes/notes/add-node-health-fields-support-c8f3d2a9b7e4f1a5.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Adds support for displaying the node health status field (``health``) + in the baremetal node list commands. This field exposes the Redfish + hardware health status (Status.Health) that is synchronized from BMCs + to Ironic node records. The health field is displayed by default in + both standard and long listing formats, providing operators with + visibility into the hardware health status of managed nodes. This + requires Ironic API version ``1.109`` or later. +