From 25ecc6f8133f7667b383069b06f7d058af4ec636 Mon Sep 17 00:00:00 2001 From: dlavigne Date: Thu, 7 Jan 2016 11:43:17 -0500 Subject: [PATCH] Add first action for lifepresever class. --- api/classes/lifepreserver.rst | 89 ++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/api/classes/lifepreserver.rst b/api/classes/lifepreserver.rst index 0ecc365..751495c 100644 --- a/api/classes/lifepreserver.rst +++ b/api/classes/lifepreserver.rst @@ -1,6 +1,91 @@ .. _lifepreserver: lifepreserver -============= +************* -Some intro text here... +The lifepreserver class is used to manage and retrieve information about scheduled snapshots and replication. + +Every lifepreserver class request contains the following parameters: + ++---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ +| **Parameter** | **Value** | **Description** | +| | | | ++=================================+===============+======================================================================================================================+ +| id | | any unique value for the request; examples include a hash, checksum, or uuid | +| | | | ++---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ +| name | sysadm | | +| | | | ++---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ +| namespace | lifepreserver | | +| | | | ++---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ +| action | | supported actions include listcron | +| | | | ++---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ + +The rest of this section provides examples of the available *actions* for each type of request, along with their responses. + +.. _List Schedules: + +List Schedules +============== + +The "listcron" action retrieves the information for each scheduled snapshot. For each schedule, it lists the name of the ZFS pool, the number of snapshots to keep, and the time that the +snapshot is taken. + +**REST Request** + +.. code-block:: json + + PUT /sysadm/lifepreserver + { + "action" : "listcron" + } + + +**REST Response** + +.. code-block:: json + + { + "args": { + "listcron": { + "tank1": { + "keep": "3", + "schedule": "daily@18" + } + } + } + } + +**WebSocket Request** + +.. code-block:: json + + { + "args" : { + "action" : "listcron" + }, + "name" : "lifepreserver", + "namespace" : "sysadm", + "id" : "fooid" + } + +**WebSocket Response** + +.. code-block:: json + + { + "args": { + "listcron": { + "tank1": { + "keep": "3", + "schedule": "daily@18" + } + } + }, + "id": "fooid", + "name": "response", + "namespace": "sysadm" + } \ No newline at end of file