
                             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 network-policies update' command.    )absolute_import)division)unicode_literals)NetworkPoliciesClient)base)flags)logz:
          Update a VMware Engine network policy.
        a  
          To update a network policy named `my-network-policy` so that it disables the external IP access service, run:

            $ {command} my-network-policy --location=us-west2 --project=my-project --no-external-ip-access

          Or:

            $ {command} my-network-policy --no-external-ip-access

          In the second example, the project and the location are taken from gcloud properties core/project and compute/regions respectively.
    )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Update.   z&Update a VMware Engine network policy.c                 j   [         R                  " U SS9  [        R                  R	                  U 5        [        R                  R                  U S5        U R                  R                  S5        U R                  SSS9  U R                  SSS9  U R                  S	S
SSS9  U R                  SS
SSS9  g)z Register flags for this command.T)
positionalyamlz--descriptionz<        Updated description for the network policy.
        )helpz--edge-services-cidrzw        Updated IP address range to use for internet access and external IP access gateways, in CIDR notation.
        z--internet-access
store_trueNz        Enable or disable network service that allows VMware workloads to access the internet. Use `--no-internet-access` to disable.
        )actiondefaultr   z--external-ip-accessz        Enable or disable network service that allows external IP addresses to be assigned to VMware workloads. To enable this service, `internet-access` must also be enabled. Use `--no-external-ip-access` to disable.
        )	r   AddNetworkPolicyToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsers    -lib/surface/vmware/network_policies/update.pyArgsUpdate.Args3   s     
""6d;OO'OOvt,
!!&)
  
   
 	   	      c                     UR                   R                  R                  5       n[        5       nUR                  nUR                  X!R                  UR                  UR                  UR                  5      nU(       a!  [        R                  " UR                  SSS9  g UR                  UR                  U5      SR                  UR!                  5       5      S9n[        R                  " UR!                  5       SS9  U$ )NzVMware Engine network policyT)kindis_asyncz-waiting for network policy [{}] to be updated)operation_refmessage)r#   )CONCEPTSnetwork_policyParser   async_r   descriptionedge_services_cidrinternet_accessexternal_ip_accessr	   UpdatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr(   clientr$   	operationresources          r   Run
Update.RunS   s    ]]11779N"$F{{Hn.>.>"55t7K7K"557I 	
..=N&&,,Y7?FF'')
 ' H ##%,J Or!    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r:   __static_attributes__r<   r!   r   r   r   .   s!    .- >r!   r   N)rA   
__future__r   r   r   -googlecloudsdk.api_lib.vmware.networkpoliciesr   googlecloudsdk.callioper   2googlecloudsdk.command_lib.vmware.network_policiesr   googlecloudsdk.corer	   rB   ReleaseTracksReleaseTrackGAUpdateCommandr   r<   r!   r   <module>rO      sh    0 &  ' O ( D #	
	( D%%(()9T 9 *9r!   