### Example Response: Program a Deployable Source: https://docs.openstack.org/api-ref/accelerator?expanded= A JSON representation of a deployable resource response. ```json { "uuid": "29e23349-12ee-4978-963c-11484a4ae601", "parent_id": null, "root_id": null, "name": "computenode_FakeDevice", "num_accelerators": 16, "device_id": 1, "attributes_list": "[{'traits1': 'CUSTOM_FAKE_DEVICE'}, {'rc': 'FPGA'}]", "rp_uuid": "853f07a6-19de-3dd6-b9f6-6c782daa3f7b", "driver_name": "fake", "bitstream_id": null, "created_at": "2020-03-13T02:27:35+00:00", "updated_at": "2020-03-13T02:27:36+00:00", "links": [ { "href": "http://localhost/accelerator/v2/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "self" }, { "href": "http://localhost/accelerator/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "bookmark" } ] } ``` -------------------------------- ### List Deployables Response Example Source: https://docs.openstack.org/api-ref/accelerator?expanded= A sample JSON response body returned when listing all available deployables. ```json { "deployables": [ { "uuid": "29e23349-12ee-4978-963c-11484a4ae601", "parent_id": null, "root_id": null, "name": "computenode_FakeDevice", "num_accelerators": 16, "device_id": 1, "attributes_list": "[{'traits1': 'CUSTOM_FAKE_DEVICE'}, {'rc': 'FPGA'}]", "rp_uuid": "853f07a6-19de-3dd6-b9f6-6c782daa3f7b", "driver_name": "fake", "bitstream_id": null, "created_at": "2020-03-13T02:27:35+00:00", "updated_at": "2020-03-13T02:27:36+00:00", "links": [ { "href": "http://localhost/accelerator/v2/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "self" }, { "href": "http://localhost/accelerator/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "bookmark" } ] } ] } ``` -------------------------------- ### GET /v2/deployables Source: https://docs.openstack.org/api-ref/accelerator?expanded= Lists all deployables, including their UUIDs, names, and attribute lists. ```APIDOC ## GET /v2/deployables ### Description Lists UUIDs, names, attribute list and more information for all deployables. ### Method GET ### Endpoint /v2/deployables ### Parameters #### Query Parameters - **filters** (string) - Optional - A list of FilterType(in json string format). ### Response #### Success Response (200) - **deployables** (array) - A list of dictionaries, with each dictionary representing a deployable object. - **uuid** (string) - The UUID of the deployable. - **parent_id** (string) - The parent_id refers to the id of the deployable’s parent node. - **root_id** (string) - The root_id refers to the id of the deployable’s root to for nested tree. - **name** (string) - Name of the deployable. - **num_accelerators** (integer) - Number of accelerators spawned by this deployable. - **device_id** (integer) - ID of device associated with the deployable. - **attributes_list** (string) - A list of dictionaries (in json string format) representing attributes of the deployable. - **rp_uuid** (string) - UUID of the resource provider corresponding to this deployable. - **driver_name** (string) - Name of the driver reported. - **bitstream_id** (string) - The UUID of the bitstream corresponding to the deployable. - **created_at** (string) - The date and time when the resource was created. - **updated_at** (string) - The date and time when the resource was updated. - **links** (array) - Links to the resources in question. #### Response Example { "deployables": [ { "uuid": "29e23349-12ee-4978-963c-11484a4ae601", "parent_id": null, "root_id": null, "name": "computenode_FakeDevice", "num_accelerators": 16, "device_id": 1, "attributes_list": "[{'traits1': 'CUSTOM_FAKE_DEVICE'}, {'rc': 'FPGA'}]", "rp_uuid": "853f07a6-19de-3dd6-b9f6-6c782daa3f7b", "driver_name": "fake", "bitstream_id": null, "created_at": "2020-03-13T02:27:35+00:00", "updated_at": "2020-03-13T02:27:36+00:00", "links": [ { "href": "http://localhost/accelerator/v2/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "self" }, { "href": "http://localhost/accelerator/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "bookmark" } ] } ] } ``` -------------------------------- ### List All Devices Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example JSON response body when listing all available accelerator devices. ```json { "devices": [ { "uuid": "359c0990-0258-44fd-8b05-fc510ac3d022", "type": "FPGA", "vendor": "0xABCD", "model": "miss model info", "std_board_info": "{'device_id': '0xabcd', 'class': 'Fake class'}", "vendor_board_info": "fake_vendor_info", "hostname": "computenode", "created_at": "2020-03-13T02:26:31+00:00", "updated_at": null, "links": [ { "href": "http://localhost/accelerator/v2/devices/359c0990-0258-44fd-8b05-fc510ac3d022", "rel": "self" } ] } ] } ``` -------------------------------- ### ISO 8601 Date Example Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example of a valid ISO 8601 timestamp with a UTC offset. ```text 2015-08-27T09:49:58-05:00 ``` -------------------------------- ### List All Attributes Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example JSON response body when listing all available attributes. ```json { "attributes": [ { "uuid": "359c0990-0258-44fd-8b05-fc510ac3d024", "deployable_id": 1, "key": "rc", "value": "FPGA", "created_at": "2023-03-13T02:26:31+00:00", "updated_at": null, "links": [ { "href": "http://localhost/accelerator/v2/attributes/359c0990-0258-44fd-8b05-fc510ac3d024", "rel": "self" } ] } ] } ``` -------------------------------- ### Create Device Profile Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example JSON response returned after successfully creating a device profile. ```json { "name":"afexample_3", "uuid":"1a939c88-0b01-408b-bab0-4c61d3a02d71", "description": "", "groups":[ { "trait:CUSTOM_FUNCTION_ID_3AFB":"required", "resources:CUSTOM_ACCELERATOR_FPGA":"1", "trait:CUSTOM_FPGA_1":"required" } ], "created_at": "2020-03-09 11:26:05+00:00", "updated_at": null, "links":[ { "href":"http://192.168.23.76/accelerator/v2/device_profiles/1a939c88-0b01-408b-bab0-4c61d3a02d71", "rel":"self" } ] } ``` -------------------------------- ### Example Device Profile Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= A sample JSON response showing the structure of a specific device profile. ```json { "device_profile":{ "name":"fpga-dp1", "uuid":"5518a925-1c2c-49a2-a8bf-0927d9456f3e", "description": "", "groups":[ { "trait:CUSTOM_FPGA_INSPUR":"required", "resources:FPGA":"1", "accel:bitstream_id":"d5ca2f11-3108-4426-a11c-a959987565df" } ], "created_at": "2020-03-09 11:26:05+00:00", "updated_at": null, "links":[ { "href":"http://192.168.32.217/accelerator/v2/device_profiles/5518a925-1c2c-49a2-a8bf-0927d9456f3e", "rel":"self" } ] } } ``` -------------------------------- ### GET /v2/deployables/{deployable_uuid} Source: https://docs.openstack.org/api-ref/accelerator?expanded= Gets the details for one deployable with the specified UUID. ```APIDOC ## GET /v2/deployables/{deployable_uuid} ### Description Gets the UUID, name, attribute list and more information for one deployable with the specified UUID. ### Method GET ### Endpoint /v2/deployables/{deployable_uuid} ### Parameters #### Path Parameters - **deployable_uuid** (string) - Required - The UUID of the deployable. ``` -------------------------------- ### Response for create accelerator request Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example response body returned after successfully creating an accelerator request. ```json { "arqs":[ { "instance_uuid":null, "hostname":null, "uuid":"89ec9c4d-73b2-4aaf-9225-485945aa7162", "links":[ { "href":"http://192.168.23.138/accelerator/v2/accelerator_requests/89ec9c4d-73b2-4aaf-9225-485945aa7162", "rel":"self" } ], "created_at":"2019-10-25T12:01:05.896464+00:00", "device_profile_group_id":0, "attach_handle_type":"", "updated_at":null, "state":"Initial", "device_rp_uuid":null, "device_profile_name":"tmp-dp1", "attach_handle_info":{ } } ] } ``` -------------------------------- ### GET /v2/devices Source: https://docs.openstack.org/api-ref/accelerator?expanded= Lists UUIDs, names, types, and additional information for all available accelerator devices. ```APIDOC ## GET /v2/devices ### Description Lists UUIDs, names, type and more information for all devices. ### Method GET ### Endpoint /v2/devices ### Parameters #### Query Parameters - **type** (string) - Optional - The type of the device. - **vendor** (string) - Optional - The vendor ID of the device. - **hostname** (string) - Optional - The hostname of a compute node where the device locates. - **filters** (array) - Optional - A list of filter of FilterType to get device list by filter. ### Response #### Success Response (200) - **devices** (array) - A list of devices objects. - **uuid** (string) - The UUID of the device. - **type** (string) - Type of the device. - **vendor** (string) - The vendor of the device. - **model** (string) - The model of the device. - **std_board_info** (string) - The standard board information of the device. - **vendor_board_info** (string) - The vendor board information of the device. - **hostname** (string) - The host name of the device. - **status** (string) - The status of device. One of maintaining or enabled. - **created_at** (string) - The date and time when the resource was created. - **updated_at** (string) - The date and time when the resource was updated. - **links** (array) - Links to the resources in question. #### Response Example { "devices": [ { "uuid": "359c0990-0258-44fd-8b05-fc510ac3d022", "type": "FPGA", "vendor": "0xABCD", "model": "miss model info", "std_board_info": "{'device_id': '0xabcd', 'class': 'Fake class'}", "vendor_board_info": "fake_vendor_info", "hostname": "computenode", "created_at": "2020-03-13T02:26:31+00:00", "updated_at": null, "links": [ { "href": "http://localhost/accelerator/v2/devices/359c0990-0258-44fd-8b05-fc510ac3d022", "rel": "self" } ] } ] } ``` -------------------------------- ### GET /v2/attributes Source: https://docs.openstack.org/api-ref/accelerator?expanded= Lists all attributes, including their UUID, deployable_id, key, and value. ```APIDOC ## GET /v2/attributes ### Description Lists UUID, deployable_id, key, value and more information for all devices. ### Method GET ### Endpoint /v2/attributes ### Parameters #### Query Parameters - **attribute_request_depid** (integer) - Optional - ID of deployable associated with the attribute. ### Response #### Success Response (200) - **attributes** (array) - A list of attributes objects. - **uuid** (string) - The UUID of the attribute. - **id** (integer) - ID of the attribute. - **deployable_id** (integer) - ID of deployable associated with the attribute. - **key** (string) - The key of the attribute. - **value** (string) - The value of the attribute. - **created_at** (string) - The date and time when the resource was created. - **updated_at** (string) - The date and time when the resource was updated. - **links** (array) - Links to the resources in question. ### Response Example { "attributes": [ { "uuid": "359c0990-0258-44fd-8b05-fc510ac3d024", "deployable_id": 1, "key": "rc", "value": "FPGA", "created_at": "2023-03-13T02:26:31+00:00", "updated_at": null, "links": [ { "href": "http://localhost/accelerator/v2/attributes/359c0990-0258-44fd-8b05-fc510ac3d024", "rel": "self" } ] } ] } ``` -------------------------------- ### Get Attribute Details Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example JSON response body for a single attribute lookup by UUID. ```json { "uuid": "359c0990-0258-44fd-8b05-fc510ac3d024", "deployable_id": 1, "key": "rc", "value": "FPGA", "created_at": "2023-03-13T02:26:31+00:00", "updated_at": null, "links": [ { "href": "http://localhost/accelerator/v2/attributes/359c0990-0258-44fd-8b05-fc510ac3d024", "rel": "self" } ] } ``` -------------------------------- ### GET /v2/devices/{device_uuid} Source: https://docs.openstack.org/api-ref/accelerator/?expanded=#accelerator-requests Gets the UUID, name, type and more information for one device with the specified UUID. ```APIDOC ## GET /v2/devices/{device_uuid} ### Description Gets the UUID, name, type and more information for one device with the specified UUID. ### Method GET ### Endpoint /v2/devices/{device_uuid} ### Parameters #### Path Parameters - **device_uuid** (string) - Required - The UUID of the device. This must be a valid UUID otherwise API will return 400. ``` -------------------------------- ### List Device Profiles Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example JSON response body returned when listing all device profiles. ```json { "device_profiles":[ { "name":"bym-1", "uuid":"3d03fa5b-507c-4810-a344-759e9ef4337a", "description": "", "groups":[ { "resources:FPGA":"1", "trait:CUSTOM_FPGA_C260":"required" } ], "created_at": "2020-03-09 11:26:05+00:00", "updated_at": null, "links":[ { "href":"http://192.168.32.217/accelerator/v2/device_profiles/3d03fa5b-507c-4810-a344-759e9ef4337a", "rel":"self" } ] }, { "name":"fpga-dp1", "uuid":"5518a925-1c2c-49a2-a8bf-0927d9456f3e", "description": "", "groups":[ { "trait:CUSTOM_FPGA_INSPUR":"required", "resources:FPGA":"1", "accel:bitstream_id":"d5ca2f11-3108-4426-a11c-a959987565df" } ], "created_at": "2020-03-10 03:52:15+00:00", "updated_at": null, "links":[ { "href":"http://192.168.32.217/accelerator/v2/device_profiles/5518a925-1c2c-49a2-a8bf-0927d9456f3e", "rel":"self" } ] } ] } ``` -------------------------------- ### Create Device Profile Request Examples Source: https://docs.openstack.org/api-ref/accelerator?expanded= JSON payloads for creating device profiles, supporting resource/trait definitions and optional bitstream properties. ```json [ { "name": "afexample_3", "description": "device profile description", "groups": [ { "resources:CUSTOM_ACCELERATOR_FPGA": "1", "trait:CUSTOM_FPGA_1": "required", "trait:CUSTOM_FUNCTION_ID_3AFB": "required" } ] } ] ``` ```json [ { "name": "afexample_3", "description": "device profile description", "groups": [ { "resources:CUSTOM_ACCELERATOR_FPGA": "1", "trait:CUSTOM_FPGA_1": "required", "trait:CUSTOM_FUNCTION_ID_3AFB": "required", "accel:bitstream_id": "a6a12670-7014-4cff-a563-cea949b57fb3" } ] } ] ``` -------------------------------- ### GET /v2/device_profiles Source: https://docs.openstack.org/api-ref/accelerator?expanded= Lists all device profiles, including their UUIDs, names, and resource groups. ```APIDOC ## GET /v2/device_profiles ### Description Lists UUIDs, names, groups and more information for all device profiles. ### Method GET ### Endpoint /v2/device_profiles ### Response #### Success Response (200) - **device_profiles** (array) - A list of device profiles objects. - **name** (string) - The display name of a device profile. - **uuid** (string) - The uuid of the device_profile. - **description** (string) - The display description of a device profile. - **groups** (list of dictionaries) - A list of dictionaries describing accelerator resources. - **created_at** (string) - The date and time when the resource was created. - **updated_at** (string) - The date and time when the resource was updated. - **links** (array) - Links to the resources in question. #### Response Example { "device_profiles":[ { "name":"bym-1", "uuid":"3d03fa5b-507c-4810-a344-759e9ef4337a", "description": "", "groups":[ { "resources:FPGA":"1", "trait:CUSTOM_FPGA_C260":"required" } ], "created_at": "2020-03-09 11:26:05+00:00", "updated_at": null, "links":[ { "href":"http://192.168.32.217/accelerator/v2/device_profiles/3d03fa5b-507c-4810-a344-759e9ef4337a", "rel":"self" } ] } ] } ``` -------------------------------- ### Create an accelerator request Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example request body for creating a new accelerator request using a device profile name. ```json { "device_profile_name": "tmp-dp1" } ``` -------------------------------- ### GET /v2/device_profiles/{uuid} Source: https://docs.openstack.org/api-ref/accelerator?expanded= Retrieves the details of a specific device profile by its UUID. ```APIDOC ## GET /v2/device_profiles/{uuid} ### Description Retrieves details of a specific device profile. ### Method GET ### Endpoint /v2/device_profiles/{uuid} ### Response #### Success Response (200) - **device_profile** (array) - A list of device profile objects. - **name** (string) - The display name of a device profile. - **uuid** (string) - The uuid of the device_profile. - **description** (string) - The display description of a device profile. - **groups** (list of dictionaries) - A list of dictionaries describing the accelerator resource. - **created_at** (string) - The date and time when the resource was created (ISO 8601). - **updated_at** (string) - The date and time when the resource was updated (ISO 8601). - **links** (array) - Links to the resources in question. ### Response Example { "device_profile":{ "name":"fpga-dp1", "uuid":"5518a925-1c2c-49a2-a8bf-0927d9456f3e", "description": "", "groups":[ { "trait:CUSTOM_FPGA_INSPUR":"required", "resources:FPGA":"1", "accel:bitstream_id":"d5ca2f11-3108-4426-a11c-a959987565df" } ], "created_at": "2020-03-09 11:26:05+00:00", "updated_at": null, "links":[ { "href":"http://192.168.32.217/accelerator/v2/device_profiles/5518a925-1c2c-49a2-a8bf-0927d9456f3e", "rel":"self" } ] } } ``` -------------------------------- ### GET /v2/accelerator_requests Source: https://docs.openstack.org/api-ref/accelerator?expanded= Lists all accelerator requests, including details like host_name, device_rp_uuid, instance_uuid, and device_profile_group_id. ```APIDOC ## GET /v2/accelerator_requests ### Description Lists all accelerator requests. ### Method GET ### Endpoint /v2/accelerator_requests ### Response #### Success Response (200) - **arqs** (array) - List of accelerator request objects. #### Response Example { "arqs":[ { "instance_uuid":null, "hostname":null, "uuid":"234c1acf-beca-47b2-9532-6bea61630936", "state":"Initial", "device_profile_name":"temp-dp1" } ] } ``` -------------------------------- ### GET /v2/devices/{device_uuid} Source: https://docs.openstack.org/api-ref/accelerator?expanded= Retrieves detailed information for a specific accelerator device using its UUID. ```APIDOC ## GET /v2/devices/{device_uuid} ### Description Gets the UUID, name, type and more information for one device with the specified UUID. ### Method GET ### Endpoint /v2/devices/{device_uuid} ### Parameters #### Path Parameters - **device_uuid** (string) - Required - The UUID of the device. ``` -------------------------------- ### GET /v2/device_profiles/{device_profile_name_or_uuid} Source: https://docs.openstack.org/api-ref/accelerator?expanded= Retrieves details for a specific device profile using its name or UUID. ```APIDOC ## GET /v2/device_profiles/{device_profile_name_or_uuid} ### Description Gets the UUID, name, groups for one device_profile with the specified name or UUID. ### Method GET ### Endpoint /v2/device_profiles/{device_profile_name_or_uuid} ### Parameters #### Path Parameters - **device_profile_uuid** (string) - Required - The uuid of the device_profile for your accelerator request. - **device_profile_name_or_uuid** (string) - Required - The name or uuid of the device_profile for your accelerator request. ``` -------------------------------- ### GET /v2/accelerator_requests/{accelerator_request_uuid} Source: https://docs.openstack.org/api-ref/accelerator?expanded= Retrieves detailed information for a specific accelerator request by its UUID. ```APIDOC ## GET /v2/accelerator_requests/{accelerator_request_uuid} ### Description Gets host_name, device_rp_uuid, instance_uuid, and device_profile_group_id for one accelerator request with the specified UUID. ### Method GET ### Endpoint /v2/accelerator_requests/{accelerator_request_uuid} ### Parameters #### Path Parameters - **accelerator_request_uuid** (string) - Required - The UUID of one accelerator request. ### Response #### Success Response (200) - **uuid** (string) - The UUID of the accelerator request. - **instance_uuid** (string) - The UUID of the instance. - **hostname** (string) - The host name. #### Response Example { "instance_uuid":null, "hostname":null, "uuid":"234c1acf-beca-47b2-9532-6bea61630936", "state":"Initial" } ``` -------------------------------- ### Update an accelerator request Source: https://docs.openstack.org/api-ref/accelerator?expanded= Example request body for binding an accelerator request using JSON-Patch operations. ```json { "89ec9c4d-73b2-4aaf-9225-485945aa7162": [ { "op": "add", "path": "/instance_uuid", "value": "506220bc-18f2-4294-9b29-80267a021dc0" }, { "op": "add", "path": "/hostname", "value": "centos-80" }, { "op": "add", "path": "/device_rp_uuid", "value": "03631f82-20a9-3f67-a29d-dc1abe4042bf" }, { "op": "add", "path": "/project_id", "value": "8934fbea7b3f4685bd8ee7cf166a4c09" } ] } ``` -------------------------------- ### GET /v2/attributes/{attribute_uuid} Source: https://docs.openstack.org/api-ref/accelerator?expanded= Retrieves detailed information for a specific attribute identified by its UUID. ```APIDOC ## GET /v2/attributes/{attribute_uuid} ### Description Gets the UUID, id, deployable_id, key, value and more information for one attribute with the specified UUID. ### Method GET ### Endpoint /v2/attributes/{attribute_uuid} ### Parameters #### Path Parameters - **attribute_uuid** (string) - Required - The UUID of the attribute. ### Response #### Success Response (200) - **uuid** (string) - The UUID of the attribute. - **id** (integer) - ID of the attribute. - **deployable_id** (integer) - ID of deployable associated with the attribute. - **key** (string) - The key of the attribute. - **value** (string) - The value of the attribute. - **created_at** (string) - The date and time when the resource was created. - **updated_at** (string) - The date and time when the resource was updated. - **links** (array) - Links to the resources in question. ### Response Example { "uuid": "359c0990-0258-44fd-8b05-fc510ac3d024", "deployable_id": 1, "key": "rc", "value": "FPGA", "created_at": "2023-03-13T02:26:31+00:00", "updated_at": null, "links": [ { "href": "http://localhost/accelerator/v2/attributes/359c0990-0258-44fd-8b05-fc510ac3d024", "rel": "self" } ] } ``` -------------------------------- ### Get details of a specific accelerator request Source: https://docs.openstack.org/api-ref/accelerator?expanded= Returns the detailed JSON representation of a single accelerator request identified by its UUID. ```json { "instance_uuid":null, "hostname":null, "uuid":"234c1acf-beca-47b2-9532-6bea61630936", "links":[ { "href":"http://192.168.23.138/accelerator/v2/accelerator_requests/234c1acf-beca-47b2-9532-6bea61630936", "rel":"self" } ], "created_at":"2019-10-25T07:58:49+00:00", "device_profile_group_id":0, "attach_handle_type":"", "updated_at":null, "state":"Initial", "device_rp_uuid":null, "device_profile_name":"tmp-dp1", "project_id":"4e01a8e0-52b4-42e4-be67-20dd82f0ef77", "attach_handle_uuid":null, "attach_handle_info":{ } } ``` -------------------------------- ### POST /v2/device_profiles Source: https://docs.openstack.org/api-ref/accelerator/?expanded=#accelerator-requests Creates a new device profile for accelerator resources. ```APIDOC ## POST /v2/device_profiles ### Description Creates a device profile. The payload defines the name, groups of accelerator resources, and an optional description. ### Method POST ### Endpoint /v2/device_profiles ### Parameters #### Request Body - **name** (string) - Required - The display name of a device profile. - **groups** (list of dictionaries) - Required - A list of dictionaries describing requested accelerator resources, traits, or Cyborg properties (accel:). - **description** (string) - Optional - A free form description of the device profile. Limited to 255 characters in length. ### Response #### Success Response (201) ``` -------------------------------- ### POST /v2/device_profiles Source: https://docs.openstack.org/api-ref/accelerator?expanded= Creates a new device profile with the specified name, groups, and optional description. ```APIDOC ## POST /v2/device_profiles ### Description Creates a device profile. The payload should have the required name and groups fields. ### Method POST ### Endpoint /v2/device_profiles ### Parameters #### Request Body - **name** (string) - Required - The display name of a device profile. - **groups** (list of dictionaries) - Required - A list of dictionaries to describe requested accelerator resource by users, using keys for resource_classes or traits and values for quantity or property. - **description** (string) - Optional - A free form description of the device profile. Limited to 255 characters in length. ### Response #### Success Response (201) - Normal response code: 201 #### Error Response - badRequest(400), unauthorized(401), forbidden(403), conflict(409) ``` -------------------------------- ### POST /v2/devices/{device_uuid}/enable Source: https://docs.openstack.org/api-ref/accelerator?expanded= Sets the specified accelerator device to enabled status. Requires admin role. ```APIDOC ## POST /v2/devices/{device_uuid}/enable ### Description Set the device to enabled status. ### Method POST ### Endpoint /v2/devices/{device_uuid}/enable ### Parameters #### Path Parameters - **device_uuid** (string) - Required - The UUID of the device. This must be a valid UUID otherwise API will return 400. ### Response #### Success Response (200) - No body content. ``` -------------------------------- ### POST /v2/devices/{device_uuid}/enable Source: https://docs.openstack.org/api-ref/accelerator/?expanded=#accelerator-requests Sets the specified accelerator device to enabled status. ```APIDOC ## POST /v2/devices/{device_uuid}/enable ### Description Set the device to enabled status. ### Method POST ### Endpoint /v2/devices/{device_uuid}/enable ### Parameters #### Path Parameters - **device_uuid** (string) - Required - The UUID of the device. This must be a valid UUID otherwise API will return 400. ### Response #### Success Response (200) - No body content for the response of a successful request. ``` -------------------------------- ### Program Deployable Request Source: https://docs.openstack.org/api-ref/accelerator?expanded= A JSON-Patch request used to program an FPGA deployable with a new bitstream image. ```json [ { "path": "/program", "value": [ { "image_uuid": "76babc1b-3222-4992-a046-52441e403577" } ], "op": "replace" } ] ``` -------------------------------- ### POST /v2/accelerator_requests Source: https://docs.openstack.org/api-ref/accelerator?expanded= Creates a new accelerator request using a specified device profile. ```APIDOC ## POST /v2/accelerator_requests ### Description Creates a new accelerator request. ### Method POST ### Endpoint /v2/accelerator_requests ### Request Body - **device_profile_name** (string) - Required - The display name of a device profile. ### Request Example { "device_profile_name": "tmp-dp1" } ### Response #### Success Response (200) - **arqs** (array) - List of created accelerator requests. #### Response Example { "arqs":[ { "uuid":"89ec9c4d-73b2-4aaf-9225-485945aa7162", "state":"Initial", "device_profile_name":"tmp-dp1" } ] } ``` -------------------------------- ### List all accelerator requests Source: https://docs.openstack.org/api-ref/accelerator?expanded= Returns a JSON object containing a list of all accelerator requests, including their state, associated instance UUIDs, and device profile information. ```json { "arqs":[ { "instance_uuid":null, "hostname":null, "uuid":"234c1acf-beca-47b2-9532-6bea61630936", "links":[ { "href":"http://192.168.23.138/accelerator/v2/accelerator_requests/234c1acf-beca-47b2-9532-6bea61630936", "rel":"self" } ], "created_at":"2019-10-25T07:58:49+00:00", "device_profile_group_id":0, "attach_handle_type":"", "updated_at":null, "state":"Initial", "device_rp_uuid":null, "device_profile_name":"temp-dp1", "project_id":"4e01a8e0-52b4-42e4-be67-20dd82f0ef77", "attach_handle_uuid":null, "attach_handle_info":{ } }, { "instance_uuid":"d1e3ff56-feef-4495-8e4f-1cf6ea59ffbc", "hostname":"ubuntu-80", "uuid":"7e88a0a5-6dd9-497e-a7e0-fa2d75728a3b", "links":[ { "href":"http://192.168.23.138/accelerator/v2/accelerator_requests/7e88a0a5-6dd9-497e-a7e0-fa2d75728a3b", "rel":"self" } ], "created_at":"2019-10-25T07:58:23+00:00", "device_profile_group_id":0, "attach_handle_type":"TEST_PCI", "updated_at":"2019-10-25T08:27:46+00:00", "state":"Bound", "device_rp_uuid":"03631f82-20a9-3f67-a29d-dc1abe4041bf", "device_profile_name":"temp-dp1", "project_id":"4e01a8e0-52b4-42e4-be67-20dd82f0ef77", "attach_handle_uuid":"c5e65f39-2647-4e93-b8b3-26e428409042", "attach_handle_info":{ "device":"00", "bus":"0c", "domain":"0000", "function":"0" } } ] } ``` -------------------------------- ### PATCH /v2/deployables/{deployable_uuid}/program Source: https://docs.openstack.org/api-ref/accelerator?expanded= Programs an FPGA deployable with a new bitstream image. This is an asynchronous operation that reconfigures the FPGA device. ```APIDOC ## PATCH /v2/deployables/{deployable_uuid}/program ### Description Program an FPGA deployable with a new bitstream image. This is an asynchronous operation that reconfigures the FPGA device. ### Method PATCH ### Endpoint /v2/deployables/{deployable_uuid}/program ### Parameters #### Path Parameters - **deployable_uuid** (string) - Required - The UUID of the deployable. #### Request Body - **image_uuid** (string) - Required - The UUID of the bitstream image to program onto the FPGA. Supplied inside a JSON-Patch `replace` operation on `/program`. ### Request Example [ { "path": "/program", "value": [ { "image_uuid": "76babc1b-3222-4992-a046-52441e403577" } ], "op": "replace" } ] ### Response #### Success Response (200) ``` -------------------------------- ### Deployable Details Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= A JSON object representing the full details of a specific deployable resource. ```json { "uuid": "29e23349-12ee-4978-963c-11484a4ae601", "parent_id": null, "root_id": null, "name": "computenode_FakeDevice", "num_accelerators": 16, "device_id": 1, "attributes_list": "[{'traits1': 'CUSTOM_FAKE_DEVICE'}, {'rc': 'FPGA'}]", "rp_uuid": "853f07a6-19de-3dd6-b9f6-6c782daa3f7b", "driver_name": "fake", "bitstream_id": null, "created_at": "2020-03-13T02:27:35+00:00", "updated_at": "2020-03-13T02:27:36+00:00", "links": [ { "href": "http://localhost/accelerator/v2/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "self" }, { "href": "http://localhost/accelerator/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "bookmark" } ] } ``` -------------------------------- ### Deployable Resource Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= Describes the fields returned for a deployable resource in the OpenStack Accelerator API. ```APIDOC ## Deployable Resource Response ### Description This represents the structure of a deployable resource returned by the API. ### Response #### Success Response (200) - **uuid** (string) - The UUID of the deployable. - **parent_id** (string) - The parent_id refers to the id of the deployable’s parent node. - **root_id** (string) - The root_id refers to the id of the deployable’s root to for nested tree. - **name** (string) - Name of the deployable. - **num_accelerators** (integer) - Number of accelerators spawned by this deployable. - **device_id** (integer) - ID of device associated with the deployable. - **attributes_list** (string) - A list of dictionaries (in json string format) representing attributes of the deployable. - **rp_uuid** (string) - UUID of the resource provider corresponding to this deployable. - **driver_name** (string) - Name of the driver reported. - **bitstream_id** (string) - The UUID of the bitstream corresponding to the deployable. - **created_at** (string) - The date and time when the resource was created (ISO 8601). - **updated_at** (string) - The date and time when the resource was updated (ISO 8601). - **links** (array) - Links to the resources in question. ### Response Example { "uuid": "29e23349-12ee-4978-963c-11484a4ae601", "parent_id": null, "root_id": null, "name": "computenode_FakeDevice", "num_accelerators": 16, "device_id": 1, "attributes_list": "[{'traits1': 'CUSTOM_FAKE_DEVICE'}, {'rc': 'FPGA'}]", "rp_uuid": "853f07a6-19de-3dd6-b9f6-6c782daa3f7b", "driver_name": "fake", "bitstream_id": null, "created_at": "2020-03-13T02:27:35+00:00", "updated_at": "2020-03-13T02:27:36+00:00", "links": [ { "href": "http://localhost/accelerator/v2/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "self" }, { "href": "http://localhost/accelerator/deployables/29e23349-12ee-4978-963c-11484a4ae601", "rel": "bookmark" } ] } ``` -------------------------------- ### POST /v2/devices/{device_uuid}/disable Source: https://docs.openstack.org/api-ref/accelerator?expanded= Sets the specified accelerator device to maintaining status. Requires admin role. ```APIDOC ## POST /v2/devices/{device_uuid}/disable ### Description Set the device to maintaining status. ### Method POST ### Endpoint /v2/devices/{device_uuid}/disable ### Parameters #### Path Parameters - **device_uuid** (string) - Required - The UUID of the device. This must be a valid UUID otherwise API will return 400. ### Response #### Success Response (200) - No body content. ``` -------------------------------- ### POST /v2/devices/{device_uuid}/disable Source: https://docs.openstack.org/api-ref/accelerator/?expanded=#accelerator-requests Sets the specified accelerator device to maintaining status. ```APIDOC ## POST /v2/devices/{device_uuid}/disable ### Description Set the device to maintaining status. ### Method POST ### Endpoint /v2/devices/{device_uuid}/disable ### Parameters #### Path Parameters - **device_uuid** (string) - Required - The UUID of the device. This must be a valid UUID otherwise API will return 400. ### Response #### Success Response (200) - No body content for the response of a successful request. ``` -------------------------------- ### Device Details Response Source: https://docs.openstack.org/api-ref/accelerator?expanded= JSON structure returned when requesting details for a specific accelerator device. ```json { "uuid": "359c0990-0258-44fd-8b05-fc510ac3d022", "type": "FPGA", "vendor": "0xABCD", "model": "miss model info", "std_board_info": "{'device_id': '0xabcd', 'class': 'Fake class'}", "vendor_board_info": "fake_vendor_info", "hostname": "computenode", "created_at": "2020-03-13T02:26:31+00:00", "updated_at": null, "links": [ { "href": "http://localhost/accelerator/v2/devices/359c0990-0258-44fd-8b05-fc510ac3d022", "rel": "self" } ] } ```