
                            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  G d dej                        Z G d dej                        Zd Z ej&                  ej(                  j*                  ej(                  j,                  ej(                  j.                         G d dej0                               Zy)z#The gcloud emulators spanner group.    )absolute_import)division)unicode_literals)base)spanner_util)util)
exceptions)files)	platformsc                       e Zd Zy)UnsupportedPlatformErrorN__name__
__module____qualname__     )lib/surface/emulators/spanner/__init__.pyr   r          r   r   c                       e Zd Zy)DockerNotFoundErrorNr   r   r   r   r   r   !   r   r   r   c                      t        j                  d      } | sAt        dj                  t        j
                  j                         j                              y )Ndockerz]To use the Cloud Spanner Emulator on {platform}, docker must be installed on your system PATH)platform)r
   FindExecutableOnPathr   formatr   OperatingSystemCurrentname)docker_paths    r   _RequireDockerInstalledr!   %   sU    **84+	
	77=v..668== 8> 8?@ @ 
r   c                       e Zd ZdZddiZd Zy)SpannerztManage your local Spanner emulator.

  This set of commands allows you to start and use a local Spanner emulator.
  EXAMPLESza          To start a local Cloud Spanner emulator, run:

            $ {command} start
          c                     t         j                  j                         }|t         j                  j                  u r3t	        j
                  t        j                  t        j                         y t                y )N)
r   r   r   LINUXr   EnsureComponentIsInstalledr   SPANNER_EMULATOR_COMPONENT_IDSPANNER_EMULATOR_TITLEr!   )selfcontextargs
current_oss       r   FilterzSpanner.Filter@   sR    **224JY..444
%%

4
4

-
-/ r   N)r   r   r   __doc__detailed_helpr.   r   r   r   r#   r#   .   s     - r   r#   N)r/   
__future__r   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.emulatorsr   r   googlecloudsdk.corer	   googlecloudsdk.core.utilr
   r   Errorr   r   r!   ReleaseTracksReleaseTrackALPHABETAGAGroupr#   r   r   r   <module>r=      s    * &  ' ( = 5 * * .z// *** @ D%%++T->->-C-C%%((* djj  * r   