cablelabs / lpwanserver

LPWAN Provisioning & Management Server
https://lpwanserver.com
Apache License 2.0
37 stars 11 forks source link

Consolidate NetworkProtocol versioned handlers #325

Open rhythnic opened 5 years ago

rhythnic commented 5 years ago

Currently, Network Protocol records contain a version property, and Network Protocol handlers are separated according to the network's version, so one Network Protocol for each major version of a network.

Instead, allow the user to enter a version string when creating a network. Since the Network record is passed to the Network Protocol handler methods, these methods will be able to branch according to the version. This would mean that there can be just one Network Protocol for all versions of a network.

The file structure of a Network Protocol handler may still reflect versions, but these will be files that are imported into the sole handler. From the system's point of view, there is only one handler per network.