docs: Add parameters list to device profile 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 Closes-Bug: #1927054 Change-Id: I197c8ea49b3f89739e569b589b40888b7d036f4d
This commit is contained in:
parent
5bd8d929a7
commit
7605982401
@ -28,6 +28,19 @@ Normal response codes: 200
|
||||
|
||||
Error response codes: unauthorized(401), forbidden(403)
|
||||
|
||||
Response
|
||||
========
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- device_profiles: device_profiles
|
||||
- name: device_prof_name_resp
|
||||
- uuid: device_profile_uuid
|
||||
- description: device_profile_description
|
||||
- groups: device_prof_groups_resp
|
||||
- created_at: created
|
||||
- updated_at: updated
|
||||
- links: links
|
||||
|
||||
**Example response: list all device profiles**
|
||||
|
||||
.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-list-resp.json
|
||||
@ -50,6 +63,19 @@ Request
|
||||
|
||||
- device_profile_uuid: device_profile_uuid
|
||||
|
||||
Response
|
||||
========
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- device_profile: device_profile
|
||||
- name: device_prof_name_resp
|
||||
- uuid: device_profile_uuid
|
||||
- description: device_profile_description
|
||||
- groups: device_prof_groups_resp
|
||||
- created_at: created
|
||||
- updated_at: updated
|
||||
- links: links
|
||||
|
||||
**Example response: get details of a specific device profile**
|
||||
|
||||
.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-getone-resp.json
|
||||
@ -74,6 +100,18 @@ Request
|
||||
- name: device_prof_name_req
|
||||
- groups: device_prof_groups_req
|
||||
|
||||
Response
|
||||
========
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- name: device_prof_name_resp
|
||||
- uuid: device_profile_uuid
|
||||
- description: device_profile_description
|
||||
- groups: device_prof_groups_resp
|
||||
- created_at: created
|
||||
- updated_at: updated
|
||||
- links: links
|
||||
|
||||
**Example post curl with resource/trait**
|
||||
|
||||
.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-post-curl.json
|
||||
|
@ -32,7 +32,23 @@ device_uuid:
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# variables in body
|
||||
created:
|
||||
description: |
|
||||
The date and time when the resource was created. The date and time
|
||||
stamp format is `ISO 8601 <https://en.wikipedia.org/wiki/ISO_8601>`_
|
||||
|
||||
::
|
||||
|
||||
CCYY-MM-DDThh:mm:ss±hh:mm
|
||||
|
||||
For example, ``2015-08-27T09:49:58-05:00``. The ``±hh:mm``
|
||||
value, if included, is the time zone as an offset from UTC. In
|
||||
the previous example, the offset value is ``-05:00``.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_prof_groups_req:
|
||||
description: |
|
||||
This is a list of dictionaries to describe requested accelerator resource
|
||||
@ -46,12 +62,50 @@ device_prof_groups_req:
|
||||
in: body
|
||||
required: true
|
||||
type: a list of dictionaries
|
||||
device_prof_groups_resp:
|
||||
description: |
|
||||
This is a list of dictionaries to describe returned accelerator resource
|
||||
by users, where users use keys to describe the resource_classes or traits
|
||||
and values to indicate its quantity or property. This is intentionally
|
||||
similar to extra_specs in nova flavor, and uses the same keywords for
|
||||
resources and traits. The key-value pair can either be a resource/trait
|
||||
or a Cyborg property. Cyborg property is of the form
|
||||
"accel:<key>": "<value>". The valid key-value pairs can be found
|
||||
`below <https://opendev.org/openstack/cyborg-specs/src/branch/master/specs/train/approved/device-profiles.rst#valid-accel-keys>`_.
|
||||
in: body
|
||||
required: true
|
||||
type: a list of dictionaries
|
||||
device_prof_name_req:
|
||||
description: |
|
||||
The display name of a device profile.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_prof_name_resp:
|
||||
description: |
|
||||
The display name of a device profile.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
device_profile:
|
||||
description: |
|
||||
A list of ``device profile`` objects.
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
device_profile_description:
|
||||
description: |
|
||||
A free form description of the device profile. Limited to 255 characters
|
||||
in length.
|
||||
type: string
|
||||
in: body
|
||||
required: false
|
||||
device_profiles:
|
||||
description: |
|
||||
A list of ``device profiles`` objects.
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
device_rp_uuid_bind_unbind_req:
|
||||
description: |
|
||||
UUID of the target accelerator (resource provider) for bind or unbind of
|
||||
@ -77,4 +131,25 @@ instance_uuid_bind_unbind_req:
|
||||
UUID of the target instance for bind or unbind of one accelerator request.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
type: string
|
||||
links:
|
||||
description: |
|
||||
Links to the resources in question.
|
||||
in: body
|
||||
required: true
|
||||
type: array
|
||||
updated:
|
||||
description: |
|
||||
The date and time when the resource was updated. The date and time
|
||||
stamp format is `ISO 8601 <https://en.wikipedia.org/wiki/ISO_8601>`_
|
||||
|
||||
::
|
||||
|
||||
CCYY-MM-DDThh:mm:ss±hh:mm
|
||||
|
||||
For example, ``2015-08-27T09:49:58-05:00``. The ``±hh:mm``
|
||||
value, if included, is the time zone as an offset from UTC. In
|
||||
the previous example, the offset value is ``-05:00``.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
|
Loading…
Reference in New Issue
Block a user