
                         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 an Anthos cluster on Azure.    )absolute_import)division)unicode_literals)azure)base)resource_args)command_util)	constants)endpoint_util)flagsz
To update a cluster named ``my-cluster'' managed in location ``us-west1'', run:

$ {command} my-cluster --location=us-west1 --cluster-version=CLUSTER_VERSION --client=CLIENT
c                   .    e Zd ZdZdeiZed        Zd Zy)Update"Update an Anthos cluster on Azure.EXAMPLESc                    | j                  dd      }t        j                  | |d       t        j                  |d       t        j
                  | d       t        j                  |        t        j                  | d       t        j                  |        t        j                  | d       t        j                  | d       t        j                  |        t        j                  | d	       t        j                  |        t        j                  |        t        j                   j#                  |        | j$                  j'                  t(        j*                         y )
NzAuthentication configurationT)mutex)updateF)create)requiredzupdate of the clustercluster)add_argument_groupr   $AddAzureClusterAndClientResourceArgsr   AddAzureServicesAuthenticationAddClusterVersion	AddVMSizeAddAdminUsersAddAdminGroupsAddSSHPublicKeyAddValidateOnlyAddDescriptionForUpdateAddAnnotationsForUpdate
AddLoggingAddMonitoringConfigr   
ASYNC_FLAGAddToParserdisplay_info	AddFormatr
   AZURE_CLUSTERS_FORMAT)parserauth_config_groups     .lib/surface/container/azure/clusters/update.pyArgszUpdate.Args+   s	   11&d 2  66!$ 
(():5I	FU3	OOF	u-	 	&51	&"9:	!!&)	!!&)4	V	f%OO'
!!)"A"AB    c                 z   t        j                  |      j                  }t        j                  |      5  t        j                  |      }t        j                         }t        j                  |j                  d      }t        j                  ||||t        j                        cddd       S # 1 sw Y   yxY w)zRuns the update command.Updating)action)resource_refresource_clientargsmessagekindN)r   ParseAzureClusterResourceArglocationsIdr   GkemulticloudEndpointOverrideapi_utilClustersClientr	   ClusterMessageazureClustersIdr   r
   AZURE_CLUSTER_KIND)selfr3   locationcluster_refcluster_clientr4   s         r+   Runz
Update.RunA   s    99$?KKH		4	4X	>!>>tDk..0n++

%
%jg   "(++ 
?	>	>s   A2B11B:N)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr,   rB    r-   r+   r   r   %   s(    *y)-C C*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.ArgsW   s     KKr-   N)	rC   rD   rE   rF   rI   r   ReleaseTrackALPHAr,   rJ   r-   r+   rL   rL   S   s&    ***00  r-   rL   N)rF   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r9   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.azurer   2googlecloudsdk.command_lib.container.gkemulticloudr	   r
   r   r   rG   ReleaseTracksrO   GAUpdateCommandr   rP   rL   rJ   r-   r+   <module>rY      s    4 &  ' L ( D K H L D	 D%%(()*T * **Z D%%++,&  -r-   