usb-0000:00:01.2-2/input0
  "   =maY>e8Cp/i1h 	    =
oB]c           @   sZ   d  Z  d d l m Z d d l m Z e Z d d g Z d Z d Z d   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: <false/none/unchanged/os/number>
i(   t   PER_INSTANCE(   t   utilt   ubuntut   debians+   /etc/apt/apt.conf.d/90cloud-init-pipeliningsQ   //Written by cloud-init per 'apt_pipelining'
Acquire::http::Pipeline-Depth "%s";
c         C   s   t  j | d d  } t |  j   j   } | d k rL t d | t  na | d
 k r\ d  S| g  t d d  D] } t |  ^ qo k r t | | t  n | j d	 |  d  S(   Nt   apt_pipeliningt   ost   falset   0t   nonet	   unchangedi    i   s%   Invalid option for apt_pipelining: %s(   R   R	   s   os(	   R   t   get_cfg_option_strt   strt   lowert   stript   write_apt_snippett   DEFAULT_FILEt   ranget   warning(   t   _namet   cfgt   _cloudt   logt   _argst   apt_pipe_valuet   apt_pipe_value_st   b(    (    sF   /usr/lib/python2.7/site-packages/cloudinit/config/cc_apt_pipelining.pyt   handle2   s    .c         C   s1   t  |  } t j | |  | j d | |   d S(   s0   Writes f_name with apt pipeline depth 'setting'.s+   Wrote %s with apt pipeline depth setting %sN(   t   APT_PIPE_TPLR   t
   write_filet   debug(   t   settingR   t   f_namet   file_contents(    (    sF   /usr/lib/python2.7/site-packages/cloudinit/config/cc_apt_pipelining.pyR   A   s    
N(   t   __doc__t   cloudinit.settingsR    t	   cloudinitR   t	   frequencyt   distrosR   R   R   R   (    (    (    sF   /usr/lib/python2.7/site-packages/cloudinit/config/cc_apt_pipelining.pyt   <module>   s   		     ?l 	    ?# Copyright 2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
#   Redistributions of source code must retain the above copyright notice,
#   this list of conditions and the following disclaimer.
#
#   Redistributions in binary form must reproduce the above copyright
#   notice, this list of conditions and the following disclaimer in the
#   documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from requestbuilder import Arg, MutuallyExclusiveArgList

from euca2ools.commands.ec2 import EC2Request


c