Skip to content

Commit

Permalink
Merge pull request #842 from Bischoff/doc-volumes-section
Browse files Browse the repository at this point in the history
Add a "Volume(s)" section to API documentation
  • Loading branch information
mfriesenegger authored Nov 17, 2024
2 parents 3dfc5f4 + 1f9ed4f commit 2ecb039
Show file tree
Hide file tree
Showing 2 changed files with 111 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
1 change: 1 addition & 0 deletions doc/source/setuphttpd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ or directly connected via Apache's wsgi module.
The detailed setup steps for each type of web server is out of this document's range,
you can refer to the specific guide of your chosen web server. This guide walks you through
the deployment process, either:

* with premade packages (which use the mod_wsgi method);
* manually, with uwsgi;
* or manually, with Apache's mod_wsgi.
Expand Down

0 comments on commit 2ecb039

Please sign in to comment.