Skip to content

gufo.thor.cli

gufo-thor command-line utility.

Attributes:

Name Type Description
NAME str

Utility name

Cli

Bases: object

gufo-thor CLI utility class.

config: Config cached property

Get config.

Returns:

Type Description
Config

Config instance.

get_handler(name)

Get handler for command.

Parameters:

Name Type Description Default
name str

Command name

required

Returns:

Type Description
Callable[[Namespace], ExitCode]

Callable, accepting Namespace and returning exit code

handle_prepare(ns)

Prepare NOC configuration.

handle_sample_config(ns)

Generate sample config.

handle_shell(ns)

Run shell.

handle_stop(ns)

Stop NOC.

handle_up(ns)

Prepare NOC configuration and run NOC.

handle_version(_ns)

Print Gufo Thor version.

Parameters:

Name Type Description Default
_ns Namespace

Options namespace, ignored.

required

Returns:

Type Description
ExitCode

Exit code.

run(args)

Parse command-line arguments and run appropriate command.

Parameters:

Name Type Description Default
args List[str]

List of command-line arguments

required

Returns: ExitCode

setup_logging()

Setup logger.

ExitCode

Bases: IntEnum

Cli exit codes.

Attributes:

Name Type Description
OK

Successful exit

main()

Run noc-thor with command-line arguments.