
    t                         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  G d de	j$                        Zy)z3Command for listing named ports in instance groups.    )absolute_import)division)unicode_literals)base_classes)instance_groups_utils)base)flags)scope)
propertiesc                   >    e Zd ZdZed        Zd Zej                  Z	y)GetNamedPortsz=Implements get-named-ports command, alpha, and beta versions.c                 x    t         j                  j                  |        | j                  j	                  d       y )Nztable(name, port))instance_groups_flagsMULTISCOPE_INSTANCE_GROUP_ARGAddArgumentdisplay_info	AddFormat)parsers    >lib/surface/compute/instance_groups/managed/get_named_ports.pyArgszGetNamedPorts.Args!   s+    77CCFK
!!"56    c           	         t        j                  | j                               }t        j                  j
                  j                  j                  d      }t        j                  j                  ||j                  t        j                  j                  t        j                   |j"                  |            }t%        j&                  ||j"                        S )z$Retrieves response with named ports.T)required)default_scopescope_lister)r   ComputeApiHolderReleaseTrackr   VALUEScoreprojectGetr   r   ResolveAsResource	resourcescompute_scope	ScopeEnumZONEr	   GetDefaultScopeListerclientr   OutputNamedPortsForGroup)selfargsholderr    	group_refs        r   RunzGetNamedPorts.Run&   s    **4+<+<+>?F$$,,00$0?G;;MM&""'116644w( 	N 	)  !996==" "r   N)
__name__
__module____qualname____doc__staticmethodr   r.   r   +INSTANCE_GROUP_GET_NAMED_PORT_DETAILED_HELPdetailed_help r   r   r   r      s,    E7 7" GG r   r   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r
   r$   2googlecloudsdk.command_lib.compute.instance_groupsr   googlecloudsdk.corer   ListCommandr   r6   r   r   <module>r>      s<    : &  ' 7 @ ( 4 E ] *ID$$ Ir   