
    +                     l   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ d
ZdZdZ ej&                  ej(                  j*                         G d dej,                               Z ej&                  ej(                  j0                         G d dej,                               Zy)zECommand to add a BGP peer to a Distributed Cloud Edge Network router.    )absolute_import)division)unicode_literals)routers)base)resource_args)flags)logz<Create a BGP peer to a Distributed Cloud Edge Network routera?      To create and add a BGP peer for the Distributed Cloud Edge Network router
    'my-router' in edge zone 'us-central1-edge-den1' , run:

        $ {command} my-router --interface=my-int-r1 --peer-asn=33333 --peer-name=peer1 --peer-ipv4-range=208.117.254.232/31 --location=us-central1 --zone=us-central1-edge-den1
   a	      To create and add a BGP peer for the Distributed Cloud Edge Network router
    'my-router' in edge zone 'us-central1-edge-den1' , run:

        $ {command} my-router --interface=my-int-r1 --peer-asn=33333 --peer-name=peer1 --peer-ipv4-range=208.117.254.232/31 --location=us-central1 --zone=us-central1-edge-den1

        $ {command} my-router --interface=my-int-r1 --peer-asn=33333 --peer-name=peer1 --peer-ipv6-range=2001:0db8:85a3:0000:0000:8a2e:0370:7334/126 --location=us-central1 --zone=us-central1-edge-den1
   c                   0    e Zd ZdZeedZed        Zd Z	y)AddBgpPeerAlphaAdd a BGP peer to a Distributed Cloud Edge Network router.

  *{command}* is used to add a BGP peer to a Distributed Cloud Edge Network
  router.
  DESCRIPTIONEXAMPLESc                     t        j                  |dd       t        j                  |dd       t        j
                  j                  |       y )Nto which we add a bgp peerTF)
for_updateenable_peer_ipv6_ranger   AddRouterResourceArgrouters_flagsAddBgpPeerArgsr   
ASYNC_FLAGAddToParserclsparsers     9lib/surface/edge_cloud/networking/routers/add_bgp_peer.pyArgszAddBgpPeerAlpha.Args8   sE    &&,d   #
 	OO'    c                    t        j                  | j                               }|j                  j                  j                         }|j                  ||      }|j                  }|s8|j                  |      }t        j                  |j                         d       |S t        j                  j                  dj                  |j                         |j                               y NzOperation was successful.)detailsz$Updating [{0}] with operation [{1}].r   RoutersClientReleaseTrackCONCEPTSrouterParse
AddBgpPeerasync_WaitForOperationr
   UpdatedResourceRelativeNamestatusPrintformatnameselfargsrouters_client
router_refupdate_req_opr+   responses          r   RunzAddBgpPeerAlpha.RunE   s    **4+<+<+>?N%%++-J"--j$?M[[F00?h	

!
!
#-H oJJ.55##%}'9'9	
r    N)
__name__
__module____qualname____doc__r   EXAMPLES_ALPHAdetailed_helpclassmethodr   r:    r    r   r   r   .   s*     #.>J-
( 
(r    r   c                   0    e Zd ZdZeedZed        Zd Z	y)r*   r   r   c                     t        j                  |dd       t        j                  |       t        j
                  j                  |       y )Nr   Tr   r   s     r   r   zAddBgpPeer.Argsc   s:    &&,d   (OO'r    c                    t        j                  | j                               }|j                  j                  j                         }|j                  ||      }|j                  }|s8|j                  |      }t        j                  |j                         d       |S t        j                  j                  dj                  |j                         |j                               y r"   r$   r3   s          r   r:   zAddBgpPeer.Runl   s    **4+<+<+>?N%%++-J"--j$?M[[F00?h	

!
!
#-HJoJJ;BB!=#5#57 8r    N)
r;   r<   r=   r>   r   EXAMPLES_GAr@   rA   r   r:   rB   r    r   r*   r*   Y   s*     #.;G-( (8r    r*   N)r>   
__future__r   r   r   4googlecloudsdk.api_lib.edge_cloud.networking.routersr   googlecloudsdk.callioper   0googlecloudsdk.command_lib.edge_cloud.networkingr   8googlecloudsdk.command_lib.edge_cloud.networking.routersr	   r   googlecloudsdk.corer
   r   rF   r?   ReleaseTracksr&   ALPHAUpdateCommandr   GAr*   rB   r    r   <module>rQ      s    L &  ' H ( J [ #M D%%++,'d(( ' -'T D%%(()8## 8 *8r    