mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
The `switches` object is only for specifying empty jails currently, but kept it vague as more may eventually happen.
There are 2 different outputs depending on if a switch is supplied.
Without any switches:
REST Request:
-------------------------------
PUT /sysadm/iocage
{
"action" : "createjail",
"props" : "tag=test release=10.2-RELEASE"
}
WebSocket Request:
-------------------------------
{
"args" : {
"props" : "tag=test release=10.2-RELEASE",
"action" : "createjail"
},
"namespace" : "sysadm",
"name" : "iocage",
"id" : "fooid"
}
Response:
-------------------------------
{
"args": {
"createjail": {
"props": "tag=test release=10.2-RELEASE",
"success": {
"Successfully created": " 3030c554-d05e-11e5-8209-d05099728dbf (test)"
},
"switches": ""
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
With switches:
REST Request:
-------------------------------
PUT /sysadm/iocage
{
"switches" : "-e",
"action" : "createjail",
"props" : "tag=emptytest"
}
WebSocket Request:
-------------------------------
{
"namespace" : "sysadm",
"args" : {
"props" : "tag=emptytest",
"action" : "createjail",
"switches" : "-e"
},
"name" : "iocage",
"id" : "fooid"
}
Response:
-------------------------------
{
"args": {
"createjail": {
"props": "tag=emptytest",
"success": {
"uuid": "1325b8bc-d05e-11e5-8209-d05099728dbf"
},
"switches": "-e"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}