
                             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  \	R                   " S
 S\	R                   5      5       rSSS.\l        g)zDCommand for removing a route policy term of a Compute Engine router.    )absolute_import)division)unicode_literals)base_classes)arg_parsers)base)flags)route_policy_utilsc                   2    \ rS rSrSrSr\S 5       rS rSr	g)RemoveRoutePolicyTerm   z6Remove a route policy term of a Compute Engine router.Nc           
          [         R                  " 5       [        l        [        R                  R	                  USS9  UR                  SSSS9  UR                  SSS[        R                  " S	S
S9S9  g )Nzremove a route policy term from)operation_typez--policy-namez?Name of the route policy from which the term should be removed.T)helprequiredz
--priorityz$Order of the term within the policy.r   i)lower_boundupper_bound)r   r   type)r	   RouterArgumentr   
ROUTER_ARGAddArgumentadd_argumentr   
BoundedInt)clsparsers     7lib/surface/compute/routers/remove_route_policy_term.pyArgsRemoveRoutePolicyTerm.Args"   s    ',';';'=$$$00@ 1  R  
 7##zJ	      c                 v   [         R                  " U R                  5       5      nUR                  nUR                  R                  nUR                  R
                  R                  n[        R                  R                  UUR                  [        R                  " U5      S9nUR                  UR                  " S0 UR                  5       DSUR                   0D65      R"                  n[$        R&                  " XqR(                  5      nUR*                  R-                  U5        / n	UR*                  (       d  U	R/                  S5        USUR0                  " S0 UR                  5       DSU0D64n
UR
                  R3                  U	5         UR5                  U
/5      nS S S 5        U$ ! , (       d  f       W$ = f)N)scope_listerpolicytermsPatchRoutePolicyroutePolicy )r   ComputeApiHolderReleaseTrackclientmessagesapitools_clientroutersr   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerGetRoutePolicy#ComputeRoutersGetRoutePolicyRequestAsDictpolicy_nameresourcer
   FindPolicyTermOrRaisepriorityr#   removeappend%ComputeRoutersPatchRoutePolicyRequestIncludeFieldsMakeRequests)selfargsholderr)   r*   service
router_refroute_policytermcleared_fieldsrequestresults               r   RunRemoveRoutePolicyTerm.Run4   s   **4+<+<+>?F]]F}}%%Hmm++33G&11CC"88@ D J
 ))44 	
!	
*.*:*:	
 h	  33L--PDd#NG$ 	66 	
!	
$	
G 
			-	-n	=""G9-f 
>M 
>	=Ms   F))
F8r&   )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   rG   __static_attributes__r&   r   r   r   r      s!    >* "#r   r   z6*{command}* removes a term of a route policy.
        z         To remove a route policy term with priority 0 from a route policy `my-policy` from a router `my-router` in region `us-central1`, run:

              $ {command} my-router --region=us-central1 --policy-name=my-policy --priority=0
          )DESCRIPTIONEXAMPLESN)rM   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   r   "googlecloudsdk.command_lib.computer	   r/   *googlecloudsdk.command_lib.compute.routersr
   UniverseCompatibleDeleteCommandr   detailed_helpr&   r   r   <module>rZ      sc    K &  ' 7 / ( E < I :D.. : :z		'  #r   