From 80e4765f7cb7f1ebfa963af653b8e01da3333bd0 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 12 Jan 2009 01:07:34 +0000 Subject: 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 --- src/sbin/bcfg2-server | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/sbin/bcfg2-server') 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 "" def _authenticate_connection(self, _, user, password, address): -- cgit v1.2.3-1-g7c22