From 37db9423e7872012fabde67e8858db5b512832f6 Mon Sep 17 00:00:00 2001 From: Tom Zanussi Date: Fri, 4 Jul 2014 19:11:49 -0500 Subject: wic: Add command to list available source plugins Add a 'wic list source-plugins' command enabling users to get a list of valid partition --sources. This is useful not only for determining sources to use in .wks partition statements, but also for making sense of errors in .wks partition processing. Signed-off-by: Tom Zanussi Signed-off-by: Saul Wold --- scripts/lib/image/engine.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'scripts/lib/image/engine.py') diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 1256236304..b850bb9bfe 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -174,6 +174,16 @@ def list_canned_image_help(scripts_path, fullpath): break +def list_source_plugins(): + """ + List the available source plugins i.e. plugins available for --source. + """ + plugins = pluginmgr.get_source_plugins() + + for plugin in plugins: + print " %s" % plugin + + def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, native_sysroot, hdddir, staging_data_dir, scripts_path, image_output_dir, debug, properties_file, properties=None): @@ -258,6 +268,9 @@ def wic_list(args, scripts_path, properties_file): if args[0] == "images": list_canned_images(scripts_path) return True + elif args[0] == "source-plugins": + list_source_plugins() + return True elif args[0] == "properties": return True else: -- cgit v1.2.3