
    	                     T   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Z e
j$                  e
j&                  j(                  e
j&                  j*                  e
j&                  j,                         G d de
j.                               Zy)z=Command to enroll a node pool in an Anthos cluster on VMware.    )absolute_import)division)unicode_literals)
operations)vmware_node_pools)base)parser_arguments)	constants)flagsz
To enroll 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)Enrollz2Enroll a node pool in an Anthos cluster on VMware.EXAMPLESparserc                     | j                   j                  t        j                         t	        j
                  | d       t        j                  j                  |        y )Nz	to enroll)	display_info	AddFormatvmware_constantsVMWARE_NODEPOOLS_FORMATr   AddNodePoolResourceArgr   
ASYNC_FLAGAddToParser)r   s    1lib/surface/container/vmware/node_pools/enroll.pyArgszEnroll.Args-   s?    
!!"2"J"JK	  5OO'    c                    |j                   j                  j                         }t        j                         }|j                  |      }|j                  r&|j                  d      st        j                  |_
        |j                  r"t        j                  ||j                         |S t        j                         }|j                  |      }t        j                  ||j                         |S )zRuns the enroll command.format)CONCEPTS	node_poolParseapisNodePoolsClientr   async_IsSpecifiedr
   OPERATIONS_FORMATr   r   
log_enrollOperationsClientWait)selfargsnode_pool_refclient	operationoperation_clientresponses          r   Runz
Enroll.Run3   s    MM++113M!!#Fd#I{{4++H5//dk{{M4;;7#446!&&y1hM4;;7or   N)__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr   r/    r   r   r   r   %   s6     ;y)-(#77 ( (
r   r   N)r3   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   r    googlecloudsdk.callioper   r	   .googlecloudsdk.command_lib.container.gkeonpremr
   +googlecloudsdk.command_lib.container.vmwarer   r   r4   ReleaseTracksReleaseTrackALPHABETAGACommandr   r8   r   r   <module>rD      s    D &  ' A P ( 4 D U =	 T..33T5F5F5I5IT\\ r   