lab: allow to retire/unretire worker/device
Allow user to set worker/device health status directly is a bit dangerous as it can be changed automatically by HC/test job or manually by admin.
Introducing non-filed retire
attribute to allow user to
retire/unretire worker/device. It hides the slightly different logic
behind worker/device health status and unifies the usage for lavacli
user.
retire: true
sets worker/device health to RETIRED
; While retire: false
sets worker heath to ACTIVE
and device health to UNKNOWN
respectively to bring them back.
The same as devices, retired workers are imported as well so that they can be un-retired easily.
Only when device/worker deleted or not defined in configure file but exists on lava-server, they will be deleted. This will need another change.
Signed-off-by: Chase Qi chase.qi@linaro.org