From 2e4005f50548e2f6999bf5b6fc11a76e355a9fdc Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sat, 9 May 2015 15:25:46 +0200 Subject: Reporting: Add dry_run and only_important flags Save the status of --dry-run and --only-important in the statistics, so that the reports could be filtered to only respect "normal" runs. --- src/lib/Bcfg2/Client/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/lib/Bcfg2/Client/__init__.py') diff --git a/src/lib/Bcfg2/Client/__init__.py b/src/lib/Bcfg2/Client/__init__.py index 674162572..32d4252c6 100644 --- a/src/lib/Bcfg2/Client/__init__.py +++ b/src/lib/Bcfg2/Client/__init__.py @@ -925,10 +925,14 @@ class Client(object): states[item] = val feedback = XML.Element("upload-statistics") - stats = XML.SubElement(feedback, - 'Statistics', total=str(len(states)), - version='2.0', - revision=self.config.get('revision', '-1')) + stats = XML.SubElement( + feedback, + 'Statistics', + total=str(len(states)), + version='2.0', + revision=self.config.get('revision', '-1'), + dry_run=str(Bcfg2.Options.setup.dry_run), + only_important=str(Bcfg2.Options.setup.only_important)) good_entries = [key for key, val in list(states.items()) if val] good = len(good_entries) stats.set('good', str(good)) -- cgit v1.2.3-1-g7c22