
    F                         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 delete' command.    )absolute_import)division)unicode_literals)NetworksClient)base)flags)logz3
          Delete a VMware Engine network.
        aB  
          To delete a network called `my-network` of type `STANDARD` in project `my-project` and region `global`, run:

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

          Or:

            $ {command} my-network

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

          To delete a network called `my-network` of type `LEAGACY` in project `my-project` and region `us-west2`, run:

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

          Or:

            $ {command} my-network --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)Deletez,Delete a Google Cloud VMware Engine network.c                     t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       y)z Register flags for this command.T)
positionalN)r   AddNetworkToParserr   
ASYNC_FLAGAddToParser
SetDefault)parsers    %lib/surface/vmware/networks/delete.pyArgszDelete.Args>   s:     
V5OO'OOvt,    c                 d   |j                   j                  j                         }t               }|j                  }|j                  |      }|r$t        j                  |j                  dd       |S |j                  |j                  |      dj                  |j                               d      S )NzVMware Engine networkT)kindis_asyncz4waiting for VMware Engine network [{}] to be deletedF)operation_refmessage
has_result)CONCEPTSvmware_engine_networkParser   async_r   r	   DeletedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsnetworkclientr   	operations         r   Runz
Delete.RunE   s    mm11779GF{{Hg&I	
..6G"",,Y7FMM  "$	 #  r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r-    r   r   r   r   8   s!    4-- -r   r   N)r1   
__future__r   r   r   &googlecloudsdk.api_lib.vmware.networksr   googlecloudsdk.callioper   *googlecloudsdk.command_lib.vmware.networksr   googlecloudsdk.corer	   r2   ReleaseTracksReleaseTrackGADeleteCommandr   r5   r   r   <module>r?      sj    ( &  ' A ( < #		< D%%(()T  *r   