summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/image/help.py18
-rwxr-xr-xscripts/wic2
2 files changed, 19 insertions, 1 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.
diff --git a/scripts/wic b/scripts/wic
index cf968591e2..dda72a9c27 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -277,7 +277,7 @@ subcommands = {
277 hlp.wic_list_help], 277 hlp.wic_list_help],
278 "plugins": [wic_help_topic_subcommand, 278 "plugins": [wic_help_topic_subcommand,
279 wic_help_topic_usage, 279 wic_help_topic_usage,
280 hlp.wic_plugins_help], 280 hlp.get_wic_plugins_help()],
281 "overview": [wic_help_topic_subcommand, 281 "overview": [wic_help_topic_subcommand,
282 wic_help_topic_usage, 282 wic_help_topic_usage,
283 hlp.wic_overview_help], 283 hlp.wic_overview_help],