
                         h   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ dd
lmZ ddlmZ dZ e	j$                  e	j&                  j(                         G d de	j*                               Z e	j$                  e	j&                  j.                         G d de             Zy)z<Command to update a node pool in an Anthos cluster on Azure.    )absolute_import)division)unicode_literals)azure)base)resource_args)command_util)	constants)endpoint_util)flagsz
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 --node-version=NODE_VERSION
c                   .    e Zd ZdZdeiZed        Zd Zy)Update1Update a node pool in an Anthos cluster on Azure.EXAMPLESc                    t        j                  | dd       t        j                  | d       t        j                  | d       t        j
                  | d       t        j                  | d       t        j                  | d       t        j                  | d       t        j                  j                  |        | j                  j                  t        j                         y )Nz	to updateT)
positionalF)requiredz	node poolzupdate of the node pool)r   AddAzureNodePoolResourceArgr   AddNodeVersionAddAutoscalingAddSSHPublicKeyAddAnnotationsForUpdateAddValidateOnlyAddEnableAutoRepairr   
ASYNC_FLAGAddToParserdisplay_info	AddFormatr
   AZURE_NODE_POOL_FORMAT)parsers    0lib/surface/container/azure/node_pools/update.pyArgszUpdate.Args,   s    -- 
%0	%0	&51	!!&+6	&";<	fe,OO'
!!)"B"BC    c                    t        j                  |      j                  }t        j                  |      5  t        j                  |      }t        j                         }t        j                  |j                  d|j                        }t        j                  ||||t        j                        cddd       S # 1 sw Y   yxY w)zRuns the update command.Updating)actioncluster)resource_refresource_clientargsmessagekindN)r   ParseAzureNodePoolResourceArglocationsIdr   GkemulticloudEndpointOverrideapi_utilNodePoolsClientr	   NodePoolMessageazureNodePoolsIdazureClustersIdr   r
   AZURE_NODEPOOL_KIND)selfr*   locationnode_pool_refnode_pool_clientr+   s         r!   Runz
Update.Run<   s    ::4@LLH		4	4X	>#AA$Gm!113,,

(
(//g
   $*,, 
?	>	>s   A=B<<CN)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr"   r:    r#   r!   r   r   &   s(    9y)-D Dr#   r   c                   L    e Zd ZdZeej                  j                  fd       Zy)UpdateAlphar   c                 .    t         j                  |        y)z-Registers alpha track flags for this command.N)r   r"   )r    tracks     r!   r"   zUpdateAlpha.ArgsT   s     KKr#   N)	r;   r<   r=   r>   rA   r   ReleaseTrackALPHAr"   rB   r#   r!   rD   rD   P   s&    9**00  r#   rD   N)r>   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r0   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.azurer   2googlecloudsdk.command_lib.container.gkemulticloudr	   r
   r   r   r?   ReleaseTracksrG   GAUpdateCommandr   rH   rD   rB   r#   r!   <module>rQ      s    C &  ' L ( D K H L D	 D%%(()&T & *&R D%%++,&  -r#   