UniversalDevicesInc/Polyglot

Refactor NodeServer::add_node() code into SimpleNodeServer::add_node()

Closed this issue · 3 comments

The add_node() method in the NodeServer class (in nodeserver_api.py) should not have a dependency on the Node class, because this makes it impossible to write a node server at a "lower level" than SimpleNodeServer.

Instead, the code that has knowledge of the Node class should be moved up into the add_node method of the SimpleNodeServer class.

If done carefully, this will have no impact on existing node servers.

@jimboca - according to git, you added the method -- is there a specific reason the Node-specific code shouldn't be pushed up to the SimpleNodeServer class's add_node method? I don't want to start messing with this if it'll break your node servers.

I think it's ok to move it up. I didn't forsee a need when the functionality was added.

Fixed on development branch -- please do a git pull and test this change against all node servers to make sure that it's working as expected. Re-open this issue if there's a problem.