Available CLI Commands
These are the built-in commands
config
Enables command-line access to get and set the FIREWHEEL configuration.
Users can interact with the config command (i.e. firewheel config
)
series of sub-commands which enable easily getting/setting various configuration options.
config get
usage: firewheel config get [-a] [SETTING]
Get a FIREWHEEL configuration.
- positional arguments:
- SETTING Get a particular configuration value. Nested settings can be grabbed
with a period separating them. For example, to get the value for the config key
{'logging':{'level':'INFO'}}
, you can use the command:firewheel config get logging.level
.
- options:
- -a, --all
Get the entire FIREWHEEL configuration.
config reset
usage: firewheel config reset [config_path]
Reset the FIREWHEEL configuration to the default values.
- positional arguments:
config_path Path of the configuration file to be reset.
config set
usage: firewheel config set (-f FILE | -s SETTING [VALUE …])
Set a FIREWHEEL configuration.
- options:
- -f FILE, --file FILE
Add config from a file.
- -s SETTING [VALUE …], –single SETTING [VALUE …]
Set (or create) a particular configuration value. Nested settings can be used with a period separating them. For example, to change the value for the config key
{'logging':{'level':'DEBUG'}}
, you can use the command:firewheel config set -s logging.level INFO
. If no VALUE is passed, the setting’s value will becomeNone
.
docs
Generate documentation file for all available Helpers and commands.
This command generates an RST file (helper_docs.rst) which contains
the DESCRIPTION section for all available Helpers. Additionally,
the docstring for all available commands is compiled into a single RST
file (commands.rst). These files are then written to the input location
or, if no argument is passed in, to ../../../../docs/source/cli
which
is where FIREWHEEL’s CLI documentation is located if the repository has been
cloned.
- Args:
- args (str): Optional directory to write docs to. If not provided,
this path will be
../../../../docs/source/cli
.
- Examples:
$ firewheel docs FIREWHEEL Helper documentation placed in: /opt/firewheel/docs/source/cli/helper_docs.rst FIREWHEEL Command documentation placed in: /opt/firewheel/docs/source/cli/commands.rst
EOF
Process the exit command, and perform the expected termination of the CLI
exit
Exits the command line
help
Print the help text for Helpers and commands.
For Helpers, the DESCRIPTION section is printed. For Commands, the docstring is printed. In interactive mode all commands/Helpers can be tab completed.
- Args:
arg (str): the command/Helper from which we need to get the help docs.
- Example:
$ firewheel help history Print the history of commands/Helpers. Shows full command line as entered and includes the associated sequence number ...
$ firewheel help vm mix Generates a table showing the VM Images for a running experiment. The table also includes the power state of the VMs and the vm_resource state. Images that are the same and have the same power/vm_resource state are grouped. The count of the various VMs are provided. Additionally, the total number of scheduled VMs is shown at the bottom of the table. ...
history
Print the history of commands/Helpers.
Shows full command line as entered and includes the associated sequence number
and session ID. History is preserved between sessions and until the logs are
cleared (typically during a firewheel restart hard
.
The output is shown in the form of <Count>: <ID>:<Sequence Number> -- <command>
.
- Args:
args (str): This argument is ignored.
- Example:
$ firewheel history <Count>: <ID>:<Sequence Number> -- <command> 0: 1ff79073-5e4a-4279-9d4c-8d81168736b1:0 -- vm mix 1: 1fcb30cb-00fb-4179-b99c-b2f4ae6f7577:0 -- list 2: a7af6f9c-6eb3-46b4-b6d8-9c0f9604808d:0 -- version ...
init
Enables easy ability for a user to “initialize” a FIREWHEEL node.
Initialization includes checking various FIREWHEEL config path and verifying that non-standard dependencies (minimega and discovery) are installed and working.
init static
Do not check if any services are running any only check if they exist.
- Args:
_args (str): This is unused in this method.
list
List the available Helpers by name.
This enables users to identify all the available FIREWHEEL Helpers. Users can optionally filter the list by partially completing a Helper name.
- Args:
args (str): Optionally specify a group to list.
- Examples:
$ firewheel list FIREWHEEL Helper commands: example_helpers pytest example_helpers subgroup index ...
$ firewheel list FIREWHEEL Helper commands containing 'vm:' vm list vm mix
quit
Exits the command line
run
Runs the scripts found in the specified Helper file.
This command is functionally equivalent to running the same Helper without the keyword run in front of it. It is largely useful when using interactive mode.
- Args:
args (str): Name of the Helper to execute.
- Returns:
int: The result of
firewheel.cli.firewheel_cli.FirewheelCLI.handle_run()
which is the number of executable sections in the Helper that encountered errors. 0 on success. Negative (e.g. -1) on other errors.- Examples:
$ firewheel run start_time Experiment start time: 03-25-2020 16:19:38 UTC
sync
Update the Helper cache on all hosts controlled by the CLI.
This command essentially calls firewheel.cli.host_accessor.sync()
.
All Helpers are executed from this cache. Therefore, this command should be run
on the creation of a new FIREWHEEL cluster and after updating a Helper.
- Args:
_args (str): This argument is ignored.
- Example:
$ firewheel sync $
version
Print FIREWHEEL’s version.
- Args:
arg (str): This argument is ignored.
- Example:
$ firewheel version 2.6.0