
    
                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ dd	lmZ  e	j                  e	j                  j                          G d
 dej"                  e	j$                               Zy)zoperations list command.    )absolute_import)division)unicode_literals)
list_pager)dm_api_util)dm_base)base)flagsc                   .    e Zd ZdZddiZed        Zd Zy)ListzmList operations in a project.

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

            $ {command}

          To print only the name of each operation, run:

            $ {command} --simple-list
          c                     t         j                  j                  |        | j                  j	                  t
        j                         y)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.
    N)r   SIMPLE_LIST_FLAGAddToParserdisplay_info	AddFormatr
   OPERATION_FORMAT)parsers    1lib/surface/deployment_manager/operations/list.pyArgsz	List.Args1   s2       ,,V4
!!%"8"89    c           	         | j                   j                  t        j                               }t	        j
                  t        j                  | j                  j                  |d|j                  |j                              S )a,  Run 'operations list'.

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

    Returns:
      The list of operations for this project.

    Raises:
      HttpException: An http error response was received while executing api
          request.
    )project
operations)fieldlimit
batch_size)messages&DeploymentmanagerOperationsListRequestr   
GetProjectr   YieldWithHttpExceptionsr   YieldFromListclientr   r   	page_size)selfargsrequests      r   RunzList.Run=   sj     mmBB""$ C G ..z/G/G|jjT^^05 6 6r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   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	   -googlecloudsdk.command_lib.deployment_managerr
   UseDmApiDmApiVersionV2ListCommand	DmCommandr   r/   r   r   <module>r:      sd      &  ' ' A = ( ? '&&))*164W.. 16 +16r   