diff --git a/api/classes/iohyve.rst b/api/classes/iohyve.rst index a98d92d..7ed08d0 100644 --- a/api/classes/iohyve.rst +++ b/api/classes/iohyve.rst @@ -21,7 +21,7 @@ Every iohyve class request contains the following parameters: | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ | action | | supported actions include "listvms", "fetchiso", "listisos", "renameiso", "rmiso", "setup", "issetup", "create", | -| | | "install", "start", "stop", "delete", "adddisk", and "listdisks" | +| | | "install", "start", "stop", "delete", "adddisk", "listdisks", and "deletedisk" | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ @@ -735,4 +735,55 @@ The "listdisks" action lists the disks connected to the specified VM. "id": "fooid", "name": "response", "namespace": "sysadm" + } + + .. index:: deletedisk, iohyve + +.. _Delete a Disk: + +Delete a Disk +============= + +The "deletedisk" action removes the specified disk from the specified VM. + +**REST Request** + +.. code-block:: json + + PUT /sysadm/iohyve + { + "disk" : "disk1", + "name" : "bsdguest", + "action" : "deletedisk" + } + +**WebSocket Request** + +.. code-block:: json + + { + "namespace" : "sysadm", + "id" : "fooid", + "name" : "iohyve", + "args" : { + "name" : "bsdguest", + "action" : "deletedisk", + "disk" : "disk1" + } + } + +**Response** + +.. code-block:: json + + { + "args": { + "deletedisk": { + "disk": "disk1", + "name": "bsdguest" + } + }, + "id": "fooid", + "name": "response", + "namespace": "sysadm" } \ No newline at end of file