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
This commit is contained in:
Jacob Anders 2021-08-10 12:28:12 +10:00
parent b385d9ae5b
commit 807b934569
2 changed files with 15 additions and 0 deletions

View File

@ -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.

View File

@ -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.