
                         h   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(                         G d de	j*                               Z e	j$                  e	j&                  j.                         G d de             Zy)z<Command to create a node pool in an Anthos cluster on Azure.    )absolute_import)division)unicode_literals)azure)base)resource_args)command_util)	constants)endpoint_util)flagsa  
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 --node-version=NODE_VERSION --ssh-public-key=SSH_PUBLIC_KEY --subnet-id=SUBNET_ID
c                   .    e Zd ZdZdeiZed        Zd Zy)Create1Create a node pool in an Anthos cluster on Azure.EXAMPLESc                 n   t        j                  | dd       t        j                  |        t        j                  |        t        j
                  | d       t        j                  |        t        j                  |        t        j                  |        t        j                  | d       t        j                  | d       t        j                  |        t        j                  |        t        j                  |        t        j                  |        t        j                  |        t        j                   |        t        j"                  | d       t        j$                  | d       t&        j(                  j+                  |        | j,                  j/                  t0        j2                         y )Nz	to createT)
positionalzthe node poolz	node poolzcreation of the node pool)r   AddAzureNodePoolResourceArgr   AddNodeVersionAddAutoscalingAddSubnetID	AddVMSizeAddSSHPublicKeyAddRootVolumeSizeAddTagsAddValidateOnlyAddMaxPodsPerNodeAddNodeLabelsAddNodeTaintsAddAzureAvailabilityZoneAddProxyConfigAddConfigEncryptionAddAnnotationsAddEnableAutoRepairr   
ASYNC_FLAGAddToParserdisplay_info	AddFormatr
   AZURE_NODE_POOL_FORMAT)parsers    0lib/surface/container/azure/node_pools/create.pyArgszCreate.Args,   s,   -- 
 	 	fo.	OOF	&!	F#	MM&+&	&"=>	F#			""6*	 	f%	-	fd+OO'
!!)"B"BC    c                    t        j                  |      j                  }t        j                  |      5  t        j                  |      }t        j                         }t        j                  |j                  d|j                        }t        j                  ||||t        j                        cddd       S # 1 sw Y   yxY w)zRuns the create command.Creating)actioncluster)resource_refresource_clientargsmessagekindN)r   ParseAzureNodePoolResourceArglocationsIdr   GkemulticloudEndpointOverrideapi_utilNodePoolsClientr	   NodePoolMessageazureNodePoolsIdazureClustersIdr   r
   AZURE_NODEPOOL_KIND)selfr3   locationnode_pool_refnode_pool_clientr4   s         r*   Runz
Create.RunE   s    ::4@LLH		4	4X	>#AA$Gm!113,,

(
(//g
   $*,, 
?	>	>s   A=B<<CN)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr+   rC    r,   r*   r   r   &   s(    9y)-D D0r,   r   c                   L    e Zd ZdZeej                  j                  fd       Zy)CreateAlphar   c                 X    t         j                  |        t        j                  |        y)z-Registers alpha track flags for this command.N)r   r+   r   AddImageType)r)   tracks     r*   r+   zCreateAlpha.Args]   s     KK	vr,   N)	rD   rE   rF   rG   rJ   r   ReleaseTrackALPHAr+   rK   r,   r*   rM   rM   Y   s&    9**00  r,   rM   N)rG   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r9   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.azurer   2googlecloudsdk.command_lib.container.gkemulticloudr	   r
   r   r   rH   ReleaseTracksrQ   GACreateCommandr   rR   rM   rK   r,   r*   <module>r[      s    C &  ' L ( D K H L D	 D%%(()/T / */d D%%++,&  -r,   