
                             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dZ ej                   ej"                  j$                         G d dej&                               Zy)z%'vmware private-clouds list' command.    )absolute_import)division)unicode_literals)PrivateCloudsClient)base)flags)	resources)resource_projectorz6
          List VMware Engine private clouds.
        a  
          To list VMware Engine operations in the location `us-west2-a`, run:

            $ {command} --location=us-west2-a

          Or:

            $ {command}

          In the second example, the location is taken from gcloud properties compute/zone.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Listz/List Google Cloud VMware Engine private clouds.c                 d    t        j                  |        | j                  j                  d       y)z Register flags for this command.aO  table(name.segment(-1):label=NAME,name.segment(-5):label=PROJECT,name.segment(-3):label=LOCATION,createTime,state,vcenter.fqdn:label=VCENTER_FQDN,type,managementCluster.stretchedClusterConfig.preferredLocation.segment(-1):label=PREFERRED_ZONE,managementCluster.stretchedClusterConfig.secondaryLocation.segment(-1):label=SECONDARY_ZONE)N)r   AddLocationArgToParserdisplay_info	AddFormat)parsers    )lib/surface/vmware/private_clouds/list.pyArgsz	List.Args3   s+     
  (
!!	 	    c              #   .  K   |j                   j                  j                         }t               }|j	                  |      }|D ]  }t        j                  |      }|j                  d      s-|j                  j                  j                  j                  |d<   |j                  d      dk(  r`|j                  d      j                  d      }t        j                  j                  d|d   |d   |d   	      }|j!                  |      |d
<   |  y w)Ntype	STRETCHEDname/z-vmwareengine.projects.locations.privateClouds)
projectsIdlocationsIdprivateCloudsIdmanagementCluster)CONCEPTSlocationParser   r   r
   MakeSerializablegetmessagesPrivateCloudTypeValueValuesEnumSTANDARDsplitr	   REGISTRYCreateGetManagementCluster)	selfargsr$   clientitemsitemprivate_cloudprivate_cloud_nameprivate_cloud_resources	            r   RunzList.RunB   s    }}%%++-H "FKK!E(99$?mv&OO((<<EE 	f 
		6	"k	1 +..v6<<SA!*!3!3!:!:;)"-*2..r2	 "; "
 .4-H-H".
)* ' s   DDN)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r8    r   r   r   r   -   s!    7- r   r   N)r<   
__future__r   r   r   +googlecloudsdk.api_lib.vmware.privatecloudsr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   googlecloudsdk.core.resourcer
   r=   ReleaseTracksReleaseTrackGAListCommandr   r@   r   r   <module>rK      sm    , &  ' K ( 3 ) ;
	$ D%%((),4 , *,r   