From 3076c9182d1dd2357922f6bc8acce6035bd7de50 Mon Sep 17 00:00:00 2001 From: William Grzybowski Date: Fri, 18 Mar 2016 16:03:27 -0300 Subject: [PATCH] Document API to update zvol Ticket: #14136 --- docs/api/resources/storage.rst | 61 ++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/docs/api/resources/storage.rst b/docs/api/resources/storage.rst index e9f4369fedbda..fce7e4830805a 100644 --- a/docs/api/resources/storage.rst +++ b/docs/api/resources/storage.rst @@ -303,6 +303,67 @@ ZFS Volumes :resheader Content-Type: content type of the response :statuscode 200: no error +.. http:put:: /api/v1.0/storage/volume/(int:id|string:name)/zvols/(string:name)/ + + Update zvol `name` for volume `id`. + + **Example request**: + + .. sourcecode:: http + + POST /api/v1.0/storage/volume/tank/zvols/ HTTP/1.1 + Content-Type: application/json + + { + "volsize": "20M" + } + + **Example response**: + + .. sourcecode:: http + + HTTP/1.1 200 OK + Vary: Accept + Content-Type: application/json + + { + "name": "myzvol", + "volsize": 20971520 + } + + :json string compression: type of compression + :json string dedup: on/off + :json string volsize: size of the zvol + :resheader Content-Type: content type of the response + :statuscode 201: no error + +.. http:get:: /api/v1.0/storage/volume/(int:id|string:name)/zvols/ + + Get zvols for volume `id`. + + **Example request**: + + .. sourcecode:: http + + GET /api/v1.0/storage/volume/tank/zvols/ HTTP/1.1 + Content-Type: application/json + + **Example response**: + + .. sourcecode:: http + + HTTP/1.1 202 Accepted + Vary: Accept + Content-Type: application/json + + [{ + "name": "myzvol", + "volsize": 10485760 + }] + + :resheader Content-Type: content type of the response + :statuscode 200: no error + .. http:delete:: /api/v1.0/storage/volume/(int:id|string:name)/zvols/(string:name)/ Delete zvol `name` of the volume `id`.