
    
                         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 private-clouds update' command.    )absolute_import)division)unicode_literals)PrivateCloudsClient)base)flags)logz9
          Update a VMware Engine private cloud.
        a  
          To update a private cloud named `my-private-cloud` by changing its description to `Example description` run:

            $ {command} my-private-cloud --location=us-west2-a --project=my-project --description='Example description'

          Or:

            $ {command} my-private-cloud --description='Example description'

          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)Updatez2Update a Google Cloud VMware Engine private cloud.c                    t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       | j                  dd       y)z Register flags for this command.T)
positionalyamlz--descriptionz2        Text describing the private cloud
        )helpN)	r   AddPrivatecloudArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsers    +lib/surface/vmware/private_clouds/update.pyArgszUpdate.Args5   si     
$$V=OO'OOvt,
!!&)
      c                    |j                   j                  j                         }t               }|j                  }|j                  ||j                        }|r#t        j                  |j                  dd       y |j                  |j                  |      dj                  |j                                     }t        j                  |j                         d       |S )N)descriptionzprivate cloudT)kindis_asyncz,waiting for private cloud [{}] to be updated)operation_refmessage)r   )CONCEPTSprivate_cloudParser   async_r   r   r	   UpdatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsprivatecloudclientr    	operationresources          r   Runz
Update.RunB   s    ==..446L "F{{Hl8H8HII	)..N&&,,Y7>EE%%') ' *H 113/JOr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r3    r   r   r   r   /   s!    :-
 
r   r   N)r7   
__future__r   r   r   +googlecloudsdk.api_lib.vmware.privatecloudsr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r8   ReleaseTracksReleaseTrackGAUpdateCommandr   r;   r   r   <module>rE      sj    . &  ' K ( 3 #		* D%%(() T   * r   