Merge lp:~zyga/lava-core/plugin-loader-respin into lp:lava-core
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | no longer in the source branch. |
Merged at revision: | 9 |
Proposed branch: | lp:~zyga/lava-core/plugin-loader-respin |
Merge into: | lp:lava-core |
Prerequisite: | lp:~zyga/lava-core/history-and-logging |
Diff against target: |
455 lines (+441/-0) 3 files modified
lava/core/errors.py (+38/-0) lava/core/plugins.py (+131/-0) lava/core/tests/test_plugins.py (+272/-0) |
To merge this branch: | bzr merge lp:~zyga/lava-core/plugin-loader-respin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle (community) | Approve | ||
Review via email: mp+104890@code.launchpad.net |
Description of the change
This is a respin of https:/
(it is a respin as I want to make lava-core standalone, co-installable and independent of any other lava.* packages)
To quote my commit message:
Add plugins and errors modules
The PluginLoader class is a simple thin wrapper around pkg_resources entry
points. It de-couples LAVA from grotty pkg_resources details and allows us to
migrate away from that technology later. It also allows us to explore frozen
applications that would allow lava to run on windows.
The PluginLoader class has basically two methods: to load all plugins that
"reside" in a particular namespace and to load an explicitly named plugin (also
from a particular namespace). Namespace names are translated 1-to-1 to
pkg_resources namespaces but are sufficiently abstract that this is not
important. All plugins must explicitly inherit from a base class designated by
the caller. In lava-core this is typically an interface that has all the
expected methods and properties that the calling side will later expect from
the returned object.
The errors module starts with two related exception classes. In subsequent
patches it will be used as a bag of assorted exceptions used in all of
lava-core.
This MP depends on the previous 'history and logging' proposal.
This is exactly the same as the code I reviewed before right?