Skip to content

Commit

Permalink
Add a "Volume(s)" section to API documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Bischoff <[email protected]>
  • Loading branch information
Bischoff committed Nov 16, 2024
1 parent 2f145a5 commit 1f9ed4f
Showing 1 changed file with 110 additions and 106 deletions.
216 changes: 110 additions & 106 deletions doc/source/restapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -431,112 +431,6 @@ Detach volume from a vm in z/VM

No Response

Refresh Volume Bootmap Info
---------------------------

**PUT /volumes/volume_refresh_bootmap**

Refresh a volume's bootmap info.

* Request:

.. restapi_parameters:: parameters.yaml

- fcpchannel: fcp_list
- wwpn: wwpn_list
- lun: lun
- transportfiles: transportfiles
- guest_networks: guest_networks

* Request sample:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_refresh_bootmap.tpl
:language: javascript

* Response code:

HTTP status code 200 on success.

* Response contents:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_refresh_bootmap_response.tpl
:language: javascript

Get Volume Connector
--------------------

**GET /volumes/conn/{userid}**

Get volume connector for z/VM.

* Request:

.. restapi_parameters:: parameters.yaml

- userid: guest_userid
- reserve: fcp_reserve

* Response code:

HTTP status code 200 on success.

* Response sample:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_get_volume_connector.tpl
:language: javascript

Get FCP Usage
--------------------

**GET /volumes/fcp/{fcp_id}**

Get the FCP usage in database for z/VM.

* Request:

.. restapi_parameters:: parameters.yaml

- fcp_id: fcp_id

* Response code:

HTTP status code 200 on success.

* Response contents:

.. restapi_parameters:: parameters.yaml

- output: fcp_usage

* Response sample:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_get_fcp_usage.tpl

Set FCP Usage
--------------------

**PUT /volumes/fcp/{fcp_id}**

Set the FCP usage in database for z/VM.

* Request:

.. restapi_parameters:: parameters.yaml

- fcp_id: fcp_id
- userid: fcp_userid
- reserved: fcp_reserve
- connections: fcp_connections

* Response code:

HTTP status code 200 on success.

* Response contents:

No response.


Get Guests stats including cpu and memory
-----------------------------------------

Expand Down Expand Up @@ -2076,6 +1970,116 @@ Delete a vswitch by using given name.

No response.

Volume(s)
=========

Handling of volumes and FCP devices.

Refresh Volume Bootmap Info
---------------------------

**PUT /volumes/volume_refresh_bootmap**

Refresh a volume's bootmap info.

* Request:

.. restapi_parameters:: parameters.yaml

- fcpchannel: fcp_list
- wwpn: wwpn_list
- lun: lun
- transportfiles: transportfiles
- guest_networks: guest_networks

* Request sample:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_refresh_bootmap.tpl
:language: javascript

* Response code:

HTTP status code 200 on success.

* Response contents:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_refresh_bootmap_response.tpl
:language: javascript

Get Volume Connector
--------------------

**GET /volumes/conn/{userid}**

Get volume connector for z/VM.

* Request:

.. restapi_parameters:: parameters.yaml

- userid: guest_userid
- reserve: fcp_reserve

* Response code:

HTTP status code 200 on success.

* Response sample:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_get_volume_connector.tpl
:language: javascript

Get FCP Usage
--------------------

**GET /volumes/fcp/{fcp_id}**

Get the FCP usage in database for z/VM.

* Request:

.. restapi_parameters:: parameters.yaml

- fcp_id: fcp_id

* Response code:

HTTP status code 200 on success.

* Response contents:

.. restapi_parameters:: parameters.yaml

- output: fcp_usage

* Response sample:

.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_get_fcp_usage.tpl

Set FCP Usage
-------------

**PUT /volumes/fcp/{fcp_id}**

Set the FCP usage in database for z/VM.

* Request:

.. restapi_parameters:: parameters.yaml

- fcp_id: fcp_id
- userid: fcp_userid
- reserved: fcp_reserve
- connections: fcp_connections

* Response code:

HTTP status code 200 on success.

* Response contents:

No response.

Files
=====
Imports and exports raw file data.
Expand Down

0 comments on commit 1f9ed4f

Please sign in to comment.