
    
                         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
dZdZ ej                  ej                   j"                         G d dej$                               Zy)z+'Marketplace Solutions images list command.    )absolute_import)division)unicode_literals)	MpsClient)base)flags)
propertieszC
          List Marketplace Solutions images in a project.
        z
          To list images in the region within the project ``us-central1'', run:

            $ {command} --region=us-central1

          Or:

          To list all images in the project, run:

            $ {command}
    )DESCRIPTIONEXAMPLESz table(
        name.segment(-1):label=NAME,
        name.segment(-5):label=PROJECT,
        name.segment(-3):label=REGION,
        imageType,
        operatingSystem,
        uid,
        state,
        storagePool
    )c                   *    e Zd ZdZeZed        Zd Zy)Listz.List Marketplace Solution images in a project.c                 d   t         j                  j                  |        t         j                  j                  |        t         j                  j                  |        t         j
                  j                  |        t        j                  |        | j                  j                  t               y)z Register flags for this command.N)r   FILTER_FLAGRemoveFromParserPAGE_SIZE_FLAGSORT_BY_FLAGURI_FLAGr   AddRegionArgToParserdisplay_info	AddFormatIMAGE_LIST_FORMAT)parsers    lib/surface/mps/images/list.pyArgsz	List.Args>   sw     	%%f-((0&&v.MM""6*	v&
 !!"34    c                    |j                   j                  j                         }t               }t        j
                  j                  j                  j                  d      }|Rt        j
                  j                  j                  j                  d      }|j                  |||j                        S |j                  ||      S )NT)required)limit)CONCEPTSregionParser   r	   VALUESmpsproductGetcoreprojectAggregateListImagesr   
ListImages)selfargsr    clientr$   r'   s         r   RunzList.RunN   s    ]]!!'')F[F##++///>G~!!&&..22D2Ag''

'KKWf--r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r-    r   r   r   r   9   s!    6-5 5.r   r   N)r1   
__future__r   r   r   %googlecloudsdk.api_lib.mps.mps_clientr   googlecloudsdk.callioper   googlecloudsdk.command_lib.mpsr   googlecloudsdk.corer	   r2   r   ReleaseTracksReleaseTrackALPHAListCommandr   r5   r   r   <module>r?      sr     2 &  ' ; ( 0 *
	"		  D%%++,.4 . -.r   