
    r
                         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 nsx credentials reset' command.    )absolute_import)division)unicode_literals)PrivateCloudsClient)base)flags)logzg
          Reset VMware NSX sign-in credentials associated with a VMware Engine private cloud.
        a  
          To reset sign-in credentials for NSX in private cloud `my-private-cloud`, run:


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

          Or:

            $ {command} --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)ResetzcReset VMware NSX sign-in credentials associated with a Google Cloud VMware Engine private cloud.
  c                     t        j                  |        t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       y)z Register flags for this command.TyamlN)r   AddPrivatecloudArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormat)parsers    :lib/surface/vmware/private_clouds/nsx/credentials/reset.pyArgsz
Reset.Args6   sL     
$$V,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nsx credentialsT)kindis_asyncz,waiting for nsx credentials [{}] to be reset)operation_refmessage)r   )CONCEPTSprivate_cloudParser   async_ResetNsxCredentialsr	   UpdatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr    clientr   	operationresources          r   Runz	Reset.Run>   s    MM//557M "F{{H**=9I	)../@4P&&,,Y7>EE&&(
 ' H 224;LMOr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r/    r   r   r   r   /   s%      -* *r   r   N)r3   
__future__r   r   r   +googlecloudsdk.api_lib.vmware.privatecloudsr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r4   ReleaseTracksReleaseTrackGAUpdateCommandr   r7   r   r   <module>rA      sj    . &  ' K ( 3 #		* D%%(()D  *r   