mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-21 10:09:02 +00:00
config/core: Re-add by_spec
reboot policy
The `by_spec` reboot policy was removed in commit 0a549bd28e01a800566e9ad05a9420e1e4db3adc however this is still desirable so re-add.
This commit is contained in:
parent
23946620d6
commit
c3e4bdc964
@ -54,11 +54,12 @@ class RebootPolicy(object):
|
||||
:as_needed: Only reboot the device if it becomes unresponsive, or needs to be flashed, etc.
|
||||
:initial: The device will be rebooted when the execution first starts, just before
|
||||
executing the first workload spec.
|
||||
:each_spec: The device will be rebooted before running a new workload spec.
|
||||
:each_iteration: The device will be rebooted before each new iteration.
|
||||
|
||||
"""
|
||||
|
||||
valid_policies = ['never', 'as_needed', 'initial', 'each_job']
|
||||
valid_policies = ['never', 'as_needed', 'initial', 'each_spec', 'each_job']
|
||||
|
||||
@staticmethod
|
||||
def from_pod(pod):
|
||||
@ -85,6 +86,10 @@ class RebootPolicy(object):
|
||||
def reboot_on_each_job(self):
|
||||
return self.policy == 'each_job'
|
||||
|
||||
@property
|
||||
def reboot_on_each_spec(self):
|
||||
return self.policy == 'each_spec'
|
||||
|
||||
def __str__(self):
|
||||
return self.policy
|
||||
|
||||
@ -599,6 +604,12 @@ class RunConfiguration(Configuration):
|
||||
|
||||
``"each_job"``
|
||||
The device will be rebooted before each new job.
|
||||
|
||||
``"each_spec"``
|
||||
The device will be rebooted before running a new workload spec.
|
||||
|
||||
.. note:: this acts the same as each_job when execution order
|
||||
is set to by_iteration
|
||||
'''),
|
||||
ConfigurationPoint(
|
||||
'device',
|
||||
|
Loading…
x
Reference in New Issue
Block a user