diff --git a/api-ref/source/v2/device_profile.inc b/api-ref/source/v2/device_profile.inc index 62cbaee2..ce4d0039 100644 --- a/api-ref/source/v2/device_profile.inc +++ b/api-ref/source/v2/device_profile.inc @@ -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 diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index 4fc192a9..5b6bdb87 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -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 `_ + + :: + + 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:": "". The valid key-value pairs can be found + `below `_. + 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 \ No newline at end of file + 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 `_ + + :: + + 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