diff options
author | John 'Skip' Reddy <jreddy@alcf.anl.gov> | 2012-05-17 23:56:46 +0000 |
---|---|---|
committer | John 'Skip' Reddy <jreddy@alcf.anl.gov> | 2012-05-17 23:56:46 +0000 |
commit | fe610e2e53362f864394e44e251f23711b26ce45 (patch) | |
tree | 576fb13dddea44ae5cfd374b2bd1656a3ba30967 /src/lib/Bcfg2/Client | |
parent | 64adcb62667adefc885bfcc5ae0f934300a96db3 (diff) | |
download | bcfg2-fe610e2e53362f864394e44e251f23711b26ce45.tar.gz bcfg2-fe610e2e53362f864394e44e251f23711b26ce45.tar.bz2 bcfg2-fe610e2e53362f864394e44e251f23711b26ce45.zip |
Adding DBStats hooks into YUMng
YUMng did not have any hooks to save data via the DBStats plugin, so
no statistics have been saved.
Diffstat (limited to 'src/lib/Bcfg2/Client')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/YUMng.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/YUMng.py b/src/lib/Bcfg2/Client/Tools/YUMng.py index 244b66cf4..da627ed7a 100644 --- a/src/lib/Bcfg2/Client/Tools/YUMng.py +++ b/src/lib/Bcfg2/Client/Tools/YUMng.py @@ -483,6 +483,7 @@ class YUMng(Bcfg2.Client.Tools.PkgTool): _POs = POs if len(_POs) == 0: # Package (name, arch) not installed + entry.set('current_exists', 'false') self.logger.debug(" %s is not installed" % nevraString(nevra)) stat['installed'] = False package_fail = True @@ -513,6 +514,12 @@ class YUMng(Bcfg2.Client.Tools.PkgTool): package_fail = True stat['version_fail'] = True # Just chose the first pkg for the error message + entry.set('current_version', "%s-%s.%s" % (POs[0]['version'], + POs[0]['release'], + POs[0]['arch'])) + entry.set('version', "%s-%s.%s" % (nevra['version'], + nevra['release'], + nevra['arch'])) self.logger.info(" %s: Wrong version installed. " "Want %s, but have %s" % (entry.get("name"), nevraString(nevra), |