To implement the concept of systems in Mender, we'll leverage the inventory attributes and mark devices belonging to a specific system setting an attribute (e.g. GatewayID or SystemID) to a shared value across the system.
This task requires the implementation of a new configuration setting in the Mender Gateway component to intercept the inventory updates from the devices connected to the gateway and extend the payload adding additional attributes.
- Users can set a new configuration setting in the Mender Gateway configuration file to enhance/extend the device inventory attributes providing a map of key-value pairs that will override the inventory data transmitted by the device.
- The key-value pairs set in the Mender Gateway will never overwrite the inventory attributes from the device if set, and will only apply if the device is not setting any value for the specified attributes.
- If the PATCH method is used the gateway should be smart enough to not set the attributes if already done for that specific value.