
                             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ee_        y)z+'vmware sddc privateclouds create' command.    )absolute_import)division)unicode_literals)PrivatecloudsClient)base)labels_util)flagsa  
          Update a VMware Engine private cloud. Private cloud update is
          considered finished when the private cloud is in READY state. Check
          the progress of a private cloud using
          `gcloud alpha vmware privateclouds list`.
        a8  
          To update a private cloud called ``my-privatecloud'' in project
          ``my-project'' and region ``us-central1'', run:

            $ {command} my-privatecloud --project=my-project --region=us-central1 --external-ip-access --labels=owner=sample-user,purpose=test --description=test

          Or:

            $ {command} my-privatecloud --external-ip-access --labels=owner=sample-user,purpose=test --description=test

          In the second example, the project and region are taken from gcloud
          properties core/project and vmware/region.
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Createz%Update a VMware Engine private cloud.c                     t        j                  | d       | j                  dd       | j                  dddd	
       t        j                  |        y)z Register flags for this command.T)
positionalz--descriptionz2        Text describing the private cloud
        )helpz--external-ip-access
store_trueNze        Enable public ips for management vms.
        Use --no-external-ip-access to disable
        )actiondefaultr   )r	   AddPrivatecloudArgToParseradd_argumentr   AddCreateLabelsFlags)parsers    /lib/surface/vmware/sddc/privateclouds/update.pyArgszCreate.Args7   sb     
$$V=
  
 	   $$V,    c                    |j                   j                  j                         }t               }|j	                  ||j
                  |j                  |j                        }|j                  |dj                  |            S )N)labelsdescriptionexternal_ip_accessz+waiting for privatecloud [{}] to be updated)
CONCEPTSprivatecloudParser   Updater   r   r   WaitForOperationformat)selfargsr    client	operations        r   Runz
Create.RunJ   sx    ==--335L "Fl4;;*.*:*:151H1H  JI ""5<<\JL Lr   N)__name__
__module____qualname____doc__staticmethodr   r)    r   r   r   r   3   s    -- -$Lr   r   N)r-   
__future__r   r   r   0googlecloudsdk.api_lib.vmware.sddc.privatecloudsr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.util.argsr   &googlecloudsdk.command_lib.vmware.sddcr	   DETAILED_HELPReleaseTracksReleaseTrackALPHAUpdateCommandr   detailed_helpr/   r   r   <module>r;      sx    2 &  ' P ( < 8		2 D%%++,LT L -LB % r   