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__/nodes.cpython-310.pyc
o

�hp�@s4ddlmZmZGdd�de�ZGdd�de�ZdS)�)�
Collection�Modelc@s2eZdZdZdZedd��Zdd�Zddd	�Zd
S)�NodezA node in a swarm.�IDcCs|j�d��d�S)z�
        The version number of the service. If this is not the same as the
        server, the :py:meth:`update` function will not work and you will
        need to call :py:meth:`reload` before calling it again.
        �Version�Index)�attrs�get��self�r�F/usr/local/CyberCP/lib/python3.10/site-packages/docker/models/nodes.py�versionszNode.versioncCs|jj�|j|j|�S)a�
        Update the node's configuration.

        Args:
            node_spec (dict): Configuration settings to update. Any values
                not provided will be removed. Default: ``None``

        Returns:
            `True` if the request went through.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.

        Example:

            >>> node_spec = {'Availability': 'active',
                             'Name': 'node-name',
                             'Role': 'manager',
                             'Labels': {'foo': 'bar'}
                            }
            >>> node.update(node_spec)

        )�client�api�update_node�idr)r�	node_specrrr
�updateszNode.updateFcCs|jjj|j|d�S)a�
        Remove this node from the swarm.

        Args:
            force (bool): Force remove an active node. Default: `False`

        Returns:
            `True` if the request was successful.

        Raises:
            :py:class:`docker.errors.NotFound`
                If the node doesn't exist in the swarm.

            :py:class:`docker.errors.APIError`
                If the server returns an error.
        )�force)rr�remove_noder)rrrrr
�remove,szNode.removeN)F)	�__name__�
__module__�__qualname__�__doc__�id_attribute�propertyrrrrrrr
rs
rc@s$eZdZdZeZdd�Zdd�ZdS)�NodeCollectionzNodes on the Docker server.cCs|�|jj�|��S)a
        Get a node.

        Args:
            node_id (string): ID of the node to be inspected.

        Returns:
            A :py:class:`Node` object.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        )�
prepare_modelrr�inspect_node)r�node_idrrr
r	DszNodeCollection.getcs"�fdd��jjj|i|��D�S)a�
        List swarm nodes.

        Args:
            filters (dict): Filters to process on the nodes list. Valid
                filters: ``id``, ``name``, ``membership`` and ``role``.
                Default: ``None``

        Returns:
            A list of :py:class:`Node` objects.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.

        Example:

            >>> client.nodes.list(filters={'role': 'manager'})
        csg|]}��|��qSr)r)�.0�nr
rr
�
<listcomp>hs��z'NodeCollection.list.<locals>.<listcomp>)rr�nodes)r�args�kwargsrr
r
�listTs
�zNodeCollection.listN)rrrrr�modelr	r(rrrr
r@s
rN)�resourcerrrrrrrr
�<module>s<