
                            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SrSr\R,                  \R.                  " \R0                  R2                  5       " S S\R4                  5      5       5       r\R.                  " \R0                  R8                  5       " S S\5      5       rg)z.Command to create an Edge Container node pool.    )nodepool)util)waiter)base)flags)print_warning)resource_args)labels_util)log)	resourcesa=  
To create a node pool called `my-nodePool`, containing 3 nodes in region `us-central1`, run:

  $ {command} my-nodePool --cluster=<my-cluster> --location=us-central1 --node-location=<my-node-location> --node-count=3

To create a node pool called `my-nodePool`, containing 3 nodes in region `us-central1`,
using only machine names matching a specific pattern, run:

  $ {command} my-nodePool --cluster=<my-cluster> --location=us-central1 --node-location=<my-node-location> --node-count=3 --machine-filter="name:<name>"

To create a node pool called `my-nodePool`, containing 3 nodes in region `us-central1`,
using only machine names NOT matching a specific pattern, run:

  $ {command} my-nodePool --cluster=<my-cluster> --location=us-central1 --node-location=<my-node-location> --node-count=3 --machine-filter="NOT name:<name>"
z
  This command uses the edgecontainer/{API} API. The full documentation for this
  API can be found at: https://cloud.google.com/edge-cloud
ic                       \ rS rSrSr\\R                  \R                  R                  \R                  R                  5      S9S.r\S 5       rS rSrg)	Create5   #Create an Edge Container node pool.API)EXAMPLESAPI REFERENCEc                    [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        [        R
                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  R                  U 5        g )Nz	to create)r	   AddNodePoolResourceArgcontainer_flagsAddNodeCountAddNodeLocationAddNodeStorageSchemaAddMachineFilterAddLocalDiskKMSKeyAddLROMaximumTimeoutAddNodeLabelsForCreateNodePoolr
   AddCreateLabelsFlagsr   
ASYNC_FLAGAddToParser)parsers    >lib/surface/edge_cloud/container/clusters/node_pools/create.pyArgsCreate.ArgsA   s     ((=  (##F+((0$$V,&&v.((0226:$$V,OO'    c                 P   [         R                  " U5      n[         R                  " XR                  5       5      n[        R
                  " U R                  5       5      nUR                  R                  U5      n[        R                  R                  UR                  SS9n[        R                  R                  SR                  UR                   S95        ["        R$                  " US5      (       d  SR                  UR'                  5       S9n[        R(                  " UR                  UR*                  5      n[,        n	["        R$                  " US5      (       a  [/        UR0                  5      n	[2        R4                  " UUUU	S	9n
[        R                  R                  S
R                  UR                   S95        [6        R8                  " U
S 5      $ [        R                  R                  SR                  UR'                  5       S95        [6        R8                  " US 5      $ )Nz+edgecontainer.projects.locations.operations)
collectionz'Create request issued for: [{nodePool}])nodePoolasync_z/Waiting for operation [{operation}] to complete)	operationlro_timeout)max_wait_mszCreated node pool [{nodePool}].z)Check operation [{operation}] for status.)r   GetNodePoolReferenceGetNodePoolCreateRequestReleaseTrackr   GetClientInstance%projects_locations_clusters_nodePoolsr   r   REGISTRYParseRelativeNamenamer   statusPrintformatnodePoolsIdr   FlagIsExplicitlySetRelativeNameOperationPollerprojects_locations_operations_LRO_MAXIMUM_TIMEOUT_intr,   r   WaitForr   PrintWarning)selfargsnode_pool_refreqclientopop_refprogress_stringoperation_pollerlro_maximum_timeoutresponses              r#   Run
Create.RunO   s   11$7M

+
+D2C2C2E
FC##D$5$5$78F		5	5	<	<S	AB11
I 2 F JJ188".. 	9 	

 $$T844
;
B
B++- C  
 --

6
6

.
. 2		"	"4	7	7!$"2"23


)	h 
jj
+
2
2$00 3 
 ''$77JJ3::))+ 	; 	

 %%b$//r&    N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLES_API_REFERENCE_r8   r   VERSION_MAPgetr   r0   GAdetailed_helpstaticmethodr$   rM   __static_attributes__rO   r&   r#   r   r   5   s_     , &--""4#4#4#7#78 . - ( (-0r&   r   c                   V    \ rS rSrSr\\R                  R                  4S j5       r	Sr
g)CreateAlpha   r   c                     [         R                  [        R                  R	                  U5      S9[
        R                  S'   [
        R                  U 5        [        R                  " U 5        g)z-Registers alpha track flags for this command.r   r   N)
rV   r8   r   rW   rX   r   rZ   r$   r   AddNodeSystemPartitionSize)r"   tracks     r#   r$   CreateAlpha.Args   sU     -<,B,B  ' -C -F) KK..v6r&   rO   N)rP   rQ   rR   rS   rT   r[   r   r0   ALPHAr$   r\   rO   r&   r#   r^   r^      s&    +**00 7 7r&   r^   N)rT   +googlecloudsdk.api_lib.edge_cloud.containerr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   /googlecloudsdk.command_lib.edge_cloud.containerr   r   r   r	   googlecloudsdk.command_lib.run$googlecloudsdk.command_lib.util.argsr
   googlecloudsdk.corer   r   rU   rV   r>   DefaultUniverseOnlyReleaseTracksr0   rY   CreateCommandr   rd   r^   rO   r&   r#   <module>ro      s    5 @ < . ( T I I 0 < # )	 
 !  D%%(()E0T E0 * E0P D%%++,
7& 
7 -
7r&   