diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-11-22 21:53:26 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-11-22 21:53:26 +0000 |
commit | 67011d71eb012239fd56bb626d19d34f0c060269 (patch) | |
tree | 81efcd3d6e68db8cc0396bd711d0426e402032d8 /src | |
parent | b69b4accf692afe3a8151798fe2a8b942788c768 (diff) | |
download | bcfg2-67011d71eb012239fd56bb626d19d34f0c060269.tar.gz bcfg2-67011d71eb012239fd56bb626d19d34f0c060269.tar.bz2 bcfg2-67011d71eb012239fd56bb626d19d34f0c060269.zip |
Metadata changes part 3
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2524 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Core.py | 5 | ||||
-rwxr-xr-x | src/sbin/bcfg2-server | 10 |
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") |