telefonicaid / iotagent-node-lib

Module to enable IoT Agent developers to build custom agents for their devices that can easily connect to NGSI Context Brokers
https://iotagent-node-lib.rtfd.io/
GNU Affero General Public License v3.0
60 stars 85 forks source link

[Remove] Single Configuration Mode #1469

Closed mapedraza closed 11 months ago

mapedraza commented 11 months ago

Remove support for Single Configuration Mode

This is an old method that provide backwards compatibility with older IoTAS (I assume CPP IoTAS)

According to the documentation:

In order to allow backward-compatibility with those agents, the IoT Agent Library now implement a compatibility mode: the Single Configuration Mode, that makes the agent behave like the old agents. In this mode:

  • Each Subservice can contain just one Configuration. If a second Configuration is created for a Subservice, an error is raised.

  • Each Device provisioned for a Subservice is automatically assigned to the Subservice one Configuration if there is any.

This compatibility has to be set for the whole IoT Agent, and there is no option of having both modes simultaneously running. Transitions from one mode to the other should be made with care, and may involve data migration.

References

https://github.com/search?q=repo%3Atelefonicaid%2Fiotagent-node-lib%20Single%20Configuration%20Mode&type=code

https://github.com/telefonicaid/iotagent-node-lib/blob/2d027c920ee180eedc49be5f3132abdd7ca75220/lib/commonConfig.js#L449

fgalan commented 11 months ago

Done in PR https://github.com/telefonicaid/iotagent-node-lib/pull/1503