
                         F   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  \	R                  \	R                  " \	R                  R                   \	R                  R"                  5       " S
 S\	R$                  5      5       5       rS rSSS.\l        g)zCommand for listing spokes.    )absolute_import)division)unicode_literals)networkconnectivity_api)networkconnectivity_util)base)flags)utilc                   .    \ rS rSrSr\S 5       rS rSrg)
ListSpokes   zSList hub spokes.

Retrieve and display a list of all spokes associated with a hub.
c                    [         R                  R                  U 5        [        R                  " U 5        [        R
                  " U 5        [        R                  " U S5        U R                  R                  [        R                  5        g )NzGassociated with the returned list of
                            spokes)r   URI_FLAGRemoveFromParserr	   AddSpokeLocationsFlagAddViewFlagAddHubResourceArgdisplay_info	AddFormatr
   LIST_SPOKES_FORMAT)parsers    4lib/surface/network_connectivity/hubs/list_spokes.pyArgsListSpokes.Args%   se     	MM""6* 
'	f	F %& ' !!$"9"9:    c           	         U R                  5       n[        UR                  U5      n[        R                  " U5      nUR
                  R                  R                  5       nUR                  UUR                  UR                  S S US9$ )N)spoke_locationslimitorder_byfilter_expressionview)ReleaseTrack
ViewToEnumr!   r   
HubsClientCONCEPTShubParseListHubSpokesr   r   )selfargsrelease_trackr!   clienthub_refs         r   RunListSpokes.Run3   s|    %%'Mdii/D$//>Fmm%%'G,,jj    r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r.   __static_attributes__r0   r   r   r   r      s     
 ; ;r   r   c                     [         R                  " U5      R                  nU S:X  a  UR                  R                  $ UR                  R
                  $ )z,Converts the typed view into its Enum value.detailed)r   GetMessagesModule?NetworkconnectivityProjectsLocationsGlobalHubsListSpokesRequestViewValueValuesEnumDETAILEDBASIC)r!   r+   list_hub_spokes_reqs      r   r#   r#   A   sK    0BB=Q  R  R	Z22;;;		0	0	6	66r   z   To list all spokes in the ``us-central1'' region and the global location, run:

        $ {command} HUB --spoke-locations=us-central1,global
  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)r5   
__future__r   r   r   +googlecloudsdk.api_lib.network_connectivityr   r   googlecloudsdk.callioper   /googlecloudsdk.command_lib.network_connectivityr	   r
   DefaultUniverseOnlyReleaseTracksr"   BETAGAListCommandr   r#   detailed_helpr0   r   r   <module>rK      s     " &  ' O P ( A @ D%%**D,=,=,@,@A!!  B D7

 r   