Use default settings instead of repeating the options
for each class.
Add docstrings for special methods that do not have them
so they appear in the output.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
If the NamedDispatchExtensionManager is told to invoke
and extension that it has not loaded, log the condition
but otherwise ignore it.
Resolves issue #14
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Update NamedExtensionManager to check the names of the plugins
before loading any code to avoid importing anything we are not going
to use.
Fixes issue #4
Change-Id: I27b19cb42ca3d165ce45953281b82e394c4539a2
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Sometimes we want to use AssertionError to cause test
failures, and it is unlikely to be used in real code,
so just let the error bubble up if it is encountered
while loading a plugin.
Change-Id: I7ad20b0796c1a02427d324aa7f35bb238013c425
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Set up a NullHandler to avoid warnings when applications
do not configure a root logger.
Change-Id: I6cd957396c5e3ad706aea812874ab43fdd9e8aea
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Scanning the entry point registry is relatively expensive
and causes performance issues with unit tests of code
depending on stevedore. This change addresses the
performance issues by caching the entry points as
they are loaded from pkg_resources in a class attribute
in the base class of the extension managesr so they can
be reused by other instances.
Change-Id: Iba7bee6790cdedc94cb537e2ed6e12219c85f26a
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Go ahead and load the extension entry point so the
check function can interrogate it about whether it
should be enabled or not.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Re-enable the line limit checking in pep8 and then fix the
issues with modules that had long lines.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Create a special extension manager class that uses pre-configured
extension instances instead of loading them from a plugin set.
This makes setting up controlled environments for testing much
easier.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Provide an easy way to get direct access to the driver
that was loaded for callers that don't want to use
the __call__() API, or who need richer access to the
object.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Update the history file and version number.
Change-Id: Ia09d4a9316dcc77775124f298ddde535707cfa0c
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Create a dictionary mapping names to extensions so the
NameDispatchExtensionManager can just iterate over the
ones that will be invoked instead of all of the loaded
plugins.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change the response list argument to _invoke_one_plugin()
to a callback that accepts the response value.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Create a method _invoke_one_plugin() to call the plugin and
append the results to a list to be returned.
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>