Updated plugin api docs

This commit is contained in:
Carl D. Roth
2016-11-28 13:31:34 -08:00
parent d7958005f3
commit 6448819434
2 changed files with 16 additions and 0 deletions

View File

@@ -26,6 +26,8 @@ of the installer Python script) will
2. instantiate an instance of each class, with the installer
object initialized as the 'installer' attribute
3. invoke the 'run' method (which must be overridden by implementors)
For a post-install plugin, the 'mode' argument is set to
PLUGIN_POSTINSTALL.
4. invoke the 'shutdown' method (by default, a no-op)
The 'run' method should return zero on success. In any other case, the
@@ -45,6 +47,12 @@ e.g. MountContext. The OnlMountContextReadWrite object and their
siblings won't work here because the mtab.yml file is not populated
within the loader environment.
A post-install plugin should execute any post-install actions when
'mode' is set to PLUGIN_POSTINSTALL. If 'mode' is set to any other
value, the plugin should ignore it and return zero. The plugin run()
method is invoked multiple times during the installer with different
values of 'mode'. The 'shutdown()' method is called only once.
When using MountContxt, the system state in the installer object can help
(self.installer.blkidParts in particular).

View File

@@ -26,6 +26,8 @@ of the installer Python script) will
2. instantiate an instance of each class, with the installer
object initialized as the 'installer' attribute
3. invoke the 'run' method (which must be overridden by implementors)
For a pre-install plugin, the 'mode' argument is set to
PLUGIN_PREINSTALL.
4. invoke the 'shutdown' method (by default, a no-op)
The 'run' method should return zero on success. In any other case, the
@@ -38,6 +40,12 @@ prepped/initialized/scanned yet. As per the ONL installer API, the
installer starts with *no* filesystems mounted, not even the ones from
a prior install.
A pre-install plugin should execute any pre-install actions when
'mode' is set to PLUGIN_PREINSTALL. If 'mode' is set to any other
value, the plugin should ignore it and return zero. The plugin run()
method is invoked multiple times during the installer with different
values of 'mode'. The 'shutdown()' method is called only once.
"""
import onl.install.Plugin