
    
                     >   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
 ej                   ej                  ej                  j                  ej                  j                  ej                  j                          G d d	ej"                                      Zy
)z&Command for creating network peerings.    )absolute_import)division)unicode_literals)base_classes)base)
propertiesc                   6    e Zd ZdZed        Zed        Zd Zy)RequestDeletea[  Request deletion of a Compute Engine network peering.

  *{command}* is used to request deletion of a consensus peering between virtual
    networks. The peering can be deleted if both sides request deletion.

  ## EXAMPLES
    To request deletion of a consensus peering with the name 'peering-name'
    between the network 'local-network' and the network 'peer-network', run:

        $ {command} peering-name --network=local-network

        $ {command} peering-name --network=peer-network

    To complete the deletion, run gcloud compute networks peerings delete
    for each side of the peering.
  c                     |j                  dd       |j                  ddd       t        j                  j                  |       y )NnamezThe name of the peering.)helpz	--networkTzFThe name of the network in the current project containing the peering.)requiredr   )add_argumentr   
ASYNC_FLAGAddToParserclsparsers     7lib/surface/compute/networks/peerings/request_delete.py
ArgsCommonzRequestDelete.ArgsCommon0   sJ     %?@
	   	OO'    c                 &    | j                  |       y )N)r   r   s     r   ArgszRequestDelete.Args@   s    NN6r   c                    t        j                  | j                               }|j                  }|j                  j                  |j                  |j                  j                  |j                        t        j                  j                  j                  j                               }|j                  |j                  j                   d|fg      S )zDIssues the request necessary for requesting deletion of the peering.)r   )network#networksRequestRemovePeeringRequestprojectRequestRemovePeering)r   ComputeApiHolderReleaseTrackclientmessages*ComputeNetworksRequestRemovePeeringRequestr   #NetworksRequestRemovePeeringRequestr   r   VALUEScorer   	GetOrFailMakeRequestsapitools_clientnetworks)selfargsholderr!   requests        r   RunzRequestDelete.RunD   s    **4+<+<+>?F]]FooHHOO??TYY?O!!&&..88: I G 

 
 
)
)+A7	KL r   N)__name__
__module____qualname____doc__classmethodr   r   r/    r   r   r
   r
      s4    
" ( (  r   r
   N)r3   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksr    ALPHABETAGACommandr
   r5   r   r   <module>r@      s    - &  ' 7 ( * T..33T5F5F5I5I5DLL 5 5r   