summaryrefslogtreecommitdiffstats
path: root/ipsilon/util/plugin.py
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-03-14 18:08:49 -0400
committerSimo Sorce <simo@redhat.com>2014-03-20 11:34:08 -0400
commit1d7df9dbac43b63424ee07ebfb86c6a106dcb43c (patch)
tree8492c4ccaa3d57a7625682eeadd98d28897121ab /ipsilon/util/plugin.py
parent7efffe85403fbaa1335186b311ad7ac8ea19ad1e (diff)
downloadipsilon-1d7df9dbac43b63424ee07ebfb86c6a106dcb43c.tar.gz
ipsilon-1d7df9dbac43b63424ee07ebfb86c6a106dcb43c.tar.xz
ipsilon-1d7df9dbac43b63424ee07ebfb86c6a106dcb43c.zip
Add server-install plugin configuration support
Automatically find plugins installed in the system and exposes their installation and configuration functions through the installer. Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/util/plugin.py')
-rwxr-xr-xipsilon/util/plugin.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ipsilon/util/plugin.py b/ipsilon/util/plugin.py
index 5a517e4..fce058d 100755
--- a/ipsilon/util/plugin.py
+++ b/ipsilon/util/plugin.py
@@ -92,6 +92,16 @@ class PluginLoader(object):
return self._plugins
+class PluginInstaller(object):
+ def __init__(self, baseobj):
+ (pathname, dummy) = os.path.split(inspect.getfile(baseobj))
+ self._pathname = pathname
+
+ def get_plugins(self):
+ p = Plugins()
+ return p.get_plugins(self._pathname, 'Installer')
+
+
class PluginObject(object):
def __init__(self):