
    &                        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
S.r\R                  \R                  " \R                   R"                  5       " S S\R$                  5      5       5       r\R                  \R                  " \R                   R(                  5       " S S\5      5       5       rg)z Command for creating multi-MIGs.    )absolute_import)division)unicode_literals)base_classes)utils)basez!Create a Compute Engine multi-MIGz<        *{command}* creates a Compute Engine multi-MIG.
    az        Running:

              $ {command} example-multimig --workload-policy=example-policy

      will create a multi-MIG called 'example-multimig'
      with a workload policy called 'example-policy' in the region and project which were set by `gcloud config set`.

      You can provide full path to multi-MIG name to override the region and
      project or use `--region` and `--project` flags.

      Example:

              $ {command} projects/example-project/regions/us-central1/multiMigs/example-multimig --workload-policy=example-policy --description="Multi-MIG with workload policy"

      will create a multi-MIG called 'example-multimig'
      in the region `us-central1` and project 'example-project' with a
      workload policy called 'projects/example-project/regions/us-central1/resourcePolicies/example-policy' and a description of 'Multi-MIG with workload policy'.
    )briefDESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create6   Create a multi-MIG.c                     [         R                  " U [        R                  R                  R
                  R                  5       5        U R                  SSS9  U R                  SSS9  g )N--descriptionSets description to multi-MIG.help--workload-policyz*Specifies a workload policy for multi-MIG.r   AddMultiMigNameArgToParserr   ReleaseTrackALPHAnameloweradd_argument)parsers    (lib/surface/compute/multi_migs/create.pyArgsCreate.Args=   sf    	$$!!'',,224 -   9      c                    [         R                  " U R                  5       5      nUR                  nUR                  nUR
                  R                  R                  5       nUR                  R                  UR                  5       UR                  UR                  [        R                  " XUR                  U5      S9n[        R                   " X6U5      $ )zCreates a multi-MIG.

Args:
  args: the argparse arguments that this command was invoked with.

Returns:
  List containing one resource.
)r   descriptionregionresourcePolicies)r   ComputeApiHolderr   client	resourcesCONCEPTS	multi_migParsemessagesMultiMigNamer#   r$   r   MakeResourcePolicy	api_utilsInsert)selfargsholderr'   r(   multi_mig_refr*   s          r   Run
Create.RunK   s     **4+<+<+>?F]]F  IMM++113M((!$$##11V__m
	 ) I F}==r!    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r6   __static_attributes__r8   r!   r   r   r   6   s#     - >r!   r   c                   (    \ rS rSrSr\S 5       rSrg)CreateAlphac   r   c                     [         R                  " U[        R                  R                  R
                  R                  5       5        UR                  SSS9  UR                  SSS9  g )Nr   r   r   r   zLTaking the resource policy ID and specifies a workload policy for multi-MIG.r   )clsr   s     r   r   CreateAlpha.Argsh   sh    	$$!!'',,224 -     r!   r8   N)r9   r:   r;   r<   r=   classmethodr   rA   r8   r!   r   rC   rC   c   s      r!   rC   N)r=   
__future__r   r   r   googlecloudsdk.api_lib.computer   )googlecloudsdk.api_lib.compute.multi_migsr   r0   googlecloudsdk.callioper   -googlecloudsdk.command_lib.compute.multi_migsr>   DefaultUniverseOnlyReleaseTracksr   BETACreateCommandr   r   rC   r8   r!   r   <module>rR      s    ' &  ' 7 H ( ? 16 D%%**+(>T (> , (>V D%%++,&  - r!   