
                             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S	.r
\R                  " \R                  R                  5       " S
 S\R                  5      5       rg)z&'vmware logging-server create command.    )LoggingServersClient)arg_parsers)base)flags)logzl
        Create a logging-server in a VMware Engine private cloud to forward VCSA or ESXI logs to it.
      a  
        To create a logging-server called `my-logging-server` in private cloud `my-private-cloud`, with source type `ESXI`, host name `192.168.0.30`, protocol `UDP` and port `514`, run:

          $ {command} my-logging-server --location=us-west2-a --project=my-project --private-cloud=my-private-cloud --source-type=ESXI --hostname=192.168.0.30 --protocol=UDP --port=514

          Or:

          $ {command} my-logging-server --private-cloud=my-private-cloud --source-type=ESXI --hostname=192.168.0.30 --protocol=UDP --port=514

          In the second example, the project and location are taken from gcloud properties core/project and compute/zone.
  )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create*   z3Create a Google Cloud VMware Engine logging-server.c                    [         R                  " U 5        [        R                  R	                  U 5        [        R                  R                  U S5        U R                  R                  S5        U R                  SSSS9  U R                  SSSS/S	S
9  U R                  S/ SQSSS9  U R                  SS[        R                  " SS5      SS9  g)z Register flags for this command.Tyamlz
--hostnamezX        Fully-qualified domain name (FQDN) or IP Address of the logging server.
        )requiredhelpz--source-typeVCSAESXIz|            The type of component that produces logs that will be forwarded
            to this logging server.
            )r   choicesr   z
--protocol)UDPTCPTLSSSLRELPzf            Defines possible protocols used to send logs to
            a logging server.
            )r   r   r   z--portr   i  zG        Port number at which the logging server receives logs.
        )r   typer   N)r   AddLoggingServerArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argumentr   
BoundedInt)parsers    ;lib/surface/vmware/private_clouds/logging_servers/create.pyArgsCreate.Args0   s     
%%f-OO'OOvt,
!!&)
    	   4	   ##Au-	      c                    UR                   R                  R                  5       n[        5       nUR                  nUR                  UUR                  UR                  UR                  UR                  5      nU(       a!  [        R                  " UR                  SSS9  g UR                  UR                  U5      SR                  UR!                  5       5      S9n[        R                  " UR!                  5       SS9  U$ )Nzlogging-serverT)kindis_asyncz-waiting for logging-server [{}] to be created)operation_refmessage)r(   )CONCEPTSlogging_serverParser   async_r   hostnamesource_typeprotocolportr   CreatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr-   clientr)   	operationresources          r#   Run
Create.RunY   s    ]]11779N!#F{{H		I 	)../?$O&&,,Y7?FF'')
 ' H 335<LMOr&    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr$   r?   __static_attributes__rA   r&   r#   r   r   *   s"    ; -& &Pr&   r   N)rF   ,googlecloudsdk.api_lib.vmware.loggingserversr   googlecloudsdk.callioper   r   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer   rG   ReleaseTracksReleaseTrackGACreateCommandr   rA   r&   r#   <module>rS      sh    - N / ( 3 #

	$ D%%(()DT D *Dr&   