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 NodeBuilder
andNodeController
into true PEP 3119 abstract base classes for clarity and better static type checking. !48 (merged) -
Have Node.getBuilder
return aNodeBuilder
instead of aLocalNodeBuilder
. For type-checking to pass, this requires not callingLocalNodeBuilder
methods that don't also exist onNodeBuilder
. !47 (merged) -
Have Node.getController
return aNodeController
instead of aLocalNodeController
. Similar to above. !49 (merged) -
Move LocalNodeController
,LocalNodeBuilder
, and other tor-specific code fromchutney.TorNet
to a a new subpackagechutney.tor
.chutney.TorNet
is 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 ArtiNodeController
andArtiNodeBuilder
classes, with implementations for all of the abstract methods on the base classesNodeBuilder
andNodeController
. (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 raiseNotImplemented
exceptions. !55 (merged) -
Add a use-arti
node configuration flag. When set, aNode
creates theArti*
variants ofNodeBuilder
andNodeController
!55 (merged)