
    .                         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\R                  " \R                  R                   5       " S S\R"                  5      5       rg)z/'vmware private-clouds subnets update' command.    )absolute_import)division)unicode_literals)SubnetsClient)base)flags)logz
          Update a Subnet. Only ip-cidr-range can be updated. This is a synchronous command and doesn't support `--async` and `--no-async` flags.
        aL  
        To update a subnet named `my-subnet`, that belongs to the private cloud `my-private-cloud` in project `my-project` and zone `us-west1-a` by changing its ip-cidr-range to `10.0.0.0/24`, run:

          $ {command} my-subnet --private-cloud=my-private-cloud --location=us-west1 --project=my-project --ip-cidr-range=10.0.0.0/24

        Or:

          $ {command} my-subnet --private-cloud=my-private-cloud --ip-cidr-range=10.0.0.0/24

        In the second example, the project and location are taken from gcloud properties `core/project` and `compute/zone`, respectively.
        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Update.   zUpdate a subnet.c                     [         R                  " U 5        U R                  R                  S5        U R	                  SSSS9  g)z Register flags for this command.yamlz--ip-cidr-rangeTz7        Updated IP CIDR range for this subnet.
        )requiredhelpN)r   AddSubnetArgToParserdisplay_info	AddFormatadd_argument)parsers    3lib/surface/vmware/private_clouds/subnets/update.pyArgsUpdate.Args4   sD     
v&
!!&)
      c                    UR                   R                  R                  5       n[        5       nUR	                  X!R
                  5      nUR                  (       a  UR                  U5      nO<UR                  UR                  U5      SR                  UR                  5       5      S9n[        R                  " UR                  5       SS9  U$ )Nz%waiting for subnet [{}] to be updated)operation_refmessagesubnet)kind)CONCEPTSr   Parser   r   ip_cidr_rangedoneGetResponseWaitForOperationGetOperationRefformatRelativeNamer	   UpdatedResource)selfargsr   client	operationresources         r   Run
Update.Run@   s    ]]!!'')F_Ff&8&89I
 ~~##I.h((..y99@@!!# ) h ++-H=Or    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r0   __static_attributes__r2   r   r   r   r   .   s!    -	 	r   r   N)r7   
__future__r   r   r   4googlecloudsdk.api_lib.vmware.private_clouds.subnetsr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r8   ReleaseTracksReleaseTrackGAUpdateCommandr   r2   r   r   <module>rE      sh    6 &  ' N ( 3 #	
	( D%%(()#T # *#r   