
                            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r\
R(                  " \
R*                  R,                  5       " S S\
R.                  5      5       r\
R(                  " \
R*                  R2                  5       " S S\
R.                  5      5       r\
R(                  " \
R*                  R6                  5       " S S\
R.                  5      5       rg)z=Command to update a node pool in an Anthos cluster on VMware.    )absolute_import)division)unicode_literals)
operations)vmware_node_pools)base)parser_arguments)	constants)flags)logz
To update a node pool named ``my-node-pool'' in a cluster named
``my-cluster'' managed in location ``us-west1'', run:

$ {command} my-node-pool --cluster=my-cluster --location=us-west1
c                   R    \ rS rSrSrS\0r\S\R                  4S j5       r
S rSrg)	UpdateAlpha&   2Update a node pool in an Anthos cluster on VMware.EXAMPLESparserc                    U R                   R                  [        R                  5        [        R
                  " U S5        [        R                  " U 5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U SS9  [        R                  " U 5        gzoGathers commandline arguments for the update command.

Args:
  parser: The argparse parser to add the flag to.
z	to updateT)
for_updateNdisplay_info	AddFormatvmware_constantsVMWARE_NODEPOOLS_FORMATr   AddNodePoolResourceArgAddValidationOnlyr   
ASYNC_FLAGAddToParserAddNodePoolDisplayName"AddVmwareNodePoolAutoscalingConfigAddVmwareNodeConfigAddNodePoolVersionr   s    1lib/surface/container/vmware/node_pools/update.pyArgsUpdateAlpha.Args,        !!"2"J"JK	  5	F#OO'	  (	,,VE	f6	V$    c                 0   UR                   R                  R                  5       n[        R                  " 5       nUR                  U5      nUR                  (       a+  UR                  S5      (       d  [        R                  Ul
        UR                  (       a  gUR                  (       a$  [        R                  " USUR                  5        U$ [        R                  " 5       nUR!                  U5      n[        R                  " USUR                  5        U$ aA  Runs the update command.

Args:
  args: The arguments received from command line.

Returns:
  The return value depends on the command arguments. If `--async` is
  specified, it returns an operation; otherwise, it returns the updated
  resource. If `--validate-only` is specified, it returns None or any
  possible error.
formatNz%Node Pool in Anthos Cluster on VMwareCONCEPTS	node_poolParseapisNodePoolsClientUpdateasync_IsSpecifiedr
   OPERATIONS_FORMATr+   validate_onlyr   UpdatedResourcer   OperationsClientWaitselfargsnode_pool_refclient	operationoperation_clientresponses          r$   RunUpdateAlpha.Run<        MM++113M!!#Fd#I{{4++H55//dk{{	
@$++ #446!&&y1h	
@$++ or(    N__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr%   rB   __static_attributes__rE   r(   r$   r   r   &   4    :y)-%#77 % %!r(   r   c                   R    \ rS rSrSrS\0r\S\R                  4S j5       r
S rSrg)	
UpdateBeta`   r   r   r   c                    U R                   R                  [        R                  5        [        R
                  " U S5        [        R                  " U 5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U SS9  [        R                  " U 5        gr   r   r#   s    r$   r%   UpdateBeta.Argsf   r'   r(   c                 0   UR                   R                  R                  5       n[        R                  " 5       nUR                  U5      nUR                  (       a+  UR                  S5      (       d  [        R                  Ul
        UR                  (       a  gUR                  (       a$  [        R                  " USUR                  5        U$ [        R                  " 5       nUR!                  U5      n[        R                  " USUR                  5        U$ r*   r,   r:   s          r$   rB   UpdateBeta.Runv   rD   r(   rE   NrF   rE   r(   r$   rS   rS   `   rQ   r(   rS   c                   R    \ rS rSrSrS\0r\S\R                  4S j5       r
S rSrg)	r2      r   r   r   c                    U R                   R                  [        R                  5        [        R
                  " U S5        [        R                  " U 5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U SS9  [        R                  " U 5        gr   r   r#   s    r$   r%   Update.Args   r'   r(   c                 0   UR                   R                  R                  5       n[        R                  " 5       nUR                  U5      nUR                  (       a+  UR                  S5      (       d  [        R                  Ul
        UR                  (       a  gUR                  (       a$  [        R                  " USUR                  5        U$ [        R                  " 5       nUR!                  U5      n[        R                  " USUR                  5        U$ r*   r,   r:   s          r$   rB   
Update.Run   rD   r(   rE   NrF   rE   r(   r$   r2   r2      rQ   r(   r2   N)rK   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   r0   googlecloudsdk.callioper   r	   .googlecloudsdk.command_lib.container.gkeonpremr
   +googlecloudsdk.command_lib.container.vmwarer   r   googlecloudsdk.corer   rL   ReleaseTracksReleaseTrackALPHAUpdateCommandr   BETArS   GAr2   rE   r(   r$   <module>rk      s    D &  ' A P ( 4 D U = #	 D%%++,6$$$ 6 -6r D%%**+6## 6 ,6r D%%(()6T 6 *6r(   