
                         r   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S r\	R&                  " \	R(                  R*                  \	R(                  R,                  \	R(                  R.                  5      \	R0                   " S S\	R2                  5      5       5       rg)z5Describes a Gcloud Deploy delivery pipeline resource.    )
exceptions)delivery_pipeline)base)describe)resource_args)target_util)logz{description}z   To describe a delivery pipeline called 'test-pipeline' in region 'us-central1', run:

     $ {command} test-pipeline --region=us-central1

)DESCRIPTIONEXAMPLESc                 .    [         R                  " U SS9  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.
T)
positionalN)r   AddDeliveryPipelineResourceArgparsers    1lib/surface/deploy/delivery_pipelines/describe.py_CommonArgsr   )   s     ..v$G    c                   p    \ rS rSrSr\r\S 5       r\	R                  " \R                  5      S 5       rSrg)Describe3   aA  Show details about a delivery pipeline.

The output contains the following sections:

Delivery Pipeline:

  - detail of the delivery pipeline to be described.

Targets:

  - target name.

  - active release in the target.

  - timestamp of the last successful deployment.

  - list of the rollouts that require approval.
c                     [        U 5        g )N)r   r   s    r   ArgsDescribe.ArgsL   s
    r   c                    UR                   R                  R                  5       n[        R                  " 5       R	                  UR                  5       5      nSU0nUR                  5       S   n/ nUR                  R                   H  n[        R                  " UR                  UR                  5       S   U5      n [        R                  " U5      n	SUR                  5       0n[        R(                  " X5      n[*        R,                  " X5      nU	R.                  (       a  [*        R0                  " XU5      nUR3                  U5        M     XdS'   U$ ! [        R                   at  n
[        R                   " SR#                  UR                  U
5      5        [        R$                  R'                  SR#                  UR                  5      5         Sn
A
GMQ  Sn
A
ff = f)	z9This is what gets called when the user runs this command.zDelivery PipelinelocationsId
projectsIdzFailed to get target {}: {}zUnable to get target {}NTargetTargets)CONCEPTSr   ParseDeliveryPipelinesClientGetRelativeNameAsDictserialPipelinestagesr   TargetReferencetargetId	GetTargetapitools_exceptions	HttpErrorr	   debugformatstatusPrintGetCurrentRolloutr   SetCurrentReleaseAndRolloutrequireApprovalListPendingApprovalsappend)selfargspipeline_refpipelineoutputregiontargetsstage
target_ref
target_objerrordetailcurrent_rollouts                r   RunDescribe.RunP   s   
 ==2288:L 88:>>!!#H "8,F  "=1FG((//..
..




-v7j **:6

 *1134f#55jOo33OLf		#	#..zPnnV 0"  9M !** 		/66u~~uMN

299%..IJs   =EG(A(GG N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptiondeploy_exceptionsHTTP_ERROR_FORMATrB   __static_attributes__rD   r   r   r   r   3   sH    & !-  44))r   r   N)rI   apitools.base.pyr   r*   "googlecloudsdk.api_lib.clouddeployr   googlecloudsdk.api_lib.utilrM   googlecloudsdk.callioper   !googlecloudsdk.command_lib.deployr   rO   r   r   googlecloudsdk.corer	   rJ   r   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyDescribeCommandr   rD   r   r   <module>r_      s    < ? @ F ( 6 M ; 9 # 			
H D%%++T->->-C-C%%((*;t## ; *;r   