summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorMichael Neumann <mneumann@ntecs.de>2021-04-07 15:19:06 +0200
committerGitHub <noreply@github.com>2021-04-07 15:19:06 +0200
commit6472cb57fe196b5e19bc7a5eceeb994843dfa095 (patch)
tree74b7036564396239c1f8946602b297d3505c3660 /Cargo.toml
parentf9c30859d284145c25a1fd9121f968c7d011994a (diff)
Refactor TEdge config (#155)
- Refactor TEdgeConfig - Move configuration into `tedge_config` crate. - Add `ConfigSetting` trait. Each "thing" that we want to make configurable will have it's own struct-type. For example `struct DeviceIdSetting` or `C8yUrlSetting`. - The `ConfigSetting` trait does not provide any means of how to read/write/unset a configuration setting. It only provides the key, description and the value type of the setting, but no implementation. - Use trait `ConfigSettingAccessor` to implemenent `query`, `update` and `unset` methods. - `TEdgeConfigRepository` implements functionality to read/write a `TEdgeConfig`. The `TEdgeConfig` struct itself just holds data. - Add `TEdgeConfigLocation` which holds all data that we need to resolve the defaults in TEdgeConfig, including the name of the config file (TODO: we might want to split these two apart). The defaults differ depending on the location of the `tedge.toml`, whether it's located in `/etc` or a users `$HOME/.tedge` (or in tests). - Only add the `tedge_config` crate. `tedge` is currently not modified to use the new API. - Remove remaining `unwrap`s, also from tests - No longer create intermediate directories upon saving configuration # FOLLOW-UP TASKS - Refactor the `tedge` crate to use `tedge_config`. - Compute the `device.id` from the certificate stored in `device.cert.path`, if any. - Ensure that the config is updated only by `tedge config set/unset`. - Extend tedge_config_location to also manage the paths to the bridge configuration files. - Update `ConfigRepository::store()` to properly set file ownership.
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index f5e84120..c009a6bb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,6 +3,7 @@
members = [
"common/mqtt_client",
"tedge",
+ "tedge_config",
"mapper/tedge_mapper",
"mapper/cumulocity/c8y_translator_lib",
]