Update the clear job id's constant

Fixes an issue of powering off with the ``idrac-wsman`` management
interface while the execution of a clear job queue cleaning step is
proceeding.
Prior to this fix, the clean step would fail when powering off a node.

Story: 2008988
Task: 42641

Change-Id: Ib4ab755c806f028d97379b80a8c27d6ade63cba1
This commit is contained in:
Dhuldev Valekar 2021-06-15 07:10:12 -05:00 committed by DhuldevValekar3
parent 349bf2d5bc
commit 741a4d8a88
3 changed files with 10 additions and 3 deletions

View File

@ -88,7 +88,7 @@ _DRAC_BOOT_MODES = ['Bios', 'Uefi']
_NON_PERSISTENT_BOOT_MODE = 'OneTime' _NON_PERSISTENT_BOOT_MODE = 'OneTime'
# Clear job id's constant # Clear job id's constant
_CLEAR_JOB_IDS = 'JID_CLEARALL_FORCE' _CLEAR_JOB_IDS = 'JID_CLEARALL'
# Clean steps constant # Clean steps constant
_CLEAR_JOBS_CLEAN_STEPS = ['clear_job_queue', 'known_good_state'] _CLEAR_JOBS_CLEAN_STEPS = ['clear_job_queue', 'known_good_state']

View File

@ -814,7 +814,7 @@ class DracManagementTestCase(test_utils.BaseDracTest):
mock_client.reset_idrac.assert_called_once_with( mock_client.reset_idrac.assert_called_once_with(
force=True, wait=True) force=True, wait=True)
mock_client.delete_jobs.assert_called_once_with( mock_client.delete_jobs.assert_called_once_with(
job_ids=['JID_CLEARALL_FORCE']) job_ids=['JID_CLEARALL'])
self.assertIsNone(return_value) self.assertIsNone(return_value)
@ -826,7 +826,7 @@ class DracManagementTestCase(test_utils.BaseDracTest):
shared=False) as task: shared=False) as task:
return_value = task.driver.management.clear_job_queue(task) return_value = task.driver.management.clear_job_queue(task)
mock_client.delete_jobs.assert_called_once_with( mock_client.delete_jobs.assert_called_once_with(
job_ids=['JID_CLEARALL_FORCE']) job_ids=['JID_CLEARALL'])
self.assertIsNone(return_value) self.assertIsNone(return_value)

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixes an issue of powering off with the ``idrac-wsman`` management
interface while the execution of a clear job queue cleaning step is
proceeding.
Prior to this fix, the clean step would fail when powering off a node.