Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/message/v2/__pycache__/_proxy.cpython-39.pyc
Ðазад
a u�h=2 � @ s^ d dl mZ d dl mZ d dl mZ d dl mZ d dl m Z d dl mZ G dd� de j�Zd S ) � )�claim)�message)�queue)�subscription)�proxy)�resourcec @ s� e Zd Zdd� Zdd� Zdd� Zd#dd �Zd d� Zdd � Zdd� Z d$dd�Z dd� Zdd� Zdd� Z d%dd�Zdd� Zdd� Zdd � Zd&d!d"�ZdS )'�Proxyc K s | j tjfi |��S )av Create a new queue from attributes :param dict attrs: Keyword arguments which will be used to create a :class:`~openstack.message.v2.queue.Queue`, comprised of the properties on the Queue class. :returns: The results of queue creation :rtype: :class:`~openstack.message.v2.queue.Queue` )�_create�_queue�Queue)�self�attrs� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/message/v2/_proxy.py�create_queue s zProxy.create_queuec C s | � tj|�S )aU Get a queue :param queue: The value can be the name of a queue or a :class:`~openstack.message.v2.queue.Queue` instance. :returns: One :class:`~openstack.message.v2.queue.Queue` :raises: :class:`~openstack.exceptions.ResourceNotFound` when no queue matching the name could be found. )�_getr r )r r r r r � get_queue# s zProxy.get_queuec K s | j tjfi |��S )a� Retrieve a generator of queues :param kwargs query: Optional query parameters to be sent to restrict the queues to be returned. Available parameters include: * limit: Requests at most the specified number of items be returned from the query. * marker: Specifies the ID of the last-seen queue. Use the limit parameter to make an initial limited request and use the ID of the last-seen queue from the response as the marker parameter value in a subsequent limited request. :returns: A generator of queue instances. )�_listr r )r �queryr r r �queues/ s zProxy.queuesTc C s | j tj||d�S )a Delete a queue :param value: The value can be either the name of a queue or a :class:`~openstack.message.v2.queue.Queue` instance. :param bool ignore_missing: When set to ``False`` :class:`~openstack.exceptions.ResourceNotFound` will be raised when the queue does not exist. When set to ``True``, no exception will be set when attempting to delete a nonexistent queue. :returns: ``None`` ��ignore_missing)�_deleter r )r �valuer r r r �delete_queue@ s zProxy.delete_queuec C s | j tjd|d�}|�| |�S )a& Post messages to given queue :param queue_name: The name of target queue to post message to. :param messages: List of messages body and TTL to post. :type messages: :py:class:`list` :returns: A string includes location of messages successfully posted. N�� queue_name)� _get_resource�_message�Message�post)r r �messagesr r r r �post_messageO s �zProxy.post_messagec K s ||d<