
                         l   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\
R,                  " \
R.                  R0                  \
R.                  R2                  \
R.                  R4                  5       " S S\
R6                  5      5       rg)z.Command to update an Anthos cluster on VMware.    )absolute_import)division)unicode_literals)bare_metal_admin_clusters)
operations)base)parser_arguments)admin_cluster_flags)	constants)flags)logz}
To update a cluster named ``my-cluster'' managed in location ``us-west1'', run:

$ {command} 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)	Update&   z-Update an Anthos on bare metal admin cluster.EXAMPLESparserc                    U R                   R                  [        R                  5        [        R
                  " U SS5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U SS9  [        R                  " U SS9  [        R                  " U 5        [        R                  " U SS9  [        R                   " U SS9  [        R"                  " U 5        [        R$                  " U 5        [&        R(                  " U 5        g)zpGathers command line arguments for the update command.

Args:
  parser: The argparse parser to add the flag to.
z	to updateT)	is_updateN)display_info	AddFormatbare_metal_constants BARE_METAL_ADMIN_CLUSTERS_FORMATcluster_flagsAddAdminClusterResourceArgr   
ASYNC_FLAGAddToParserAddValidationOnlyAddDescription
AddVersionAddControlPlaneConfigAddProxyConfigAddClusterOperationsConfigAddMaintenanceConfigAddNetworkConfigAddAdminWorkloadNodeConfigAddNodeAccessConfigr   AddBinauthzEvaluationMode)r   s    9lib/surface/container/bare_metal/admin_clusters/update.pyArgsUpdate.Args.   s     !!==?,,V[$GOO'##F+  (Vt4''$?  48,,V4&&v>""6T:,,V4%%f-	##F+    c                    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$  [        R                  " USUR                  5        U$ [        R                  " 5       nUR                  U5      n[        R                  " USUR                  5        U$ )zRuns 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.
formatz"Anthos on bare metal Admin Cluster)CONCEPTSadmin_clusterParseapisAdminClustersClientr   async_IsSpecifiedr   OPERATIONS_FORMATr-   r   UpdatedResourcer   OperationsClientWait)selfargscluster_refcluster_client	operationoperation_clientoperation_responses          r(   Run
Update.RunE   s     ----335K--/N%%d+I{{4++H55//dk{{	+'K++'#446+00;	+'K++'  r+    N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr)   r@   __static_attributes__rB   r+   r(   r   r   &   s6     6y)-,#77 , ,, r+   r   N)rG   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r1   r   googlecloudsdk.callioper   r	   /googlecloudsdk.command_lib.container.bare_metalr
   r   r   r   .googlecloudsdk.command_lib.container.gkeonpremr   googlecloudsdk.corer   rH   ReleaseTracksReleaseTrackALPHABETAGAUpdateCommandr   rB   r+   r(   <module>rY      s    5 &  ' X A ( 4 ` ] D @ #	 T..33T5F5F5I5I8 T 8 8 r+   