
    v                        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lmZ ddlmZ dd	lmZ d
ddZdZdZdZdZe
j0                   e
j2                  e
j4                  j6                  e
j4                  j8                  e
j4                  j:                         G d de
j<                                      Zee_         y)z#Command for creating interconnects.    )absolute_import)division)unicode_literals)base_classes)client)base)flags)logz        *{command}* is used to create interconnects. An interconnect represents
        a single specific connection between Google and the customer.

        For an example, refer to the *EXAMPLES* section below.
        a          To create an interconnect of type DEDICATED, run:

          $ {command} example-interconnect --customer-name="Example Customer Name" --interconnect-type=DEDICATED --link-type=LINK_TYPE_ETHERNET_10G_LR --location=example-zone1-1 --requested-link-count=1 --noc-contact-email=noc@example.com --description="Example interconnect"

        To create a Cross-Cloud Interconnect, run:

          $ {command} example-cc-interconnect --interconnect-type=DEDICATED --link-type=LINK_TYPE_ETHERNET_10G_LR --location=example-zone1-1 --requested-link-count=1 --remote-location=example-remote-location --noc-contact-email=noc@example.com --description="Example Cross-Cloud Interconnect"
        )DESCRIPTIONEXAMPLESzThe location for the interconnect. The locations can be listed by using the `{parent_command} locations list` command to find the appropriate location to use when creating an interconnect.zThe remote location for a Cross-Cloud Interconnect. The remote locations can be listed by using the `{parent_command} remote-locations list` command to find the appropriate remote location to use when creating a Cross-Cloud Interconnect.zKhttps://cloud.google.com/interconnect/docs/how-to/dedicated/retrieving-loaszUhttps://cloud.google.com/network-connectivity/docs/interconnect/concepts/cci-overviewc                   B    e Zd ZdZdZdZdZdZed        Z	d Z
d Zd Zy)CreatezCreate a Compute Engine interconnect.

  *{command}* is used to create interconnects. An interconnect represents a
  single specific connection between Google and the customer.
  NFc                    t        j                  t              | _        | j                  j	                  |       t        j                  t              | _        | j                  j	                  |       t        j                         | _        | j                  j	                  |d       t        j                  || j                                |j                  j                  t        j                          y )Ncreate)operation_type)location_flags,InterconnectLocationArgumentForOtherResource_LOCATION_FLAG_MSGLOCATION_ARGAddArgumentremote_location_flags2InterconnectRemoteLocationArgumentForOtherResource_REMOTE_LOCATION_FLAG_MSGREMOTE_LOCATION_ARGr	   InterconnectArgumentINTERCONNECT_ARGAddCreateArgsReleaseTrackdisplay_infoAddCacheUpdaterInterconnectsCompleter)clsparsers     +lib/surface/compute/interconnects/create.pyArgszCreate.ArgsS   s     	CC	     (3ff!C ''/ 557C$$VH$E	 0 0 23
''(D(DE    c                      y)Nzcompute.interconnects )selfs    r$   
CollectionzCreate.Collectionb   s    "r&   c                    t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  ||j                        }| j                  j	                  ||j
                        }| j                  j	                  ||j
                        }|j                  j                  }t        j                  ||j                        }t        j                  ||j                        }	d }
|r|j!                         }
d| _        |j%                  |j&                  ||j(                  |	|j*                  |j,                  |j!                         t        j.                  ||j0                        |j2                  |
t        j4                  ||j6                              S )N)compute_clientT)descriptioninterconnect_typerequested_link_count	link_typeadmin_enablednoc_contact_emaillocationsubzonecustomer_nameremote_locationrequested_features)r   ComputeApiHolderr   r   ResolveAsResource	resourcesr   Interconnectr   r   messagesr	   GetInterconnectTyper.   GetLinkTyper0   SelfLinkis_ccir   r-   r/   r1   r2   
GetSubzoner4   r5   GetRequestedFeaturesr7   )r)   argsholderrefinterconnectlocation_refremote_location_refr<   r.   r0   r6   s              r$   Runz
Create.Rune   sx   **4+<+<+>?F



1
1$8H8H
IC&&s6==IL$$66tV=M=MNL22DDf }}%%H11$(( !!(DNN;IO+446odk$$+!66((00&&(  4<<8((' 55d--
   r&   c                     | j                   rt        nt        }dj                  |      }t        j
                  j                  |       y )NzPlease check the provided contact email for further instructions on how to activate your Interconnect. See also {} for more detailed help.)r@   _CCI_DOCUMENTATION_LINK_DOCUMENTATION_LINKformatr
   statusPrint)r)   resources_were_displayeddocumentation_linkmessages       r$   EpilogzCreate.Epilog   s=    #';;4G 
	%%+V,>%? 
 JJWr&   )__name__
__module____qualname____doc__r   r   r   r@   classmethodr%   r*   rI   rS   r(   r&   r$   r   r   C   sC    
 ,&F F#"H
r&   r   N)!rW   
__future__r   r   r   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   0googlecloudsdk.command_lib.compute.interconnectsr	   :googlecloudsdk.command_lib.compute.interconnects.locationsr   Agooglecloudsdk.command_lib.compute.interconnects.remote_locationsr   googlecloudsdk.corer
   DETAILED_HELPr   r   rL   rK   UniverseCompatibleReleaseTracksr   ALPHABETAGACreateCommandr   detailed_helpr(   r&   r$   <module>ri      s    * &  ' 7 ? ( B ^ l #		0E    d q  T..33T5F5F5I5ILT L L^ % r&   