
                         6   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d	lmZ ddlmZ dZe	j(                   e	j*                  e	j,                  j.                         G d de	j0                                      Zy)zLCommand to create a node pool in an Anthos standalone cluster on bare metal.    )absolute_import)division)unicode_literals)
operations)standalone_node_pools)base)parser_arguments)	constants)node_pool_flags)standalone_node_pool_flags)logz
To create 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
c                   H    e Zd ZdZdeiZedej                  fd       Z	d Z
y)CreatezACreate a node pool in an Anthos standalone cluster on bare metal.EXAMPLESparserc                 h   | j                   j                  t        j                         t	        j
                  | d       t        j                  |        t        j                  j                  |        t	        j                  |        t	        j                  |        t	        j                  |        y)z|Gathers command line arguments for the create command.

    Args:
      parser: The argparse parser to add the flag to.
    z	to createN)display_info	AddFormatbare_metal_constantsBARE_METAL_NODE_POOLS_FORMATr   AddNodePoolResourceArgr   AddValidationOnlyr   
ASYNC_FLAGAddToParserAddNodePoolAnnotationsAddNodePoolDisplayNameAddNodePoolConfig)r   s    @lib/surface/container/bare_metal/standalone_node_pools/create.pyArgszCreate.Args.   s{     !!99;55fkJ%%f-OO'55f=55f=008    c                    |j                   j                  j                         }t        j                         }|j                  |      }|j                  r&|j                  d      st        j                  |_
        |j                  r|S t        j                         }|j                  |      }|j                  s!t        j                   |d|j                         |S )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.
    formatz4node pool in Anthos standalone cluster on bare metal)CONCEPTS	node_poolParser   StandaloneNodePoolsClientr   async_IsSpecifiedr
   OPERATIONS_FORMATr"   r   OperationsClientWaitvalidate_onlyr   CreatedResource)selfargsnode_pool_refclient	operationoperation_clientoperation_responses          r   Runz
Create.Run>   s     MM++113M"<<>Fd#I{{4++H5//dk{{!224)..y9	

@
++
 r    N)__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr   r5    r    r   r   r   '   s7     Jy)-9#77 9 9r    r   N)r9   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   googlecloudsdk.callioper   r	   /googlecloudsdk.command_lib.container.bare_metalr
   r   r   r   .googlecloudsdk.command_lib.container.gkeonpremgooglecloudsdk.corer   r:   HiddenReleaseTracksReleaseTrackALPHACreateCommandr   r>   r    r   <module>rJ      s|    S &  ' A L ( 4 ] K V D #	 D%%++,4T 4 - 4r    