diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-11-09 20:01:28 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-11-09 20:01:28 +0000 |
commit | d7e21c89c1b2e37ff45b40d14680a74ffc4974a5 (patch) | |
tree | f915586bc85ad6ea2c0b8ed5d1c3da28fcb62f6e /src/lib | |
parent | eceeda42cac9fd0063b8a6535addc7ed7f0099a6 (diff) | |
download | bcfg2-d7e21c89c1b2e37ff45b40d14680a74ffc4974a5.tar.gz bcfg2-d7e21c89c1b2e37ff45b40d14680a74ffc4974a5.tar.bz2 bcfg2-d7e21c89c1b2e37ff45b40d14680a74ffc4974a5.zip |
Reports: Add server name to reports (Patch from Tim Laszlo)
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5562 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/DBStats.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/Server/Plugins/DBStats.py b/src/lib/Server/Plugins/DBStats.py index 4a7e04db2..0ecf9abde 100644 --- a/src/lib/Server/Plugins/DBStats.py +++ b/src/lib/Server/Plugins/DBStats.py @@ -1,9 +1,13 @@ +import difflib +import logging +import lxml.etree +import platform +import time + import Bcfg2.Server.Plugin import Bcfg2.Server.Reports.importscript from Bcfg2.Server.Reports.reports.models import Client -import difflib, lxml.etree, time, logging import Bcfg2.Server.Reports.settings - from Bcfg2.Server.Reports.updatefix import update_database # for debugging output only logger = logging.getLogger('Bcfg2.Plugins.DBStats') @@ -39,12 +43,14 @@ class DBStats(Bcfg2.Server.Plugin.Plugin, container.append(e) # FIXME need to build a metadata interface to expose a list of clients - # FIXME Server processing the request should be mentionned here start = time.time() for i in [1, 2, 3]: try: - Bcfg2.Server.Reports.importscript.load_stats( - self.core.metadata.clientdata, container, 0, True) + Bcfg2.Server.Reports.importscript.load_stats(self.core.metadata.clientdata, + container, + 0, + True, + platform.node()) break except: logger.error("DBStats: Failed to write to db (lock); retrying", |