summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-server
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-01-12 01:07:34 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-01-12 01:07:34 +0000
commit80e4765f7cb7f1ebfa963af653b8e01da3333bd0 (patch)
tree82e946b7e4a08ae2739acafc5a8708549957c83a /src/sbin/bcfg2-server
parent1affc07c26fad2528a5847a77db33a9baabb9fc8 (diff)
downloadbcfg2-80e4765f7cb7f1ebfa963af653b8e01da3333bd0.tar.gz
bcfg2-80e4765f7cb7f1ebfa963af653b8e01da3333bd0.tar.bz2
bcfg2-80e4765f7cb7f1ebfa963af653b8e01da3333bd0.zip
Finish up Pull Source and multi-Statistics code
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5012 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/bcfg2-server')
-rwxr-xr-xsrc/sbin/bcfg2-server16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index fed02bf6b..5d0b9d6bb 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -166,7 +166,8 @@ class Bcfg2Serv(Bcfg2.Component.Component):
'''Build config for a client'''
try:
client = self.Core.metadata.resolve_client(address)
- return tostring(self.Core.BuildConfiguration(client), encoding='UTF-8', xml_declaration=True)
+ return tostring(self.Core.BuildConfiguration(client),
+ encoding='UTF-8', xml_declaration=True)
except Bcfg2.Server.Plugins.Metadata.MetadataConsistencyError:
self.logger.warning("Metadata consistency failure for %s" % (address))
raise Fault, (6, "Metadata consistency failure")
@@ -174,17 +175,8 @@ class Bcfg2Serv(Bcfg2.Component.Component):
def Bcfg2RecvStats(self, address, stats):
'''Act on statistics upload'''
sdata = XML(stats)
- state = sdata.find(".//Statistics")
- # Versioned stats to prevent tied client/server upgrade
- if state.get('version') >= '2.0':
- client = self.Core.metadata.resolve_client(address)
- meta = self.Core.build_metadata(client)
-
- # Update statistics
- self.Core.stats.StoreStatistics(meta, sdata)
-
- self.logger.info("Client %s reported state %s" %
- (client, state.attrib['state']))
+ client = self.Core.metadata.resolve_client(address)
+ self.Core.process_statistics(client, sdata)
return "<ok/>"
def _authenticate_connection(self, _, user, password, address):