
                            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SKJr  SSKJr  SrSrSrSr\R2                  \R4                  " \R6                  R8                  5       " S S\R:                  5      5       5       r\R4                  " \R6                  R>                  5       " S S\5      5       r g)z!Command to create a GDCE cluster.    )absolute_import)division)unicode_literalscluster)util)waiter)base)flags)print_warning)resource_args)log)	resourceszt
To create a cluster called `my-cluster` in region us-central1,
run:

$ {command} my-cluster --location=us-central1
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@w i Q%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)	Create0   !Create an Edge Container cluster.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                  " U 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(                  " U 5        [        R*                  " U 5        [        R,                  " U 5        [        R.                  " U 5        [        R0                  " U 5        [        R2                  " U 5        [        R4                  " U 5        [6        R8                  R;                  U 5        g )Nz	to create)r   AddClusterResourceArgcontainer_flagsAddAdminUsersAddClusterIPV4CIDRAddServicesIPV4CIDRAddDefaultMaxPodsPerNodeAddFleetProject	AddLabelsAddMaintenanceWindowRecurrenceAddMaintenanceWindowEndAddMaintenanceWindowStartAddControlPlaneKMSKeyAddLROMaximumTimeoutAddSystemAddonsConfigAddExternalLbIpv4AddressPoolsAddControlPlaneNodeLocationAddControlPlaneNodeCount AddControlPlaneNodeStorageSchemaAddControlPlaneMachineFilter%AddControlPlaneSharedDeploymentPolicyAddOfflineRebootTtLAddReleaseChannel
AddVersionAddZoneStorageKMSKeyAddContainerDefaultRuntimeClass"AddEnableGoogleGroupAuthenticationr
   
ASYNC_FLAGAddToParser)parsers    3lib/surface/edge_cloud/container/clusters/create.pyArgsCreate.Args<   st   ''<!!&)&&v.''/,,V4##F+f%226:++F3--f5))&1((0))&111&9//7,,V444V<00899&A''/%%f-v&((033F;66v>OO'    c                    [         R                  " U5      n[         R                  " XR                  5       5      n[         R                  " X0R                  5       5      nUb  [
        R                  " U5        g [        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      (       Gd  SR#                  UR+                  5       S9n[        R,                  " UR                  UR.                  5      n	[0        n
[         R2                  " U5      (       a  [4        n
[&        R(                  " US5      (       a  [7        UR8                  5      n
[:        R<                  " U	UUU
S	9n[
        R                  R!                  S
R#                  UR$                  S95        [>        R@                  " US 5      $ [
        R                  R!                  SR#                  UR+                  5       S95        [>        R@                  " US 5      $ )Nz+edgecontainer.projects.locations.operations)
collectionz&Create request issued for: [{cluster}]r   async_z/Waiting for operation [{operation}] to complete)	operationlro_timeout)max_wait_mszCreated cluster [{cluster}].z)Check operation [{operation}] for status.)!r   GetClusterReferenceGetClusterCreateRequestReleaseTrackValidateClusterCreateRequestr   errorr   GetClientInstanceprojects_locations_clustersr   r   REGISTRYParseRelativeNamenamestatusPrintformat
clustersIdr   FlagIsExplicitlySetRelativeNameOperationPollerprojects_locations_operations_RCP_LRO_MAXIMUM_TIMEOUT_IsLCPCluster_LCP_LRO_MAXIMUM_TIMEOUT_intr>   r	   WaitForr   PrintWarning)selfargscluster_refreqrD   cluster_clientopop_refprogress_stringoperation_pollerlro_maximum_timeoutresponses               r6   Run
Create.RunY   s   --d3K

)
)$0A0A0C
DC006G6G6IJE	ii++D,=,=,?@N		3	3	:	:3	?B11
I 2 F JJ077** 	8 	

 $$T844
;
B
B++- C  
 --

4
4

6
6 6			d	#	#7		"	"4	7	7!$"2"23


)	h 
jj
(
/
/8N8N
/
O ''$77JJ3::))+ 	; 	

 %%b$//r9    N)__name__
__module____qualname____firstlineno____doc__	_EXAMPLES_API_REFERENCE_rL   r   VERSION_MAPgetr
   rB   GAdetailed_helpstaticmethodr7   rc   __static_attributes__re   r9   r6   r   r   0   s_     * &--""4#4#4#7#78 . - ( (810r9   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        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                  " U 5        [        R                   " U 5        g)z-Registers alpha track flags for this command.r   r   N)rl   rL   r   rm   rn   r   rp   r7   r   AddClusterIPV6CIDRAddServicesIPV6CIDRAddExternalLbIpv6AddressPools#AddExternalLoadBalancerAddressPoolsAddEnableClusterIsolationAddEnableRemoteBackupAddEnableRobinCNS&AddControlPlaneNodeSystemPartitionSize)r5   tracks     r6   r7   CreateAlpha.Args   s     -<,B,B  ' -C -F) KK&&v.''/11&977?--f5))&1%%f-::6Br9   re   N)rf   rg   rh   ri   rj   rq   r
   rB   ALPHAr7   rr   re   r9   r6   rt   rt      s(    )**00 C Cr9   rt   N)!rj   
__future__r   r   r   +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.corer   r   rk   rl   rR   rT   DefaultUniverseOnlyReleaseTracksrB   ro   CreateCommandr   r   rt   re   r9   r6   <module>r      s    ( &  ' ? < . ( T I I 0 # )	
 $ $  D%%(()X0T X0 * X0v D%%++,C& C -Cr9   