zun/api-ref/source/services.inc
miaohb 16f83bd01d Add the description about service api to api-ref
This patch adds the decription about service api to api-ref.

Change-Id: I9b5d765fdf9f627b73556e9799bd188e3d9b8505
Partially-Implements: blueprint zun-api-doc
2017-05-31 10:06:35 +08:00

215 lines
3.6 KiB
ReStructuredText

.. -*- rst -*-
==================
Manage Zun service
==================
Show container management service status
========================================
.. rest_method:: GET /v1/services
Enables administrative users to view details for all Zun services.
Container management service status details include service id, binary,
host, report count, creation time, last updated time, health status, and
the reason for disabling service.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- X-Openstack-Request-Id: request_id
- services: services
- binary: binary
- created_at: created_at
- state: state
- report_count: report_count
- updated_at: updated_at
- host: host
- disabled_reason: disabled_reason
- id: id_s
Response Example
----------------
.. literalinclude:: samples/service-get-resp.json
:language: javascript
Delete container management service
===================================
.. rest_method:: DELETE /v1/services
Delete the specified Zun service.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- binary: binary
- host: host
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
Enable container management service
===================================
.. rest_method:: PUT /v1/services/enable
Enable the specified Zun service.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- binary: binary
- host: host
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- service: service
- host: host
- binary: binary
- disabled: disabled
- disabled_reason: disabled_reason
Response Example
----------------
.. literalinclude:: samples/service-enable-resp.json
:language: javascript
Disable container management service
====================================
.. rest_method:: PUT /v1/services/disable
Disable the specified Zun service.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- binary: binary
- host: host
- disabled_reason: disabled_reason
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- service: service
- host: host
- binary: binary
- disabled: disabled
- disabled_reason: disabled_reason
Response Example
----------------
.. literalinclude:: samples/service-disable-resp.json
:language: javascript
Force down container management service
=======================================
.. rest_method:: PUT /v1/services/force_down
Force the specified Zun service to down or unset it.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- binary: binary
- host: host
- forced_down: forced_down
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- service: service
- host: host
- binary: binary
- forced_down: forced_down
Response Example
----------------
.. literalinclude:: samples/service-forcedown-resp.json
:language: javascript