8c9cfb527d
The ARQ PATCH endpoint was documented with a UUID in the URL path
(PATCH /v2/accelerator_requests/{uuid}) but the code takes no path
UUID — ARQ UUIDs are keys in the JSON request body. The docs also
referenced a response sample, but the endpoint returns 202 with no
body. Fix the URL, remove the orphan response sample, and add the
standard "no body content" text. Add prose clarifying the JSON-Patch
request structure for the parameter table.
The deployables program endpoint (PATCH /v2/deployables/{uuid}/program)
existed in code but had no api-ref documentation. Add the endpoint
section, request/response parameter docs, and sample JSON files.
Document the JSON-Patch envelope in the parameter description and
set bitstream_id to null in the response sample to match what the
controller actually returns.
Add a functional test for the new program endpoint samples, extending
_check_sample() to support PATCH requests with a request body.
Closes-Bug: #2158759
Assisted-by: Claude claude-opus-4-6 claude-code-2.1.196
Change-Id: Iaf9e68cf7174bf9993cef034e07d78f532d1077a
Signed-off-by: melanie witt <melwittt@gmail.com>
143 lines
3.6 KiB
ReStructuredText
143 lines
3.6 KiB
ReStructuredText
.. -*- rst -*-
|
|
.. needs:body_verification
|
|
|
|
Deployables
|
|
+++++++++++
|
|
|
|
Lists, shows details for deployables.
|
|
|
|
A `deployables` represent a logical unit of an acceleration card, such as re-configurable
|
|
region of an FPGA card.
|
|
|
|
List Deployables
|
|
----------------
|
|
|
|
.. rest_method:: GET /v2/deployables
|
|
|
|
Lists UUIDs, names, attribute list and more information for all deployables.
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), internalServerError(500)
|
|
|
|
Request
|
|
=======
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- filters: filters
|
|
|
|
Response
|
|
========
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- deployables: deployables
|
|
- uuid: deployable_uuid_resp
|
|
- parent_id: deployable_parent_id
|
|
- root_id: deployable_root_id
|
|
- name: deployable_name
|
|
- num_accelerators: deployable_num_accelerators
|
|
- device_id: deployable_device_id
|
|
- attributes_list: deployable_attributes_list
|
|
- rp_uuid: deployable_rp_uuid
|
|
- driver_name: deployable_driver_name
|
|
- bitstream_id: deployable_bitstream_id
|
|
- created_at: created
|
|
- updated_at: updated
|
|
- links: links
|
|
|
|
**Example response: list all deployables**
|
|
|
|
.. literalinclude:: ../../doc/api_samples/deployables/deployables-list-resp.json
|
|
:language: javascript
|
|
|
|
Get One Deployable
|
|
------------------
|
|
|
|
.. rest_method:: GET /v2/deployables/{deployable_uuid}
|
|
|
|
Gets the UUID, name, attribute list and more information for one deployable with the specified UUID.
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), notfound(404)
|
|
|
|
Request
|
|
=======
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- deployable_uuid: deployable_uuid
|
|
|
|
Response
|
|
========
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: deployable_uuid_resp
|
|
- parent_id: deployable_parent_id
|
|
- root_id: deployable_root_id
|
|
- name: deployable_name
|
|
- num_accelerators: deployable_num_accelerators
|
|
- device_id: deployable_device_id
|
|
- attributes_list: deployable_attributes_list
|
|
- rp_uuid: deployable_rp_uuid
|
|
- driver_name: deployable_driver_name
|
|
- bitstream_id: deployable_bitstream_id
|
|
- created_at: created
|
|
- updated_at: updated
|
|
- links: links
|
|
|
|
**Example response: show details of a specific deployable**
|
|
|
|
.. literalinclude:: ../../doc/api_samples/deployables/deployables-getone-resp.json
|
|
:language: javascript
|
|
|
|
Program a Deployable
|
|
--------------------
|
|
|
|
.. rest_method:: PATCH /v2/deployables/{deployable_uuid}/program
|
|
|
|
Program an FPGA deployable with a new bitstream image. This is an
|
|
asynchronous operation that reconfigures the FPGA device.
|
|
|
|
Normal response codes: 200
|
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), notfound(404)
|
|
|
|
Request
|
|
=======
|
|
|
|
The request body is a JSON-Patch array. The ``image_uuid`` is supplied
|
|
inside a ``replace`` operation on ``/program``:
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- deployable_uuid: deployable_uuid
|
|
- image_uuid: image_uuid
|
|
|
|
**Example request: program a deployable**
|
|
|
|
.. literalinclude:: ../../doc/api_samples/deployables/deployables-program-req.json
|
|
:language: javascript
|
|
|
|
Response
|
|
========
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: deployable_uuid_resp
|
|
- parent_id: deployable_parent_id
|
|
- root_id: deployable_root_id
|
|
- name: deployable_name
|
|
- num_accelerators: deployable_num_accelerators
|
|
- device_id: deployable_device_id
|
|
- attributes_list: deployable_attributes_list
|
|
- rp_uuid: deployable_rp_uuid
|
|
- driver_name: deployable_driver_name
|
|
- bitstream_id: deployable_bitstream_id
|
|
- created_at: created
|
|
- updated_at: updated
|
|
- links: links
|
|
|
|
**Example response: program a deployable**
|
|
|
|
.. literalinclude:: ../../doc/api_samples/deployables/deployables-program-resp.json
|
|
:language: javascript
|