diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2014-07-04 19:11:49 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-10 17:37:40 +0100 |
commit | 37db9423e7872012fabde67e8858db5b512832f6 (patch) | |
tree | 40f5aeca37902e2ffe04cad4a98c4ab5af1726e0 /scripts/lib/mic/plugin.py | |
parent | ad4a54a0f5bb667f5d5e3df2bcf841b05e0d0f2c (diff) | |
download | openembedded-core-37db9423e7872012fabde67e8858db5b512832f6.tar.gz openembedded-core-37db9423e7872012fabde67e8858db5b512832f6.tar.bz2 openembedded-core-37db9423e7872012fabde67e8858db5b512832f6.zip |
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 <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'scripts/lib/mic/plugin.py')
-rw-r--r-- | scripts/lib/mic/plugin.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/lib/mic/plugin.py b/scripts/lib/mic/plugin.py index 585fd6d563..f836950727 100644 --- a/scripts/lib/mic/plugin.py +++ b/scripts/lib/mic/plugin.py @@ -117,6 +117,22 @@ class PluginMgr(object): return pluginbase.get_plugins(ptype) + def get_source_plugins(self): + """ + Return list of available source plugins. + """ + plugins_dir = self._build_plugin_dir_list(self.plugin_dir, 'source') + + self.append_dirs(plugins_dir) + + plugins = [] + + for _source_name, klass in self.get_plugins('source').iteritems(): + plugins.append(_source_name) + + return plugins + + def get_source_plugin_methods(self, source_name, methods): """ The methods param is a dict with the method names to find. On |