thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
223 stars 55 forks source link

Move cloud specific logic out of plugins #2017

Closed reubenmiller closed 1 year ago

reubenmiller commented 1 year ago

Is your feature request related to a problem? Please describe.

The following plugins assume that the cloud backend is Cumulocity IoT.

It would be very beneficial (and a cleaner overall design) if all cloud specific logic was moved out of the plugins and to the associated mappers. This would leave a plugin that could be usable for different clouds. A good reference is the Software Management feature in the tedge-agent which provides tedge/commands topics to handle requests and responses related software management in a cloud agnostic manner.

Describe the solution you'd like

The following points should be covered:

Describe alternatives you've considered

Additional context

One specific challenged that will need to be addressed is how to handle cloud specific HTTP downloads/uploads. As this generally requires a cloud specific authorization. The actual implementation of a cloud specific downloader/uploader could be implemented in a different issue/PR and then used by this issue.

This is also related to the topic of subscribing to Cumulocity JSON operations via the devicecontrol/notifications #1718 topic which sends the operations as JSON instead of Cumulocity SmartREST.

Subtasks

rina23q commented 1 year ago

Subtasks:

reubenmiller commented 1 year ago

The following plugins have been migrated to a generic implementation with no cloud-specific logic:

The system tests have been updated to use the these new plugins.

reubenmiller commented 1 year ago

QA has thoroughly checked the feature and here are the results: