Debian Codegraph @

api-ref/source/arqs.inc

raw
1 .. -*- rst -*-
2 .. needs:body_verification
3
4 Accelerator Requests
5 ++++++++++++++++++++
6
7 Lists, creates, shows details for, updates and deletes accelerator requests.
8
9 An accelerator request (ARQ) represents a request for a single accelerator
10 to be assigned to an instance. ARQs are created in accordance with the
11 resource_groups defined in a `device_profile
12 <http://specs.openstack.org/openstack/cyborg-specs/specs/train/implemented/device-profiles.html>`_
13 by the operator. The accelerator request in the user request may have N
14 request groups, each asking for M accelerators; then N * M ARQs will be
15 created for that accelerator request.
16
17 List Accelerator Requests
18 -------------------------
19
20 .. rest_method:: GET /v2/accelerator_requests
21
22 Lists host_name, device_rp_uuid, instance_uuid and device_profile_group_id
23 for all accelerator_requests.
24
25 **Example response: list all accelerator requests**
26
27 .. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-list-resp.json
28 :language: javascript
29
30 Get One Accelerator Request
31 ---------------------------
32
33 .. rest_method:: GET /v2/accelerator_requests/{accelerator_request_uuid}
34
35 Gets host_name, device’s_RP_UUID, instance UUID and device_profile_group_ID
36 for one accelerator request with the specified UUID.
37
38 Request
39 =======
40 .. rest_parameters:: parameters.yaml
41
42 - accelerator_request_uuid: accelerator_request_uuid
43
44 **Example response: get details of a specific accelerator request**
45
46 .. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-getone-resp.json
47
48 Create Accelerator Requests
49 ---------------------------
50
51 .. rest_method:: POST /v2/accelerator_requests
52
53 Creates an accelerator request. The payload should have the following field:
54
55 Request
56 =======
57 .. rest_parameters:: parameters.yaml
58
59 - device_profile_name: device_profile_name
60
61 **Example post curl**
62
63 .. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-post-curl.json
64
65 **Example response: create an accelerator request**
66
67 .. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-create-resp.json
68
69 Update Accelerator Requests
70 ---------------------------
71
72 The Nova compute manager calls the Cyborg API PATCH /v2/accelerator_requests
73 to bind and unbind the ARQ with the host name, device’s RP UUID and instance UUID. This
74 is an asynchronous call which prepares or reconfigures the device in the
75 background.
76
77 .. rest_method:: PATCH /v2/accelerator_requests/{accelerator_request_uuid}
78
79 Updates:an accelerator request. The payload should have these fields:
80
81 Request
82 =======
83 .. rest_parameters:: parameters.yaml
84
85 - accelerator_request_uuid: accelerator_request_uuid
86 - hostname: hostname_bind_unbind_req
87 - device_rp_uuid: device_rp_uuid_bind_unbind_req
88 - instance_uuid: instance_uuid_bind_unbind_req
89 - instance_project_id: instance_project_id_bind_unbind_req
90
91 **Example patch curl**
92
93 .. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-patch-curl.json
94
95 **Example response: update an accelerator request**
96
97 .. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-after-update-resp.json
98
99 Delete Accelerator Requests by ARQ uuid
100 ---------------------------------------
101
102 .. rest_method:: DELETE /v2/accelerator_requests?arqs={accelerator_request_uuid}
103
104 Delete Accelerator Requests by instance uuid
105 --------------------------------------------
106
107 .. rest_method:: DELETE /v2/accelerator_requests?instance={instance_uuid}
108
109 Delete an accelerator request. No query parameters required.
110
111 Response
112 ========
113
114 Normal response codes: 204
115
116 There is no body content for the response of a successful DELETE query