Python Scripts

lager python

Run a python script on the gateway

lager python [OPTIONS] [RUNNABLE] [ARGS]...

Options

--dut <dut>

ID of DUT

--image <image>

Docker image to use for running script

Default:

lagerdata/gatewaypy3:v0.1.84

--env <env>

Environment variables to set for the python script. Format is --env FOO=BAR - this will set an environment varialbe named FOO to the value BAR

--passenv <passenv>

Environment variables to inherit from the current environment and pass to the python script. This option is useful for secrets, tokens, passwords, or any other values that you do not want to appear on the command line. Example: --passenv FOO will set an environment variable named FOO in the python script to the valueof FOO in the current environment.

--kill

Terminate a running python script

--download <download>

Download named files from gateway after script completes

--allow-overwrite

Allow overwriting existing files with --download

--signal <signum>

Signal to use with --kill

Default:

SIGTERM

Options:

SIGINT | SIGQUIT | SIGABRT | SIGKILL | SIGUSR1 | SIGUSR2 | SIGTERM | SIGSTOP

--timeout <timeout>

Max runtime in seconds for the python script

-d, --detach

Detach

-p, --port <port>

Forward ports to the lager python process. Syntax: -p SRC_PORT[:DST_PORT][/PROTOCOL]. Example: -p 1234:4567/udp to forward UDP traffic on port 1234 to port 4567 in the lager python process. To forward traffic to the same port in the container, simply use -p PORT e.g. -p 1234 to forward all traffic on port 1234 to port 1234 in the lager python process.

--add-file <add_file>

Add files to folder before upload

Arguments

RUNNABLE

Optional argument

ARGS

Optional argument(s)