diff options
author | Abdulwasiu Apalowo <abdulwasiuapalowo@gmail.com> | 2022-11-05 23:10:45 +0100 |
---|---|---|
committer | Abdulwasiu Apalowo <abdulwasiuapalowo@gmail.com> | 2023-01-10 14:00:11 +0100 |
commit | 5053e2cebbfd2a1670d599e5c2e0125513130b18 (patch) | |
tree | 7a109327cfd76590ffe621ae8fe17a1cefab6980 | |
parent | d821698a546f1d2fd184f04694d57d7ec4522e36 (diff) | |
download | libvirt-ci-5053e2cebbfd2a1670d599e5c2e0125513130b18.zip libvirt-ci-5053e2cebbfd2a1670d599e5c2e0125513130b18.tar.gz libvirt-ci-5053e2cebbfd2a1670d599e5c2e0125513130b18.tar.bz2 |
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 <abdulwasiuapalowo@gmail.com>
-rw-r--r-- | lcitool/commandline.py | 9 |
1 files changed, 9 insertions, 0 deletions
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): """ |