Add an enabled boolean to the application model to indicate running status.
Move network enabled check out of the REST handler and into the application model.
Check for existence of applicationNetworkTypeLink. Don't forward message if no link.
Don't start all applications on boot
Make the calls for start/stop application from the Application model to the network protocols so that integrations get created/deleted.
Check for an existing integration before attempting to create one when starting an application.
Integrate pullIntegrations into addRemoteApplication. Use the integration's uplinkDataURL as the application's baseUrl.
Move TTN E2E testing data from TTN into E2E tests.
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:
Have you connected this PR to the issue it resolves? #287
Does the documentation need an update? No
Does this add new dependencies? ttn
Have you added unit or functional tests for this PR? No
What does this PR do?
enabled
boolean to the application model to indicate running status.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 theaddRemoteApplication
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 fromaddRemoteApplication
,startApplication
is called if app has a baseURL. ThestartApplication
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 asenabled
to align withNetwork.enabled
. I rename it torunning
on fetch so as to not mess with the API versioning.Screenshots or logs (if appropriate)
Questions: