
                             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y)z!'vmware networks create' command.    )absolute_import)division)unicode_literals)NetworksClient)base)flags)logz
          Create a VMware Engine network. VMware Engine network creation is considered finished when the VMware Engine network is in ACTIVE state. Check the progress of a VMware Engine network creation using `{parent_command} list`.
        a0  
          To create a VMware Engine network of type `STANDARD`, run:

            $ {command} my-network --type=STANDARD --location=global --project=my-project

          Or:

            $ {command} my-network --type=STANDARD

          In the second example, the project is taken from gcloud properties core/project and the location is taken as `global`.

          To create a VMware Engine network of type `LEGACY` in the `us-west2` region, run:

            $ {command} my-network --type=LEGACY --location=us-west2 --project=my-project

          Or:

            $ {command} my-network --type=LEGACY --location=us-west2

          In the last example, the project is taken from gcloud properties core/project. For VMware Engine networks of type `LEGACY`, you must always specify a region as the location.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Createz,Create a Google Cloud VMware Engine network.c                 @   ddd}t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       | j                  dd	       | j                  d
d|d       y)z Register flags for this command.zyStandard network type used for private cloud connectivity. A VMware Engine network of type STANDARD is a global resource.zNetwork type used by private clouds created in projects without a network of type STANDARD. This network type is only used for new PCs in existing projects that continue to use LEGACY network. A VMware Engine network of type LEGACY is a regional resource.)STANDARDLEGACYT)
positionalyamlz--descriptionz;        Text describing the VMware Engine network.
        )helpz--typez"Type of the VMware Engine network.)requiredchoicesr   N)	r   AddNetworkToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsertype_choicess     %lib/surface/vmware/networks/create.pyArgszCreate.Args>   s    
KK	L 
V5OO'OOvt,
!!&)
  
 5	  7    c                    |j                   j                  j                         }t               }|j                  }|j                  ||j                  |j                        }|r#t        j                  |j                  dd       y |j                  |j                  |      dj                  |j                                     }t        j                  |j                         d       |S )NzVMware Engine networkT)kindis_asyncz4waiting for VMware Engine network [{}] to be created)operation_refmessage)r#   )CONCEPTSvmware_engine_networkParser   async_r   typedescriptionr	   CreatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsnetworkclientr$   	operationresources          r   Runz
Create.RunZ   s    mm11779GF{{Hgtyy$2B2BCI	
..6G&&,,Y7FMM  "
 ' H ,,.5LMOr!   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr    r9    r!   r   r   r   8   s!    4-7 76r!   r   N)r=   
__future__r   r   r   &googlecloudsdk.api_lib.vmware.networksr   googlecloudsdk.callioper   *googlecloudsdk.command_lib.vmware.networksr   googlecloudsdk.corer	   r>   ReleaseTracksReleaseTrackGACreateCommandr   rA   r!   r   <module>rK      sj    ( &  ' A ( < #		< D%%(()2T 2 *2r!   