
    7                         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y)z+'vmware hcx activationkeys create' command.    )absolute_import)division)unicode_literals)HcxActivationKeysClient)base)flags)logz
          Create a HCX activation key in a VMware Engine private cloud. Successful creation of a HCX activation key results in a HCX activation key in AVAILABLE state. Check the progress of a HCX activation key using `{parent_command} list`.
        a  
          To create a HCX activation key called `key1` in private cloud `my-private-cloud` in zone `us-west2-a`, run:

            $ {command} key1 --location=us-west2-a --project=my-project --private-cloud=my-private-cloud

            Or:

            $ {command} my-cluster --private-cloud=my-private-cloud

          In the second example, the project and location are taken from gcloud properties core/project and compute/zone.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Createz0Create a Google Cloud VMware HCX activation key.c                     t        j                  |        t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       y)z Register flags for this command.TyamlN)r   AddHcxActivationKeyArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormat)parsers    >lib/surface/vmware/private_clouds/hcx/activationkeys/create.pyArgszCreate.Args4   sL     
((0OO'OOvt,
!!&)    c                    |j                   j                  j                         }t               }|j                  }|j                  |      }|r#t        j                  |j                  dd       y |j                  |j                  |      dj                  |j                                     }t        j                  |j                         d       |S )Nzhcx activation keyT)kindis_asyncz1waiting for hcx activation key [{}] to be created)operation_refmessage)r   )CONCEPTShcx_activation_keyParser   async_r   r	   CreatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr    clientr   	operationresources          r   Runz
Create.Run<   s    99??A$&F{{H01I	
..3dD&&,,Y7CJJ++-/ ' 0H '')0D Or   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r.    r   r   r   r   .   s!    8-* *r   r   N)r2   
__future__r   r   r   /googlecloudsdk.api_lib.vmware.hcxactivationkeysr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r3   ReleaseTracksReleaseTrackGACreateCommandr   r6   r   r   <module>r@      sj    2 &  ' S ( 3 #	
	( D%%(()T  *r   