
    	                         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)z1VMware Engine VPC network peering delete command.    )absolute_import)division)unicode_literals)networkpeering)base)flags)logz
          Delete a VPC network peering. After you delete a VPC network peering, you won't be able to access the corresponding VMware Engine network through the peer network.
        z
          To delete a VPC network peering with name `my-peering`, run:

            $ {command} my-peering

          In this example, the project is taken from gcloud properties core/project and location is taken as `global`.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Deletez8Delete a Google Cloud VMware Engine VPC network peering.c                     t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       y)z Register flags for this command.T)
positionalN)r   AddNetworkPeeringToParserr   
ASYNC_FLAGAddToParser
SetDefault)parsers    -lib/surface/vmware/network_peerings/delete.pyArgszDelete.Args0   s:     
##Ft<OO'OOvt,    c                 x   |j                   j                  j                         }t        j                         }|j
                  }|j                  |      }|r$t        j                  |j                  dd       |S |j                  |j                  |      dj                  |j                               d      S )NzVPC network peeringT)kindis_asyncz*waiting for vpc peering [{}] to be deletedF)operation_refmessage
has_result)CONCEPTSnetwork_peeringParser   NetworkPeeringClientasync_r   r	   DeletedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargspeeringclientr   	operations         r   Runz
Delete.Run7   s    mm++113G002F{{Hg&I	
..4tE"",,Y7<CC  "$	 #  r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r.    r   r   r   r   *   s!    @-- -r   r   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.vmwarer   googlecloudsdk.callioper   2googlecloudsdk.command_lib.vmware.network_peeringsr   googlecloudsdk.corer	   r3   ReleaseTracksReleaseTrackGADescribeCommandr   r6   r   r   <module>r@      sj    8 &  ' 8 ( D #		  D%%(()T!!  *r   