
    G                        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  \
R                  " \
R                  R                   5       " S	 S
\R"                  \
R$                  5      5       rg)zmanifests describe command.    )absolute_import)division)unicode_literals)
exceptions)dm_api_util)dm_base)basec                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Describe   zgProvide information about a manifest.

This command prints out all available details about a manifest.
EXAMPLESz
To display information about a manifest, run:

  $ {command} --deployment=my-deployment manifest-name

To display information about the latest manifest, run:

  $ {command} --deployment=my-deployment
c                 H    U R                  SSSS9  U R                  SSSS9  g	)
zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go
      on the command line after this command. Positional arguments are
      allowed.
z--deploymentzDeployment name.T)helprequiredmanifest?zManifest name.)nargsr   N)add_argument)parsers    4lib/surface/deployment_manager/manifests/describe.pyArgsDescribe.Args2   s0     -?$O

#4DE    c                    UR                   nU(       d   U R                  R                  R                  U R                  R                  [        R                  " 5       UR                  S95      n[        R                  " U5      nU(       d#  [        R                   " SUR                  -  5      e U R                  R"                  R                  U R                  R%                  [        R                  " 5       UR                  US95      $ ! [        R                   a  n[        R                  " U5      eSnAff = f! [        R                   a*  n[        R                  " U[        R&                  5      eSnAff = f)zRun 'manifests describe'.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
      with.

Returns:
  The requested manifest.

Raises:
  HttpException: An http error response was received while executing api
      request.
)project
deploymentNzWThe deployment [%s] does not have a current manifest. Please specify the manifest name.)r   r   r   )r   clientdeploymentsGetmessages&DeploymentmanagerDeploymentsGetRequestr   
GetProjectr   apitools_exceptions	HttpErrorr   HttpExceptionr   ExtractManifestNamedm_exceptionsManifestError	manifests$DeploymentmanagerManifestsGetRequestHTTP_ERROR_FORMAT)selfargsr   r   errors        r   RunDescribe.Run>   sA    }}H.[[,,00MM@@**,?? A 

 00<h))026//BC 	C	K[[""&&
--
<
<((* =   !** .&&u--." (( K$$UK,I,IJJKs1   AD 0AD= D:D55D:=E;%E66E; N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r/   __static_attributes__r1   r   r   r   r      s4      
- 	F 	F)Kr   r   N)r6   
__future__r   r   r   apitools.base.pyr   r#   )googlecloudsdk.api_lib.deployment_managerr   r   r'   googlecloudsdk.callioper	   UseDmApiDmApiVersionV2DescribeCommand	DmCommandr   r1   r   r   <module>rC      sk     " &  ' > A = Q ( . 	'&&))*GKt##W%6%6 GK +GKr   