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

Cumulocity software api configuration options #2778

Closed reubenmiller closed 5 months ago

reubenmiller commented 8 months ago

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

It would be useful if thin-edge.io would be able to be configurable to control when to use the new Cumulocity Advanced Software Management API and when to use the legacy inventory managed update API.

This is a follow-up feature enhancement of the c8y mapper enhancement:

Describe the solution you'd like

Allow users to control the Cumulocity Software API used by thin-edge.io via configuration. Also include an option which will automatically detect the appropriate API to use during runtime.

Proposed tedge.toml configuration

The following tedge.toml configuration is proposed:

[c8y]
software_management.api = "legacy|advanced|auto"
software_management.with_types = true

Where

Describe alternatives you've considered

Additional context

rina23q commented 5 months ago

2771 implemented the feature described in this ticket besides the auto option. So as of now, we support legacy and advanced enum only as you can find it in the code below.

https://github.com/thin-edge/thin-edge.io/blob/82732a9e219eac788eae008558503e198831efcf/crates/common/tedge_config/src/tedge_config_cli/models/c8y_software_management.rs#L10-L13