
    i                     v   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SKJr  \R"                  \R$                  " \R&                  R(                  \R&                  R*                  5      \R,                   " S S\R.                  5      5       5       5       rSSS.\l        g)zCommand for activating spokes.    )absolute_import)division)unicode_literals)networkconnectivity_api)networkconnectivity_util)waiter)base)flags)log)	resourcesc                   .    \ rS rSrSr\S 5       rS rSrg)Activate   zActivate a spoke.

Activate a previously deactivated spoke. By activating a spoke,
you permit connectivity between it and any other spokes that are
attached to the same hub.
c                     [         R                  " U S5        [         R                  " U SS9  [         R                  " U 5        g )Nzto activateT)hide_global_arg)r
   AddSpokeResourceArgAddRegionGroupAddAsyncFlag)parsers    3lib/surface/network_connectivity/spokes/activate.pyArgsActivate.Args*   s0    	fm4	6	v    c                 2   [         R                  " U R                  5       S9nUR                  R                  R                  5       nUR                  U5      n[        R                  R                  SR                  UR                  5       5      5        [        R                  R                  UR                  S[         R"                  U R                  5          S9n[$        R&                  " UR(                  UR*                  5      nUR,                  (       a  UR/                  U5      $ UR0                  (       a:  [        R                  R                  SR                  UR                  5      5        U$ [        R                  R                  UR                  S[         R"                  U R                  5          S9n[$        R&                  " UR(                  UR*                  5      n[$        R2                  " XeSR                  UR                  5      5      nU$ )N)release_trackz!Activate request issued for: [{}]z1networkconnectivity.projects.locations.operations)
collectionapi_versionz Check operation [{}] for status.z&Waiting for operation [{}] to complete)r   SpokesClientReleaseTrackCONCEPTSspokeParser   r   statusPrintformatNamer   REGISTRYParseRelativeNamenamer   VERSION_MAPr   CloudOperationPollerspoke_serviceoperation_servicedone	GetResultasync_WaitFor)selfargsclient	spoke_refop_refop_resourcepollerress           r   RunActivate.Run0   s   $11'')+F##))+I__Y'FJJ8??  $$66F,889J9J9LM 7 OK (()=)=)/)A)ACF {{k**{{	jj9@@MNm$$66F,889J9J9LM 7 OK (()=)=)/)A)ACF
..077DFC Jr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r:   __static_attributes__r<   r   r   r   r      s       
 r   r   z}   To activate a spoke named ``myspoke'' in the ``us-central1'' region, run:

    $ {command} myspoke --region=us-central1
  z   This command uses the networkconnectivity/v1 API. The full documentation
  for this API can be found at:
  https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest
  )EXAMPLESzAPI REFERENCEN)rA   
__future__r   r   r   +googlecloudsdk.api_lib.network_connectivityr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper	   /googlecloudsdk.command_lib.network_connectivityr
   googlecloudsdk.corer   r   HiddenReleaseTracksr   BETAGADefaultUniverseOnlyCommandr   detailed_helpr<   r   r   <module>rR      s     % &  ' O P . ( A # ) D%%**D,=,=,@,@A.t|| .  B .f		 r   