
                            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 ej$                  ej&                  j(                  ej&                  j*                         G d dej,                               Zy)zGCommand to add an interface to a Distributed Cloud Edge Network router.    )absolute_import)division)unicode_literals)routers)base)resource_args)flags)logz?Create an interface to a Distributed Cloud Edge Network router.at      To create and add a northbound interface for Distributed Cloud Edge Network router 'my-router' in edge zone 'us-central1-edge-den1' , run:

        $ {command} my-router --interface-name=my-int-r1 --interconnect-attachment=my-link-attachment --ip-address=208.117.254.233 --ip-mask-length=31 --location=us-central1 --zone=us-central1-edge-den1

    To create and add a southbound interface for Distributed Cloud Edge Network router 'my-router' in edge zone 'us-central1-edge-den1', run:

         $ {command} my-router --interface-name=my-int-r2 --subnetwork=my-subnet --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)AddInterfacezAdd an interface to a Distributed Cloud Edge Network router.

  *{command}* is used to add an interface to a Distributed Cloud Edge Network
  router.
  )DESCRIPTIONEXAMPLESc                     t        j                  |dd       t        j                  |       t        j
                  j                  |       y )Nzto which we add an interfaceT)r   AddRouterResourceArgrouters_flagsAddInterfaceArgsr   
ASYNC_FLAGAddToParser)clsparsers     :lib/surface/edge_cloud/networking/routers/add_interface.pyArgszAddInterface.Args2   s:    &&. ""6*OO'    c                    t        j                  | j                               }|j                  j                  j                         }|j                  ||      }t        |dd      }|s8|j                  |      }t        j                  |j                         d       |S t        j                  j                  dj                  |j                         |j                               y )Nasync_FzOperation was successful.)detailsz$Updating [{0}] with operation [{1}].)r   RoutersClientReleaseTrackCONCEPTSrouterParser   getattrWaitForOperationr
   UpdatedResourceRelativeNamestatusPrintformatname)selfargsrouters_client
router_refupdate_req_opr   responses          r   RunzAddInterface.Run:   s    **4+<+<+>?N%%++-J"//
DAMT8U+F00?h	

!
!
#-H oJJ.55##%}'9'9	
r   N)
__name__
__module____qualname____doc__r   r   detailed_helpclassmethodr   r0    r   r   r   r   (   s*     #.8D-( (r   r   N)r4   
__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   r   ReleaseTracksr   ALPHAGAUpdateCommandr   r7   r   r   <module>rB      sx    N &  ' H ( J [ #O	 D%%++T->->-A-AB"4%% " C"r   