Merge "Add verifications api doc"
This commit is contained in:
commit
02dbd3ba40
|
@ -0,0 +1,185 @@
|
|||
.. -*- rst -*-
|
||||
|
||||
=============
|
||||
Verifications
|
||||
=============
|
||||
|
||||
This API enables the Karbor user to do verifications of the specify checkpoint:
|
||||
|
||||
- Create a verification for a given checkpoint.
|
||||
- List all verifications of a given project.
|
||||
- Show the information of a given verification.
|
||||
|
||||
When you perform the above operation, these status values are possible:
|
||||
|
||||
+-----------------+----------------------------------------------------------+
|
||||
| Status | Description |
|
||||
+=================+==========================================================+
|
||||
| in_progress | A verify operation is in progress. |
|
||||
+-----------------+----------------------------------------------------------+
|
||||
| success | A verify operation is success. |
|
||||
+-----------------+----------------------------------------------------------+
|
||||
| fail | A verify operation is failed. |
|
||||
+-----------------+----------------------------------------------------------+
|
||||
|
||||
|
||||
List All Verifications
|
||||
======================
|
||||
|
||||
.. rest_method:: GET /v1/{tenant_id}/verifications
|
||||
|
||||
Lists all verifications offered for the given project.
|
||||
|
||||
|
||||
Response Codes
|
||||
--------------
|
||||
|
||||
.. rest_status_code:: success status.yaml
|
||||
|
||||
- 200
|
||||
|
||||
.. rest_status_code:: error status.yaml
|
||||
|
||||
- 401
|
||||
- 403
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant_id: tenant_id
|
||||
- sort: sort
|
||||
- limit: limit
|
||||
- marker: marker
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- verifications: verifications
|
||||
- id: verification_id
|
||||
- project_id: tenant_id_1
|
||||
- provider_id: provider_id
|
||||
- checkpoint_id: checkpoint_id
|
||||
- parameters: verification_parameters
|
||||
- status: verification_status
|
||||
- resources_status: resources_status
|
||||
- resources_reason: resources_reason
|
||||
- verifications_links: verifications_links
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/verifications-list-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Create verification
|
||||
===================
|
||||
|
||||
.. rest_method:: PUT /v1/{tenant_id}/verifications
|
||||
|
||||
Execute the verify operation for the specified provider and checkpoint.
|
||||
|
||||
Response codes
|
||||
--------------
|
||||
|
||||
.. rest_status_code:: success ../status.yaml
|
||||
|
||||
- 200
|
||||
|
||||
.. rest_status_code:: error ../status.yaml
|
||||
|
||||
- 401
|
||||
- 403
|
||||
- 404
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- verification: verification
|
||||
- provider_id: provider_id
|
||||
- checkpoint_id: checkpoint_id
|
||||
- parameters: verification_parameters
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: ./samples/verification-create-request.json
|
||||
:language: javascript
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- verification: verification
|
||||
- id: verification_id
|
||||
- project_id: tenant_id_1
|
||||
- provider_id: provider_id
|
||||
- checkpoint_id: checkpoint_id
|
||||
- parameters: verification_parameters
|
||||
- status: verification_status
|
||||
- resources_status: resources_status
|
||||
- resources_reason: resources_reason
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/verification-create-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Show Verification
|
||||
=================
|
||||
|
||||
.. rest_method:: GET /v1/{tenant_id}/verifications/{verification_id}
|
||||
|
||||
Show the information of a given verify operation.
|
||||
|
||||
|
||||
Response Codes
|
||||
--------------
|
||||
|
||||
.. rest_status_code:: success status.yaml
|
||||
|
||||
- 200
|
||||
|
||||
.. rest_status_code:: error status.yaml
|
||||
|
||||
- 401
|
||||
- 404
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- tenant_id: tenant_id
|
||||
- verification_id: verification_id_path
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- verification: verification
|
||||
- id: verification_id
|
||||
- project_id: tenant_id_1
|
||||
- provider_id: provider_id
|
||||
- checkpoint_id: checkpoint_id
|
||||
- parameters: verification_parameters
|
||||
- status: verification_status
|
||||
- resources_status: resources_status
|
||||
- resources_reason: resources_reason
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/verification-create-response.json
|
||||
:language: javascript
|
||||
|
|
@ -68,6 +68,12 @@ trigger_id_1:
|
|||
in: path
|
||||
required: true
|
||||
type: UUID
|
||||
verification_id_path:
|
||||
description: |
|
||||
The UUID of the verify.
|
||||
in: path
|
||||
required: true
|
||||
type: UUID
|
||||
|
||||
|
||||
# variables in query
|
||||
|
@ -447,6 +453,18 @@ resources_1:
|
|||
in: body
|
||||
required: false
|
||||
type: array
|
||||
resources_reason:
|
||||
description: |
|
||||
Map of the verify reason for each resource.
|
||||
in: body
|
||||
required: true
|
||||
type: dict
|
||||
resources_status:
|
||||
description: |
|
||||
Map of the verify status for each resource.
|
||||
in: body
|
||||
required: true
|
||||
type: dict
|
||||
restore:
|
||||
description: |
|
||||
A ``restore`` object.
|
||||
|
@ -633,3 +651,40 @@ updated:
|
|||
in: body
|
||||
required: true
|
||||
type: string
|
||||
verification:
|
||||
description: |
|
||||
A ``verification`` object.
|
||||
in: body
|
||||
required: true
|
||||
type: object
|
||||
verification_id:
|
||||
description: |
|
||||
The UUID of the verify.
|
||||
in: body
|
||||
required: true
|
||||
type: UUID
|
||||
verification_parameters:
|
||||
description: |
|
||||
The specified parameters for verification.
|
||||
in: body
|
||||
required: true
|
||||
type: dict
|
||||
verification_status:
|
||||
description: |
|
||||
The status of verify. A valid value is "``in_progress``" "``success``" or
|
||||
"``fail``".
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
verifications:
|
||||
description: |
|
||||
A list of verification objects.
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
verifications_links:
|
||||
description: |
|
||||
Links for transfer.
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"verification": {
|
||||
"status": "in_progress",
|
||||
"resources_status": {},
|
||||
"provider_id": "6659007d-6f66-4a0f-9cb4-17d6aded0bb9",
|
||||
"parameters": {},
|
||||
"checkpoint_id": "a7418b97-0474-4360-9600-5a08fd60a2b6",
|
||||
"project_id": "5d3242420cb641ac840cd4ae37af0f18",
|
||||
"id": "8c1df1c5-29ab-4f77-8b45-bebc3aacf996",
|
||||
"resources_reason": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{"verifications": [
|
||||
{
|
||||
"status": "fail",
|
||||
"resources_status": {},
|
||||
"provider_id": "6659007d-6f66-4a0f-9cb4-17d6aded0bb9",
|
||||
"parameters": {},
|
||||
"checkpoint_id": "35486bac-1b14-4158-a403-916cf09a5596",
|
||||
"project_id": "5d3242420cb641ac840cd4ae37af0f18",
|
||||
"id": "7f7bd4a4-0a96-4f03-9553-d6c6cf7b36b8",
|
||||
"resources_reason": {}
|
||||
},
|
||||
{
|
||||
"status": "success",
|
||||
"resources_status": {
|
||||
"OS::Glance::Image#1a220464-6449-4fb6-8169-14f3016c4bb9": "available"
|
||||
},
|
||||
"provider_id": "6659007d-6f66-4a0f-9cb4-17d6aded0bb9",
|
||||
"parameters": {},
|
||||
"checkpoint_id": "dd8bbf5a-6759-4ce2-a64b-854db2fa7541",
|
||||
"project_id": "5d3242420cb641ac840cd4ae37af0f18",
|
||||
"id": "2c126c95-3e69-46fb-83f0-b63e9770906f",
|
||||
"resources_reason": {
|
||||
"OS::Glance::Image#1a220464-6449-4fb6-8169-14f3016c4bb9": ""}
|
||||
}]
|
||||
}
|
Loading…
Reference in New Issue