
    	                        S r SSKJr  SSKJr  SSKJr  SSK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  SSKJr  Sr\
R(                  " \
R*                  R,                  5      \
R.                   " S S\
R0                  5      5       5       rg)z3Command to export an Anthos clusters on VMware API.    )absolute_import)division)unicode_literalsN)vmware_clusters)base)parser_arguments)flags)util)filesz
A cluster can be exported to a file by running:

  $ {command} NAME --destination=<path-to-file>

A cluster can also be exported to stdout by running:

  $ {command} NAME
c                   f    \ rS rSrSrS\0r\S
S j5       r\S\	R                  4S j5       rS rSrg	)Export)   z(Export an Anthos on VMware user cluster.EXAMPLESc                 0    [         R                  " SSSU S9$ )N	gkeonpremv1VmwareClusterfor_help)export_utilGetSchemaPathr   s    /lib/surface/container/vmware/clusters/export.pyr   Export.GetSchemaPath0   s    $$T?X     parserc                 ~    [         R                  " U S5        [        R                  " U [        R                  SS9S9  g )Nz	to exportTr   )schema_path)r	   AddClusterResourceArgr   AddExportFlagsr   r   )r   s    r   ArgsExport.Args6   s3    	4F00$0?r   c                    UR                   R                  R                  5       n[        R                  " 5       nUR                  U5      nUR                  (       aN  [        R                  " UR                  5       n[        R                  " UUU R                  5       S9  S S S 5        g [        R                  " U[        R                  U R                  5       S9  g ! , (       d  f       g = f)N)messagestreamr   )CONCEPTSclusterParseapisClustersClientDescribedestinationr   
FileWriterr   r   r   sysstdout)selfargscluster_refclientuser_clusterr$   s         r   Run
Export.Run=   s    --''--/K  "F??;/LD,,- **,	
 .- ((* .-s   <%C
C+ N)F)__name__
__module____qualname____firstlineno____doc__	_EXAMPLESdetailed_helpstaticmethodr   r   ArgumentInterceptorr    r4   __static_attributes__r6   r   r   r   r   )   sJ     1y)- 
 #77  r   r   )r;   
__future__r   r   r   r-   *googlecloudsdk.api_lib.container.gkeonpremr   r(   googlecloudsdk.callioper   r   +googlecloudsdk.command_lib.container.vmwarer	   !googlecloudsdk.command_lib.exportr
   r   googlecloudsdk.core.utilr   r<   ReleaseTracksReleaseTrackALPHAHiddenCommandr   r6   r   r   <module>rL      sq    : &  ' 
 N ( 4 = A *	 D%%++,#T\\ #  -#r   