
                             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 r\R                   " \R"                  R$                  5       " S S\R&                  5      5       rg)zDA command that prints out information about your gcloud environment.    )absolute_import)division)unicode_literals)base)info_holder)
exceptions)log)network_diagnostics)property_diagnosticsc                     [         R                  " 5       R                  5       n[        R                  " U 5      R                  5       nU=(       a    U$ )N)r
   NetworkDiagnostic	RunChecksr   PropertyDiagnostic) ignore_hidden_property_allowlistpassed_networkpassed_propss      lib/surface/info.py_RunDiagnosticsr      sA    &88:DDF.%88&((1	 		(L(    c                   T    \ rS rSrSrSS0r\R                  r\	S 5       r
S rS rSrg	)
Info&   z9Display information about the current gcloud environment.EXAMPLESa  
          To display information about the current gcloud environment including
          the Google Cloud account, project and directory paths for
          logs, run:

            $ {command}

          To check network connectivity and hidden properties, run:

            $ {command} --run-diagnostics

          To print the contents of the most recent log file, run:

            $ {command} --show-log
          c                     U R                  SS9nUR                  SSSS9  UR                  5       nUR                  SSSS9  UR                  S	SSS
S9  U R                  SSSS9  g )NT)mutexz
--show-log
store_truez(Print the contents of the last log file.)actionhelpz--run-diagnosticsz=Run diagnostics on your installation of the Google Cloud CLI.z"--ignore-hidden-property-allowlistz%Ignore the hidden property allowlist.)r   hiddenr   z--anonymizezWMinimize any personal identifiable information. Use it when sharing output with others.)	add_groupadd_argument)parsermodediagnosticss      r   Args	Info.Args>   s    $'D7  9 .."KL  N ,4	  6
 7  8r   c                    UR                   (       a3  [        UR                  5      nU(       a  g [        R                  " S5      e[
        R                  " UR                  (       a  [
        R                  " 5       S9$ S S9$ )Nz)Some of the checks in diagnostics failed.)
anonymizer)	run_diagnosticsr   r   r   Errorr   
InfoHolder	anonymize
Anonymizer)selfargspasseds      r   RunInfo.RunU   si    tDDEf	JKK!!/3~~;))+I ICGI Ir   c                 @   U(       d  g UR                   (       d  [        R                  " U5        g UR                  R                  (       aS  [        R                  " SR                  UR                  R                  UR                  R                  5       5      5        g g )Nz]
Contents of log file: [{0}]
==========================================================
{1}

)show_logr	   Printlogslast_logformatLastLogContents)r.   r/   infos      r   DisplayInfo.Display_   sc    ==	iio				ii  		**DII,E,E,GHJ 
r    N)__name__
__module____qualname____firstlineno____doc__detailed_helpr   SDK_TOOLS_CATEGORYcategorystaticmethodr%   r1   r;   __static_attributes__r=   r   r   r   r   &   sA    A  -$ $$(8 8,I	Jr   r   N)rB   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_libr   googlecloudsdk.corer   r	   googlecloudsdk.core.diagnosticsr
   r   r   ReleaseTracksReleaseTrackGACommandr   r=   r   r   <module>rQ      si     K &  ' ) 2 * # ? @) D%%(()AJ4<< AJ *AJr   