
    @                        S r SSKJr  SSKJr  SSKJr  SSKJr	  SSK
Jr  SSKJr  SSKJr  SSKJr  Sr\R&                  " \R(                  R*                  5      \R,                   " S S	\R.                  5      5       5       r\R&                  " \R(                  R2                  5      \R,                   " S
 S\5      5       5       r\R&                  " \R(                  R6                  5      \R,                   " S S\5      5       5       rg)z<Command for creating L2 forwarding interconnect attachments.    )base_classes)client)base)flags)logzWhttps://cloud.google.com/interconnect/docs/how-to/l2-forwarding/creating-l2-attachmentsc                   @    \ rS rSrSrSrSrSr\S 5       r	S r
S rSrg)Create     Create a Compute Engine L2 forwarding interconnect attachment.

*{command}* is used to create a L2 forwarding interconnect attachments. An
interconnect attachment is what binds the underlying connectivity of an
interconnect to a path into and out of the customer's cloud network.
Nc                    [         R                  " S5      U l        U R                  R                  U5        [        R
                  " S5      U l        U R                  R                  U5        [        R                  " 5       U l	        U R                  R                  USS9  [        R                  " U5        [        R                  " U5        [        R                  " USS9  [        R                  " U5        [        R                  " U5        [        R                  " U5        [        R                   " U5        [        R"                  " U5        [        R$                  " U5        g )Nz0The interconnect for the interconnect attachmentz,The Google Network to use for L2 forwarding.create)operation_typeF)required)interconnect_flags$InterconnectArgumentForOtherResourceINTERCONNECT_ARGAddArgumentnetwork_flagsNetworkArgumentForOtherResourceNETWORK_ARGattachment_flagsInterconnectAttachmentArgumentINTERCONNECT_ATTACHMENT_ARGAddDescriptionAddEnableAdminAddBandwidthAddMtuAddGeneveVniAddDefaultApplianceIpAddressAddTunnelEndpointIpAddress
AddZ2zVlanAddResourceManagerTags)clsparsers     Elib/surface/compute/interconnects/attachments/l2_forwarding/create.pyArgsCreate.Args*   s    	??>	@  $$V,#CC6CO OO' 	779 ###//x/P##F+##F+!!&59F#!!&)11&9//7'++F3    c                    [         R                  " U R                  5       5      nU R                  R	                  UUR
                  [        R                  " UR                  5      S9n[        R                  " X2R                  S9nS nUR                  b%  U R                  R	                  XR
                  5      nUR                  b&  U R                  R	                  XR
                  5      nOS nUR                  UR                  USUR                   [#        USS 5      [#        USS 5      [#        USS 5      U[#        USS 5      [#        USS 5      [#        US	S 5      [#        US
S 5      UR$                  S9$ )N)scope_lister)compute_clientL2_DEDICATED	bandwidthdry_runmtu
geneve_vnidefault_appliance_ip_addresstunnel_endpoint_ip_addressz2z_vlan)descriptioninterconnectattachment_typeadmin_enabledr-   validate_onlyr/   networkr0   r1   r2   vlan_tag_802_1qresource_manager_tags)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerr   InterconnectAttachmentr5   r   r9   r   r	   r4   enable_admingetattrr;   )selfargsholderattachment_refinterconnect_attachmentinterconnect_refnetwork_refs          r%   Run
Create.RunC   sm   **4+<+<+>?F55GG"88G H IN
 %;;}}6 $..@@
  " ||$$66t=M=MNkk"))$$%&''$T2dIt4D%&4t4%,0$&
 $+.$
  j$7"88# *  r(   c                 l    SR                  [        5      n[        R                  R	                  U5        g )NzYou must ensure that there is at least one valid Appliance IP (default or within the mapping) and that firewall rules allow traffic between the tunnel endpoint IP and your appliance(s). See also {} for more detailed help.)format_DOCUMENTATION_LINKr   statusPrint)rE   resources_were_displayedmessages      r%   EpilogCreate.Epilogk   s-    	. /5f5H.I	  JJWr(    )__name__
__module____qualname____firstlineno____doc__r   r   r   classmethodr&   rL   rU   __static_attributes__rW   r(   r%   r	   r	      s7     !%+4 40&Pr(   r	   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )
CreateBetau   r   c                 $   > [         TU ]  U5        g N)superr&   r#   r$   	__class__s     r%   r&   CreateBeta.Args   s    	GLr(   rW   	rX   rY   rZ   r[   r\   r]   r&   r^   __classcell__rf   s   @r%   r`   r`   u   s      r(   r`   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )CreateAlpha   r   c                 P   > [         TU ]  U5        [        R                  " U5        g rc   )rd   r&   r   	AddDryRunre   s     r%   r&   CreateAlpha.Args   s    	GLv&r(   rW   rh   rj   s   @r%   rl   rl      s     ' 'r(   rl   N)r\   googlecloudsdk.api_lib.computer   8googlecloudsdk.api_lib.compute.interconnects.attachmentsr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r@   0googlecloudsdk.command_lib.compute.interconnectsr   <googlecloudsdk.command_lib.compute.interconnects.attachmentsr   +googlecloudsdk.command_lib.compute.networksr   googlecloudsdk.corer   rP   ReleaseTracksr=   GADefaultUniverseOnlyCreateCommandr	   BETAr`   ALPHArl   rW   r(   r%   <module>r      s    C 7 K ( E X b N #o  D%%(()ST S  *Sl D%%**+
 
  ,
 D%%++,'* '  -'r(   