summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/__init__.py
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2015-05-09 15:25:46 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2015-05-10 16:02:20 +0200
commit2e4005f50548e2f6999bf5b6fc11a76e355a9fdc (patch)
tree71c3aedaf613142c061ec123fa8b477cb30b6e0d /src/lib/Bcfg2/Client/__init__.py
parent04c357d9bba17696af0ce47bd20c4898527b6ca2 (diff)
downloadbcfg2-2e4005f50548e2f6999bf5b6fc11a76e355a9fdc.tar.gz
bcfg2-2e4005f50548e2f6999bf5b6fc11a76e355a9fdc.tar.bz2
bcfg2-2e4005f50548e2f6999bf5b6fc11a76e355a9fdc.zip
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.
Diffstat (limited to 'src/lib/Bcfg2/Client/__init__.py')
-rw-r--r--src/lib/Bcfg2/Client/__init__.py12
1 files changed, 8 insertions, 4 deletions
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))