
    6
                         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  \R                   " S S\R                  5      5       rg	)
z&Check autopilot compatibility command.    )absolute_import)division)unicode_literals)base)logc                   >    \ rS rSrSrSSS.r\S 5       rS rS r	S	r
g
)CheckAutopilotCompatibility   z3Check autopilot compatibility of a running cluster.a  {description}

For clusters with GKE version 1.31.6-gke.1027000 or later, you must enable the control plane component that performs the check by running the `gcloud container clusters update` command with the [`--enable-autopilot-compatiblity-auditing`](https://cloud.google.com/sdk/gcloud/reference/container/clusters/update#--%5Bno-%5Denable-autopilot-compatibility-auditing)  flag.zz          To check autopilot compatibility of an existing cluster, run:

            $ {command} sample-cluster
          )DESCRIPTIONEXAMPLESc                 $    U R                  SSS9  g )NnamezThe name of this cluster.)help)add_argument)parsers    ?lib/surface/container/clusters/check_autopilot_compatibility.pyArgs CheckAutopilotCompatibility.Args.   s    
%@A    c                    U R                   S   nU R                   S   nU" U5      nS nUR                  UR                  UR                  U5      5      n[	        UR
                  US9Ul        UR                  U l        UR
                  $ )zThis is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  Some value that we want to have printed later.
api_adapterlocation_getc                 2    U R                   U R                  4$ )N)incompatibilityTypeconstraintType)issues    r   sort_key1CheckAutopilotCompatibility.Run.<locals>.sort_key@   s    '')=)=>>r   )key)contextr	   ParseClusterr   sortedissuessummary_summary)selfargsadapterr   locationr   resps          r   RunCheckAutopilotCompatibility.Run2   s|     ll=)G<</LD!H? ..TYY13D(3DKLLDM;;r   c                     U R                   (       a-  [        R                  R                  SU R                   -   5        g g )Nz

Summary:
)r%   r   outPrint)r&   results_were_displayeds     r   Epilog"CheckAutopilotCompatibility.EpilogJ   s'    }}	ggmmNT]]23 r   )r%   N)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r+   r1   __static_attributes__ r   r   r	   r	      s6    ;-" B B04r   r	   N)r7   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.corer   UniverseCompatibleListCommandr	   r;   r   r   <module>rA      s@    - &  ' ( # 24$"2"2 24 24r   