Now that the script is ok, i thought it was the right time to improve it a bit.
So here it goes:
- refactor a bit the script
- Add docstrings and comments to clarify some part
- simplify the data computation (no if, simply inline the call for history data solely for content).
- Make the script parametric to reuse the setup from the manifest (avoiding future problems, hard-coding values in the long run is not what we want)
This also:
- export-stats: Rename script with consistent _ for python filename
- extract variables from puppet manifest to avoid duplication
- export_archive_counters: Update required python dependencies (requests was not mentioned)