
                         X   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       " S S\R,                  5      5       5       rSSS.\l        g)z$Command for accepting spoke updates.    )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)AcceptSpokeUpdate   a  Accept a proposal to update a spoke in a hub.

Accept a proposed or previously rejected VPC spoke update. By accepting a
spoke update, you permit updating connectivity between the associated VPC
network and other VPC networks that are attached to the same hub.
c                     [         R                  " U S5        [         R                  " U S5        [         R                  " U S5        [         R                  " U 5        g )Nzto accept the spoke updatez!URI of the spoke to accept updatez"Etag of the spoke to accept update)r
   AddHubResourceArgAddSpokeFlagAddSpokeEtagFlagAddAsyncFlag)parsers    <lib/surface/network_connectivity/hubs/accept_spoke_update.pyArgsAcceptSpokeUpdate.Args)   sC    	F$@A	vBC	6#GH	v    c                    [         R                  " U R                  5       S9nUR                  R                  R                  5       nU R                  5       [        R                  R                  :X  a'  UR                  X1R                  UR                  5      nO&UR                  X1R                  UR                  5      n[        R                  R                  SR                  UR!                  5       5      5        ["        R$                  R'                  UR(                  S[*        R,                  U R                  5          S9n[.        R0                  " UR2                  5      nUR4                  (       a  UR7                  U5      $ UR8                  (       a:  [        R                  R                  SR                  UR(                  5      5        U$ [.        R:                  " XeSR                  UR(                  5      5      nU$ )N)release_trackz,Accept spoke update request issued for: [{}]z1networkconnectivity.projects.locations.operations)
collectionapi_versionz Check operation [{}] for status.z&Waiting for operation [{}] to complete)r   
HubsClientReleaseTrackCONCEPTShubParser	   BETAAcceptSpokeUpdateBetaspoke
spoke_etagr   r   statusPrintformatNamer   REGISTRYParseRelativeNamenamer   VERSION_MAPr   CloudOperationPollerNoResourcesoperation_servicedone	GetResultasync_WaitFor)selfargsclienthub_refop_refop_resourcepollerress           r   RunAcceptSpokeUpdate.Run0   s{   $//'')F mm%%'Gd//444++
::tf ''T__MfJJ6==gllnM $$66F,889J9J9LM 7 K
 33F4L4LMF{{k**{{	jj9@@MNm
..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 accept updating a spoke named ``my-spoke'' with ``etag'' in a hub named ``my-hub'', run:

    $ {command} my-hub --spoke="projects/spoke-project/locations/global/hubs/my-spoke" --spoke-etag=etag
  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)rD   
__future__r   r   r   +googlecloudsdk.api_lib.network_connectivityr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper	   /googlecloudsdk.command_lib.network_connectivityr
   googlecloudsdk.corer   r   DefaultUniverseOnlyReleaseTracksr   r#   GACommandr   detailed_helpr?   r   r   <module>rS      s     + &  ' O P . ( A # ) D%%**D,=,=,@,@A0 0 B 0j		#  r   