
    m
                         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ee_        y)z 'vmware sddc ip create' command.    )absolute_import)division)unicode_literals)IPAddressesClient)base)labels_util)flagszO
          Linking external ip address to VMware Engine private cloud.
        a  
          To link external ip address for internal ip ``165.87.54.14'' called ``myip'' to private cloud
          ``myprivatecloud'', in region ``us-east2'', run:

            $ {command} myip --project=my project --privatecloud=myprivatecloud --region=us-east2 --internal-ip=165.87.54.14

          Or:

            $ {command} myip --privatecloud=myprivatecloud --internal-ip=165.87.54.14

          In the second example, the project and region are taken from gcloud properties core/project and vmware/region.
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Createz8Link external ip address to VMware Engine private cloud.c                     t        j                  |        | j                  ddd       t        j                  |        y)z Register flags for this command.z--internal-ipTzH        internal ip address to which will be linked external ip
        )requiredhelpN)r	   AddIPArgToParseradd_argumentr   AddCreateLabelsFlags)parsers    -lib/surface/vmware/sddc/ipaddresses/create.pyArgszCreate.Args3   s@     
6"
   $$V,    c                    |j                   j                  j                         }t               }|j	                  ||j
                  |j                        }|j                  ||d      }|j                  |dj                  |            S )NT)resource_pathencoded_cluster_groups_idz1waiting for external ip address [{}] to be linked)
CONCEPTSnameParser   r   internal_iplabelsGetResourcePathWaitForOperationformat)selfargsresourceclient	operationr   s         r   Runz
Create.Run?   s    }}!!'')H FI
 **D + JM""FMM r   N)__name__
__module____qualname____doc__staticmethodr   r(    r   r   r   r   /   s    @	- 	-r   r   N)r,   
__future__r   r   r   .googlecloudsdk.api_lib.vmware.sddc.ipaddressesr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.util.argsr   &googlecloudsdk.command_lib.vmware.sddcr	   DETAILED_HELPReleaseTracksReleaseTrackALPHACreateCommandr   detailed_helpr.   r   r   <module>r:      st    ' &  ' L ( < 8		* D%%++,T  -< % r   