
    
                         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  \	R                  " \	R                  R                  5       " S	 S
\R                  \	R                   5      5       rg)zdeployments list command.    )absolute_import)division)unicode_literals)
list_pager)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)	List   zkList deployments in a project.

Prints a table with summary information on all deployments in the project.
EXAMPLESz          To print out a list of deployments with some summary information about each, run:

            $ {command}

          To print only the name of each deployment, run:

            $ {command} --simple-list
          c                 x    [         R                  R                  U 5        U R                  R	                  S5        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
          table(
            name,
            operation.operationType:label=LAST_OPERATION_TYPE,
            operation.status,
            description,
            manifest.basename(),
            operation.error.errors.group(code)
          )
    N)r   SIMPLE_LIST_FLAGAddToParserdisplay_info	AddFormat)parsers    2lib/surface/deployment_manager/deployments/list.pyArgs	List.Args0   s1       ,,V4
!! 	# 		    c           
         U R                   R                  [        R                  " 5       S9n[        R
                  " [        R                  " U R                  R                  USUR                  UR                  S95      $ )a
  Run 'deployments list'.

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

Returns:
  The list of deployments for this project.

Raises:
  HttpException: An http error response was received while executing api
      request.
)projectdeployments)fieldlimit
batch_size)messages'DeploymentmanagerDeploymentsListRequestr   
GetProjectr   YieldWithHttpExceptionsr   YieldFromListclientr   r   	page_size)selfargsrequests      r   RunList.RunE   sj     mmCC""$ D G ..z/G/GjjT^^05 6 6r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r(   __static_attributes__r*   r   r   r   r      s1      
- 	 	(6r   r   N)r/   
__future__r   r   r   apitools.base.pyr   )googlecloudsdk.api_lib.deployment_managerr   r   googlecloudsdk.callioper	   UseDmApiDmApiVersionV2ListCommand	DmCommandr   r*   r   r   <module>r<      s_       &  ' ' A = ( 	'&&))*:64W.. :6 +:6r   