
                             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)zD'vmware private-clouds management-dns-zone-bindings create' command.    )absolute_import)division)unicode_literals)ManagementDNSZoneBindingClient)base)flags)logz9
          Create a management DNS zone binding.
        a  
          To create a management DNS zone binding called `my-mgmt-dns-zone-binding` that corresponds to the vmware engine network `sample-vmware-engine-network` in private cloud
          `my-private-cloud`, in location `us-east2-b`, run:

            $ {command} my-mgmt-dns-zone-binding --project=my-project --private-cloud=my-private-cloud --location=us-east2-b --vmware-engine-network=sample-vmware-engine-network

          Or:

            $ {command} my-mgmt-dns-zone-binding --private-cloud=my-private-cloud --vmware-engine-network=sample-vmware-engine-network

          In the second example, the project and location are taken from gcloud properties `core/project` and `compute/zone` respectively.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Createz%Create a management DNS zone binding.c                 |   t        j                  |        t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       | j                  d      }|j                  ddd       |j                  ddd	       | j                  d
d       y)z Register flags for this command.Tyaml)requiredz--vpc-networkFzx        Resource name of the Google Cloud VPC network to bind to the management DNS zone of the  private cloud.
        )r   helpz--vmware-engine-networkzq        Resource name of VMware Engine network to bind to the management DNS zone of the  private cloud.
        z--descriptionz{        Text describing the binding resource that represents the network getting bound to the management DNS zone.
        )r   N)
r   &AddManagementDnsZoneBindingArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_mutually_exclusive_groupadd_argument)parsergroups     Hlib/surface/vmware/private_clouds/management_dns_zone_bindings/create.pyArgszCreate.Args5   s     
008OO'OOvt,
!!&)///>E	   
!         c                    |j                   j                  j                         }t               }|j                  }|j                  ||j                  |j                  |j                        }|r#t        j                  |j                  dd       y |j                  |j                  |      dj                  |j                                     }t        j                  |j                         d       |S )N)vpc_networkvmware_engine_networkdescriptionzmanagement DNS zone bindingT)kindis_asyncz:waiting for management DNS zone binding [{}] to be created)operation_refmessage)r#   )CONCEPTSmanagement_dns_zone_bindingParser   async_r   r    r!   r"   r	   CreatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsmdzbclientr$   	operationresources          r   Runz
Create.RunO   s    ==44::<D+-F{{H$$"88$$	  I 	
..<tM&&,,Y7!"(&):):)<"= ' ?H ))+2OPOr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r7    r   r   r   r   /   s!    -- 2r   r   N)r;   
__future__r   r   r   6googlecloudsdk.api_lib.vmware.managementdnszonebindingr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r<   ReleaseTracksReleaseTrackGACreateCommandr   r?   r   r   <module>rI      sk    K &  ' a ( 3 #		* D%%(()3T 3 *3r   