
                         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)z4Command for creating interconnect attachment groups.    )absolute_import)division)unicode_literals)base_classes)client)base)flags)
propertiesa          *{command}* is used to create interconnect attachment groups. An
        interconnect attachment group connects a set of redundant interconnect
        attachments between Google and the customer.

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

          $ {command} example-attachment-group
          --intended-availability-sla=PRODUCTION_CRITICAL
          --description="Example interconnect attachment group"

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

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

          $ {command} example-attachment-group
          --intended-availability-sla=PRODUCTION_NON_CRITICAL
          --attachments=region-1/attachment-1,region-2/attachment-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 attachment group.

  *{command}* is used to create interconnect attachment groups. An interconnect
  attachment group connects a set of redundant interconnect attachments 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	   #InterconnectAttachmentGroupArgumentATTACHMENT_GROUP_ARGAddArgumentAddDescription#AddIntendedAvailabilitySlaForCreate)GetMemberInterconnectAttachmentsForCreate)clsparsers     >lib/surface/compute/interconnects/attachments/groups/create.pyArgszCreate.ArgsF   s]    $HH C (((I	 	--f5	33F;    c                      y)Nz$compute.interconnectAttachmentGroups )selfs    r   
CollectionzCreate.CollectionP   s    1r   c                 4   t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  j                  j                  j                         }t        j                  |||j                  |j
                        }t        j                  |j                  j                  |j                         }t        j"                  |j$                        }|j'                  |j(                  ||      S )N)compute_client	resources)descriptionavailability_slaattachments)r   ComputeApiHolderReleaseTrackr   ResolveAsResourcer$   r
   VALUEScoreproject	GetOrFailr   InterconnectAttachmentGroupr	   GetIntendedAvailabilitySlamessagesintended_availability_slaParseAttachmentsr'   r   r%   )r    argsholderrefr-   attachment_groupr&   r'   s           r   Runz
Create.RunS   s    **4+<+<+>?F

#
#
5
5dF<L<L
MC$$,,668G99WV]]f>N>N 77 > > (()9)9:K""$$) #  r   )	__name__
__module____qualname____doc__r   classmethodr   r!   r8   r   r   r   r   r   8   s+    
 < <2r   r   N)r<   
__future__r   r   r   googlecloudsdk.api_lib.computer   ?googlecloudsdk.api_lib.compute.interconnects.attachments.groupsr   googlecloudsdk.callioper   Cgooglecloudsdk.command_lib.compute.interconnects.attachments.groupsr	   googlecloudsdk.corer
   DETAILED_HELPUniverseCompatibleReleaseTracksr)   ALPHABETAGACreateCommandr   detailed_helpr   r   r   <module>rL      s    ; &  ' 7 R ( U *: T..33T5F5F5I5I'T ' 'T % r   