summaryrefslogtreecommitdiffstats
path: root/scripts/lib/image/help.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/image/help.py')
-rw-r--r--scripts/lib/image/help.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index adfe976716..ce42627cdb 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -28,6 +28,7 @@
28import subprocess 28import subprocess
29import logging 29import logging
30 30
31from wic.plugin import pluginmgr, PLUGIN_TYPES
31 32
32def subcommand_error(args): 33def subcommand_error(args):
33 logging.info("invalid subcommand %s" % args[0]) 34 logging.info("invalid subcommand %s" % args[0])
@@ -55,6 +56,23 @@ def wic_help(args, usage_str, subcommands):
55 print(usage_str) 56 print(usage_str)
56 57
57 58
59def get_wic_plugins_help():
60 """
61 Combine wic_plugins_help with the help for every known
62 source plugin.
63 """
64 result = wic_plugins_help
65 for plugin_type in PLUGIN_TYPES:
66 result += '\n\n%s PLUGINS\n\n' % plugin_type.upper()
67 for name, plugin in pluginmgr.get_plugins(plugin_type).iteritems():
68 result += "\n %s plugin:\n" % name
69 if plugin.__doc__:
70 result += plugin.__doc__
71 else:
72 result += "\n %s is missing docstring\n" % plugin
73 return result
74
75
58def invoke_subcommand(args, parser, main_command_usage, subcommands): 76def invoke_subcommand(args, parser, main_command_usage, subcommands):
59 """ 77 """
60 Dispatch to subcommand handler borrowed from combo-layer. 78 Dispatch to subcommand handler borrowed from combo-layer.