
    t                        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r\
R(                  " \
R*                  R,                  5       " S S\
R.                  5      5       r\
R(                  " \
R*                  R2                  5       " S S\
R.                  5      5       r\
R(                  " \
R*                  R6                  5       " S S\
R.                  5      5       rg)z=Command to create a node pool in an Anthos cluster on VMware.    )absolute_import)division)unicode_literals)
operations)vmware_node_pools)base)parser_arguments)	constants)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                   R    \ rS rSrSrS\0r\S\R                  4S j5       r
S rSrg)	CreateAlpha&   2Create a node pool in an Anthos cluster on VMware.EXAMPLESparserc                    U R                   R                  [        R                  5        [        R
                  " U S5        [        R                  " U 5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U S[        R                  R                  S9  [        R                   " U 5        g)oGathers commandline arguments for the create command.

Args:
  parser: The argparse parser to add the flag to.
	to createF
for_update)r   release_trackN)display_info	AddFormatvmware_constantsVMWARE_NODEPOOLS_FORMATr   AddNodePoolResourceArgAddValidationOnlyr   
ASYNC_FLAGAddToParserAddNodePoolDisplayNameAddNodePoolAnnotations"AddVmwareNodePoolAutoscalingConfigAddVmwareNodeConfigReleaseTrackALPHAAddNodePoolVersionr   s    1lib/surface/container/vmware/node_pools/create.pyArgsCreateAlpha.Args,   s     !!"2"J"JK	  5	F#OO'	  (	  (	,,VF	50A0A0G0G 
V$    c                 0   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  g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$ 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.
formatNz%Node Pool in Anthos Cluster on VMwareCONCEPTS	node_poolParseapisNodePoolsClientCreateasync_IsSpecifiedr
   OPERATIONS_FORMATr/   validate_onlyr   CreatedResourcer   OperationsClientWaitselfargsnode_pool_refclient	operationoperation_clientresponses          r)   RunCreateAlpha.Run?        MM++113M!!#Fd#I{{4++H55//dk{{	
@$++ #446!&&y1h	
@$++ or,    N__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr*   rF   __static_attributes__rI   r,   r)   r   r   &   s4    :y)-%#77 % %$!r,   r   c                   R    \ rS rSrSrS\0r\S\R                  4S j5       r
S rSrg)	
CreateBetac   r   r   r   c                    U R                   R                  [        R                  5        [        R
                  " U S5        [        R                  " U 5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U SS9  [        R                  " U 5        gr   r   Fr   Nr   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r'   r(   s    r)   r*   CreateBeta.Argsi        !!"2"J"JK	  5	F#OO'	  (	  (	,,VF	f7	V$r,   c                 0   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  g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$ r.   r0   r>   s          r)   rF   CreateBeta.Runz   rH   r,   rI   NrJ   rI   r,   r)   rV   rV   c   4    :y)-%#77 % % !r,   rV   c                   R    \ rS rSrSrS\0r\S\R                  4S j5       r
S rSrg)	r6      r   r   r   c                    U R                   R                  [        R                  5        [        R
                  " U S5        [        R                  " U 5        [        R                  R                  U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U SS9  [        R                  " U SS9  [        R                  " U 5        grY   rZ   r(   s    r)   r*   Create.Args   r\   r,   c                 0   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  g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$ r.   r0   r>   s          r)   rF   
Create.Run   rH   r,   rI   NrJ   rI   r,   r)   r6   r6      r_   r,   r6   N)rO   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   r4   googlecloudsdk.callioper   r	   .googlecloudsdk.command_lib.container.gkeonpremr
   +googlecloudsdk.command_lib.container.vmwarer   r   googlecloudsdk.corer   rP   ReleaseTracksr%   r&   CreateCommandr   BETArV   GAr6   rI   r,   r)   <module>rp      s    D &  ' A P ( 4 D U = #	 D%%++,9$$$ 9 -9x D%%**+7## 7 ,7t D%%(()7T 7 *7r,   