From 521e7f9ec83b83982598edbed5559997bdd8095d Mon Sep 17 00:00:00 2001 From: dlavigne Date: Thu, 4 Feb 2016 11:21:18 -0500 Subject: [PATCH] Doc startjail action. --- api/classes/iocage.rst | 72 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 2 deletions(-) diff --git a/api/classes/iocage.rst b/api/classes/iocage.rst index 79155aa..1b13d25 100644 --- a/api/classes/iocage.rst +++ b/api/classes/iocage.rst @@ -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" } - \ No newline at end of file + +.. 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" + } \ No newline at end of file