
                         l   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S.r\R"                  " \R$                  R&                  \R$                  R(                  \R$                  R*                  5      \R,                   " S S\R.                  5      5       5       rg)z>Ignores a job and phase combination on a Cloud Deploy rollout.    )rollout)
exceptions)base)delivery_pipeline_util)deploy_policy_util)flags)resource_args)logz{description}aE       To ignore a job `test-job` in phase `test-phase` on a rollout `test-rollout` for delivery pipeline `test-pipeline`, release `test-release` in region `us-central1`, run:

      $ {command} test-rollout --job-id=test-job --phase-id=test-phase --delivery-pipeline=test-pipeline --release=test-release --region=us-central1

)DESCRIPTIONEXAMPLESc                   p    \ rS rSrSr\r\S 5       r\	R                  " \R                  5      S 5       rSrg)	IgnoreJob'   z;Ignores a specified job and phase combination on a rollout.c                     [         R                  " U SS9  [        R                  " U 5        [        R                  " U 5        [        R
                  " U 5        g )NT)
positional)r	   AddRolloutResourceArgr   AddJobId
AddPhaseIdAddOverrideDeployPolicies)parsers    )lib/surface/deploy/rollouts/ignore_job.pyArgsIgnoreJob.Args0   s:    ''4@	NN6	V	##F+    c                    UR                   R                  R                  5       nUR                  5       R                  5       n[        R
                  " UR                  5       5      nSR                  UR                  5       5      n[        R                  " XE5        [        R                  R                  SR                  UR                  UR                  UR                  5       5      5        [        R                  " X1R                   5      n[        R"                  " 5       R%                  UR                  5       UR                  UR                  US9$ )Nz Cannot ignore job on rollout {}.z+Ignoring job {} in phase {} of rollout {}.
)override_deploy_policies)CONCEPTSr   ParseParentr   GetPipelineRelativeNameformatThrowIfPipelineSuspendedr
   statusPrintjob_idphase_idr   CreateDeployPolicyNamesFromIDsr   RolloutClientr   )selfargsrollout_refpipeline_refpipeline_objfailed_activity_msgpoliciess          r   RunIgnoreJob.Run7   s    --''--/K%%'..0L)55!!#L =CC  " 33 JJ6==KK(@(@(B	
 "@@33H   ",,  "!)	 -  r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptiondeploy_exceptionsHTTP_ERROR_FORMATr1   __static_attributes__r3   r   r   r   r   '   sG    
 D -, , 44))r   r   N)r8   "googlecloudsdk.api_lib.clouddeployr   googlecloudsdk.api_lib.utilr   r<   googlecloudsdk.callioper   !googlecloudsdk.command_lib.deployr   r   r>   r   r	   googlecloudsdk.corer
   r9   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyCreateCommandr   r3   r   r   <module>rM      s    E 7 F ( D @ M 3 ; # # T..33T5F5F5I5I +"" + +r   