# Accelerator API

## The Accelerator Class

The accelerator high-level interface is available through the `accelerator` member of a `Connection` object. The `accelerator` member will only be added if the service is detected.

### Deployable Operations

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  deployables(**query)

    Retrieve a generator of deployables.

    Parameters:

      query (kwargs) – Optional query parameters to be sent to restrict the deployables to be returned.

    Returns:

      A generator of deployable instances.

  get_deployable(uuid, fields=None)

    Get a single deployable.

    Parameters:

      uuid – The value can be the UUID of a deployable.

    Returns:

      One `Deployable`

    Raises:

      `NotFoundException` when no deployable matching the criteria could be found.

  update_deployable(uuid, patch)

    Reconfig the FPGA with new bitstream.

    Parameters:

      - uuid – The value can be the UUID of a deployable

      - patch – The information to reconfig.

    Returns:

      The results of FPGA reconfig.

### Device Operations

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  devices(**query)

    Retrieve a generator of devices.

    Parameters:

      query (kwargs) –

      Optional query parameters to be sent to restrict the devices to be returned. Available parameters include:

      - hostname: The hostname of the device.

      - type: The type of the device.

      - vendor: The vendor ID of the device.

      - sort: A list of sorting keys separated by commas. Each sorting key can optionally be attached with a sorting direction modifier which can be `asc` or `desc`.

      - limit: Requests a specified size of returned items from the query. Returns a number of items up to the specified limit value.

      - marker: Specifies the ID of the last-seen item. Use the limit parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.

    Returns:

      A generator of device instances.

  get_device(uuid, fields=None)

    Get a single device.

    Parameters:

      uuid – The value can be the UUID of a device.

    Returns:

      One `Device`

    Raises:

      `NotFoundException` when no device matching the criteria could be found.

### Device Profile Operations

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  device_profiles(**query)

    Retrieve a generator of device profiles.

    Parameters:

      query (kwargs) – Optional query parameters to be sent to restrict the device profiles to be returned.

    Returns:

      A generator of device profile instances.

  create_device_profile(**attrs)

    Create a device_profile.

    Parameters:

      attrs (kwargs) – a list of device_profiles.

    Returns:

      The list of created device profiles

  delete_device_profile(device_profile, ignore_missing=True)

    Delete a device profile

    Parameters:

      - device_profile – The value can be either the ID of a device profile or a `DeviceProfile` instance.

      - ignore_missing (bool) – When set to `False` `NotFoundException` will be raised when the device profile does not exist. When set to `True`, no exception will be set when attempting to delete a nonexistent device profile.

    Returns:

      `None`

  get_device_profile(uuid, fields=None)

    Get a single device profile.

    Parameters:

      uuid – The value can be the UUID of a device profile.

    Returns:

      One :class: ~openstack.accelerator.v2.device_profile.DeviceProfile

    Raises:

      `NotFoundException` when no device profile matching the criteria could be found.

### Accelerator Request Operations

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  accelerator_requests(**query)

    Retrieve a generator of accelerator requests.

    Parameters:

      query (kwargs) – Optional query parameters to be sent to restrict the accelerator requests to be returned.

    Returns:

      A generator of accelerator request instances.

  create_accelerator_request(**attrs)

    Create an ARQs for a single device profile.

    Parameters:

      attrs (kwargs) – request body.

    Returns:

      The created accelerator request instance.

  delete_accelerator_request(accelerator_request, ignore_missing=True)

    Delete a device profile

    Parameters:

      - device_profile – The value can be either the ID of a device profile or a `DeviceProfile` instance.

      - ignore_missing (bool) – When set to `False` `NotFoundException` will be raised when the device profile does not exist. When set to `True`, no exception will be set when attempting to delete a nonexistent accelerator request.

    Returns:

      `None`

  get_accelerator_request(uuid, fields=None)

    Get a single accelerator request.

    Parameters:

      uuid – The value can be the UUID of a accelerator request.

    Returns:

      One :class: ~openstack.accelerator.v2.accelerator_request.AcceleratorRequest

    Raises:

      `NotFoundException` when no accelerator request matching the criteria could be found.

  update_accelerator_request(uuid, properties)

    Bind/Unbind an accelerator to VM.

    Parameters:

      - uuid – The uuid of the accelerator_request to be bound/unbound.

      - properties – The info of VM that will bind/unbind the accelerator.

    Returns:

      True if bind/unbind succeeded, False otherwise.

### Attribute Operations

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  attributes(**query)

    Retrieve a generator of attributes.

    Parameters:

      query (kwargs) – Optional query parameters to be sent to restrict the attributes to be returned.

    Returns:

      A generator of attribute instances.

  create_attribute(**attrs)

    Create a attribute.

    Parameters:

      attrs (kwargs) – a list of attributes.

    Returns:

      The list of created attributes

  delete_attribute(attribute, ignore_missing=True)

    Delete a attribute

    Parameters:

      - attribute – The value can be either the ID of a attributes or a `Attributes` instance.

      - ignore_missing (bool) – When set to `False` `ResourceNotFound` will be raised when the device profile does not exist. When set to `True`, no exception will be set when attempting to delete a nonexistent device profile.

    Returns:

      `None`

  get_attribute(uuid, fields=None)

    Get a single device profile.

    Parameters:

      uuid – The value can be the UUID of a attribute.

    Returns:

      One :class: ~openstack.accelerator.v2.attribute.Attribute

    Raises:

      `ResourceNotFound` when no device profile matching the criteria could be found.

### Helpers

class openstack.accelerator.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
  wait_for_status(res, status, failures=None, interval=2, wait=None, attribute='status', callback=None)

    Wait for the resource to be in a particular status.

    Parameters:

      - session – The session to use for making this request.

      - resource – The resource to wait on to reach the status. The resource must have a status attribute specified via `attribute`.

      - status – Desired status of the resource.

      - failures – Statuses that would indicate the transition failed such as ‘ERROR’. Defaults to [‘ERROR’].

      - interval – Number of seconds to wait between checks.

      - wait – Maximum number of seconds to wait for transition. Set to `None` to wait forever.

      - attribute – Name of the resource attribute that contains the status.

      - callback – A callback function. This will be called with a single value, progress. This is API specific but is generally a percentage value from 0-100.

    Returns:

      The updated resource.

    Raises:

      `ResourceTimeout` if the transition to status failed to occur in `wait` seconds.

    Raises:

      `ResourceFailure` if the resource transitioned to one of the states in `failures`.

    Raises:

      `AttributeError` if the resource does not have a `status` attribute

  wait_for_delete(res, interval=2, wait=120, callback=None)

    Wait for a resource to be deleted.

    Parameters:

      - res – The resource to wait on to be deleted.

      - interval – Number of seconds to wait before to consecutive checks.

      - wait – Maximum number of seconds to wait before the change.

      - callback – A callback function. This will be called with a single value, progress, which is a percentage value from 0-100.

    Returns:

      The resource is returned on success.

    Raises:

      `ResourceTimeout` if transition to delete failed to occur in the specified seconds.

this page last updated: 2026-01-16 23:06:19

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.