
    2                     `   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Z e
j&                  e
j(                  j*                  e
j(                  j,                  e
j(                  j.                         G d de
j0                               Zy)zBCommand to enroll an admin cluster in an Anthos cluster on VMware.    )absolute_import)division)unicode_literals)
operations)vmware_admin_clusters)base)parser_arguments)	constants)flagsa[  
To enroll a cluster named ``my-cluster'' managed in location ``us-west1''
with admin cluster membership of
``projects/my-project/locations/us-west1/memberships/my-admin-cluster-membership'',
run:

$ {command} my-cluster --location=us-west1 --admin-cluster-membership=projects/my-project/locations/us-west1/memberships/my-admin-cluster-membership
c                   H    e Zd ZdZdeiZedej                  fd       Z	d Z
y)Enrollz)Enroll an Anthos on VMware admin cluster.EXAMPLESparserc                     | j                   j                  t        j                         t	        j
                  | d       t        j                  | d       t        j                  j                  |        y )NF)
positionalz	to enroll)display_info	AddFormatvmware_constantsVMWARE_CLUSTERS_FORMATr   $AddAdminClusterMembershipResourceArgvmware_flagsAddAdminClusterResourceArgr   
ASYNC_FLAGAddToParser)r   s    5lib/surface/container/vmware/admin_clusters/enroll.pyArgszEnroll.Args0   sO    
!!"2"I"IJ	..v%H++FK@OO'    c                    t        j                         }|j                  j                  j	                         }|j                  |      }|j                  r&|j                  d      st        j                  |_
        |j                  r"t        j                  ||j                         |S t        j                         }|j                  |      }t        j                  ||j                         |S )Nformat)apisAdminClustersClientCONCEPTSadmin_clusterParser   async_IsSpecifiedr
   OPERATIONS_FORMATr   r   
log_enrollOperationsClientWait)selfargscluster_clientadmin_cluster_ref	operationoperation_clientoperation_responses          r   Runz
Enroll.Run7   s    --/N3399;%%d+I{{4++H5//dk{{-t{{;#446+00;-t{{;r   N)__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr	   ArgumentInterceptorr   r2    r   r   r   r   (   s6     2y)-(#77 ( ( r   r   N)r6   
__future__r   r   r   *googlecloudsdk.api_lib.container.gkeonpremr   r   r    googlecloudsdk.callioper   r	   .googlecloudsdk.command_lib.container.gkeonpremr
   r   +googlecloudsdk.command_lib.container.vmwarer   r   r7   ReleaseTracksReleaseTrackALPHABETAGACommandr   r;   r   r   <module>rG      s    I &  ' A T ( 4 D @ U M	 T..33T5F5F5I5I T\\   r   