
                             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  SSKJr  SSKr\R,                   " S S\R.                  5      5       rg)zDelete cluster command.    )absolute_import)division)unicode_literals)
exceptions)
kubeconfig)util)base)flags)log)
properties)
console_ioNc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Delete"   ac  Delete an existing cluster for running containers.

When you delete a cluster, the following resources are deleted:

- The control plane resources
- All of the node instances in the cluster
- Any Pods that are running on those instances
- Any firewalls and routes created by Kubernetes Engine at the time of cluster
  creation
- Data stored in host hostPath and emptyDir volumes

GKE will attempt to delete the following resources. Deletion of these
resources is not always guaranteed:

- External load balancers created by the cluster
- Internal load balancers created by the cluster
- Persistent disk volumes
z{description}z`          To delete an existing cluster, run:

            $ {command} sample-cluster
          )DESCRIPTIONEXAMPLESc                     U R                  SSSSS9  U R                  S[        SSS	S
9  [        R                  " U 5        [        R                  " U 5        g)zRegister flags for this command.

Args:
  parser: An argparse.ArgumentParser-like object. It is mocked out in order
    to capture some information, but behaves like an ArgumentParser.
namesNAME+z$The names of the clusters to delete.)metavarnargshelpz	--timeouti  Tz;Timeout (seconds) for waiting on the operation to complete.)typedefaulthiddenr   N)add_argumentintr
   AddAsyncFlagAddKubecontextOverrideFlag)parsers    (lib/surface/container/clusters/delete.pyArgsDelete.ArgsB   sf     3	  5
 J  L 
v	$$V,    c                 f   U R                   S   nU R                   S   nU" U5      n/ nUR                   H#  nUR                  UR                  Xd5      5        M%     [        R
                  " [        R                  " SU Vs/ s H,  nSR                  UR                  UR                  U5      S9PM.     sn5      SSS9  / n/ n	U H'  n
 UR                  U
5      nUR                  X45        M)     UR(                  (       Gd!  U GH  u  p UR+                  US	R                  U
R                  5      UR,                  S
9   [        R.                  R1                  U
R                  UR                  U
5      U
R2                  UR4                  5        [>        R@                  RB                  RD                  RG                  5       U
R                  :X  a9  [>        RH                  " [>        R@                  RB                  RD                  S5        [:        RJ                  " U
5        GM     U	(       a+  [        R&                  " [        R                  " SU	5      5      egs  snf ! [        R                   aT  nU	R                  [        R                  " [         R"                  " U[        R$                  5      5      5         SnAGM  SnAf[        R&                   a  nU	R                  U5         SnAGM(  SnAff = f! [6        R8                   a!  n[:        R<                  " U5         SnAGNSnAff = f! [        R                   a@  nU	R                  [         R"                  " U[        R$                  5      5         SnAGMx  SnAf[        R&                   a  nU	R                  U5         SnAGM  SnAff = f)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_getz'The following clusters will be deleted.z[{name}] in [{zone}])namezoneT)messagethrow_if_unattendedcancel_on_noNzDeleting cluster {0})	timeout_szSome requests did not succeed:)&contextr   appendParseClusterr   PromptContinuer   ConstructListformat	clusterIdZoneDeleteClusterapitools_exceptions	HttpErrorsix	text_typer   HttpExceptionHTTP_ERROR_FORMATErrorasync_WaitForOperationtimeoutClusterConfigPurge	projectIdkubecontext_overridekconfigMissingEnvVarErrorr   warningr   VALUES	containerclusterGetPersistPropertyDeletedResource)selfargsadapterr(   locationcluster_refsr)   ref
operationserrorscluster_refop_referroroperation_refs                 r"   Run
Delete.RunX   s    ll=)G<</LD!HL

'..t>? ""#L $O
 $ #))]]c): * <#O
 
 ! JF#&&{36/0 $ ;;;(2
$-	

"
"$++K,A,AB # &
$$%%[)%%))	 ((00446+:O:OO&&z'8'8'B'B'J'J'+-


k
*) )34 JJ


=v
FH H cO
 !** JMM((0F0FGI	J 	J ZZ e$ ++ KK #,, 	Q
--
008N8NO
P
Pzz 	
--

	s{   3I	#I4L- AK5BL-K2/AJ>>K2K--K25L*	L%L-%L**L--N04M<<N0N++N0 N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr#   r[   __static_attributes__r]   r%   r"   r   r   "   s3    * 		- - -*DHr%   r   )rb   
__future__r   r   r   apitools.base.pyr   r8    googlecloudsdk.api_lib.containerr   rF   r   googlecloudsdk.callioper	   $googlecloudsdk.command_lib.containerr
   googlecloudsdk.corer   r   googlecloudsdk.core.consoler   r:   DefaultUniverseOnlyDeleteCommandr   r]   r%   r"   <module>ro      s^     &  ' > B 1 ( . 6 # * 2 
 yHT yH yHr%   