
    4
                     *   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dlmZ dZ e	j&                  e	j(                  j*                  e	j(                  j,                         G d de	j.                               Zy)z'Command to list Anthos clusters on AWS.    )absolute_import)division)unicode_literals)aws)base)resource_args)	constants)endpoint_util)versions)logz_
To lists all clusters managed in location ``us-west1'', run:

$ {command} --location=us-west1
c                   @     e Zd ZdZdeiZed        Zd Z fdZ	 xZ
S )ListzList Anthos clusters on AWS.EXAMPLESc                     t        j                  | d       | j                  j                  t        j
                         y )Nzto list)r   AddLocationResourceArgdisplay_info	AddFormatr	   AWS_CLUSTERS_FORMAT)parsers    *lib/surface/container/aws/clusters/list.pyArgsz	List.Args+   s,    ((;
!!)"?"?@    c                    d| _         |j                  j                  j                         }t	        j
                  |j                        5  t        j                         }|j                  ||j                  |j                        \  }}|r|cddd       S t        j                  }t        j                  |||      \  }}|rt        j                   |      | _         |cddd       S # 1 sw Y   yxY w)zRuns the list command.N)_upgrade_hintCONCEPTSlocationParser
   GkemulticloudEndpointOverridelocationsIdapi_utilClustersClientr   	page_sizelimitr	   AWSr   generate_cluster_versions_tableupgrade_hint_cluster_list)	selfargslocation_refcluster_clientitemsis_emptyplatformcluster_info_tableend_of_life_flags	            r   RunzList.Run0   s    D==))//1L		4	4\5M5M	N..0n&++


oeX 
 
O	N h

2
2 +* 
%??I# 
O	N	Ns   AC(AC((C1c                     t         t        |   |       | j                  r*t        j
                  j                  | j                         y y )N)superr   Epilogr   r   statusPrint)r'   results_were_displayed	__class__s     r   r3   zList.EpilogG   s9    	$34	jjt))* r   )__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr   r0   r3   __classcell__)r7   s   @r   r   r   %   s3    $y)-A A .+ +r   r   N)r;   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r    googlecloudsdk.callioper   (googlecloudsdk.command_lib.container.awsr   2googlecloudsdk.command_lib.container.gkemulticloudr	   r
   r   googlecloudsdk.corer   r<   ReleaseTracksReleaseTrackALPHAGAListCommandr    r   r   <module>rL      sx    . &  ' J ( B H L G #	 D%%++T->->-A-AB$+4 $+ C$+r   