
    y                        d Z ddlmZ ddlmZ ddlmZ ddl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ee_        y)z-'Marketplace Solutions networks list command.    )absolute_import)division)unicode_literalsN)	MpsClient)base)flags)
properties)resource_projectorzE
          List Marketplace Solutions networks in a project.
        z
          To list networks in the region within the project ``us-central1'', run:

            $ {command} --region=us-central1

          Or:

          To list all networks in the project, run:

            $ {command}
    )DESCRIPTIONEXAMPLESz table(
        name.segment(-1):label=NAME,
        name.segment(-5):label=PROJECT,
        name.segment(-3):label=REGION,
        cidr,
        uid,
        type,
        jumboFramesEnabled,
        vlanId
    )c                   *    e Zd ZdZeZed        Zd Zy)Listz0List Marketplace Solution networks 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NETWORK_LIST_FORMAT)parsers     lib/surface/mps/networks/list.pyArgsz	List.ArgsB   sw     	%%f-((0&&v.MM""6*	v&
 !!"56    c                    |j                   j                  j                         }t               }t        j
                  j                  j                  j                  d      }|Rt        j
                  j                  j                  j                  d      }|j                  |||j                        S |j                  ||      S )z6Return network list information based on user request.T)required)limit)CONCEPTSregionParser   r	   VALUESmpsproductGetcoreprojectAggregateListNetworksr   ListNetworks)selfargsr!   clientr%   r(   s         r   RunzList.RunR   s    ]]!!'')F[F##++///>G~!!&&..22D2Ag))'7$**)MMw//r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r.    r   r   r   r   =   s!    8-7 7	0r   r   )r2   
__future__r   r   r   json%googlecloudsdk.api_lib.mps.mps_clientr   googlecloudsdk.callioper   googlecloudsdk.command_lib.mpsr   googlecloudsdk.corer	   googlecloudsdk.core.resourcer
   r3   r   ReleaseTracksReleaseTrackALPHAListCommandr   r4   r6   r   r   <module>rB      s     4 &  '  ; ( 0 * ;
	
	$		  D%%++,04 0 -0> # r   