
    
                     *   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	lmZ ddlmZ dd
lmZ dZ e	j&                  e	j(                  j*                  e	j(                  j,                         G d de	j.                               Zy)z:Command to generate install manifest for Attached cluster.    )absolute_import)division)unicode_literals)	locations)base)flags)resource_args)endpoint_util)logaa  
To generate install manifest for cluster named ``my-cluster'' managed in location ``us-west1'', run:

$ {command} my-cluster --location=us-west1 --platform-version=PLATFORM_VERSION

To store the manifest in a file named ``manifest.yaml'', run:

$ {command} my-cluster --location=us-west1 --platform-version=PLATFORM_VERSION --output-file=manifest.yaml
c                   .    e Zd ZdZdeiZed        Zd Zy)Describez2Generate Install Manifest for an Attached cluster.EXAMPLESc                     t        j                  | d       t        j                  |        t        j                  |        t        j                  | d       y)z!Registers flags for this command.zto generate install manifestzto store manifestN)r	   AddAttachedClusterResourceArgattached_flagsAddPlatformVersionAddProxyConfigr   AddOutputFile)parsers    Dlib/surface/container/attached/clusters/generate_install_manifest.pyArgszDescribe.Args.   sG     //. %%f-!!&)	 34    c                    t        j                  |      j                  }t        j                  |      5  t        j                  |      }t        j                         }|j                  ||      }|j                  r8t        j                  |j                  |j                  ddd       	 ddd       y|cddd       S # 1 sw Y   yxY w)z+Runs the generate-install-manifest command.)argsTF)	overwritebinaryprivateN)r	   ParseAttachedClusterResourceArglocationsIdr
   GkemulticloudEndpointOverrideapi_utilLocationsClientGenerateInstallManifestoutput_filer   WriteToFileOrStdoutmanifest)selfr   locationcluster_refclientresps         r   RunzDescribe.Run9   s    <<TBNNH		4	4X	>!AA$Gk'')f++Kd+Cd			MM	
  
?	>  
?	>	>s   A8C6CC
N)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr   r,    r   r   r   r   (   s&    :y)-5 5r   r   N)r0   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r!   googlecloudsdk.callioper   -googlecloudsdk.command_lib.container.attachedr   r   r	   2googlecloudsdk.command_lib.container.gkemulticloudr
   googlecloudsdk.corer   r1   ReleaseTracksReleaseTrackALPHAGACommandr   r4   r   r   <module>r@      sw    A &  ' P ( Q G L D #	 D%%++T->->-A-AB!t|| ! C!r   