
                             S r SSKJr  SSKJr  SSKJr  SSK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 r " S S\R"                  5      rg)zbigtable clusters list command.    )absolute_import)division)unicode_literalsN)
list_pager)util)base)	arguments)	resourcesc                 n    [         R                  R                  U R                  SS9R	                  5       $ )Nz)bigtableadmin.projects.instances.clusters)
collection)r
   REGISTRYParseRelativeNamenameSelfLink)resources    %lib/surface/bigtable/clusters/list.py_GetUriFunctionr      s2    				-	-mm< 
. 
>>FhjI    c                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	ListClusters$   z List existing Bigtable clusters.EXAMPLESz          To list all clusters in an instance, run:

            $ {command} --instances=my-instance-id

          To list all clusters in multiple instances, run:

            $ {command} --instances=my-instance-id,my-other-instance-id

          c                     [         R                  " U S5        U R                  R                  S5        U R                  R	                  [
        5        U R                  R                  [         R                  5        g)z Register flags for this command.zto list clusters fora  
          table(
            name.segment(3):sort=1:label=INSTANCE,
            name.basename():sort=2:label=NAME,
            location.basename():label=ZONE,
            serveNodes:label=NODES,
            defaultStorageType:label=STORAGE,
            state
          )
        N)r	   AddInstancesResourceArgdisplay_info	AddFormat
AddUriFuncr   AddCacheUpdaterInstanceCompleter)parsers    r   ArgsListClusters.Args5   s^     %%f.DE
!! 	# 	 ""?3
''	(C(CDr   c              #     #    [         R                  " 5       nUR                  R                  R	                  5       nUR                  S5      (       d  [         R                  " S5      /nU H_  n[         R                  " 5       R                  UR                  5       S9n[        R                  " UR                  USSS9 H  nUv   M	     Ma     g7f)zThis is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Yields:
  Some value that we want to have printed later.
	instances-)parentclustersN)fieldbatch_size_attribute)r   GetAdminClientCONCEPTSr$   ParseIsSpecifiedGetInstanceRefGetAdminMessages1BigtableadminProjectsInstancesClustersListRequestRelativeNamer   YieldFromListprojects_instances_clusters)selfargscliinstance_refsinstance_refmsgclusters          r   RunListClusters.RunF   s      


CMM++113MK((**3/0m%



!<<!..0 = 2 
  --

)
)
#	%'
 % &s   CC N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr!   r;   __static_attributes__r=   r   r   r   r   $   s=    ( 
// 	 	- E E r   r   )rB   
__future__r   r   r   rC   apitools.base.pyr   googlecloudsdk.api_lib.bigtabler   googlecloudsdk.callioper   #googlecloudsdk.command_lib.bigtabler	   googlecloudsdk.corer
   r   ListCommandr   r=   r   r   <module>rO      s=    & &  '  ' 0 ( 9 )I:4## :r   