This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
dynamic mapping of device report content -> appropriate database fields #1035
Labels
device reports
Involves data coming from reporters
enhancement
extends current functionality
v3.next
features, big changes for api v3.<next>
Builds on #1001.
At present (v3.0), when processing a device report, we have hardcoded paths within the report from which to extract the various fields to be added to the database (disks, memory, etc). This will be problematic as we start moving the device report structure around for the validation rewrite (the report structure has to change somewhat in order to accomodate the capabilities and limitations of the JSON Schema format).
We can use the schema information (and therefore device report version) encoded in the Content-Type header to select
from a mapping table the appropriate locations of the various database fields.
For example:
We will need a mapping table for every new device report format we create. This should be enforced by (what else!) another JSON Schema in order for a new device report format to be eligible for submission by relays.
The text was updated successfully, but these errors were encountered: