stormlibpp.hstorm module

An HTTP based Storm CLI.

This CLI relies on Synapse’s out of the box CLI objects. It just replaces the CLI’s Cortex with an HttpCortex, making it capable of executing Storm code via HTTP. However, currently HttpCortex only supports the storm and callStorm methods, so the builtin commands that do not rely on Storm (Axon-related commands) do not work. HttpCortex raises a synapse.exc.SynErr` when these unsupported CLI commands are used, so the commands fail cleanly from the user’s perspective.

The script, like HttpCortex, requires a user and password to communicate with the Synapse Cortex. A user can be passed via the command-line, the CORTEX_USER environment variable, or will be prompted for (getpass is used as a default). The CORTEX_PASS environment variable may be used to give hstorm a password at runtime, otherwise one will be prompted for.

The --no-verify option tells the script to not check the Cortex’s HTTPS cert. This is needed to connect to any test Cortex or a Cortex that otherwise doesn’t use a trusted CA to sign HTTPS certificates.

stormlibpp.hstorm.get_args(argv: list[str])

Build an argument parser for this script and parse the passed in args.

async stormlibpp.hstorm.main(argv: list[str])

The main functionality of the HTTP Storm CLI.



The unparsed CLI arguments for this script.