Repository navigation
Configurator and Client Refactor - #135
Conversation
There was a problem hiding this comment.
__hash__ and set_port et al below vs "If a class defines mutable objects and implements a cmp() or eq() method, it should not implement hash(), since hashable collection implementations require that a object’s hash value is immutable (if the object’s hash value changes, it will be in the wrong hash bucket)." (https://docs.python.org/2/reference/datamodel.html#object.__hash__)
There was a problem hiding this comment.
Yeah... I was worried about that... I didn't get around to the test cases yet in order to verify the problem. Thanks for the info. I will rewrite the class and get testcases in before the merge.
|
Nice :)
|
|
About to leave for a few hours... wanted to get this pushed out before I left, there are probably a few things that I missed. I will do further cleanup when I get back. |
|
This branch does temporarily mess up the "revocation experience". I am busy further removing the revocation functions from the client, but this will also require that the send/receive functions should be removed into their own file. |
Conflicts: letsencrypt/client/client.py letsencrypt/client/crypto_util.py
Conflicts: letsencrypt/client/apache/configurator.py setup.py
|
@jdkasten sure, I forgot what was on the whiteboard :) |
This pull request is just a large refactor. I am not sure if this is complete, but I thought I would open it up to comment before I have to go to sleep for a couple hours.
I pulled out lower-level code from the Apache Configurator into a separate Apache Parser. Apache Parser is a member of ApacheConfigurator. I would like to write separate classes for each challenge type, but that will come in the next PR.
Client.py has been separated into its particular functions. (obtain certificates, deploy_cert, optimize). I have pulled out all of the setup code (dialogs) into functions that can be accessed by the main script before beginning. The main script now have a naive sense of picking the proper Authenticator and Installer (two new interfaces that represent the previous configurator's functionality).
Separating this into two parts allow things like the Stand-alone configurator to be easily used by itself and also allows the possibility of any other TLS service to write an installer in order to install the cert from something like the stand-alone (null) configurator.
Code works and it is PEP8 compliant. Pylint warnings are pretty low.
I need some rest, but I will review pull requests here in a couple of hours and get everything merged appropriately.