
    X
                     *   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 Azure.    )absolute_import)division)unicode_literals)azure)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 Azure.EXAMPLESc                     t        j                  | d       | j                  j                  t        j
                         y )Nzto list Azure clusters)r   AddLocationResourceArgdisplay_info	AddFormatr	   AZURE_CLUSTERS_FORMAT)parsers    ,lib/surface/container/azure/clusters/list.pyArgsz	List.Args+   s-    ((1IJ
!!)"A"AB    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)	page_sizelimit)_upgrade_hintCONCEPTSlocationParser
   GkemulticloudEndpointOverridelocationsIdapi_utilClustersClientr   r   r   r	   AZUREr   generate_cluster_versions_tableupgrade_hint_cluster_list)	selfargslocation_ref
api_clientitemsis_emptyplatformcluster_info_tableend_of_life_flags	            r   RunzList.Run0   s    D==))//1L		4	4\5M5M	N**,j"
$..

 ( oeX 
 
O	N h

2
2 +* 
%??I% 
O	N	Ns   AC)AC))C2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.EpilogH   s9    	$34	jjt))* r   )__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr   r0   r3   __classcell__)r7   s   @r   r   r   %   s3    &y)-C C 0+ +r   r   N)r;   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r"   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.azurer   2googlecloudsdk.command_lib.container.gkemulticloudr	   r
   r   googlecloudsdk.corer   r<   ReleaseTracksReleaseTrackALPHAGAListCommandr    r   r   <module>rL      sx    0 &  ' L ( D H L G #	 D%%++T->->-A-AB%+4 %+ C%+r   