
                             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	KJr  SS
KJr  SSKJr  Sr\S-   r " S S\R(                  5      rS rg)z%services vpc-peerings update command.    )absolute_import)division)unicode_literals)projects_api)peering)services_util)base)util)log)
propertiesz(gcloud services vpc-peerings operations zwait {0}c                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Update!   zGUpdate a private service connection to a service for a project network.zp          This command updates a private service connection to a service via a
          VPC network.
          a6            To update connection for a network called `my-network`  on the current
          project to a service called `your-service` with IP CIDR ranges
          `google-range-1,google-range-2` for the service to use, run:

            $ {command} --network=my-network --service=your-service \
                --ranges=google-range-1,google-range-2

          To run the same command asynchronously (non-blocking), run:

            $ {command} --network=my-network --service=your-service \
                --ranges=google-range-1,google-range-2 --async
          )DESCRIPTIONEXAMPLESc                     U R                  SSSSS9  U R                  SSSS	S
9  U R                  SSSS9  U R                  SSSS9  [        R                  R                  U 5        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NETWORKTz@The network in the current project to be peered with the service)metavarrequiredhelpz	--serviceSERVICEz servicenetworking.googleapis.comzThe service to connect to)r   defaultr   z--rangesRANGESz/The names of IP CIDR ranges for service to use.)r   r   z--force
store_truezQIf specified, the update call will proceed even if the update can be destructive.)actionr   N)add_argumentr	   
ASYNC_FLAGAddToParser)parsers    +lib/surface/services/vpc_peerings/update.pyArgsUpdate.Args:   s     O	  Q
 2(	  *
 >  @   
 	OO'    c                    [         R                  R                  R                  R	                  SS9n[        U5      nUR                  (       a  UR                  R                  S5      n[        R                  " X1R                  UR                  WUR                  5      nUR                  (       aN  [        R                  UR                   5      n["        R$                  R'                  SR                  U5      5        g[(        R*                  " UR                   [        R,                  5      n[(        R.                  " U5        g)z~Run 'services vpc-peerings connect'.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.
T)r   ,zcAsynchronous operation is in progress... Use the following command to wait for its completion:
 {0}N)r   VALUEScoreprojectGet_GetProjectNumberrangessplitr   UpdateConnectionservicenetworkforceasync_OP_WAIT_CMDformatnamer   statusPrintr   WaitOperationGetOperationPrintOperation)selfargsr(   project_numberr+   opcmds          r    Run
Update.RunW   s     $$,,00$0?G&w/N{{{{  %f		!	!.,,"($**
6B{{rww'c	jj ++16#;8 		$	$RWWg.B.B	CB  $r#    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr!   r?   __static_attributes__rA   r#   r    r   r   !   s/    O
-, ( (8%r#   r   c                 j    [         R                  " [        R                  " U 5      5      R                  $ )N)r   r)   projects_utilParseProjectprojectNumber)
project_ids    r    r*   r*   p   s$    			-44Z@	A	O	OOr#   N)rF   
__future__r   r   r   +googlecloudsdk.api_lib.cloudresourcemanagerr   googlecloudsdk.api_lib.servicesr   r   googlecloudsdk.callioper	   #googlecloudsdk.command_lib.projectsr
   rK   googlecloudsdk.corer   r   OP_BASE_CMDr2   SilentCommandr   r*   rA   r#   r    <module>rW      sR    , &  ' D 3 9 ( E # *8J&L%T L%^Pr#   