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:38:34 +0100 |
commit | 40769b7cc0cd94ce6f8ee93f01d64c76d9b8578e (patch) | |
tree | a9e69d8d182c73d7c95f85e3eb6320f99b79845d /scripts/lib/mic | |
parent | ae33bda011ce0c0a0e0dcd36bb38ba0186fa353d (diff) | |
download | poky-40769b7cc0cd94ce6f8ee93f01d64c76d9b8578e.tar.gz |
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.
(From OE-Core rev: 37db9423e7872012fabde67e8858db5b512832f6)
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic')
-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): | |||
117 | 117 | ||
118 | return pluginbase.get_plugins(ptype) | 118 | return pluginbase.get_plugins(ptype) |
119 | 119 | ||
120 | def get_source_plugins(self): | ||
121 | """ | ||
122 | Return list of available source plugins. | ||
123 | """ | ||
124 | plugins_dir = self._build_plugin_dir_list(self.plugin_dir, 'source') | ||
125 | |||
126 | self.append_dirs(plugins_dir) | ||
127 | |||
128 | plugins = [] | ||
129 | |||
130 | for _source_name, klass in self.get_plugins('source').iteritems(): | ||
131 | plugins.append(_source_name) | ||
132 | |||
133 | return plugins | ||
134 | |||
135 | |||
120 | def get_source_plugin_methods(self, source_name, methods): | 136 | def get_source_plugin_methods(self, source_name, methods): |
121 | """ | 137 | """ |
122 | The methods param is a dict with the method names to find. On | 138 | The methods param is a dict with the method names to find. On |