
    _                        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SKJr  Sr\R(                  \R*                  " \R,                  R.                  5       " S	 S
\R0                  5      5       5       r\R(                  \R*                  " \R,                  R4                  5       " S S\5      5       5       r\R(                  \R*                  " \R,                  R8                  5       " S S\5      5       5       rg)z8Command for creating dedicated interconnect attachments.    )base_classes)client)base)parser_errors)flags)logzUhttps://cloud.google.com/interconnect/docs/how-to/dedicated/creating-vlan-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 dedicated interconnect attachment.

*{command}* is used to create a dedicated 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
                  " 5       U l        U R                  R                  U5        [        R                  " 5       U l	        U R                  R                  USS9  [        R                  " U5        [        R                  " USS9  [        R                  " U5        [        R                  " U5        [        R                  " USU R                  5       S9  [        R                   " U5        [        R"                  " U5        [        R$                  " 5       R'                  U5        [        R(                  " U5        [        R*                  " U5        [        R,                  " U5        [        R.                  " U5        [        R0                  " U5        [        R2                  " U5        g )Nz0The interconnect for the interconnect attachmentcreate)operation_typeT)default_behaviorF)requiredrelease_track)interconnect_flags$InterconnectArgumentForOtherResourceINTERCONNECT_ARGAddArgumentrouter_flagsRouterArgumentForOtherResources
ROUTER_ARGattachment_flagsInterconnectAttachmentArgumentINTERCONNECT_ATTACHMENT_ARGAddDescriptionAddAdminEnabledAddVlanAddCandidateSubnetsAddBandwidthReleaseTrackAddMtuAddEncryptionGetIpsecInternalAddressesFlagAddToParserAddStackTypeAddCandidateIpv6SubnetsAddCloudRouterIpv6InterfaceId AddCustomerRouterIpv6InterfaceIdAddSubnetLengthAddResourceManagerTags)clsparsers     Alib/surface/compute/interconnects/attachments/dedicated/create.pyArgsCreate.Args+   sf    	??>	@  $$V,!AACCNNNv& 	779 ###//x/P##F+$$VdCV$((0!!c.>.>.@ F#""6*224@@H!!&),,V4226:55f=$$V,++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                  c  UR                  Ul        UR                  UR                  :w  a  [        R                  " S5      eS nUR                   b%  U R"                  R	                  XR
                  5      n[$        R&                  " U5      nS nUR                  n	UR(                  bT  UR(                   V
s/ s H=  n
[$        R*                  " UR
                  XUR,                  5      R/                  5       PM?     nn
UR1                  UR2                  USUUR4                  UUR6                  [9        USS 5      [9        USS 5      [9        USS 5      [9        USS 5      U[9        US	S 5      UR:                  [9        US
S 5      [9        USS 5      [9        USS 5      [9        USS 5      [9        USS 5      [9        USS 5      [9        USS 5      [9        USS 5      U R                  5       [<        R                  R>                  :H  UR@                  S9$ s  sn
f )N)scope_lister)compute_clientz4router-region must be same as the attachment region.	DEDICATED	bandwidthdry_runmtu
encryption
stack_typecloud_router_ipv6_interface_id!customer_router_ipv6_interface_idsubnet_lengthenable_multicast!candidate_cloud_router_ip_address$candidate_customer_router_ip_address#candidate_cloud_router_ipv6_address&candidate_customer_router_ipv6_address)descriptioninterconnectattachment_typeroutervlan_tag_802_1qadmin_enabledcandidate_subnetsr7   validate_onlyr9   r:   ipsec_internal_addressesr;   candidate_ipv6_subnetsr<   r=   r>   multicast_enabledr@   rA   rB   rC   supports_400gresource_manager_tags)!r   ComputeApiHolderr"   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerr   InterconnectAttachmentrE   r   router_regionregionr   ArgumentExceptionrG   r   r   GetAdminEnabledFlagrL   GetAddressRefprojectSelfLinkr
   rD   vlanrJ   getattrrM   r   ALPHArP   )selfargsholderattachment_refinterconnect_attachmentinterconnect_ref
router_refrI   ipsec_internal_addresses_urlsrX   names              r/   Run
Create.RunI   s   **4+<+<+>?F55GG"88G H IN
 %;;}}6 $..@@
  " !)00d^222++
@B B J{{??44T;K;KLj$88>M$(!""F$$0
 33	' 4d 
(
(n.D.DHJ 4	 $ ' #))$$%#		#00$T2dIt4D%&4t4!>4t4#::'.2D(
 +25t+
 dOT:!$(:DA*15t+
 .58$.
 -47-
 07:D0
 '')T->->-D-DD"88I * % %'s   ;AKc                 l    SR                  [        5      n[        R                  R	                  U5        g )NzYou must configure your Cloud Router with an interface and BGP peer for your created VLAN attachment. See also {} for more detailed help.)format_DOCUMENTATION_LINKr   statusPrint)ra   resources_were_displayedmessages      r/   EpilogCreate.Epilog   s+    %%+V,?%@  JJWr2    )__name__
__module____qualname____firstlineno____doc__r   r   r   classmethodr0   rj   rs   __static_attributes__ru   r2   r/   r
   r
      s8     !%*4 4:KZr2   r
   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )
CreateBeta   r   c                    > [         TU ]  U5        [        R                  " U5        [        R                  " U5        [        R
                  " U5        [        R                  " U5        g N)superr0   r    AddCandidateCloudRouterIpAddress#AddCandidateCustomerRouterIpAddress"AddCandidateCloudRouterIpv6Address%AddCandidateCustomerRouterIpv6Addressr-   r.   	__class__s     r/   r0   CreateBeta.Args   sG    	GL55f=88@77?::6Br2   ru   	rv   rw   rx   ry   rz   r{   r0   r|   __classcell__r   s   @r/   r~   r~      s     C Cr2   r~   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )CreateAlpha   r   c                 |   > [         TU ]  U5        [        R                  " U5        [        R                  " U5        g r   )r   r0   r   AddEnableMulticast	AddDryRunr   s     r/   r0   CreateAlpha.Args   s+    	GL''/v&r2   ru   r   r   s   @r/   r   r      s     ' 'r2   r   N)rz   googlecloudsdk.api_lib.computer   8googlecloudsdk.api_lib.compute.interconnects.attachmentsr   googlecloudsdk.callioper   r   "googlecloudsdk.command_lib.computer   rT   0googlecloudsdk.command_lib.compute.interconnectsr   <googlecloudsdk.command_lib.compute.interconnects.attachmentsr   *googlecloudsdk.command_lib.compute.routersr   googlecloudsdk.corer   rn   UniverseCompatibleReleaseTracksr"   GACreateCommandr
   BETAr~   r`   r   ru   r2   r/   <module>r      s    ? 7 K ( 1 E X b L #m  D%%(()zT z * zz D%%**+C C , C" D%%++,'* ' - 'r2   