mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
API CHANGE:
Re-enable the sysadm/iocage "deactivatepool" API call.
Description: This will deactivate a ZFS pool from being used by iocage (may result in loss of data regarding iocage-created jails).
Required arguments: "pool" = "zfs pool to deactivate"
-----------
REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
"pool" : "tank1",
"action" : "deactivatepool"
}
WebSocket Request:
-------------------------------
{
"name" : "iocage",
"args" : {
"action" : "deactivatepool",
"pool" : "tank1"
},
"id" : "fooid",
"namespace" : "sysadm"
}
Response:
-------------------------------
{
"args": {
"deactivatepool": {
"success": "pool tank1 deactivated."
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -649,6 +649,7 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmIocageRequest(const QJsonVal
|
||||
QString act = JsonValueToString(in_args.toObject().value("action"));
|
||||
QJsonObject retObj;
|
||||
if(act=="activatepool"){ retObj = sysadm::Iocage::activatePool(in_args.toObject()); }
|
||||
else if(act=="deactivatepool"){retObj = sysadm::Iocage::deactivatePool(in_args.toObject()); }
|
||||
|
||||
/*if(act=="execjail"){
|
||||
ok = true;
|
||||
|
||||
Reference in New Issue
Block a user