summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/imager/direct_plugin.py
Commit message (Collapse)AuthorAgeFilesLines
* wic: renamd direct_plugin.py -> direct.pyEd Bartosh2017-02-021-418/+0
| | | | | | | | | | | | | As this files is located in plugins/imager subdirectory it's obvious that it's an imager plugin. Renamed to direct.py to be consistent with plugin naming scheme. [YOCTO #10619] (From OE-Core rev: d5db8c2ee91bdd51bfbb2ebf61aea8ff0378d512) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: simplified code of direct_pluginEd Bartosh2017-02-021-22/+2
| | | | | | | | | | | | Removed unused methods. Got rid of get_default_source_plugin and _full_name methods. [YOCTO #10619] (From OE-Core rev: c5706f71dee531557a6b1290665283b8637fff6e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: pylinted direct_pluginEd Bartosh2017-02-021-15/+7
| | | | | | | | | | | | Fixed wrong continued indentation, unused import and trailing new line pyling warnings. [YOCTO #10619] (From OE-Core rev: e78762a4b52c31357ef29a5b93c53db7190fa4f2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: improve naming in direct_plugin classesEd Bartosh2017-02-021-40/+22
| | | | | | | | | | | Synchronized attribure names in DirectImageCreator and DirectPlugin for better readability. Simplified code, removed unneeded global variable disk_methods. (From OE-Core rev: b87b9ef84791615636424a224f74386a4aa0c2fa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: get rid of __rootfs_dir_to_dict methodEd Bartosh2017-02-021-16/+5
| | | | | | | | | | | | Replaced class method __rootfs_dir_to_dict with a list comprehension. [YOCTO #10619] (From OE-Core rev: 266fd31410771db4c06539f7368c196a6d03000a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: moved content of direct.py to direct_pluginEd Bartosh2017-02-021-16/+380
| | | | | | | | | | | | | This move simplifies directory structure and makes further refactoring easier. The code from direct.py was used only in direct_plugin, so it's safe to move it there. [YOCTO #10619] (From OE-Core rev: a8f5ebb26183faa9af6eb72f4dabfcf83aa1e8d4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: direct_plugin: stop using config managerEd Bartosh2017-02-021-7/+15
| | | | | | | | | | | | | | | | | | | This is a preparation to removing conf.py and config/wic.conf from the codebase. Got rid of using configmgr global object in direct_plugin and direct modules. It was used to implicitly parse kickstart file and set couple of variables. Replaced usage of configmgr by passing parameters directly to the DirectImageCreator. [YOCTO #10619] (From OE-Core rev: 79191119de010acb107f9392a991108728858441) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement --bmap optionEd Bartosh2016-05-191-1/+2
| | | | | | | | | | | | This option enables generation of <image>.bmap file for the result image using native bmaptool. [YOCTO #9413] (From OE-Core rev: d64c7b37c40b052510419b4d6629b83319c833e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix short variable namesEd Bartosh2015-09-031-2/+2
| | | | | | | | | | | | Made short variable names longer and more readable. Fixed pylint warnings "Invalid variable name" and "Invalid argument name". (From OE-Core rev: 872cb0d5d79b26f34e6b35d7be8870d245021be4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use optparse instead of cmdlnEd Bartosh2015-09-031-1/+1
| | | | | | | | | | | | | | | | | cmdln.py https://pypi.python.org/pypi/cmdln was used in creator.py to parse image plugin options and arguments. There is no need in such a sofisticated API to do this simple task. Standard option parser optparse.OptionParser can do it just fine. Modified Creator class to work with option parser. Removed cmdln.py from the wic codebase. (From OE-Core rev: 1e5220f74830b99cf8340a4f6977399b5cf49871) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Code cleanup: unused importsEd Bartosh2015-07-021-3/+1
| | | | | | | | | Fixed pylint warning unused-import (From OE-Core rev: e77fda5fb6cb0a35308e4620ca4602715a471fbe) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add new argument to direct pluginEd Bartosh2015-06-271-1/+3
| | | | | | | | | | Added 'compressor' argument to Direct plugin API to pass a name of compressor utility. (From OE-Core rev: 34c583274c2908351e3a84dd629302f1975f2f0d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add missing docstrings to plugin classesEd Bartosh2015-06-231-0/+9
| | | | | | | | | | | | Docstings from plugin classes are used as part of output of 'wic help plugins'. Adding them makes help page more informative. (From OE-Core rev: d4414b45c81ab539f75a7bb16fc6412c30dfc45f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Code cleanup: bad-classmethod-argumentEd Bartosh2015-06-231-3/+3
| | | | | | | | | | | | Fixed wrong name for the first argument in class methods. Pylint complains about the issue this way: Class method should have 'cls' as first argument (From OE-Core rev: cd7c72d6d5a5110173d0d3f60f2991b1dc30fc26) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: code cleanup: unused importsEd Bartosh2015-04-091-5/+0
| | | | | | | | | Fixed pylint warning 'Unused import' (From OE-Core rev: dfde8bdae3ae151ffed5777b920d24c774e5da2c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Remove special-case bootimg_dirTom Zanussi2014-10-301-12/+8
| | | | | | | | | | | | | | | | | | | | The first iterations of wic very shortsightedly catered to two specific use-cases and added special-purpose params for those cases so that they could be directly given their corresponding boot artifacts. (hdddir and staging_data_dir). As more use-cases are added, it becomes rather obvious that such a scheme doens't scale, and additionally causes confusion for plugin writers. This removes those special cases and states explicitly in the help text that plugins are responsible for locating their own boot artifacts. (From OE-Core rev: 6ba3eb5ff7c47aee6b3419fb3a348a634fe74ac9) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Rename /mic to /wicTom Zanussi2014-08-111-0/+102
As well as any other stray instances of mic in the codebase that can be removed. We don't really need to carry around legacy naming, and the history is in git. (From OE-Core rev: 598b120406dc1d2b7e377bd1ab6f0acbef034b22) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>