cablelabs / lpwanserver

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

Issue 287 - Support uplink data #290

Closed rhythnic closed 5 years ago

rhythnic commented 5 years ago

What does this PR do?

Do you have any concerns with this PR?

I can't find a usable TTN API for managing integrations. All integration functionality is disabled in TTN.

How can the reviewer verify this PR?

View

Any background context you want to provide?

I removed pullIntegrations. The http integration is now pulled from the addRemoteApplication method. If there is an uplinkDataURL property (or similar), it's used as the application's baseURL when creating the app on LPWAN Server. Also from addRemoteApplication, startApplication is called if app has a baseURL. The startApplication method creates/updates the HTTP integration to set the uplinkDataURL to the uplink endpoint in LPWAN Server.

I incorporated the TTN node.js client in an attempt to support integrations. It didn't work; however, using the client enables LPWAN Server to easily discover the handler region of the applications being pulled. Before, LPWAN Server would always use the us-west region.

The running prop on application wasn't in the model, but was added to the record on fetch based on an in-memory map. I added it to the model as enabled to align with Network.enabled. I rename it to running on fetch so as to not mess with the API versioning.

Screenshots or logs (if appropriate)

Questions: