docs: Add parameters table to devices APIs
Since we were introduced microversion in Ussuri [1], that if we need to add a microversion for an API we should mark it as min_version and/or max_version, so we should maintain these parameters with a list in the docs, it will be clearer and friendly for users. [1]https://specs.openstack.org/openstack/cyborg-specs/specs/ussuri/implemented/api-microversion.html Co-Authored-By: Brin Zhang <zhangbailin@inspur.com> Closes-Bug: #1927057 Change-Id: I25b3de9b37e1b8769f8f34783b62bb56d176c931
This commit is contained in:
parent
88b57dcd0c
commit
f1eb10f4e4
@ -19,6 +19,31 @@ Normal response codes: 200
|
||||
|
||||
Error response codes: unauthorized(401), forbidden(403)
|
||||
|
||||
Request
|
||||
=======
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- type: device_type
|
||||
- vendor: device_vendor
|
||||
- hostname: hostname
|
||||
- filters: device_filters
|
||||
|
||||
Response
|
||||
========
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- devices: devices
|
||||
- uuid: device_uuid_resp
|
||||
- type: device_type_resp
|
||||
- vendor: device_vendor_resp
|
||||
- model: device_model_resp
|
||||
- std_board_info: device_std_board_info_resp
|
||||
- vendor_board_info: device_vendor_board_info_resp
|
||||
- hostname: hostname_resp
|
||||
- created_at: created
|
||||
- updated_at: updated
|
||||
- links: links
|
||||
|
||||
**Example response: list all devices**
|
||||
|
||||
.. literalinclude:: ../../doc/api_samples/devices/devices-list-resp.json
|
||||
|
@ -26,7 +26,37 @@ device_uuid:
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# variables in query
|
||||
device_filters:
|
||||
description: |
|
||||
A list of filter of ``FilterType`` to get device list by filter.
|
||||
in: query
|
||||
required: false
|
||||
type: array
|
||||
device_type:
|
||||
description: |
|
||||
The type of the device.
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
device_vendor:
|
||||
description: |
|
||||
The vendor ID of the device.
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
filters:
|
||||
description: |
|
||||
A list of FilterType(in json string format).
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
hostname:
|
||||
description: |
|
||||
The hostname of a compute node where the device locates.
|
||||
in: query
|
||||
required: false
|
||||
type: string
|
||||
# variables in body
|
||||
created:
|
||||
description: |
|
||||
@ -43,6 +73,12 @@ created:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_model_resp:
|
||||
description: |
|
||||
The model of the device.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_prof_groups_req:
|
||||
description: |
|
||||
This is a list of dictionaries to describe requested accelerator resource
|
||||
@ -113,12 +149,48 @@ device_rp_uuid_bind_unbind_req:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_std_board_info_resp:
|
||||
description: |
|
||||
The standard board information of the device.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_type_resp:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_uuid_resp:
|
||||
description: |
|
||||
The UUID of the device.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_vendor_board_info_resp:
|
||||
description: |
|
||||
The vendor board information of the device.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_vendor_resp:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
devices:
|
||||
description: |
|
||||
A list of ``devices`` objects.
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
hostname_bind_unbind_req:
|
||||
description: |
|
||||
The name of the target host for bind or unbind of one accelerator request.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
hostname_resp:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
instance_project_id_bind_unbind_req:
|
||||
description: |
|
||||
Project id of the target instance for bind or unbind of one accelerator request.
|
||||
|
Loading…
x
Reference in New Issue
Block a user