contrib: add pure python statefile parser
This PR adds a python module to read Bareos filedaemon statefiles.
Please check
- [x] Short description and the purpose of this PR is present above this paragraph
- [x] Your name is present in the AUTHORS file (optional)
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.
General
- [x] Is the PR title usable as CHANGELOG entry?
- [x] Purpose of the PR is understood
- [x] Commit descriptions are understandable and well formatted ~~Required backport PRs have been created~~
Source code quality
- [x] Source code changes are understandable
- [x] Variable and function names are meaningful
- [x] Code comments are correct (logically and spelling) ~~Required documentation changes are present and part of the PR~~
Should we anticipate the usage of that decoding for also bareos-sd ?
I haven't tested it, but maybe it just works? The problem with the SD statefile parsing is that looking the last 10 jobs of an SD is usually a lot less useful (just because so much more jobs are running there).
I haven't tested it, but maybe it just works? The problem with the SD statefile parsing is that looking the last 10 jobs of an SD is usually a lot less useful (just because so much more jobs are running there).
It just work when the state file in not empty. So good enough for contrib code.
We should probably write at least one systemtest for this. Nothing major. A simple backup + read state file and check for consistency should be enough.
We should probably write at least one systemtest for this. Nothing major. A simple backup + read state file and check for consistency should be enough.
But if we do that, then this isn't example-code for contrib anymore. Then we should clean it up, make sure it is portable and put it into the scripts directory.