
                            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*                  R,                  5       " S S\	R.                  5      5       rg)z=Command to update an Anthos on bare metal standalone cluster.    )absolute_import)division)unicode_literals)
operations)standalone_clusters)base)parser_arguments)	constants)standalone_cluster_flags)flags)logz
To update a standalone 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&   z2Update an Anthos on bare metal standalone cluster.EXAMPLESparserc                    U R                   R                  [        R                  5        [        R
                  " U SSS9  [        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 SS9  [        R                  " U SS9  [        R                   " U SS9  [        R"                  " U 5        [        R$                  " U 5        [        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)verb
positional)	is_updateN)display_info	AddFormatbare_metal_constants%BARE_METAL_STANDALONE_CLUSTERS_FORMATr   AddStandaloneClusterResourceArgr   
ASYNC_FLAGAddToParserAddValidationOnly&AddAllowMissingUpdateStandaloneClusterAddControlPlaneConfig
AddVersionAddSecurityConfigAddMaintenanceConfigAddNetworkConfigAddLoadBalancerConfigAddDescriptionAddClusterOperationsConfigAddNodeAccessConfigAddUpdateAnnotationsr   AddBinauthzEvaluationMode)r   s    >lib/surface/container/bare_metal/standalone_clusters/update.pyArgsUpdate.Args,   s    !!BB <<[T 	OO'..v6CCFK226TJ''$?..vF11&DI--fE226TJ++F377?00811&9	##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  U$ [        R                  " 5       nUR                  U5      nUR                  (       d"  [        R                   " USUR                  5        U$ )aF  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 operation or any
  possible error.
formatz'Anthos on bare metal standalone cluster)CONCEPTSstandalone_clusterParser   StandaloneClustersClientr   async_IsSpecifiedr
   OPERATIONS_FORMATr0   r   OperationsClientWaitvalidate_onlyr   UpdatedResource)selfargscluster_refcluster_client	operationoperation_clientoperation_responses          r+   Run
Update.RunH   s     --2288:K(AACN%%d+I{{4++H55//dk{{!224)..y9	+C++' r.    N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr,   rC   __static_attributes__rE   r.   r+   r   r   &   s4    :y)-,#77 , ,6r.   r   N)rJ   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   googlecloudsdk.callioper   r	   /googlecloudsdk.command_lib.container.bare_metalr
   r   r   .googlecloudsdk.command_lib.container.gkeonpremr   googlecloudsdk.corer   rK   ReleaseTracksReleaseTrackALPHAUpdateCommandr   rE   r.   r+   <module>rZ      sn    D &  ' A J ( 4 ] T D @ #	 D%%++,>T > ->r.   