HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/docker/models/__pycache__/configs.cpython-310.pyc
o

�2.a��@s@ddlmZddlmZmZGdd�de�ZGdd�de�ZdS)	�)�	APIClient�)�Model�
Collectionc@s0eZdZdZdZdd�Zedd��Zdd�Zd	S)
�Configz	A config.�IDcCsd|jj�d|j�d�S)N�<z: 'z'>)�	__class__�__name__�name��self�r�7/usr/lib/python3/dist-packages/docker/models/configs.py�__repr__	szConfig.__repr__cCs|jddS)N�Spec�Name)�attrsrrrrrszConfig.namecCs|jj�|j�S)z�
        Remove this config.

        Raises:
            :py:class:`docker.errors.APIError`
                If config failed to remove.
        )�client�api�
remove_config�idrrrr�removesz
Config.removeN)	r
�
__module__�__qualname__�__doc__�id_attributer�propertyrrrrrrrs
rc@s6eZdZdZeZdd�Zejje_dd�Z	dd�Z
dS)	�ConfigCollectionzConfigs on the Docker server.cKs|jjjdi|��}|�|�S)Nr)rr�
create_config�
prepare_model)r
�kwargs�objrrr�creates
zConfigCollection.createcCs|�|jj�|��S)ac
        Get a config.

        Args:
            config_id (str): Config ID.

        Returns:
            (:py:class:`Config`): The config.

        Raises:
            :py:class:`docker.errors.NotFound`
                If the config does not exist.
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        )r rr�inspect_config)r
�	config_idrrr�get$szConfigCollection.getcs&�jjjdi|��}�fdd�|D�S)aT
        List configs. Similar to the ``docker config ls`` command.

        Args:
            filters (dict): Server-side list filtering options.

        Returns:
            (list of :py:class:`Config`): The configs.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        csg|]}��|��qSr)r )�.0r"rrr�
<listcomp>Esz)ConfigCollection.list.<locals>.<listcomp>Nr)rr�configs)r
r!�resprrr�list6szConfigCollection.listN)r
rrrr�modelr#rrr&r+rrrrrs
rN)rr�resourcerrrrrrrr�<module>s