summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Core.py5
-rwxr-xr-xsrc/sbin/bcfg2-server10
2 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index 95b9fb08e..448471781 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -5,7 +5,7 @@ from time import time
from Bcfg2.Server.Plugin import PluginInitError, PluginExecutionError
from Bcfg2.Server.Statistics import Statistics
-import logging, lxml.etree, os, stat, Bcfg2.Server.Metadata, ConfigParser
+import logging, lxml.etree, os, stat, ConfigParser
logger = logging.getLogger('Bcfg2.Core')
@@ -218,7 +218,8 @@ class Core(object):
self.read_svn_revision()
except:
self.svn = False
-
+
+ mpath = self.cfile.get('server','repository')
self.stats = Statistics("%s/etc/statistics.xml" % (mpath))
structures = self.cfile.get('server', 'structures').split(',')
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index abaf0bc09..c6d3d9ab7 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -3,7 +3,7 @@
'''The XML-RPC Bcfg2 Server'''
__revision__ = '$Revision$'
-import Bcfg2.Server.Metadata
+import Bcfg2.Server.Plugins.Metadata
from Bcfg2.Server.Core import Core, CoreInitError
from xmlrpclib import Fault
@@ -123,7 +123,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
for probe in generator.GetProbes(meta):
resp.append(probe)
return tostring(resp)
- except Bcfg2.Server.Metadata.MetadataConsistencyError:
+ except Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError:
warning = 'metadata consistency error'
self.logger.warning(warning)
raise Fault, (6, warning)
@@ -135,7 +135,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
try:
name = self.Core.metadata.resolve_client(address[0])
meta = self.Core.metadata.get_metadata(name)
- except Bcfg2.Server.Metadata.MetadataConsistencyError:
+ except Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError:
warning = 'metadata consistency error'
self.logger.warning(warning)
raise Fault, (6, warning)
@@ -160,7 +160,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
try:
client = self.Core.metadata.resolve_client(address[0])
self.Core.metadata.set_profile(client, profile)
- except (Bcfg2.Server.Metadata.MetadataConsistencyError, Bcfg2.Server.Metadata.MetadataRuntimeError):
+ except (Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError, Bcfg2.Server.Plugins.Metadata.MetadataRuntimeError):
warning = 'metadata consistency error'
self.logger.warning(warning)
raise Fault, (6, warning)
@@ -171,7 +171,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
try:
client = self.Core.metadata.resolve_client(address[0])
return tostring(self.Core.BuildConfiguration(client))
- except Bcfg2.Server.Metadata.MetadataConsistencyError:
+ except Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError:
self.logger.warning("Metadata consistency failure for %s" % (address))
raise Fault, (6, "Metadata consistency failure")