feat(cli): Add CLI support for RevPi configuration object (revpi-config)
This implements a new command "config" in the CLI to handle RevPi configuration. It includes parsing and subparser setup for configuration-related operations. The change improves usability by extending CLI functionality to manage RevPi configuration objects.
This commit is contained in:
@@ -29,6 +29,11 @@ def setup_command_line_arguments():
|
||||
help="RevPi PiControl object",
|
||||
)
|
||||
cli_picontrol.add_subparsers(obj_picontrol)
|
||||
obj_config = rpictl_obj.add_parser(
|
||||
"config",
|
||||
help="RevPi configuration object (revpi-config)",
|
||||
)
|
||||
cli_config.add_subparsers(obj_config)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
@@ -39,6 +44,9 @@ def main() -> int:
|
||||
if obj == "picontrol":
|
||||
rc = cli_picontrol.main()
|
||||
|
||||
elif obj == "config":
|
||||
rc = cli_config.main()
|
||||
|
||||
else:
|
||||
log.error(f"Unknown object: {obj}")
|
||||
rc = 1
|
||||
|
||||
Reference in New Issue
Block a user