
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  \R                  " \R                  R                  \R                  R                  \R                  R                  5       " S S	\R                  5      5       rg
)z'gcloud emulators spanner start command.    )absolute_import)division)unicode_literals)arg_parsers)base)spanner_utilc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Start   z[Start a local Cloud Spanner emulator.

This command starts a local Cloud Spanner emulator.
EXAMPLESz[          To start a local Cloud Spanner emulator, run:

            $ {command}
          c                    U R                  SSS SS9  U R                  SS[        R                  " SS5      S	S9  U R                  S
S[        R                  " 5       SS9  U R                  SS[        R                  " 5       SSS9  g )Nz--host-portFc                 >    [         R                  R                  U SS9$ )NT)ipv6_enabled)r   HostPortParse)args    &lib/surface/emulators/spanner/start.py<lambda>Start.Args.<locals>.<lambda>0   s    --33Cd3K    a  The host:port to which the emulator should be bound. The default value is localhost:9010. Note that this port serves gRPC requests. To override the default port serving REST requests, use --rest-port. If using Docker to run the emulator, the host must be specified as an ipaddress.)requiredtypehelpz--rest-port   i  zyThe port at which REST requests are served. gcloud uses REST to communicate with the emulator. The default value is 9020.z--use-dockera  Use the Cloud Spanner emulator docker image even if the platform has a native binary available in the gcloud CLI. Currently we only provide a native binary for Linux. For other systems, you must install Docker for your platform before starting the emulator.z--enable-fault-injectionzvIf true, the emulator will randomly inject faults into transactions. This facilitates application abort-retry testing.)r   r   r   default)add_argumentr   
BoundedInt
ArgBoolean)parsers    r   Args
Start.Args+   s    
K	   ##Au-D	  E ##%I	  J "##%J  r   c                     UR                   (       d  [        R                  " SS5      Ul         UR                  (       d  SUl        [        R
                  " U5        g )N	localhost9010i<#  )	host_portr   r   	rest_portr   r
   )selfargss     r   Run	Start.RunL   s9    >>"++K@dn>>dntr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr    r)   __static_attributes__r+   r   r   r
   r
      s2     -  @r   r
   N)r0   
__future__r   r   r   googlecloudsdk.callioper   r   $googlecloudsdk.command_lib.emulatorsr   ReleaseTracksReleaseTrackALPHABETAGACommandr
   r+   r   r   <module>r=      sq    . &  ' / ( = D%%++T->->-C-C%%((*6DLL 6*6r   