Ë
    €Ï<  ã                   ób   — 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„ Zd	„ Zd
„ Zy)zHelpers for compute diagnose.é    )Úabsolute_import)Údivision)Úunicode_literals)Ú	ssh_utils)Úlog)Úresource_printerc                 óð   — | s t         j                  j                  d«       yt         j                  j                  d«       t        j                  | d«       t         j                  j                  d«       y)z?Prints the list of instances to which the command will work on.zNo instances found.Nz1The command will run for the following instances:ztable(name, zone)Ú )r   ÚoutÚPrintr   )Ú	instancess    úClib/googlecloudsdk/command_lib/compute/diagnose/internal_helpers.pyÚPrintHeaderr      sK   € á	Ü‡GG‡MMÐ'Ô(Ø
ä‡''‡--ÐCÔDÜ×Ñ˜Ð$7Ô8Ü‡''‡--Õó    c                 ój   — t        j                  | «      }dj                  | j                  |¬«      }|S )z³Returns a string that identifies the instance.

  Args:
    instance: The instance proto.

  Returns:
    A string that identifies the zone and the external ip of the instance.
  z![{instance_name}] ({instance_ip}))Úinstance_nameÚinstance_ip)r   ÚGetExternalIPAddressÚformatÚselfLink)ÚinstanceÚexternal_ipÚresults      r   ÚGetInstanceNetworkTitleStringr   %   s<   € ô ×.Ñ.¨xÓ8€+à.×5Ñ5Ø×%Ñ%Øð 6ó €&ð 
€-r   c                 ó\   — |j                  | j                  d¬«      }|j                  «       S )Nzcompute.zones)Ú
collection)ÚParseÚzoneÚName)r   Úresource_registryÚzone_refs      r   ÚGetZoneFromInstancer"   6   s'   € Ø×$Ñ$ X§]¡]¸Ð$ÓO€(Ø	‰‹Ðr   N)Ú__doc__Ú
__future__r   r   r   Ú"googlecloudsdk.command_lib.computer   Úgooglecloudsdk.corer   Úgooglecloudsdk.core.resourcer   r   r   r"   © r   r   Ú<module>r)      s+   ðñ $å &Ý Ý 'å 8Ý #Ý 9òòó"r   