Rewrote ToAutorenewCerts 'check' to Python3 #4822
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR (Pull Request) do?
This rewrites a single "check" script from Perl to Python3. It doesn't replace the old script - yet - just provides an alternative.
The script in question is
ToAutorenewCerts.pl
, and it has several external dependencies that would not be dependencies of a Go-only Traffic Ops deployment. The Python version has no dependencies outside of the Python3 standard library.Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
There are some very sparing unit tests that can be run with
python3 -m doctest path/to/ToAutorenewCerts.py
, but the best way to test it is to simply run the script (-h
/--help
for usage - but it should be perfectly able to run using existing commands by just replacingToAutorenewCerts.pl
withToAutorenewCerts.py
because it supports the exact same command line arguments) and verify that it properly renews expired certificates by calling the appropriate API endpoints. Which is all it really does, to be honest.The following criteria are ALL met by this PR