
                             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  S	S
S.r " S S\R                  5      r\\l        g)z#services vpc-peerings list command.    )absolute_import)division)unicode_literals)peering)base)util)
propertieszp        This command lists connections of a network to a service via VPC peering
        for a project.
        a+          To list connections of a network called `my-network` to a service called
        `your-service`, run:

          $ {command} --network=my-network --service=your-service

        To list connections of a network against all services, run:

          $ {command} --network=my-network

        )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)List0   zDList connections to a service via VPC peering for a project network.c                 L    U R                  SSSSS9  U R                  SSSS	S
9  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	--networkNETWORKTzGThe network in the current project to list connections with the service)metavarrequiredhelpz	--serviceSERVICE zThe service to list connections)r   defaultr   N)add_argument)parsers    )lib/surface/services/vpc_peerings/list.pyArgs	List.Args3   sD     V	   .	  0    c                 0   [         R                  R                  R                  R	                  SS9n[
        R                  " U5      nUR                  S5      (       a  UR                  OSn[        R                  " X4UR                  5      n[        U5      $ )zRun 'services vpc-peerings list'.

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

Returns:
  The list of connections.
T)r   service-)r	   VALUEScoreprojectGetprojects_utilGetProjectNumberIsSpecifiedr   r   ListConnectionsnetworkiter)selfargsr"   project_numberr   connss         r   RunList.RunH   st     $$,,00$0?G"33G<N"..y99dllsG##NT\\JE;r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r.   __static_attributes__r0   r   r   r   r   0   s    L0 0(r   r   N)r5   
__future__r   r   r   googlecloudsdk.api_lib.servicesr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.projectsr   r$   googlecloudsdk.corer	   _DETAILED_HELPDescribeCommandr   detailed_helpr0   r   r   <module>r@      sM    * &  ' 3 ( E *	

	,&4 &R $ r   