summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Options.py2
-rw-r--r--src/lib/Server/Admin/Client.py5
-rw-r--r--src/lib/Server/Admin/Pull.py4
-rw-r--r--src/lib/Server/Admin/Query.py4
-rw-r--r--src/lib/Server/Core.py16
5 files changed, 16 insertions, 15 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index 3c5b3979a..5d62196aa 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -179,6 +179,8 @@ SERVER_REPOSITORY = Option('Server repository path', '/var/lib/bcfg2',
cf=('server', 'repository'), cmd='-Q',
odesc='<repository path>' )
SERVER_SVN = Option('Server svn support', False, cf=('server', 'svn'))
+SERVER_PLUGINS = Option('Server plugin list', cf=('server', 'plugins'),
+ default=[], cook=list_split)
SERVER_GENERATORS = Option('Server generator list', cf=('server', 'generators'),
default=['SSHbase', 'Cfg', 'Pkgmgr', 'Rules'],
cook=list_split)
diff --git a/src/lib/Server/Admin/Client.py b/src/lib/Server/Admin/Client.py
index a63c971fe..c51ac1598 100644
--- a/src/lib/Server/Admin/Client.py
+++ b/src/lib/Server/Admin/Client.py
@@ -8,9 +8,8 @@ class Client(Bcfg2.Server.Admin.Mode):
def __init__(self, configfile):
Bcfg2.Server.Admin.Mode.__init__(self, configfile)
try:
- self.bcore = Bcfg2.Server.Core.Core(self.get_repo_path(),
- [], ['Metadata'],
- 'foo', False, 'UTF-8')
+ self.bcore = Bcfg2.Server.Core.Core(self.get_repo_path(), [],
+ [], [], 'foo', False, 'UTF-8')
except Bcfg2.Server.Core.CoreInitError, msg:
self.errExit("Core load failed because %s" % msg)
[self.bcore.fam.Service() for _ in range(5)]
diff --git a/src/lib/Server/Admin/Pull.py b/src/lib/Server/Admin/Pull.py
index 71bfdefc2..d0efe489e 100644
--- a/src/lib/Server/Admin/Pull.py
+++ b/src/lib/Server/Admin/Pull.py
@@ -97,8 +97,8 @@ class Pull(Bcfg2.Server.Admin.Mode):
new_entry = self.BuildNewEntry(client, etype, ename)
try:
- bcore = Bcfg2.Server.Core.Core(self.repo, [], ['Cfg', 'SSHbase', 'Metadata'],
- 'foo', False)
+ bcore = Bcfg2.Server.Core.Core(self.repo, [], [],
+ ['Cfg', 'SSHbase'], 'foo', False)
except Bcfg2.Server.Core.CoreInitError, msg:
self.errExit("Core load failed because %s" % msg)
[bcore.fam.Service() for _ in range(5)]
diff --git a/src/lib/Server/Admin/Query.py b/src/lib/Server/Admin/Query.py
index 9fc019a88..999bde5c2 100644
--- a/src/lib/Server/Admin/Query.py
+++ b/src/lib/Server/Admin/Query.py
@@ -8,8 +8,8 @@ class Query(Bcfg2.Server.Admin.Mode):
Bcfg2.Logging.setup_logging(100, to_console=False, to_syslog=False)
Bcfg2.Server.Admin.Mode.__init__(self, cfile)
try:
- self.bcore = Bcfg2.Server.Core.Core(self.get_repo_path(),
- [], ['Metadata'],
+ self.bcore = Bcfg2.Server.Core.Core(self.get_repo_path(), [],
+ [], [],
'foo', False, 'UTF-8')
except Bcfg2.Server.Core.CoreInitError, msg:
self.errExit("Core load failed because %s" % msg)
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index d7086aa96..57655cbb4 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -199,7 +199,7 @@ except ImportError:
class Core(object):
'''The Core object is the container for all Bcfg2 Server logic, and modules'''
- def __init__(self, repo, structures, generators, password, svn, encoding):
+ def __init__(self, repo, plugins, structures, generators, password, svn, encoding):
object.__init__(self)
self.datastore = repo
try:
@@ -224,28 +224,28 @@ class Core(object):
[data.remove('') for data in [structures, generators] if '' in data]
- for plugin in structures + generators:
+ for plugin in structures + generators + plugins:
if not self.plugins.has_key(plugin):
self.init_plugins(plugin)
- plugins = self.plugins.values()
+ chk_plugins = self.plugins.values()
while True:
- plugin = plugins.pop()
+ plugin = chk_plugins.pop()
if isinstance(plugin, Bcfg2.Server.Plugin.MetadataPlugin):
self.metadata = plugin
break
- if not plugins:
+ if not chk_plugins:
self.init_plugins("Metadata")
self.metadata = self.plugins["Metadata"]
break
- plugins = self.plugins.values()
+ chk_plugins = self.plugins.values()
while True:
- plugin = plugins.pop()
+ plugin = chk_plugins.pop()
if isinstance(plugin, Bcfg2.Server.Plugin.StatisticsPlugin):
self.stats = plugin
break
- if not plugins:
+ if not chk_plugins:
self.init_plugins("Statistics")
self.stats = self.plugins["Statistics"]
break