cadet.cli

CADET command-line interface.

What this is for:
The cadet command. Subcommands:
  • validate / show: check and inspect a config.

  • serve / client / load: run a single role process (used by the orchestrator, or by hand).

  • run / sweep: orchestrate a whole run / matrix (start servers + clients, collect, tear down; sweep resumes completed cells).

  • status: report orchestrator-started processes.

  • dashboard: serve a local page over a tree of run directories.

  • variance: reduce a run tree’s repetitions into one variance report.

  • summarize / ask: read a run or a sweep and put it to a model.

  • down: recover from a run that never reached its teardown, removing the processes, containers, networks, namespaces, bridges, veths and qdiscs CADET owns.

What it contains:
How it fits into CADET:

Thin front-end over cadet.config.loader. Exposed as the cadet console script and runnable as python -m cadet. Returns a process exit code (0 ok, non-zero on error) so it composes in scripts and CI.

How to configure it:

cadet validate path/to/config.yaml [--set a.b=1 --set c=d].

cadet.cli.cmd_validate(args)

Validate a config file; print a summary or readable errors.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_show(args)

Print one resolved run config as YAML (sweep run --run).

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_serve(args)

Run a server node for a config (blocks serving one client).

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_client(args)

Run a client node for a config (blocks until the run ends).

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_load(args)

Run the load generator (N synthetic clients -> server(s)).

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_run(args)

Orchestrate one run: preflight, start servers+clients, collect, tear down.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_emulate(args)

Run one experiment with its roles inside an emulated network.

Intended to be invoked inside the emulation container, which is the only place that can put a process into a Mininet host namespace. The host-side orchestrator reaches it with docker exec.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_sweep(args)

Orchestrate every run x rep in the config; –resume skips completed ones.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_status(args)

Print the orchestrator’s recorded active runs (processes it started).

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_down(args)

Remove every CADET-owned leftover and report each one.

Printing the list is the point as much as the removal: the operator has to be able to see what was taken down, because the alternative - a cleanup that reports only a count - is how an indiscriminate kill goes unnoticed.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_dashboard(args)

Serve the local dashboard over a tree of run directories.

Reads only what a run already wrote and serves it from the standard library’s HTTP server, with nothing fetched at page load: the page is shown on machines with no network. Does not start, change or tear down a run.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_variance(args)

Reduce a tree of repetitions into one variance record.

Reads only what a run already wrote; writes the report into the run tree (a variance report is a result, so it does not belong in the repository).

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_summarize(args)

Summarise one run directory, or every sweep in a tree of them.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.cmd_ask(args)

Answer one question about a run directory or a tree of them.

Return type:

int

Parameters:

args (Namespace)

cadet.cli.build_parser()

Construct the top-level argument parser.

Return type:

ArgumentParser

cadet.cli.main(argv=None)

Entry point for the cadet console script and python -m cadet.

Return type:

int

Parameters:

argv (List[str] | None)