Add (skeleton) ArtiLocalNodeController and ArtiLocalNodeBuilder
This is part of arti#1683.
The idea is to add a place where we can start adding arti implementations of the various functionality that is currently c-tor-specific.
I think adding ArtiLocalNodeController and ArtiLocalNodeBuilder classes that implement the current (intended-to-be)-abstract base classes NodeBuilder and NodeController seems like a fairly sensible approach.
It's a little weird in that the only current implementations of these base classes are LocalNodeController and LocalNodeBuilder, implying possible future implementations along the lines of RemoteNode*, which could indeed be useful; meanwhile adding arti here adds an extra "dimension" so that we could later end up with e.g. 4 implementations of each: [Arti|Tor][Local|Remote]Node*. I think in practice that might actually be what we want, though, since the implementations of the base classes will indeed look substantially different for all 4 variants. If and when we do add Remote variants we can also put code that would be common between Local and Remote into some utility function, mixin, intermediate base class, etc.
The intended plan and scope of this issue is roughly:
-
Turn NodeBuilderandNodeControllerinto true PEP 3119 abstract base classes for clarity and better static type checking. !48 (merged) -
Have Node.getBuilderreturn aNodeBuilderinstead of aLocalNodeBuilder. For type-checking to pass, this requires not callingLocalNodeBuildermethods that don't also exist onNodeBuilder. !47 (merged) -
Have Node.getControllerreturn aNodeControllerinstead of aLocalNodeController. Similar to above. !49 (merged) -
Move LocalNodeController,LocalNodeBuilder, and other tor-specific code fromchutney.TorNetto a a new subpackagechutney.tor.chutney.TorNetis already large enough to warrant splitting up, and we want to establish a pattern such that the new arti-specific code will likewise go in a new subpackage instead of intochutney.TorNet. !51 (merged) -
Add ArtiNodeControllerandArtiNodeBuilderclasses, with implementations for all of the abstract methods on the base classesNodeBuilderandNodeController. (More methods will have been added while cleaning up other code to not assume these objects are actuallyLocal*). Within the scope of this issue, these implementations may just raiseNotImplementedexceptions. !55 (merged) -
Add a use-artinode configuration flag. When set, aNodecreates theArti*variants ofNodeBuilderandNodeController!55 (merged)