FirewallCliCommand#
- class wattson.cosimulation.cli.commands.firewall_cli_command.FirewallCliCommand(cli)#
Bases:
CliCommandHandler
Methods
Generates a nested dictionary that provides all possible auto complete options.
description
get_node
get_node_info
get_nodes
get_plural
get_singular
Gets a command divided into a list to apply the respective actions
matches_type
- __init__(cli)#
- auto_complete_choices(prefix: list[str], level: int | None = None) dict #
Generates a nested dictionary that provides all possible auto complete options. In case a level is given, the dictionary’s nesting level can be restricted to this level.
- Parameters:
prefix (List[str]) – The command prefix that is relevant for this auto completion
level (Optional[int], optional) – Optional restriction of the maximum nesting level of the dictionary that allows to skip non-static command completions on lower nesting levels (Default value = None)
- Returns:
A nested dictionary with auto complete options. Each dictionary key is a string that contains no spaces
- Return type:
dict
- handle_command(command: list[str], prefix: list[str]) bool #
Gets a command divided into a list to apply the respective actions
- Parameters:
command (List[str]) – The command split into a list at spaces
prefix (List[str]) – The command’s prefix. Original input is ‘prefix command’
- Returns:
True iff the CLI should continue to prompt for the next command
- Return type:
bool