From 807b934569a3470ebade7c77b216ec1792abdf1f Mon Sep 17 00:00:00 2001 From: Jacob Anders Date: Tue, 10 Aug 2021 12:28:12 +1000 Subject: [PATCH] Make iDRAC management steps verify steps This change enables running management.reset_idrac, management.clear_job_queue and management.known_good_state as verify steps on iDRAC hardware type. Story: 2009025 Task: 42922 Change-Id: Ia5945a95edbcd35e24ff4d2af013380073f6928c --- ironic/drivers/modules/drac/management.py | 6 ++++++ .../notes/add-idrac-verify-steps-50c1a0f0fe299922.yaml | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add-idrac-verify-steps-50c1a0f0fe299922.yaml diff --git a/ironic/drivers/modules/drac/management.py b/ironic/drivers/modules/drac/management.py index 637f837d19..c25b128a5f 100644 --- a/ironic/drivers/modules/drac/management.py +++ b/ironic/drivers/modules/drac/management.py @@ -649,6 +649,7 @@ class DracRedfishManagement(redfish_management.RedfishManagement): node.driver_internal_info = driver_internal_info @METRICS.timer('DracRedfishManagement.clear_job_queue') + @base.verify_step(priority=0) @base.clean_step(priority=0) def clear_job_queue(self, task): """Clear iDRAC job queue. @@ -662,6 +663,7 @@ class DracRedfishManagement(redfish_management.RedfishManagement): lambda m: m.job_service.delete_jobs(job_ids=['JID_CLEARALL'])) @METRICS.timer('DracRedfishManagement.reset_idrac') + @base.verify_step(priority=0) @base.clean_step(priority=0) def reset_idrac(self, task): """Reset the iDRAC. @@ -677,6 +679,7 @@ class DracRedfishManagement(redfish_management.RedfishManagement): {'node': task.node.uuid}) @METRICS.timer('DracRedfishManagement.known_good_state') + @base.verify_step(priority=0) @base.clean_step(priority=0) def known_good_state(self, task): """Reset iDRAC to known good state. @@ -799,6 +802,7 @@ class DracWSManManagement(base.ManagementInterface): raise NotImplementedError() @METRICS.timer('DracManagement.reset_idrac') + @base.verify_step(priority=0) @base.clean_step(priority=0) def reset_idrac(self, task): """Reset the iDRAC. @@ -813,6 +817,7 @@ class DracWSManManagement(base.ManagementInterface): client.reset_idrac(force=True, wait=True) @METRICS.timer('DracManagement.known_good_state') + @base.verify_step(priority=0) @base.clean_step(priority=0) def known_good_state(self, task): """Reset the iDRAC, Clear the job queue. @@ -828,6 +833,7 @@ class DracWSManManagement(base.ManagementInterface): client.delete_jobs(job_ids=[_CLEAR_JOB_IDS]) @METRICS.timer('DracManagement.clear_job_queue') + @base.verify_step(priority=0) @base.clean_step(priority=0) def clear_job_queue(self, task): """Clear the job queue. diff --git a/releasenotes/notes/add-idrac-verify-steps-50c1a0f0fe299922.yaml b/releasenotes/notes/add-idrac-verify-steps-50c1a0f0fe299922.yaml new file mode 100644 index 0000000000..ef854087f5 --- /dev/null +++ b/releasenotes/notes/add-idrac-verify-steps-50c1a0f0fe299922.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Adding support for running ``management.clear_job_queue``, + ``management.reset_idrac`` and ``management.known_good_state`` methods as + verify steps on iDRAC hardware type, for both ``idrac-wsman`` and + ``idrac-redfish`` interfaces. In order to use this feature, + ``[conductor]verify_step_priority_override`` needs to be used to set + non-zero step priorties for the desired verify steps.