
                             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 networks update' command.    )absolute_import)division)unicode_literals)NetworksClient)base)flags)logz3
          Update a VMware Engine network.
        a  
          To update a network named `my-network` of type `STANDARD` by changing its description to `Example description`, run:

            $ {command} my-network --location=global --project=my-project --description='Example description'

          Or:

            $ {command} my-network --description='Example description'

          In the second example, the project is taken from gcloud properties core/project and the location is taken as `global`.

          To update a network named `my-network` of type `LEGACY` by changing its description to `Example description`, run:

            $ {command} my-network --location=us-west2 --project=my-project --description='Example description'

          Or:

            $ {command} my-network --location=us-west2 --description='Example description'

          In the last example, the project is taken from gcloud properties core/project. For VMware Engine networks of type `LEGACY`, you must always specify a region as the location.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Updatez,Update a Google Cloud VMware Engine network.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--descriptionz:        Text describing the VMware Engine network
        )helpN)	r   AddNetworkToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsers    %lib/surface/vmware/networks/update.pyArgszUpdate.Args>   si     
V5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VMware Engine networkT)kindis_asyncz4waiting for VMware Engine network [{}] to be updated)operation_refmessage)r   )CONCEPTSvmware_engine_networkParser   async_r   r   r	   UpdatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsnetworkclientr    	operationresources          r   Runz
Update.RunK   s    mm11779GF{{Hg43C3CDI	
..6G&&,,Y7FMM  "
 ' H ,,.5LMOr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r3    r   r   r   r   8   s!    4-
 
r   r   N)r7   
__future__r   r   r   &googlecloudsdk.api_lib.vmware.networksr   googlecloudsdk.callioper   *googlecloudsdk.command_lib.vmware.networksr   googlecloudsdk.corer	   r8   ReleaseTracksReleaseTrackGAUpdateCommandr   r;   r   r   <module>rE      sj    ( &  ' A ( < #		< D%%(()#T # *#r   