
    Y                         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r\
R&                  " \
R(                  R*                  5       " S S\
R,                  5      5       rg)z?Command to unenroll an Anthos on bare metal standalone cluster.    )absolute_import)division)unicode_literals)
operations)standalone_clusters)base)parser_arguments)	constants)standalone_cluster_flagsz
To unenroll a standalone cluster named `my-cluster` managed in location `us-west1`,
run:

$ {command} my-cluster --location=us-west1
c                   R    \ rS rSrSrS\0r\S\R                  4S j5       r
S rSrg)	Unenroll%   z4Unenroll an Anthos on bare metal standalone cluster.EXAMPLESparserc                    U R                   R                  [        R                  5        [        R
                  " U S5        [        R                  " U 5        [        R                  R                  U 5        [        R                  " U 5        g)z!Registers flags for this command.zto unenrollN)display_info	AddFormatbare_metal_constants%BARE_METAL_STANDALONE_CLUSTERS_FORMATcluster_flagsAddStandaloneClusterResourceArg AddAllowMissingStandaloneClusterr   
ASYNC_FLAGAddToParserAddIgnoreErrors)r   s    @lib/surface/container/bare_metal/standalone_clusters/unenroll.pyArgsUnenroll.Args+   sa     !!BB 11&-H226:OO'!!&)    c                     [         R                  " 5       nUR                  R                  R	                  5       nUR                  U5      nUR                  (       a+  UR                  S5      (       d  [        R                  Ul
        UR                  c  gUR                  (       a"  [        R                  " X1R                  5        U$ [        R                  " 5       nUR                  U5      n[        R                  " X1R                  5        U$ )zRuns the unenroll command.formatN)apisStandaloneClustersClientCONCEPTSstandalone_clusterParser   async_IsSpecifiedr
   OPERATIONS_FORMATr!   namer   log_unenrollOperationsClientWait)selfargscluster_clientcluster_ref	operationoperation_clientoperation_responses          r   RunUnenroll.Run6   s    224N--2288:K''-I{{4++H55//dk ~~{{k;;7#446+00;k;;7r    N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr   r5   __static_attributes__r7   r   r   r   r   %   s4    <y)-*#77 * * r   r   N)r<   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   r"   googlecloudsdk.callioper   r	   /googlecloudsdk.command_lib.container.bare_metalr
   r   r   r   .googlecloudsdk.command_lib.container.gkeonpremr=   ReleaseTracksReleaseTrackALPHACommandr   r7   r   r   <module>rK      sf    F &  ' A R ( 4 ] e D	 D%%++,% t|| %  -% r   