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:
Ken Moore
2017-02-17 11:55:31 -05:00
parent 2047491544
commit 9cb26f211e

View File

@@ -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;