ó oBú]c@sZdZddlmZddlmZeZddgZdZdZd„Z d „Z d S( s… Apt Pipelining -------------- **Summary:** configure apt pipelining This module configures apt's ``Acquite::http::Pipeline-Depth`` option, whcih 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). The ``apt_pipelining`` config key may be set to ``false`` to disable pipelining altogether. This is the default behavior. If it is set to ``none``, ``unchanged``, or ``os``, no change will be made to apt configuration and the default setting for the distro will be used. The pipeline depth can also be manually specified by setting ``apt_pipelining`` to a number. However, this is not recommended. **Internal name:** ``cc_apt_pipelining`` **Module frequency:** per instance **Supported distros:** ubuntu, debian **Config keys**:: apt_pipelining: iÿÿÿÿ(t PER_INSTANCE(tutiltubuntutdebians+/etc/apt/apt.conf.d/90cloud-init-pipeliningsQ//Written by cloud-init per 'apt_pipelining' Acquire::http::Pipeline-Depth "%s"; cCs±tj|ddƒ}t|ƒjƒjƒ}|dkrLtd|tƒna|d kr\dS|gtddƒD]}t|ƒ^qokrt||tƒn|jd |ƒdS( Ntapt_pipeliningtostfalset0tnonet unchangediis%Invalid option for apt_pipelining: %s(RR sos( Rtget_cfg_option_strtstrtlowertstriptwrite_apt_snippett DEFAULT_FILEtrangetwarning(t_nametcfgt_cloudtlogt_argstapt_pipe_valuetapt_pipe_value_stb((sF/usr/lib/python2.7/site-packages/cloudinit/config/cc_apt_pipelining.pythandle2s  .cCs1t|}tj||ƒ|jd||ƒdS(s0Writes f_name with apt pipeline depth 'setting'.s+Wrote %s with apt pipeline depth setting %sN(t APT_PIPE_TPLRt write_filetdebug(tsettingRtf_namet file_contents((sF/usr/lib/python2.7/site-packages/cloudinit/config/cc_apt_pipelining.pyRAs N( t__doc__tcloudinit.settingsRt cloudinitRt frequencytdistrosRRRR(((sF/usr/lib/python2.7/site-packages/cloudinit/config/cc_apt_pipelining.pyts