| Summary: | Add remote HTTP API to enable status aggregation of multiple Toaster instances | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | Konrad Scherer <konrad.scherer> |
| Component: | toaster | Assignee: | David Reyna <david.reyna> |
| Status: | RESOLVED FIXED | QA Contact: | Libertad <libertad.gonzalez.de.la.cruz> |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | jessica.zhang, stanciux.mihail |
| Version: | 2.4 | ||
| Target Milestone: | 2.4 M3 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Konrad Scherer
2017-07-14 18:26:34 UTC
The patterns "/builds" and "build/<name>" are currently already used for the normal full GUI pages, so I will propose alternate names.
FYI, the Toaster URL patterns are encoded here:
bitbake/lib/toaster/toastergui/urls.py
The counter proposal is: /api/builds /api/build/<name> This makes sense in that it follows the Layer Index model for the back end data. Here are the example API calls and output, with the returned JSON data fanned out and sorted for clarity.
1) "localhost:8000/toastergui/api/building"
{"count": 1,
"building": [
{"id": 22,
"name": "20170718220837",
"project": "foo",
"target": "core-image-base",
"distro": "poky",
"machine": "qemux86",
"start": "2017-07-18T22:07:48.083Z",
"seconds": "32.783",
"clone": "1:1"}
"parse": "800:803",
"task": "0:0",
}]
}
2) "localhost:8000/toastergui/api/builds"
{"count": 1,
"builds": [
{"id": 21,
"outcome": "Succeeded",
"name": "20170630232654",
"project": "Command line builds",
"target": "core-image-base",
"distro": "poky"
"machine": "qemux86",
"start": "2017-06-30T23:26:47.767Z",
"stop": "2017-06-30T23:35:32.753Z",
"seconds": "524.986",
"errors": 0,
"warnings": 0,
}]
}
3) "localhost:8000/health"
"Ok"
Source:
<!DOCTYPE html>
<html lang="en">
<head><title>Toaster Health</title></head>
<body>Ok</body>
</html>
commit 3bc3d26b465b5af3cebc1d4c0d1fa382965c32cf |