
                             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S.r\	R"                  " \	R$                  R&                  5       " S S\	R(                  5      5       rg)z!'vmware clusters create' command.    )absolute_import)division)unicode_literals)ClustersClient)arg_parsers)base)flags)util)logz
          Create a cluster in a VMware Engine private cloud. Successful creation of a cluster results in a cluster in READY state. Check the progress of a cluster using `{parent_command} list`.
        a5  
          To create a cluster called `my-cluster` in private cloud `my-private-cloud`, with 3 initial `standard-72` nodes in zone `us-west2-a`, run:

            $ {command} my-cluster --location=us-west2-a --project=my-project --private-cloud=my-private-cloud --node-type-config=type=standard-72,count=3

            Or:

            $ {command} my-cluster --private-cloud=my-private-cloud --node-type-config=type=standard-72,count=3

            In the second example, the project and location are taken from gcloud properties core/project and compute/zone.
    )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create0   z,Create a Google Cloud VMware Engine cluster.c           
      z   [         R                  " U SS9  [        R                  R	                  U 5        [        R                  R                  U S5        U R                  R                  S5        U R                  SS[        R                  " [        [        [        S.SS9SS	S
9  [         R                  " U 5        g)z Register flags for this command.T)
positionalyamlz--node-type-config)typecountzcustom-core-count)r   r   )specrequired_keysappenda          Information about the type and number of nodes associated with the cluster.

        type (required): canonical identifier of the node type.

        count (required): number of nodes of this type in the cluster.

        custom-core-count (optional): customized number of cores available to each node of the type.
        To get a list of valid values for your node type,
        run the gcloud vmware node-types describe command and reference the
        availableCustomCoreCounts field in the output.
        )requiredr   actionhelpN)r	   AddClusterArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argumentr   ArgDictstrint#AddAutoscalingSettingsFlagsToParser)parsers    4lib/surface/vmware/private_clouds/clusters/create.pyArgsCreate.Args6   s     
48OO'OOvt,
!!&)
  %(
 ,-   . 
--f5    c                 \   UR                   R                  R                  5       n[        5       nUR                  n[
        R                  " UR                  5      nS nUR                  (       a   [
        R                  " UR                  5      nUR                  (       d3  UR                  (       d"  UR                  (       d  UR                  (       aA  [
        R                  " UR                  UR                  UR                  UR                  5      nUR                  X%U5      nU(       a!  [         R"                  " UR$                  SSS9  g UR'                  UR)                  U5      SR+                  UR-                  5       5      S9n[         R"                  " UR-                  5       SS9  U$ )NclusterT)kindis_asyncz&waiting for cluster [{}] to be created)operation_refmessage)r.   )CONCEPTSr-   Parser   async_r
   ParseNodesConfigsParametersnode_type_configautoscaling_settings_from_file&ParseAutoscalingSettingsFromFileFormat"autoscaling_min_cluster_node_count"autoscaling_max_cluster_node_countautoscaling_cool_down_periodautoscaling_policy)ParseAutoscalingSettingsFromInlinedFormatr   r   CreatedResourcenameWaitForOperationGetOperationRefformatRelativeName)	selfargsr-   clientr/   nodes_configsautoscaling_settings	operationresources	            r(   Run
Create.RunV   sQ   mm##))+GF{{H44T5J5JKM**!HH

-
- 	//22,,""!KK

1
1

1
1

+
+

!
!	 g6JKI	)..y4H&&,,Y78??  "$ ' %H ,,.Y?Or+    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr)   rK   __static_attributes__rM   r+   r(   r   r   0   s!    4-6 6>"r+   r   N)rR   
__future__r   r   r   &googlecloudsdk.api_lib.vmware.clustersr   googlecloudsdk.callioper   r   !googlecloudsdk.command_lib.vmwarer	   *googlecloudsdk.command_lib.vmware.clustersr
   googlecloudsdk.corer   rS   ReleaseTracksReleaseTrackGACreateCommandr   rM   r+   r(   <module>ra      sq    ( &  ' A / ( 3 ; #	
	( D%%(()GT G *Gr+   