Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/baremetal/v1/__pycache__/allocation.cpython-39.pyc
Ðазад
a t�h� � @ sJ d dl mZ d dlmZ d dlmZ d dlmZ G dd� dejej�ZdS )� )�_common)� exceptions)�resource)�utilsc @ s� e Zd ZdZdZdZdZdZdZdZ dZ dZdZe jddddejid �Zd Ze jded�Ze �d �Ze jded�Ze jddd�Ze �d�Ze jded�Ze �d�Ze �d�Ze �d�Ze �d�Ze �d�Z e jded�Z!e �d�Z"ddd�Z#dS )� AllocationZallocationsz/allocationsT�PATCH�node�resource_class�state�type)�fieldsz1.58�candidate_nodes)r � created_at�extra�uuid)Zalternate_id� last_error�links�nameZ node_uuid�traits� updated_atNFc C s� | j dkr| S t�|d| j �D ]`}| �|� | j dkrV|sVt�d| j| jd� ��n| j dkrh| S |j� d| j| j d�� q d S ) a. Wait for the allocation to become active. :param session: The session to use for making this request. :type session: :class:`~keystoneauth1.adapter.Adapter` :param timeout: How much (in seconds) to wait for the allocation. The value of ``None`` (the default) means no client-side timeout. :param ignore_error: If ``True``, this call will raise an exception if the allocation reaches the ``error`` state. Otherwise the error state is considered successful and the call returns. :return: This :class:`Allocation` instance. :raises: :class:`~openstack.exceptions.ResourceFailure` if allocation fails and ``ignore_error`` is ``False``. :raises: :class:`~openstack.exceptions.ResourceTimeout` on timeout. Zactivez%Timeout waiting for the allocation %s�errorz+Allocation %(allocation)s failed: %(error)s)� allocationr Z allocatingz`Still waiting for the allocation %(allocation)s to become active, the current state is %(state)s)r r N) r r Ziterate_timeout�id�fetchr ZResourceFailurer �log�debug)�self�session�timeoutZignore_error�count� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/baremetal/v1/allocation.py�waitG s&