diff options
-rw-r--r-- | scripts/lib/image/engine.py | 13 | ||||
-rw-r--r-- | scripts/lib/mic/plugin.py | 16 |
2 files changed, 29 insertions, 0 deletions
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): | |||
174 | break | 174 | break |
175 | 175 | ||
176 | 176 | ||
177 | def list_source_plugins(): | ||
178 | """ | ||
179 | List the available source plugins i.e. plugins available for --source. | ||
180 | """ | ||
181 | plugins = pluginmgr.get_source_plugins() | ||
182 | |||
183 | for plugin in plugins: | ||
184 | print " %s" % plugin | ||
185 | |||
186 | |||
177 | def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, | 187 | def wic_create(args, wks_file, rootfs_dir, bootimg_dir, kernel_dir, |
178 | native_sysroot, hdddir, staging_data_dir, scripts_path, | 188 | native_sysroot, hdddir, staging_data_dir, scripts_path, |
179 | image_output_dir, debug, properties_file, properties=None): | 189 | image_output_dir, debug, properties_file, properties=None): |
@@ -258,6 +268,9 @@ def wic_list(args, scripts_path, properties_file): | |||
258 | if args[0] == "images": | 268 | if args[0] == "images": |
259 | list_canned_images(scripts_path) | 269 | list_canned_images(scripts_path) |
260 | return True | 270 | return True |
271 | elif args[0] == "source-plugins": | ||
272 | list_source_plugins() | ||
273 | return True | ||
261 | elif args[0] == "properties": | 274 | elif args[0] == "properties": |
262 | return True | 275 | return True |
263 | else: | 276 | else: |
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 |