
                            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SKJr  SSKJr  SrSrSr\R0                  \R2                  " \R4                  R6                  5       " S S\R8                  5      5       5       r\R0                  \R2                  " \R4                  R<                  5       " S S\5      5       5       rg)z.Command to update an Edge Container node pool.    )nodepool)util)waiter)base)flags)print_warning)resource_args)labels_util)log)	resources)resource_printerz
To update the number of nodes in a node pool called `my-node-pool` in region `us-central1`,
run:

  $ {command} my-node-pool --location=us-central1 --cluster=<my-cluster>       --node-count=<new-count>
z
  This command uses the edgecontainer/{API} API. The full documentation for this
  API can be found at: https://cloud.google.com/edge-cloud
ic                       \ rS rSrSr\\R                  \R                  R                  \R                  R                  5      S9S.r\S 5       rS rSrg)	Update.   $Updates an Edge Container node pool.API)EXAMPLESAPI REFERENCEc                    [         R                  " U S5        [        R                  " U SS9  [        R                  " U 5        [        R
                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  R                  U 5        g )Nz	to updateF)required)r	   AddNodePoolResourceArgcontainer_flagsAddNodeCountAddMachineFilterAddLROMaximumTimeoutAddNodeLabelsForUpdateNodePoolr
   AddUpdateLabelsFlagsAddLocalDiskKMSKeyAddUseGoogleManagedKeyr   
ASYNC_FLAGAddToParser)parsers    >lib/surface/edge_cloud/container/clusters/node_pools/update.pyArgsUpdate.Args:   s    ((=  %8$$V,((0226:$$V,&&v.**62OO'    c                 P   [         R                  " U5      n[        R                  " U R	                  5       5      n[         R
                  " XR	                  5       5      nUR                  R                  U5      n[         R                  " XR	                  5       U5      nUR                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  R!                  SR#                  UR$                  S95        [&        R(                  " US5      (       Gd"  SR#                  UR+                  5       S9n	[        R,                  " UR                  UR.                  5      n
[0        n[&        R(                  " US5      (       a  [3        UR4                  5      n[6        R8                  " U
UU	US	9nUR                  R                  U5      n[        R                  R!                  S
R#                  UR$                  S95        [:        R                   " US[        R                  S9  [<        R>                  " US 5      $ [        R                  R!                  SR#                  UR+                  5       S95        [<        R>                  " US 5      $ )Nz+edgecontainer.projects.locations.operations)
collectionz'Update request issued for: [{nodePool}])nodePoolasync_z/Waiting for operation [{operation}] to complete)	operationlro_timeout)max_wait_mszUpdated node pool [{nodePool}].json)outz)Check operation [{operation}] for status.) r   GetNodePoolReferencer   GetClientInstanceReleaseTrackGetNodePoolGetRequest%projects_locations_clusters_nodePoolsGetGetNodePoolUpdateRequestPatchr   REGISTRYParseRelativeNamenamer   statusPrintformatnodePoolsIdr   FlagIsExplicitlySetRelativeNameOperationPollerprojects_locations_operations_LRO_MAXIMUM_TIMEOUT_intr-   r   WaitForr   r   PrintWarning)selfargsnode_pool_refclientget_reqexisting_node_pool
update_reqopop_refprogress_stringoperation_pollerlro_maximum_timeoutresponseupdated_node_pools                 r$   Run
Update.RunF   sO   11$7M##D$5$5$78F,,T3D3D3FGGEEII 22!#5J 
	5	5	;	;J	GB11
I 2 F JJ188".. 	9 	

 $$T844
;
B
B++- C  
 --

6
6

.
. 2		"	"4	7	7!$"2"23


)	h !FFJJ
 
jj
+
2
2$00 3 
 .CJJG''$77JJ3::))+ 	; 	

 %%b$//r'    N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLES_API_REFERENCE_r>   r   VERSION_MAPgetr   r3   GAdetailed_helpstaticmethodr%   rV   __static_attributes__rX   r'   r$   r   r   .   s_     - &--""4#4#4#7#78 . - 	( 	(70r'   r   c                   V    \ rS rSrSr\\R                  R                  4S j5       r	Sr
g)UpdateAlpha   r   c                     [         R                  [        R                  R	                  U5      S9[
        R                  S'   [
        R                  U 5        g)z-Registers alpha track flags for this command.r   r   N)r_   r>   r   r`   ra   r   rc   r%   )r#   tracks     r$   r%   UpdateAlpha.Args   sG     -<,B,B  ' -C -F) KKr'   rX   N)rY   rZ   r[   r\   r]   rd   r   r3   ALPHAr%   re   rX   r'   r$   rg   rg      s(     -**00  r'   rg   N) r]   +googlecloudsdk.api_lib.edge_cloud.containerr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   /googlecloudsdk.command_lib.edge_cloud.containerr   r   r   r	   googlecloudsdk.command_lib.run$googlecloudsdk.command_lib.util.argsr
   googlecloudsdk.corer   r   googlecloudsdk.core.resourcer   r^   r_   rD   DefaultUniverseOnlyReleaseTracksr3   rb   UpdateCommandr   rl   rg   rX   r'   r$   <module>rx      s    5 @ < . ( T I I 0 < # ) 9	
 !  D%%(()M0T M0 * M0` D%%++,	& 	 - 	r'   