
    `	                         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  G d	 d
ej                        Zy)zList operations command.    )absolute_import)division)unicode_literals)
exceptions)util)base)
propertiesc                   0    e Zd ZdZdddZed        Zd Zy)Listz'List operations for container clusters.z{description}zF          To list operations, run:

            $ {command}
          )DESCRIPTIONEXAMPLESc                     t         j                  j                  |        | j                  j	                  t
        j                         y)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.
    N)r   URI_FLAGRemoveFromParserdisplay_info	AddFormatr   OPERATIONS_FORMAT)parsers    (lib/surface/container/operations/list.pyArgsz	List.Args+   s0     	MM""6*
!!$"8"89    c                 p   | j                   d   }| j                   d   }t        j                  j                  j                  j                         } ||dd      }	 |j                  ||      j                  S # t        j                  $ r)}t        j                  |t        j                        d}~ww xY w)zThis is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    api_adapterlocation_getTF)ignore_propertyrequiredN)contextr	   VALUEScoreproject	GetOrFailListOperations
operationsapitools_exceptions	HttpErrorr   HttpExceptionr   HTTP_ERROR_FORMAT)selfargsadapterr   
project_idlocationerrors          r   RunzList.Run7   s     ll=)G<</L""''//99;JD$GHD##J9DDD(( D$$UD,B,BCCDs   A9 9B5$B00B5N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r.    r   r   r   r      s0    / 		- 	: 	:Dr   r   N)r2   
__future__r   r   r   apitools.base.pyr   r$    googlecloudsdk.api_lib.containerr   googlecloudsdk.callioper   googlecloudsdk.corer	   ListCommandr   r5   r   r   <module>r<      s6     &  ' > 1 ( . *-D4 -Dr   