Description of problem: Please extend the RestAPI to allow querying of the watchdog https://beaker-project.org/docs/alternative-harnesses/#post--recipes-(recipe_id)-watchdog Version-Release number of selected component (if applicable): 0.16 This would allow a simple cron job to alert the user both with wall and email to when the system will be expiring.
On Gerrit: http://gerrit.beaker-project.org/3084
Suggested steps for verifying: 1. Submit a job with: <task name="/distribution/command"> <param name="CMDS_TO_RUN" value="curl -s http://$LAB_CONTROLLER:8000/recipes/$RECIPEID/watchdog ; rhts-extend $LAB_CONTROLLER $TESTID 1000 ; curl -s http://$LAB_CONTROLLER:8000/recipes/$RECIPEID/watchdog" /> </task> 2. Check TESTOUT.log to see the fetched watchdog values Expected results: First curl command should produce the current watchdog time in seconds (I guess around 10800 = 3 hours). Second curl command should produce the new watchdog time that was set (around 1000).
Hmm the JSON response might make it a bit annoying to parse in a shell script, which was Bill's original intention I think...
It's the kind of simple JSON response where cut can deal with it fairly easily, though.
Beaker 0.17.0 has been released.