mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add the 'startupdate' API call which allows you to queue a
system update
Valid args:
target : "chbranch/pkgupdate/fbsdupdate/fbsdupdatepkgs/standalone"
branch: "newbranch" - (Only used with chbranch target)
tag: "pkgng-1.6.9" - (Only used with standalone target)
REST Request:
-------------------------------
PUT /sysadm/update
{
"action" : "startupdate",
"target" : "pkgupdate"
}
REST Response:
-------------------------------
{
"args": {
"startupdate": {
"queueid": "611c89ae-c43c-11e5-9602-54ee75595566",
"command": "pc-updatemanager pkgupdate",
"comment": "Task Queued"
}
}
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "startupdate",
"target" : "pkgupdate"
},
"name" : "update",
"id" : "fooid",
"namespace" : "sysadm"
}
WebSocket Response:
-------------------------------
{
"args": {
"startupdate": {
"queueid": "611c89ae-c43c-11e5-9602-54ee75595566",
"command": "pc-updatemanager pkgupdate",
"comment": "Task Queued"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -142,6 +142,7 @@ QJsonObject Update::startUpdate(QJsonObject jsin) {
|
||||
// Create a unique ID for this queued action
|
||||
QString ID = QUuid::createUuid().toString();
|
||||
|
||||
// Queue the update action
|
||||
DISPATCHER->queueProcess(ID, "pc-updatemanager " + flags);
|
||||
|
||||
// Return some details to user that the action was queued
|
||||
|
||||
Reference in New Issue
Block a user