Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/accelerator/v2/__pycache__/_proxy.cpython-39.pyc
Ðазад
a t�h� � @ sR d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z G dd� dej�ZdS ) � )�proxy)� deployable)�device)�device_profile)�accelerator_requestc @ s� e Zd Zdd� Zddd�Zdd� Zdd � Zd d d�Zdd � Zdd� Z d!dd�Z d"dd�Zdd� Zdd� Z d#dd�Zd$dd�Zdd� ZdS )%�Proxyc K s | j tjfi |��S )z�Retrieve a generator of deployables. :param kwargs query: Optional query parameters to be sent to restrict the deployables to be returned. :returns: A generator of deployable instances. )�_list�_deployable� Deployable��self�query� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/accelerator/v2/_proxy.py�deployables s zProxy.deployablesNc C s | � tj|�S )a7 Get a single deployable. :param uuid: The value can be the UUID of a deployable. :returns: One :class:`~openstack.accelerator.v2.deployable.Deployable` :raises: :class:`~openstack.exceptions.ResourceNotFound` when no deployable matching the criteria could be found. )�_getr r �r �uuid�fieldsr r r �get_deployable s zProxy.get_deployablec C s | � tj|��| |�S )z�Reconfig the FPGA with new bitstream. :param uuid: The value can be the UUID of a deployable :param patch: The infomation of to reconfig. :returns: The results of FPGA reconfig. )� _get_resourcer r �patch)r r r r r r �update_deployable( s ��zProxy.update_deployablec K s | j tjfi |��S )a Retrieve a generator of devices. :param kwargs query: 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. )r �_device�Devicer r r r �devices2 s z Proxy.devicesc C s | � tj|�S )a' Get a single device. :param uuid: The value can be the UUID of a device. :returns: One :class:`~openstack.accelerator.v2.device.Device` :raises: :class:`~openstack.exceptions.ResourceNotFound` when no deployable matching the criteria could be found. )r r r r r r r � get_deviceH s zProxy.get_devicec K s | j tjfi |��S )z�Retrieve a generator of device profiles. :param kwargs query: Optional query parameters to be sent to restrict the device profiles to be returned. :returns: A generator of device profile instances. )r �_device_profile� DeviceProfiler r r r �device_profilesR s zProxy.device_profilesc K s | j tjfi |��S )z�Create a device_profiles. :param kwargs attrs: a list of device_profiles. :returns: The list of created device profiles )�_creater r �r �attrsr r r �create_device_profile[ s zProxy.create_device_profileTc C s | j tj||d�S )a� Delete an device profile :param name_or_id: The value can be either the ID of an device profile. :param bool ignore_missing: When set to ``False`` :class:`~openstack.exceptions.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`` ��ignore_missing)�_deleter r �r Z name_or_idr% r r r �delete_device_profilec s �zProxy.delete_device_profilec C s | � tj|�S )aW Get a single device profile. :param uuid: The value can be the UUID of a device profile. :returns: One :class: `~openstack.accelerator.v2.device_profile.DeviceProfile` :raises: :class:`~openstack.exceptions.ResourceNotFound` when no device profile matching the criteria could be found. )r r r r r r r �get_device_profiler s zProxy.get_device_profilec K s | j tjfi |��S )z�Retrieve a generator of accelerator requests. :param kwargs query: Optional query parameters to be sent to restrict the accelerator requests to be returned. :returns: A generator of accelerator request instances. )r �_arq�AcceleratorRequestr r r r �accelerator_requests} s zProxy.accelerator_requestsc K s | j tjfi |��S )z`Create an ARQs for a single device profile. :param kwargs attrs: request body. )r r* r+ r! r r r �create_accelerator_request� s z Proxy.create_accelerator_requestc C s | j tj||d�S )a� Delete an device profile :param name_or_id: The value can be either the ID of an accelerator request. :param bool ignore_missing: When set to ``False`` :class:`~openstack.exceptions.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 accelerator request. :returns: ``None`` r$ )r&