HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/docker/models/__pycache__/resource.cpython-310.pyc
o

�h
�@s Gdd�d�ZGdd�d�ZdS)c@sVeZdZdZdZddd�Zdd�Zdd	�Zd
d�Ze	dd
��Z
e	dd��Zdd�ZdS)�ModelzF
    A base class for representing a single object on the server.
    �IdNcCs*||_||_||_|jduri|_dSdS�N)�client�
collection�attrs)�selfrrr�r�I/usr/local/CyberCP/lib/python3.10/site-packages/docker/models/resource.py�__init__s

�zModel.__init__cCsd|jj�d|j�d�S)N�<z: �>)�	__class__�__name__�short_id�rrrr	�__repr__�zModel.__repr__cCst||j�o|j|jkSr)�
isinstancer
�id)r�otherrrr	�__eq__rzModel.__eq__cCst|jj�d|j���S)N�:)�hashr
rrrrrr	�__hash__rzModel.__hash__cCs|j�|j�S)z'
        The ID of the object.
        )r�get�id_attributerrrr	r�zModel.idcCs|jdd�S)zC
        The ID of the object, truncated to 12 characters.
        N�)rrrrr	r#rzModel.short_idcCs|j�|j�}|j|_dS)zh
        Load this object from the server again and update ``attrs`` with the
        new data.
        N)rrrr)r�	new_modelrrr	�reload*szModel.reload)NNN)
r�
__module__�__qualname__�__doc__rr
rrr�propertyrrrrrrr	rs


rc@sHeZdZdZdZddd�Zdd�Zdd�Zd	d
�Zddd�Z	d
d�Z
dS)�
Collectionz[
    A base class for representing all objects of a particular type on the
    server.
    NcCs
||_dSr)r)rrrrr	r
<s
zCollection.__init__cOstd|jj�d���)N�'zh' object is not callable. You might be trying to use the old (pre-2.0) API - use docker.APIClient if so.)�	TypeErrorr
r)r�args�kwargsrrr	�__call__As�zCollection.__call__cC�t�r��NotImplementedErrorrrrr	�listH�zCollection.listcCr*rr+)r�keyrrr	rKr.zCollection.getcCr*rr+�rrrrr	�createNr.zCollection.createcCsPt|t�r|j|_||_|St|t�r|j||j|d�Std|jj�d|����)z:
        Create a model from a set of attributes.
        )rrrz
Can't create z from )rrrr�dict�model�	Exceptionrr0rrr	�
prepare_modelQs

zCollection.prepare_modelr)rr r!r"r3r
r)r-rr1r5rrrr	r$3s

r$N)rr$rrrr	�<module>s2