
    (                         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
S.r\R                  " \R                  R                   5       " S S\R"                  5      5       rg)z+'vmware external-addresses create' command.    )absolute_import)division)unicode_literals)ExternalAddressesClient)base)flags)logz
          Create an external IP address that represents an allocated external IP address and its corresponding internal IP address in the private cloud.
        a  
          To create an external IP address called `myip` that corresponds to the internal IP address `165.87.54.14` that belongs to the private cloud `my-private-cloud` in project `my-project` and location `us-east2-b`, run:

            $ {command} myip --project=my-project --private-cloud=my-private-cloud --location=us-east2-b --internal-ip=165.87.54.14 --description="A short description for the new external address"

          Or:

            $ {command} myip --private-cloud=my-private-cloud --internal-ip=165.87.54.14 --description="A short description for the new external address"

          In the second example, the project and region are taken from gcloud properties core/project and vmware/region.
    )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create,   zCreate an external IP address.c                 &   [         R                  " U 5        [        R                  R	                  U 5        [        R                  R                  U S5        U R                  R                  S5        U R                  SSSS9  U R                  SSS9  g	)
z Register flags for this command.Tyamlz--internal-ipzM        internal ip address to which external address will be linked
        )requiredhelpz--descriptionz5        Text describing the external address
        )r   N)	r   AddExternalAddressArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsers    >lib/surface/vmware/private_clouds/external_addresses/create.pyArgsCreate.Args2   s     
''/OO'OOvt,
!!&)
         c                    UR                   R                  R                  5       n[        5       nUR                  nUR                  X!R                  UR                  5      nU(       a!  [        R                  " UR                  SSS9  g UR                  UR                  U5      SR                  UR                  5       5      S9n[        R                  " UR                  5       SS9  U$ )Nzexternal addressT)kindis_asyncz/waiting for external address [{}] to be created)operation_refmessage)r    )CONCEPTSexternal_addressParser   async_r   internal_ipdescriptionr	   CreatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr%   clientr!   	operationresources          r   Run
Create.RunF   s    }}55;;=$&F{{H**D,<,<I 	
..1DB&&,,Y7AHH))+- ' .H %%'.@ Or    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r5   __static_attributes__r7   r   r   r   r   ,   s!    &- &r   r   N)r<   
__future__r   r   r   /googlecloudsdk.api_lib.vmware.externaladdressesr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r=   ReleaseTracksReleaseTrackGACreateCommandr   r7   r   r   <module>rJ      sh    2 &  ' S ( 3 #
	$ D%%((),T , *,r   