Add new API call to start a iohyve guest

REST Request:
-------------------------------
PUT /sysadm/iohyve
{
   "action" : "start",
   "name" : "bsdguest"
}

WebSocket Request:
-------------------------------
{
   "name" : "iohyve",
   "id" : "fooid",
   "args" : {
      "action" : "start",
      "name" : "bsdguest"
   },
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "start": {
      "name": "bsdguest"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
This commit is contained in:
Kris Moore
2016-02-09 14:42:56 -05:00
parent c5c10a0616
commit c8b123df65
3 changed files with 32 additions and 0 deletions

View File

@@ -533,6 +533,10 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmIohyveRequest(const QJsonVal
ok = true;
out->insert("setup", sysadm::Iohyve::setupIohyve(in_args.toObject()));
}
if(act=="start"){
ok = true;
out->insert("start", sysadm::Iohyve::startGuest(in_args.toObject()));
}
} //end of "action" key usage
//If nothing done - return the proper code