Doc list_pools action.

This commit is contained in:
dlavigne
2016-03-03 10:06:38 -05:00
parent 5f148d5388
commit 358009fd8b

83
api/classes/zfs.rst Normal file
View File

@@ -0,0 +1,83 @@
.. _zfs:
zfs
***
The zfs class is used to manage and retrieve information about ZFS pools.
Every zfs class request contains the following parameters:
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
| **Parameter** | **Value** | **Description** |
| | | |
+=================================+===============+======================================================================================================================+
| id | | any unique value for the request; examples include a hash, checksum, or uuid |
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
| name | zfs | |
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
| namespace | sysadm | |
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
| action | | supported actions include "list_pools" |
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
The rest of this section provides examples of the available *actions* for each type of request, along with their responses.
.. index:: list_pools, zfs
.. _List Pools:
List Pools
==========
The "list_pools" action lists pool information. For each ZFS pool, the response includes the pool name, the amount of space that has been physically allocated, whether or not an alternate
root has been defined, capacity (percent used), the deduplication ratio, amount of uninitialized space (expandsz, which usually applies to LUNs), percentage of fragmentation, amount of free
space, pool health, and total size. This action is the equivalent of running :command:`zpool list` from the command line.
**REST Request**
.. code-block:: json
PUT /sysadm/zfs
{
"action" : "list_pools"
}
**WebSocket Request**
.. code-block:: json
{
"namespace" : "sysadm",
"args" : {
"action" : "list_pools"
},
"name" : "zfs",
"id" : "fooid"
}
**Response**
.. code-block:: json
{
"args": {
"tank": {
"alloc": "71.8G",
"altroot": "-",
"cap": "32%",
"dedup": "1.00x",
"expandsz": "-",
"frag": "18%",
"free": "148G",
"health": "ONLINE",
"size": "220G"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}