
    	                     L   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d
lmZ dZdZ e	j&                  e	j(                  j*                  e	j(                  j,                  e	j(                  j.                         G d de	j0                               Zy)zMCommand to list all admin clusters in the Anthos clusters on bare metal API.
    )absolute_import)division)unicode_literals)bare_metal_admin_clusters)base)parser_arguments)admin_cluster_flags)	constants)logzd
To list all admin clusters managed in location ``us-west1'', run:

$ {command} --location=us-west1
z
To include admin clusters that are not enrolled with the Anthos On-Prem API, run:

$ gcloud container fleet memberships list --filter='endpoint.onPremCluster.adminCluster=true'
c                   Z     e Zd ZdZdeiZedej                  fd       Z	d Z
 fdZ xZS )Listz)List Anthos on bare metal admin clusters.EXAMPLESparserc                     | j                   j                  t        j                         t	        j
                  | d       y)zzGathers command line arguments for the list command.

    Args:
      parser: The argparse parser to add the flag to.
    z+to list Anthos on bare metal admin clustersN)display_info	AddFormatr
    BARE_METAL_ADMIN_CLUSTERS_FORMATcluster_flagsAddLocationResourceArg)r   s    7lib/surface/container/bare_metal/admin_clusters/list.pyArgsz	List.Args2   s2     !!)"L"LM((=?    c                 L    t        j                         }|j                  |      S )zRuns the list command.

    Args:
      args: Arguments received from command line.

    Returns:
      protorpc.message.Message, The resources listed by the service.
    )apisAdminClustersClientr   )selfargsclients      r   RunzList.Run=   s!     %%'F;;tr   c                 r    t         t        |   |       t        j                  j                  t               y )N)superr   Epilogr   statusPrint_EPILOG)r   resources_were_displayed	__class__s     r   r"   zList.EpilogI   s%    	$56JJWr   )__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr   ArgumentInterceptorr   r   r"   __classcell__)r'   s   @r   r   r   *   sA     2y)-?#77 ? ?
 r   r   N)r+   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   googlecloudsdk.callioper   r   /googlecloudsdk.command_lib.container.bare_metalr	   r   r
   googlecloudsdk.corer   r,   r%   ReleaseTracksReleaseTrackALPHABETAGAListCommandr    r   r   <module>r=      s    '  ' X ( 4 ` E #	 T..33T5F5F5I5I4 r   