
    m                     2   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  SS
KJr  SSKJr  SSKJr  \
R&                  " \
R(                  R*                  \
R(                  R,                  5       " S S\
R.                  5      5       rg)z9Command to get credentials of an Anthos cluster on Azure.    )absolute_import)division)unicode_literals)azure)util)base)resource_args)endpoint_util)flags)
kubeconfig)logc                   z    \ rS rSrSr\R                  \R                  R                  SS9S.r	\
S 5       rS rSrg	)
GetCredentials   z.Get credentials of an Anthos cluster on Azure.zAnthos cluster on Azure)cluster_type)EXAMPLESDESCRIPTIONc                     [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        g )Nzto get credentials)r	   AddAzureClusterResourceArgr   AddAuthProviderCmdPathAddPrivateEndpoint)parsers    7lib/surface/container/azure/clusters/get_credentials.pyArgsGetCredentials.Args*   s/    ,,V5IJ	  (	V$    c           	         [         R                  " [        R                  " U5      R                  U R                  5       5         [        R                  " U5      n[        R                  " 5       n[        R                  R                  S5        UR                  U5      nUR                  [        R                  " 5       R                  R                   R"                  :w  a=  [        R$                  " [&        R(                  R+                  UR,                  5      5        UR.                  (       dO  [&        R0                  " XBR,                  5      (       a*  [&        R2                  " [        R4                  " 5       U5        [&        R6                  " XBR,                  5        [&        R8                  " SUR:                  UR                  UR,                  5      n[&        R<                  " SUR,                  UR                  UR:                  5      n[&        R>                  " UUR,                  UUR@                  UUR.                  5        SSS5        g! , (       d  f       g= f)z!Runs the get-credentials command.z(Fetching cluster endpoint and auth data.r   N)!r
   GkemulticloudEndpointOverrider	   ParseAzureClusterResourceArglocationsIdReleaseTrackapi_utilClustersClientr   statusPrintGetstater   GetMessagesModule&GoogleCloudGkemulticloudV1AzureClusterStateValueValuesEnumRUNNINGwarningr   NOT_RUNNING_MSGformatazureClustersIdprivate_endpointConnectGatewayInNodePoolsCheckClusterHasNodePoolsNodePoolsClientValidateClusterVersionGenerateContext
projectsIdGenerateAuthProviderCmdArgsGenerateKubeconfigauth_provider_cmd_path)selfargscluster_refclientrespcontextcmd_argss          r   RunGetCredentials.Run0   s   		4	42248DD
 ">>tDk&&(f	jjABZZ$d **##%LLaaiij 	&&--k.I.IJ	
 ""z'K'K
++( ( 	++$$&	
 ''.I.IJ**


 
 

!
!

%
%	g 77


%
%

!
!

 
 	h ##


%
%


%
%



M
 
 
s   HI
I N)__name__
__module____qualname____firstlineno____doc__r   COMMAND_EXAMPLECOMMAND_DESCRIPTIONr.   detailed_helpstaticmethodr   rA   __static_attributes__rC   r   r   r   r      sL    6 ,,33::0 ; - % %
/r   r   N)rH   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r"   r   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.azurer	   2googlecloudsdk.command_lib.container.gkemulticloudr
   r   r   googlecloudsdk.corer   ReleaseTracksr!   ALPHAGACommandr   rC   r   r   <module>rX      sq    @ &  ' L ? ( D L D I # D%%++T->->-A-AB?T\\ ? C?r   