summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r--src/lib/Bcfg2/Server/Core.py7
-rw-r--r--src/lib/Bcfg2/Server/MultiprocessingCore.py5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index 85760aac3..e3a9f7fce 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -247,6 +247,9 @@ class Core(object):
self.logger.error("Updating database %s failed: %s" %
(Bcfg2.Options.setup.db_name, err))
+ def __str__(self):
+ return self.__class__.__name__
+
def plugins_by_type(self, base_cls):
""" Return a list of loaded plugins that match the passed type.
@@ -1360,6 +1363,10 @@ class NetworkCore(Core):
__init__.__doc__ = Core.__init__.__doc__.split(".. -----")[0] + \
"\n.. automethod:: _daemonize\n"
+ def __str__(self):
+ return "%s(%s)" % (self.__class__.__name__,
+ Bcfg2.Options.setup.location)
+
def run(self):
""" Run the server core. This calls :func:`_daemonize` before
calling :func:`Bcfg2.Server.Core.Core.run` to run the server
diff --git a/src/lib/Bcfg2/Server/MultiprocessingCore.py b/src/lib/Bcfg2/Server/MultiprocessingCore.py
index c42009bdd..58a05c85d 100644
--- a/src/lib/Bcfg2/Server/MultiprocessingCore.py
+++ b/src/lib/Bcfg2/Server/MultiprocessingCore.py
@@ -351,6 +351,11 @@ class MultiprocessingCore(BuiltinCore):
#: to provide a round-robin distribution of render requests
self.children = None
+ def __str__(self):
+ return "%s(%s; %s children)" % (self.__class__.__name__,
+ Bcfg2.Options.setup.location,
+ len(self._all_children))
+
def _run(self):
for cnum in range(Bcfg2.Options.setup.core_children):
name = "Child-%s" % cnum