
    i                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  \R                  r
SSS	.r\R                  " \R                  R                  5      \R                   " S
 S\R                   5      5       5       rg)z#'vmware datastores create' command.    )
datastores)arg_parsers)base)flags)logz
          Create a datastore. Datastore creation is considered finished when the datastore is in ACTIVE state. Check the progress of a datastore using `{parent_command} list`.
        a  
          To create a datastore named `my-datastore` in `us-west2-a` connected to filestore instance `projects/my-project/locations/us-west2-a/instances/my-filestore-instance`, run:

          $ {command} my-datastore --location=us-west2-a --project=my-project --filestore=projects/my-project/locations/us-west2-a/instances/my-filestore-instance

          Or:

          $ {command} my-datastore --filestore=projects/my-project/locations/us-west2-a/instances/my-filestore-instance

          Or:

          $ {command} my-datastore --netapp=projects/my-project/locations/us-west2-a/volumes/my-netapp-volume

          Or:

          $ {command} my-datastore --third-party-nfs-network=my-network --third-party-nfs-file-share=my-fileshare --third-party-nfs-servers=10.0.0.1,10.0.0.2 --location=us-west2-a --project=my-project

          In the second example, the project and location are taken from gcloud properties core/project and compute/zone.
    )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create3   zCreate a datastore.c           	         [         R                  " U SS9  [        R                  R	                  U 5        [        R                  R                  U S5        U R                  R                  S5        U R                  SSS9  U R                  SSS9nUR                  SS	S9  UR                  S
SS9  UR                  5       nUR                  SSSS9  UR                  SSSS9  UR                  SSS[        R                  " SS9SS9  g)z Register flags for this command.T)
positionalyamlz--descriptionz/        Text describing the datastore.
        )help)mutexrequiredz--netappz>        Google NetApp volume to be used as datastore.
        z--filestorezC        Google Filestore instance to be used as datastore.
        z--third-party-nfs-networkz+        Network name of NFS's VPC.
        )r   r   z--third-party-nfs-file-sharez*        Mount folder name of NFS.
        z--third-party-nfs-serverszU        Comma-separated list of server IP addresses of the NFS file service.
           )
min_lengthSERVER)r   r   typemetavarN)r   AddDatastoreArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument	add_groupr   ArgList)parserdatastore_type_groupthird_party_nfs_groups      'lib/surface/vmware/datastores/create.pyArgsCreate.Args:   sC    
!!&T:OO'OOvt,
!!&)
   "++ ,  %% &  %% &  1::<&&# '  &&& '  &&#   A. '     c           
      *   UR                   R                  R                  5       n[        5       nUR                  nUR                  UUR                  UR                  UR                  UR                  UR                  UR                  S9nU(       a!  [        R                  " UR                  SSS9  g UR                  UR!                  U5      SR#                  UR%                  5       5      S9n[        R                  " UR%                  5       SS9  U$ )N)descriptionnetapp_volumefilestore_instancethird_party_nfs_networkthird_party_nfs_file_sharethird_party_nfs_servers	datastoreT)kindis_asyncz(waiting for datastore [{}] to be created)operation_refmessage)r0   )CONCEPTSr/   ParseDatastoresClientasync_r   r)   netapp	filestorer,   r-   r.   r   CreatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr/   clientr1   	operationresources          r$   Run
Create.Runp   s    ''--/IF{{H$$kk>> $ < <#'#B#B $ < <  I 	)..{TJ&&,,Y7:AA""$
 ' H 	..0{COr'    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr%   rE   __static_attributes__rG   r'   r$   r   r   3   s$     -3 3jr'   r   N)rL   googlecloudsdk.api_lib.vmwarer   googlecloudsdk.callioper   r   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer   r6   rM   ReleaseTracksReleaseTrackGADefaultUniverseOnlyCreateCommandr   rG   r'   r$   <module>rZ      s    * 5 / ( 3 #.. 	4 D%%(()ST S  *Sr'   