Current File : //lib/python2.7/site-packages/euca2ools/commands/elasticloadbalancing/createloadbalancerpolicy.pyo
�
��Xc@s�ddlZddlmZddlmZddlmZddlmZd�Z	d�Z
de
_d	efd
��YZdS(i����N(tArg(t
ArgumentError(tdelimited_list(t
ELBRequestcCs�i}x�|jd�D]�}|jdd�\}}|j�dkrY|j�|d<q|j�dkr~|j�|d<qtdj||j����qWd|kr�td	j|���nd|kr�td
j|���n|S(Nt,t=itnamet
AttributeNametvaluetAttributeValuesXattribute '{0}': '{1}' is not a valid part of an attribute (choose from 'name', 'value')s!attribute '{0}': name is requireds"attribute '{0}': value is required(tsplittstripRtformat(tattr_as_strtattrtpairtkeytval((sd/usr/lib/python2.7/site-packages/euca2ools/commands/elasticloadbalancing/createloadbalancerpolicy.pyt	attribute#s$cCsxd|kr$tdj|���n|jdd�\}}|sZtdj|���ni|j�d6|j�d6S(NRs+attribute '{0}' must have format NAME=VALUEis attribute '{0}' must have a nameRR	(RRR
R(R
RR((sd/usr/lib/python2.7/site-packages/euca2ools/commands/elasticloadbalancing/createloadbalancerpolicy.pytkey_value_attribute9sRtCreateLoadBalancerPolicycBseZdZeddddd�edddd	dd
dedd�ed
ddddddedd�edddddddddedd�edddddd'dddddedd e�dd!�ed"dd#dd$dd'dd%�gZ	d&�Z
RS((s#Add a new policy to a load balancertLoadBalancerNametmetavartELBthelps.name of the load balancer to modify (required)s-ns
--policy-nametdestt
PolicyNametPOLICYtrequireds!name of the new policy (required)s-ts
--policy-typetPolicyTypeNametPOLTYPEsstype of the new policy.  For a list of policy types,
                use eulb-describe-lb-policy-types.  (required)s-as--attributesPolicyAttributes.membertactiontappends"name=NAME, value=VALUE"ttypes�name and value for each attribute
                associated with the new policy.  Use this option multiple times
                to supply multiple attributes.s-As--attributestnew_attr_liststroute_tosNAME=VALUE,...Rt	item_types�a comma-delimited list of attribute names and values
                to associate with the new policy, each pair of which is
                separated by "=".  This is a more concise alternative to the
                -a/--attribute option.s--attributes-from-filet
attr_filenametFILEs�a file containing
                attribute names and values to associate with the new
                policy, one per line, each pair of which is separated by
                "=".  Lines that are blank or begin with "#" are ignored.c
CsY|jjd�s"g|jd<nx:|jjd�p:gD] }|jdj|pWg�q;W|jjd�rU|jddkr�tj}nt|jd�}|��x�t|d�D]�\}}|j�r�|j	d�r�y$|jdj
t|j���WqHtk
rD}t
dj|jd||jd���qHXq�q�WWdQXndS(	NsPolicyAttributes.memberR"R%t-it#serror on {0} line {1}: {2}i(tparamstgettargstextendtsyststdintopent	enumerateRt
startswithR RRt
ValueErrorR(tselft	attr_listt	attr_filetline_notlineterr((sd/usr/lib/python2.7/site-packages/euca2ools/commands/elasticloadbalancing/createloadbalancerpolicy.pyt
preprocessds&

N(t__name__t
__module__tDESCRIPTIONRtTrueRtNoneRRtARGSR9(((sd/usr/lib/python2.7/site-packages/euca2ools/commands/elasticloadbalancing/createloadbalancerpolicy.pyRHs((
R-trequestbuilderRtrequestbuilder.exceptionsRteuca2ools.commands.argtypesRt'euca2ools.commands.elasticloadbalancingRRRR:R(((sd/usr/lib/python2.7/site-packages/euca2ools/commands/elasticloadbalancing/createloadbalancerpolicy.pyt<module>s