
                         n   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dZe
j                    e
j"                  e
j$                  j&                  e
j$                  j(                  e
j$                  j*                         G d de
j,                                      Zee_        y)z)Command for creating interconnect groups.    )absolute_import)division)unicode_literals)base_classes)client)base)flags)
propertiesz        *{command}* is used to create interconnect groups. An interconnect group
        connects a set of redundant interconnects between Google and the
        customer.

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

          $ {command} example-interconnect-group
          --intended-topology-capability=PRODUCTION_CRITICAL
          --description="Example interconnect group"

        It is easy to add members to an existing interconnect group after
        creation using the *add-members* command.

        To create an interconnect group capable of PRODUCTION_NON_CRITICAL, with
        two members at creation time, run:

          $ {command} example-interconnect-group
          --intended-topology-capability=PRODUCTION_NON_CRITICAL
          --interconnects=interconnect-1,interconnect-2
        )DESCRIPTIONEXAMPLESc                   0    e Zd ZdZdZed        Zd Zd Zy)CreatezCreate a Compute Engine interconnect group.

  *{command}* is used to create interconnect groups. An interconnect group
  connects a set of redundant interconnects between Google and the customer.
  Nc                     t        j                  d      | _        | j                  j                  |d       t        j                  |       t        j
                  |       t        j                  |       y )NF)pluralcreate)operation_type)r	   InterconnectGroupArgumentINTERCONNECT_GROUP_ARGAddArgumentAddDescription&AddIntendedTopologyCapabilityForCreateGetMemberInterconnectsForCreate)clsparsers     2lib/surface/compute/interconnects/groups/create.pyArgszCreate.ArgsD   sX    !&!@!@!NC**6(*K	 	008	))&1    c                      y)Nzcompute.interconnectGroups )selfs    r   
CollectionzCreate.CollectionL   s    'r   c                 
   t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  j                  j                  j                         }t        j                  |||j                  |j
                        }t        j                  |j                  j                  |j                         }|j#                  |j$                  ||j&                        S )N)compute_client	resources)descriptiontopology_capabilityinterconnects)r   ComputeApiHolderReleaseTrackr   ResolveAsResourcer$   r
   VALUEScoreproject	GetOrFailr   InterconnectGroupr	   GetTopologyCapabilitymessagesintended_topology_capabilityr   r%   r'   )r    argsholderrefr-   interconnect_groupr&   s          r   Runz
Create.RunO   s    **4+<+<+>?F

%
%
7
7f>N>N
OC$$,,668G11WV]]f>N>N  55 A A $$$$/(( %  r   )	__name__
__module____qualname____doc__r   classmethodr   r!   r7   r   r   r   r   r   7   s+    
  2 2(r   r   N)r;   
__future__r   r   r   googlecloudsdk.api_lib.computer   3googlecloudsdk.api_lib.compute.interconnects.groupsr   googlecloudsdk.callioper   7googlecloudsdk.command_lib.compute.interconnects.groupsr	   googlecloudsdk.corer
   DETAILED_HELPUniverseCompatibleReleaseTracksr)   ALPHABETAGACreateCommandr   detailed_helpr   r   r   <module>rK      s    0 &  ' 7 F ( I *8 T..33T5F5F5I5I#T # #L % r   