
    ,                     d   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SS	KJr  SS
KJr  SSKJr  Sr\S-   r\R(                  " \R*                  R,                  \R*                  R.                  \R*                  R0                  5       " S S\R2                  5      5       rS rg)z+services peered-dns-domains create command.    )absolute_import)division)unicode_literals)projects_api)peering)services_util)base)util)log)
propertiesz(gcloud services vpc-peerings operations zwait {0}c                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Create!   z<Create a peered DNS domain for a private service connection.a            This command creates a peered DNS domain for a private service
          connection which sends requests for records in a given namespace
          originating in the service producer VPC network to the consumer
          VPC network to be resolved.
          a            To create a peered DNS domain called `example-com` which forwards DNS
          requests for the domain suffix `example.com.` for a private service
          connection between service `peering-service` and the consumer network
          `my-network` in the current project, run:

            $ {command} example-com --network=my-network \
                --service=peering-service --dns-suffix=example.com.

          To run the same command asynchronously (non-blocking), run:

            $ {command} example-com --network=my-network \
                --service=peering-service --dns-suffix=example.com. \
                --async
          )DESCRIPTIONEXAMPLESc                     U R                  SSS9  U R                  SSSSS9  U R                  S	S
SSS9  U R                  SSSSS9  [        R                  R                  U 5        g)zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.
namez,The name of the peered DNS domain to create.)helpz	--networkNETWORKTz<The network in the consumer project peered with the service.)metavarrequiredr   z	--serviceSERVICEz servicenetworking.googleapis.comz:The name of the service to create a peered DNS domain for.)r   defaultr   z--dns-suffix
DNS_SUFFIXz4The DNS domain name suffix of the peered DNS domain.N)add_argumentr	   
ASYNC_FLAGAddToParser)parsers    1lib/surface/services/peered_dns_domains/create.pyArgsCreate.ArgsC   s     C  E
K	  M
 2I	  K
 C	  E
 	OO'    c                 H   [         R                  R                  R                  R	                  SS9n[        U5      n[        R                  " UUR                  UR                  UR                  UR                  5      nUR                  (       aN  [        R                  UR                  5      n[        R                   R#                  SR                  U5      5        g[$        R&                  " UR                  [        R(                  5      n[$        R*                  " U5        g)zRun 'services peered-dns-domains create'.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.
T)r   zcAsynchronous operation is in progress... Use the following command to wait for its completion:
 {0}N)r   VALUEScoreprojectGet_GetProjectNumberr   CreatePeeredDnsDomainservicenetworkr   
dns_suffixasync__OP_WAIT_CMDformatr   statusPrintr   WaitOperationGetOperationPrintOperation)selfargsr&   project_numberopcmds         r   Run
Create.Run^   s     $$,,00$0?G&w/N		&	&		
B {{(c	jj ++16#;8 		$	$RWWg.B.B	CB  $r"    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr    r:   __static_attributes__r<   r"   r   r   r   !   s2     E-4 ( (4%r"   r   c                 j    [         R                  " [        R                  " U 5      5      R                  $ )N)r   r'   projects_utilParseProjectprojectNumber)
project_ids    r   r(   r(   x   s$    			-44Z@	A	O	OOr"   N)rA   
__future__r   r   r   +googlecloudsdk.api_lib.cloudresourcemanagerr   googlecloudsdk.api_lib.servicesr   r   googlecloudsdk.callioper	   #googlecloudsdk.command_lib.projectsr
   rF   googlecloudsdk.corer   r   _OP_BASE_CMDr.   ReleaseTracksReleaseTrackALPHABETAGASilentCommandr   r(   r<   r"   r   <module>rW      s    2 &  ' D 3 9 ( E # *9j( 
O%T O%
O%dPr"   