Current File : //usr/lib/python2.7/site-packages/euca2ools/commands/ec2/associateaddress.pyc
�
��Xc@sPddlmZmZddlmZddlmZdefd��YZdS(i����(tArgtMutuallyExclusiveArgList(t
ArgumentError(t
EC2RequesttAssociateAddresscBs
eZdZeddddddd�edd	d
ddddd
�eeddd
ddddd�eddd
ddddd��j�eddd
ddddd�eedd
dddd d!dd"�ed#d
dddd d$dd%��gZd&�Zd'�ZRS((s7Associate an elastic IP address with a running instancetPublicIptmetavartADDRESStnargst?thelpsA[Non-VPC
                only] IP address to associate (required)s-as--allocation-idtdesttAllocationIdtALLOCs'[VPC only] VPC allocation ID (required)s-is
--instance-idt
InstanceIdtINSTANCEsDID of the instance to associate
                    the address withs-ns--network-interfacetNetworkInterfaceIdt	INTERFACEsN[VPC only] network interface
                    to associate the address withs-ps--private-ip-addresstPrivateIpAddresss�[VPC only] the private address to
                associate with the address being associated in the VPC
                (default: primary private IP)s--allow-reassociationtAllowReassociationtactiontstore_consttconstttruesy[VPC only] allow the address to be associated even
                    if it is already associated with another interfaces--no-allow-reassociationtfalses�[VPC only]
                    do not allow the address to be associated if it is already
                    associated with another interfacecCs�tj|�|jjd�dk	rL|jjd�dk	rLtd��n|jjd�dkr�|jjd�dkr�td��n|jjd�p�djd�r�|jjd�|jd<ndS(NRRs;argument -a/--allocation-id: not allowed with an IP addresss8argument -a/--allocation-id or an IP address is requiredts	eipalloc-(	Rt	configuretargstgettNoneRt
startswithtparamstpop(tself((sK/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/associateaddress.pyR=s
!cCs�|jjd�r_|jd|jjd�|jjd�|jd�|jjd�f�GHn/|jd|jjd�|jjd�f�GHdS(NRRRt
associationIdRR(RRttabify(R!tresult((sK/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/associateaddress.pytprint_resultMs(	t__name__t
__module__tDESCRIPTIONRRtrequiredtARGSRR%(((sK/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/associateaddress.pyR s0	N(trequestbuilderRRtrequestbuilder.exceptionsRteuca2ools.commands.ec2RR(((sK/usr/lib/python2.7/site-packages/euca2ools/commands/ec2/associateaddress.pyt<module>s