Your IP : 216.73.217.13


Current Path : /usr/lib/python3/dist-packages/cloudinit/config/__pycache__/
Upload File :
Current File : //usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_apt_pipelining.cpython-38.pyc

U

�AdH�@s�UdZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZeZd	d
gZdZdZd
dded�eedddddgdgd�Zeed<e
e�Zee
eeedd�dd�Zdd�ZdS)z)Apt Pipelining: configure apt pipelining.�)�Logger)�dedent)�util)�Cloud)�Config)�
MetaSchema�get_meta_doc)�PER_INSTANCEZubuntuZdebianz+/etc/apt/apt.conf.d/90cloud-init-pipeliningzQ//Written by cloud-init per 'apt_pipelining'
Acquire::http::Pipeline-Depth "%s";
Zcc_apt_pipeliningzApt PipeliningzConfigure apt pipelininga        This module configures apt's ``Acquite::http::Pipeline-Depth`` option,
        which controls how apt handles HTTP pipelining. It may be useful for
        pipelining to be disabled, because some web servers, such as S3 do not
        pipeline properly (LP: #948461).

        Value configuration options for this module are:

        * ``false`` (Default): disable pipelining altogether
        * ``none``, ``unchanged``, or ``os``: use distro default
        * ``<number>``: Manually specify pipeline depth. This is not recommended.zapt_pipelining: falsezapt_pipelining: nonezapt_pipelining: unchangedzapt_pipelining: oszapt_pipelining: 3�apt_pipelining)�id�name�titleZdescription�distros�	frequencyZexamplesZactivate_by_schema_keys�metaN)r�cfg�cloud�log�args�returncCst|�dd�}t|�����}|dkr2td|t�n>|dkr>dS|dd�tdd	�D�krdt||t�n|�d
|�dS)Nr
�osZfalse�0)ZnoneZ	unchangedrcSsg|]}t|��qS�)�str)�.0�brr�D/usr/lib/python3/dist-packages/cloudinit/config/cc_apt_pipelining.py�
<listcomp>Hszhandle.<locals>.<listcomp>r�z%Invalid option for apt_pipelining: %s)�getr�lower�strip�write_apt_snippet�DEFAULT_FILE�rangeZwarning)rrrrrZapt_pipe_valueZapt_pipe_value_srrr�handle>sr%cCs&t|}t�||�|�d||�dS)z0Writes f_name with apt pipeline depth 'setting'.z+Wrote %s with apt pipeline depth setting %sN)�APT_PIPE_TPLrZ
write_file�debug)ZsettingrZf_nameZ
file_contentsrrrr"Nsr")�__doc__Zloggingr�textwraprZ	cloudinitrZcloudinit.cloudrZcloudinit.configrZcloudinit.config.schemarrZcloudinit.settingsr	rrr#r&r�__annotations__r�listr%r"rrrr�<module>sJ�
�
���