
    2.a                     L    d dl mZ ddlmZmZ  G d de      Z G d de      Zy)	   )	APIClient   )Model
Collectionc                   0    e Zd ZdZdZd Zed        Zd Zy)Configz	A config.IDc                 P    d| j                   j                   d| j                   dS )N<z: 'z'>)	__class____name__nameselfs    7/usr/lib/python3/dist-packages/docker/models/configs.py__repr__zConfig.__repr__	   s&    4>>**+3tyyk<<    c                 &    | j                   d   d   S )NSpecName)attrsr   s    r   r   zConfig.name   s    zz&!&))r   c                 `    | j                   j                  j                  | j                        S )z
        Remove this config.

        Raises:
            :py:class:`docker.errors.APIError`
                If config failed to remove.
        )clientapiremove_configidr   s    r   removezConfig.remove   s!     {{,,TWW55r   N)	r   
__module____qualname____doc__id_attributer   propertyr   r    r   r   r   r      s(    L= * *6r   r   c                   \    e Zd ZdZeZd Zej                  j                  e_        d Z	d Z
y)ConfigCollectionzConfigs on the Docker server.c                 p     | j                   j                  j                  di |}| j                  |      S )Nr#   )r   r   create_configprepare_model)r   kwargsobjs      r   createzConfigCollection.create   s0    +dkkoo++5f5!!#&&r   c                 j    | j                  | j                  j                  j                  |            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(   r   r   inspect_config)r   	config_ids     r   getzConfigCollection.get$   s(      !!$++//"@"@"KLLr   c                      | j                   j                  j                  di |}|D cg c]  }| j                  |       c}S c c}w )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.
        r#   )r   r   configsr(   )r   r)   respr*   s       r   listzConfigCollection.list6   s@     't{{&&00378C""3'888s   AN)r   r   r   r    r   modelr+   r   r'   r/   r3   r#   r   r   r%   r%      s/    'E' ,,44FNM$9r   r%   N)r   r   resourcer   r   r   r%   r#   r   r   <module>r6      s#     '6U 6,*9z *9r   