Doc startjail action.

This commit is contained in:
dlavigne
2016-02-04 11:21:18 -05:00
parent ee8fa9d436
commit 521e7f9ec8

View File

@@ -20,7 +20,7 @@ Every iocage class request contains the following parameters:
| namespace | sysadm | |
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
| action | | supported actions include "getdefaultsettings", "listjails", "getjailsettings" |
| action | | supported actions include "getdefaultsettings", "listjails", "getjailsettings", "startjail" |
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
@@ -650,4 +650,72 @@ The "getjailsettings" action lists all of the settings that apply to the specifi
"name": "response",
"namespace": "sysadm"
}
.. index:: startjail, iocage
.. _Start a Jail:
Start a Jail
============
The "startjail" action starts the specified jail.
.. note:: since a jail can only be started once, you will receive an error if the jail is already running.
**REST Request**
.. code-block:: json
PUT /sysadm/iocage
{
"action" : "startjail",
"jail" : "test"
}
**REST Response**
.. code-block:: json
{
"args": {
"startjail": {
"test": {
"* Starting 0bf985de-ca0f-11e5-8d45-d05099728dbf (test)": "",
"+ Started (shared IP mode) OK": "",
"+ Starting services OK": ""
}
}
}
}
**WebSocket Request**
.. code-block:: json
{
"namespace" : "sysadm",
"id" : "fooid",
"args" : {
"action" : "startjail",
"jail" : "test"
},
"name" : "iocage"
}
**WebSocket Response**
.. code-block:: json
{
"args": {
"startjail": {
"test": {
"INFO": " 0bf985de-ca0f-11e5-8d45-d05099728dbf (test) is already up"
}
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}