From 24295f65a1fd580626b83f25e164e0414ae03fc1 Mon Sep 17 00:00:00 2001 From: dlavigne Date: Fri, 5 Feb 2016 08:53:13 -0500 Subject: [PATCH] Doc fetchiso action. --- api/classes/iohyve.rst | 58 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/api/classes/iohyve.rst b/api/classes/iohyve.rst index f916770..42db703 100644 --- a/api/classes/iohyve.rst +++ b/api/classes/iohyve.rst @@ -20,7 +20,7 @@ Every iohyve class request contains the following parameters: | namespace | sysadm | | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ -| action | | supported actions include "listvms" | +| action | | supported actions include "listvms", "fetchiso" | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ @@ -31,7 +31,7 @@ The rest of this section provides examples of the available *actions* for each t .. _List VMs: List VMs -================ +======== The "listvms" action lists information about currently installed VMs. For each VM, the response includes the VM's name, description, whether or not it is scheduled to start when the host system boots, whether or not it is currently running, and whether or not the VM is currently loaded into memory. @@ -41,7 +41,7 @@ system boots, whether or not it is currently running, and whether or not the VM .. code-block:: json PUT /sysadm/iohyve -{ + { "action" : "listvms" } @@ -93,4 +93,56 @@ system boots, whether or not it is currently running, and whether or not the VM "id": "fooid", "name": "response", "namespace": "sysadm" + } + +.. index:: fetchiso, iohyve + +.. _Fetch ISO: + +Fetch ISO +========= + +The "fetchiso" action is used to retrieve the installation ISO. It is used with the "url" argument which contains the ISO address beginning with *http://*, +*ftp://*, or +*file://*. + +**REST Request** + +.. code-block:: json + + PUT /sysadm/iohyve + { + "url" : "ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso", + "action" : "fetchiso" + } + +**WebSocket Request** + +.. code-block:: json + + { + "namespace" : "sysadm", + "name" : "iohyve", + "args" : { + "url" : "ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso", + "action" : "fetchiso" + }, + "id" : "fooid" + } + +**Response** + +.. code-block:: json + + { + "args": { + "fetchiso": { + "command": "iohyve fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso", + "comment": "Task Queued", + "queueid": "{b3a8b980-a564-4ff8-86a2-1971bd4f58d1}" + } + }, + "id": "fooid", + "name": "response", + "namespace": "sysadm" } \ No newline at end of file