From b7b80c5c0fc1895e85aae3acbfcbbc593a42697f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 27 Oct 2014 11:25:46 -0400 Subject: Refactor plugin initialization and enablement Move most plugin enablement and initialization code in plugin.py to reduce code duplication and simplify and unifify plugin enablement for all base plugin types (login, info, providers). This patch breaks backwards compatibility as it changes how the list of enabled plugins is stored in the database tables. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/helpers/common.py | 5 ++++- ipsilon/helpers/ipa.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'ipsilon/helpers') diff --git a/ipsilon/helpers/common.py b/ipsilon/helpers/common.py index 6ec2819..f670bc6 100755 --- a/ipsilon/helpers/common.py +++ b/ipsilon/helpers/common.py @@ -20,8 +20,11 @@ from ipsilon.util.plugin import PluginInstaller +FACILITY = 'environment_helpers' + + class EnvHelpersInstall(object): def __init__(self): - pi = PluginInstaller(EnvHelpersInstall) + pi = PluginInstaller(EnvHelpersInstall, FACILITY) self.plugins = pi.get_plugins() diff --git a/ipsilon/helpers/ipa.py b/ipsilon/helpers/ipa.py index 4a4849a..d01d663 100755 --- a/ipsilon/helpers/ipa.py +++ b/ipsilon/helpers/ipa.py @@ -46,7 +46,7 @@ failure (see logs) and retry. class Installer(object): - def __init__(self): + def __init__(self, *pargs): self.name = 'ipa' self.ptype = 'helper' self.logger = None -- cgit