mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
Add new API call for listing available branches to update to
REST Request:
-------------------------------
PUT /sysadm/update
{
"action" : "listbranches"
}
REST Response:
-------------------------------
{
"args": {
"listbranches": {
"10.1-RELEASE": "available",
"10.2-RELEASE": "active",
"11.0-CURRENTJAN2016": "available"
}
}
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "listbranches"
},
"namespace" : "sysadm",
"name" : "update",
"id" : "fooid"
}
WebSocket Response:
-------------------------------
{
"args": {
"listbranches": {
"10.1-RELEASE": "available",
"10.2-RELEASE": "active",
"11.0-CURRENTJAN2016": "available"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -297,9 +297,11 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmUpdateRequest(const QJsonVal
|
||||
QString act = JsonValueToString(in_args.toObject().value("action"));
|
||||
if(act=="checkupdates"){
|
||||
ok = true;
|
||||
qDebug() << " - Starting update check";
|
||||
out->insert("checkupdates", sysadm::Update::checkUpdates());
|
||||
qDebug() << " - Finished update check";
|
||||
}
|
||||
if(act=="listbranches"){
|
||||
ok = true;
|
||||
out->insert("listbranches", sysadm::Update::listBranches());
|
||||
}
|
||||
|
||||
} //end of "action" key usage
|
||||
|
||||
Reference in New Issue
Block a user