UniversalDevicesInc / Polyglot

Polyglot Open Source
MIT License
24 stars 2 forks source link

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

Closed mjwesterhof closed 8 years ago

mjwesterhof commented 8 years ago

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.

mjwesterhof commented 8 years ago

@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.

jimboca commented 8 years ago

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

mjwesterhof commented 8 years ago

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.