Bug 1093052 - [RFE] allow GET method on /recipes/#/watchdog to query current watchdog
Summary: [RFE] allow GET method on /recipes/#/watchdog to query current watchdog
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.17
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-30 13:27 UTC by Bill Peck
Modified: 2018-02-06 00:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-10 23:28:21 UTC
Embargoed:


Attachments (Terms of Use)

Description Bill Peck 2014-04-30 13:27:30 UTC
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.

Comment 2 Dan Callaghan 2014-05-16 07:21:35 UTC
On Gerrit: http://gerrit.beaker-project.org/3084

Comment 4 Dan Callaghan 2014-05-23 04:05:49 UTC
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).

Comment 6 Dan Callaghan 2014-05-23 06:29:29 UTC
Hmm the JSON response might make it a bit annoying to parse in a shell script, which was Bill's original intention I think...

Comment 7 Nick Coghlan 2014-05-23 08:07:52 UTC
It's the kind of simple JSON response where cut can deal with it fairly easily, though.

Comment 8 Dan Callaghan 2014-06-10 23:28:21 UTC
Beaker 0.17.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.