
                         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)z8Command to create an Anthos on bare metal admin cluster.    )absolute_import)division)unicode_literals)bare_metal_admin_clusters)
operations)base)parser_arguments)admin_cluster_flags)	constants)flags)logz}
To create 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)	Create&   z-Create an Anthos on bare metal admin cluster.EXAMPLESparserc                 X   U R                   R                  [        R                  5        [        R
                  " U SS5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                   " U 5        [        R"                  " U 5        [        R$                  " U 5        [        R&                  " U 5        [        R(                  " U 5        [        R*                  " U 5        [        R,                  " U 5        [.        R0                  " U 5        g)zpGathers command line arguments for the create command.

Args:
  parser: The argparse parser to add the flag to.
z	to createTN)display_info	AddFormatbare_metal_constants BARE_METAL_ADMIN_CLUSTERS_FORMATbare_metal_flagsAddAdminClusterResourceArgr   
ASYNC_FLAGAddToParserAddValidationOnlyAddDescriptionAddAnnotations
AddVersionAddNetworkConfigAddAdminLoadBalancerConfigAddStorageConfigAddControlPlaneConfigAddProxyConfigAddClusterOperationsConfigAddMaintenanceConfigAddAdminWorkloadNodeConfigAddNodeAccessConfigAddSecurityConfigr   AddBinauthzEvaluationMode)r   s    9lib/surface/container/bare_metal/admin_clusters/create.pyArgsCreate.Args.   s    !!== //TJOO'&&v.##F+##F+'%%f-//7%%f-**62##F+//7))&1//7((0&&v.	##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UR                   (       d"  [        R                  " USUR                  5        U$ )aA  Runs the create 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 created
  resource. If `--validate-only` is specified, it returns None or any
  possible error.
formatz"Anthos on bare metal Admin Cluster)CONCEPTSadmin_clusterParseapisAdminClustersClientr   async_IsSpecifiedr   OPERATIONS_FORMATr0   r   CreatedResourcer   OperationsClientWaitvalidate_only)selfargscluster_refcluster_client	operationoperation_clientoperation_responses          r+   Run
Create.RunJ   s     ----335K--/N%%d+I{{4++H55//dk{{	
;T[[ !224)..y9	
;T[[ r.    N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr,   rD   __static_attributes__rF   r.   r+   r   r   &   s6     6y)-,#77 , ,6 r.   r   N)rK   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r4   r   googlecloudsdk.callioper   r	   /googlecloudsdk.command_lib.container.bare_metalr
   r   r   r   .googlecloudsdk.command_lib.container.gkeonpremr   googlecloudsdk.corer   rL   ReleaseTracksReleaseTrackALPHABETAGACreateCommandr   rF   r.   r+   <module>r]      s    ? &  ' X A ( 4 c ] D @ #	 T..33T5F5F5I5IAT AAr.   