From 5053e2cebbfd2a1670d599e5c2e0125513130b18 Mon Sep 17 00:00:00 2001 From: Abdulwasiu Apalowo Date: Sat, 5 Nov 2022 23:10:45 +0100 Subject: lcitool: Add container command This adds another top-level command "container" which will introduce other subcommands in later patches. The "container" command allow the ability to plug another subcommand, which nests lcitool two levels deep. i.e lcitool container {command} -h Signed-off-by: Abdulwasiu Apalowo --- lcitool/commandline.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lcitool/commandline.py b/lcitool/commandline.py index 743401a..164888b 100644 --- a/lcitool/commandline.py +++ b/lcitool/commandline.py @@ -283,6 +283,15 @@ class CommandLine: parents=[manifestopt, dryrunopt, quietopt, basediropt, cidiropt]) manifestparser.set_defaults(func=Application._action_manifest) + container_parser = subparsers.add_parser( + "container", + help="Container related functionality" + ) + + containersubparser = container_parser.add_subparsers(metavar="COMMAND", + dest='container') + containersubparser.required = True + # Validate "container" args def _validate(self, args): """ -- cgit v1.1