mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Add new API call to create a new snapshot via Life-Preserver
REST Request:
-------------------------------
PUT /sysadm/lifepreserver
{
"snap" : "mytestsnap",
"dataset" : "tank",
"comment" : "Testing",
"action" : "createsnap"
}
WebSocket Request:
-------------------------------
{
"args" : {
"comment" : "Testing",
"dataset" : "tank",
"action" : "createsnap",
"snap" : "mytestsnap"
},
"name" : "lifepreserver",
"namespace" : "sysadm",
"id" : "fooid"
}
Response:
-------------------------------
{
"args": {
"createsnap": {
"comment": "Testing",
"dataset": "tank",
"snap": "mytestsnap"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -337,6 +337,10 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmLifePreserverRequest(const Q
|
||||
ok = true;
|
||||
out->insert("addreplication", sysadm::LifePreserver::addReplication(in_args.toObject()));
|
||||
}
|
||||
if(act=="createsnap"){
|
||||
ok = true;
|
||||
out->insert("createsnap", sysadm::LifePreserver::createSnapshot(in_args.toObject()));
|
||||
}
|
||||
if(act=="cronscrub"){
|
||||
ok = true;
|
||||
out->insert("cronscrub", sysadm::LifePreserver::scheduleScrub(in_args.toObject()));
|
||||
@@ -787,4 +791,4 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmPkgRequest(const QJsonValue
|
||||
}
|
||||
|
||||
return RestOutputStruct::OK;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user