2 from micng.pluginbase.base_plugin import PluginBase
3 import micng.configmgr as configmgr
5 class ImagerPlugin(PluginBase):
7 def __init__(self, configinfo=None):
9 self.configinfo = configmgr.getConfigInfo()
11 self.configinfo = configinfo
13 def do_mount_instroot(self):
14 """Mount or prepare the install root directory.
16 This is the interface where plugin may prepare the install root by e.g.
17 mounting creating and loopback mounting a filesystem image to
22 def do_umount_instroot(self):
23 """Undo anything performed in do_mount_instroot().
25 This is the interface where plugin must undo anything which was done
26 in do_mount_instroot(). For example, if a filesystem image was mounted
27 onto _instroot, it should be unmounted here.
32 """Setup the target filesystem in preparation for an install.
34 This interface should setup the filesystem which other functions will
35 install into and configure.
40 """Unmounts the target filesystem.
42 It should detache the system from the install root.
47 """Unmounts the target filesystem and deletes temporary files.
49 This interface deletes any temporary files and directories that were created
50 on the host system while building the image.
55 """Install packages into the install root.
57 This interface installs the packages listed in the supplied kickstart
58 into the install root. By default, the packages are installed from the
59 repository URLs specified in the kickstart.
63 def do_configure(self):
64 """Configure the system image according to the kickstart.
66 This interface applies the (e.g. keyboard or network) configuration
67 specified in the kickstart and executes the kickstart %post scripts.
69 If neccessary, it also prepares the image to be bootable by e.g.
70 creating an initrd and bootloader configuration.
74 def do_package(self, destdir):
75 """Prepares the created image for final delivery.
77 This interface merely copies the install root to the supplied destination
82 def do_create(self, args):
83 """ Temporary solution to create image in one single interface """