
                             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
dZ ej                  ej                  j                          G d dej"                               Zee_        y)z+'vmware sddc privateclouds create' command.    )absolute_import)division)unicode_literals)PrivatecloudsClient)base)labels_util)flagsa  
          Create a VMware Engine private cloud. Private cloud creation is
          considered finished when the private cloud is in READY state. Check
          the progress of a private cloud using
          `gcloud alpha vmware privateclouds list`.
        a  
          To create a private cloud called ``my-privatecloud'' in project
          ``my-project'' and region ``us-central1'', run:

            $ {command} my-privatecloud --project=my-project --region=us-central1

          Or:

            $ {command} my-privatecloud

          In the second example, the project and region are taken from gcloud
          properties core/project and vmware/region.
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Createz%Create a VMware Engine private cloud.c                     t        j                  | d       | j                  dd       | j                  ddd       | j                  d	dd
       | j                  ddd       t        j                  |        y)z Register flags for this command.T)
positionalz--descriptionz2        Text describing the private cloud
        )helpz--vpc-networkzC        Name of the virtual network for this private cloud
        )requiredr   z--management-ip-rangez        IP address range available to the private cloud for management access,
        in address/mask format. For example,
        `--management-ip-range=10.0.1.0/29`.
        z--workload-ip-rangez        IP address range available to the private cloud in address/mask
        format. For example, `--workload-ip-range=10.0.1.0/29`.
        N)r	   AddPrivatecloudArgToParseradd_argumentr   AddCreateLabelsFlags)parsers    /lib/surface/vmware/sddc/privateclouds/create.pyArgszCreate.Args7   s     
$$V=
  
          $$V,    c                 2   |j                   j                  j                         }t               }|j	                  ||j
                  |j                  |j                  |j                  |j                        }|j                  |dj                  |            S )N)vpc_networkmanagement_ip_rangeworkload_ip_rangelabelsdescriptionz+waiting for privatecloud [{}] to be created)CONCEPTSprivatecloudParser   r   r   r   r   r   r   WaitForOperationformat)selfargsr    client	operations        r   Runz
Create.RunW   s    ==--335L "F$$ 4400{{$$  I ""5<<\JL Lr   N)__name__
__module____qualname____doc__staticmethodr   r(    r   r   r   r   3   s    -- ->Lr   r   N)r,   
__future__r   r   r   0googlecloudsdk.api_lib.vmware.sddc.privatecloudsr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.util.argsr   &googlecloudsdk.command_lib.vmware.sddcr	   DETAILED_HELPReleaseTracksReleaseTrackALPHACreateCommandr   detailed_helpr.   r   r   <module>r:      sx    2 &  ' P ( < 8		2 D%%++,0LT 0L -0Lf % r   