Merge "Add the description about service api to api-ref"

This commit is contained in:
Jenkins 2017-06-04 15:32:52 +00:00 committed by Gerrit Code Review
commit 50e3f3ad93
5 changed files with 193 additions and 0 deletions

View File

@ -68,6 +68,12 @@ report_count:
in: body
required: true
type: integer
service:
description: |
A Zun services.
in: body
required: true
type: dict
services:
description: |
A list of Zun services.

View File

@ -0,0 +1,8 @@
{
"service": {
"disabled": true,
"binary": "zun-compute",
"host": "host1",
"disabled_reason": "abc"
}
}

View File

@ -0,0 +1,8 @@
{
"service":{
"disabled": false,
"binary": "zun-compute",
"host": "tecs",
"disabled_reason": null
}
}

View File

@ -0,0 +1,7 @@
{
"service": {
"binary": "zun-compute",
"host": "tecs",
"forced_down": true
}
}

View File

@ -48,3 +48,167 @@ 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