summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
AgeCommit message (Collapse)Author
2022-05-20c8y_log_plugin implementation #1077initard
- log plugin is now a daemon - log file uses a configuration file to request logs from c8y UI - log plugin uses inotify to automatically update c8y of new logs files Signed-off-by: initard <solo@softwareag.com>
2022-04-08Initial skeleton of c8y_configuration_pluginRina Fujino
- The daemon reads the plugin config file, and reports the supported config types to c8y - Issue tracked by #1030, Specs is by #1028 Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
2022-02-28Enable Resolve v2 for workspaceMarcel Müller
The v2 resolver allows for more fine-grained inclusion of dependency features. Previously dev-dependency features got merged with 'normal' dependency features. This may not always be desirable. For more information see https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html Signed-off-by: Marcel Müller <m.mueller@ifm.com>
2022-02-15fixed session name buginitard
- renamed jwt token session - renamed file C8y_LogfileRequest to c8y_LogfileRequest - added cargo deb asset to create binary in /usr/bin/tedge_logfile_request_plugin - closing mqtt client connection in plugin Signed-off-by: initard <solo@softwareag.com>
2022-02-15moving implemenation specific code to plugin (#790)initard
- Moved mqtt client and http client to pluing main.rs - Removed empty test file and default cargo lib test - Moved log specific messages from topic.rs to plugin - Fixed mapper session name Signed-off-by: initard <solo@softwareag.com>
2022-02-15c8y_api lib, tedge config, mqtt/http utilities (#790)initard
Preparing the repo for the log request plugin. Restructuring folders, moving code out of sm_c8y_mapper and into c8y_api, c8y_smartrest or tedge_config. Signed-off-by: initard <solo@softwareag.com>
2021-11-24Restructure directories of the workspace (#559)Lukasz Woznicki
* Restructure directories of the workspace * Rename c8y_translator_lib to c8y_translator * Update comment on how to get dummy plugin path Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-11-22[CIT-675] Apama plugin (#586)Albin Suresh
* [CIT-675] Apama plugin
2021-11-10[CIT 515] Fix the tests of the MQTT component. (#561)Didier Wenzek
* Add a test helper to except a message on MQTT * Fix doc string Signed-off-by: Wenzek <diw@softwareag.com> * Move the test_mqtt_server in a dev-dependency * The tests of the agent are not dependent of MQTT * Working around sub ack * Refactor the test message logger * Add test helper functions * Make test clearer * Use test helper functions to simplify the tests * Rename module * Launch the test MQTT broker just once * Encapsulate the port of the MQTT test broker * Display the first 30 bytes of the messages recieved by the test MQTT broker * Make serial the agent tests * Upgrade to rumqtt latest * Fix mqtt test broker log * Reproduce the issue with lost messages when the sm_mapper is down * Cargo fmt * Addressing comments * Update test * Remove test_serial attribute * Ignore test `tedge_agent_check_no_multiple_instances_running` * Run commit-workflow tests with no-fail-fast * ignore test requesting sudo * Make helper functions method of the test broker handler * Cargo fmt * Wait for the mapper under test to start Co-authored-by: Wenzek <diw@softwareag.com>
2021-09-28[CIT-571] Add download crate and supporting struct in json_sm (#454)Lukasz Woznicki
* Add download crate and supporting struct in json_sm * Add tests for downloader Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-09-23Move smartrest to separate crate (#446)Lukasz Woznicki
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-08-16[CIT-450] Add tests for plugin_sm lib (#375)Lukasz Woznicki
* Add tests for plugins and plugin registry. Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-08-08[CIT-450] Tedge Agent - SM feature (#354)Lukasz Woznicki
* Add basic tedge_agent code and service * Add tedge_utils::fs atomically write file * Add short documentation notes for tedge_agent * Make sm-plugins path dynamic for agent * Update dependencies due to cargo audit hyper vuln Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-30[CIT-500] thin edge json extension to handle software management messages (#360)Didier Wenzek
* [CIT-500] Add the crate `sm/json_sm` * [CIT-500] Start with code from PR #354 * [CIT-500] Add helper method for software list request and response * [CIT-500] Move all the messages into the `messages` module * [CIT-500] Add help method to create software update requests * [CIT-500] Using a software list response * [CIT-500] Fix version in Cargo.toml * [CIT-500] Make optional the current list of software * [CIT-500] Report software update errors * [CIT-500] Add getter for operation status * [CIT-500] Retrieve the list of modules of a software list response * [CIT-500] Cargo fmt Co-authored-by: Wenzek <diw@softwareag.com> Co-authored-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
2021-07-23CIT-459: Deterministic batching algorithm (#355)ChrisGreenaway
2021-07-07[CIT-429] apt plugin (#325)Didier Wenzek
* [CIT-429] Init with the prototype version * [CIT-429] Update the options * [CIT-429] Returning approprate error status * [CIT-429] Improve code readability * [CIT-429] Cargo fmt * [CIT-429] Fix module description * [CIT-429] Configure package for debian * [CIT-429] Fix apt list output * [CIT-429] Add basic system test * [CIT-429] Simplify struct def * [CIT-429] Use --manual-installed * [CIT-429] Add tests for install/remove * [CIT-429] Build tedge_apt_plugin debian package * [CIT-429] Purge tedge-apt-plugin before re-install * [CIT-429] Checking that the whole list output * [CIT-429] Rename pysys tests Co-authored-by: Wenzek <diw@softwareag.com>
2021-07-06[CIT-380] Integrate collectd_mapper with tedge_mapper (#320)Lukasz Woznicki
* Move collectd_mapper to tedge_mapper * Add tedge-mapper-collectd service * Rename cli arg from dm to collectd Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-07-05Add binary size optimization to decrease size of the produced binaries (#316)Lukasz Woznicki
Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-06-17[cit-415] Refactor TEJ/C8Y Serializer code (#292)PradeepKiruvale
* Use String for serialization * Add a JsonWriter abstraction * [CIT-415] add unit tests * [CIT-415] addressed review comments * [CIT-415] updated test cases * [CIT-415] Add key type * Use serde_json::to_writer for serialization * use serde_json for serializing * fix azure_converter tests * [CIT-415] Add test for key with quote Co-authored-by: Michael Neumann <mneumann@ntecs.de> Co-authored-by: Pradeep K J <Pradeep K J pradeekumar.kj@softwareag.com>
2021-06-03[CIT-394] fix build on windows (#267)Didier Wenzek
* [CIT-394] Create unix/windows module for flockfile * [CIT-394] Extract the `users` module into the `common/tedge_users` crate * [CIT-394] cargo fmt * [CIT-394] Use `tedge_users` rather than `users` Co-authored-by: Wenzek <diw@softwareag.com>
2021-06-03[CIT-377] rename tedge_dm_agent to collectd_mapper (#266)PradeepKiruvale
Co-authored-by: Pradeep K J <Pradeep K J pradeekumar.kj@softwareag.com>
2021-05-21[CIT 365] Refactor DM agent code (#229)Albin Suresh
* Make MessageBatcher configurable. * Make `MessageBatchPublisher::new` infallible * Move error into it's own module. * Introduce Clock trait to simulate time Co-authored-by: Michael Neumann <mneumann@ntecs.de>
2021-05-18[CIT-293] Add lock to allow only one mapper running (#231)Lukasz Woznicki
* Add flockfile crate Signed-off-by: Lukasz Woznicki <lukasz.woznicki@softwareag.com>
2021-05-12[CIT-335] Device monitoring with collectd (#211)Albin Suresh
[CIT-335] Device monitoring with collectd
2021-04-13[CIT-218] Extract the device identifier from the device certificate (#176)Didier Wenzek
* [CIT-218] Extract certificate related code to a new crate * [CIT-218] Cargo fmt * [CIT-218] Add tests * [CIT-218] Add PemCertificate::subject_common_name() * [CIT-218] Cargo fmt Co-authored-by: Wenzek <diw@softwareag.com>
2021-04-07[CIT-309] thinedge crate (#156)PradeepKiruvale
* [CIT-309] move thinedge json into separate crate * [CIT-309] move thinedge json into separate crate * [CIT-309] moved some tests into tedge_json * [CIT-309] fixed some review comments * [CIT-309] Added a newline at the eof * [CIT-309] moved thin edge related tests * [CIT-309] renamed crate to thin_edge_json * [CIT-309] cargo fmt/clippy * [CIT-309] Fixed failing test * [CIT-309] reverted de/serialization code * [CIT-309] Updated the authors Co-authored-by: root <root@SAG-8J75N13.localdomain> Co-authored-by: Pradeep K J <pradeekumar.kj@softwareag.com> Co-authored-by: Pradeep K J <Pradeep K J pradeekumar.kj@softwareag.com>
2021-04-07Refactor TEdge config (#155)Michael Neumann
- 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.
2021-03-09[CIT-70] Rename c8y_mapper to tedge_mapper (#79)Rina Fujino
2021-02-09[CIT-182] Change the directory layout (#32)Rina Fujino
[CIT-182] Change the directory layout and rename some directories - The `mqtt_client` crate move to common directory - The `tedge-mapper` crate rename to `c8y_mapper` and move to mapper/cumulocity directory - The `c8y_json_translarot` crate rename to `c8y_translator_lib` and move to mapper/cumulocity directory - The `script` directory rename to `ci`
2021-01-29Update dependencies to latest, remove unused module. (#28)Lukasz Woznicki
2021-01-15[CIT-101] Mapper application framework (#16)Lukasz Woznicki
* [CIT-102] Thin Edge Json to C8y Json translator library * Added binary workspace for tedge-mapper * Mapper struct * Add client mapper struct to map from open json to csv mqtt * Add missing comments * Add missing comments * Update tokio to latest * Use translator to convert to c8y_json * Remove commented out code from mapper.rs * mapper.rs - convert error message return result to string. * mapper.rs - remove unused code. * Adjust code to use latest (4cd08dc52ebd026f05845bb95d2d4eb47c2e48ed) interface from json translator * mapper.rs - update publish interface call to pass plain payload. * Add tests for scan_port function. * mapper.rs - fix tests for mapper::map with new payload format. * Remove server avaialable check. * Correct Ok return results * Remove redundant contants and use default config. * Remove commented out code. * main.rs - Use mapper::const for topics instead of hardcoded values. * mapper.rs - Remove behaviour to overwrite user input and propagate error with exit. * tedge-mapper.service - Update app description to be more generic. * mapper.rs - change Vec<u8> to a slice param. * mapper.rs - Update timestamp to be correctly formatted to iso8601 * mapper.rs - Add run method with task handlejoin on errors and messages. * main.rs - Use run method from mapper. * mapper.rs - Refactor tests to use byte raw string. * Remove redundant tests from mapper.rs which are already covered in c8y_translator
2021-01-15[CIT-102] Thin Edge Json to C8y Json translator library (#10)PradeepKiruvale
* [CIT-102] Thin Edge Json to C8y Json translator library * [CIT-102] moved pretty_assertions into dev-dependancies [CIT-102] removed commented code [CIT-102] renamed c8ytype to c8y_type [CIT-102] Changed timestamp to DateTime type from string [CIT-102] Fixed example name typo [CIT-102] rename c8y_type to c8y_msg_type [CIT-102] make MultiValueMeasurement struct to pub [CIT-102] moved JsonError down in the file [CIT-102] Removed e/println! macros [CIT-102] Moved the coversion of struct to enum into the create function [CIT-102] add wild cards to gitignore [CIT-102] Changed datetime stamp to Utc * [CIT-102] Fixed some indentation issue [CIT-102] Fixed json indentation issue [CIT-102] c8yobj to c8y_obj [CIT-102] c8yobj to c8y_object [CIT-102] created a reuseable insert function [CIT-102] cargo fmt [CIT-102] Simplified the assert_eq [CIT-102] c8yjson to c8y_json [CIT-102] single_value_thinedge to single_value_thin_edge [CIT-102] multi_value_thin_obj to multi_value_thin_edge_object [CIT-102] create_value_obj to create_value_object [CIT-102] json::from to into [CIT-102] mutlivale to multi_value [CIT-102] single_value to single_values [CIT-102] initialize vector with vec! instead of new [CIT-102] thinedge to thin_edge [CIT-102] c8yjson to c8y_json [CIT-102] re-ordered parameters in create_multi_val [CIT-102] Refactored from_json function [CIT-102] avoid clone * [CIT-102] translate timestamp and type * [CIT-102] Fixed the formating and names in example * [CIT-102] Added a test to test timestamp and type translation * [CIT-102] Removed dead code in library * [CIT-102] time and type as thin edge reserved words [cit-102] changed the value to f64 from json::Number [CIT-102] Removed dead code * [CIT-102] renamed JsonError to ThinEdgeJsonError [CIT-102] changed error handling to shorthand notation [CIT-103] removed simple insert_object function [CIT-102] rename create_c8y_obj to new and made it a method of Cumulocity structure [CIT-102] translate_multi value as method of CumulocityJson structure [CIT-102] Moved single_val translation as part of C8Y structure [CIT-103] move all c8y struct methods to one place [CIT-102] remaned thinedge to thin_edge [CIT-103] move all the create_* functions as methods of ThinEdgeValue enum * [CIT-102] Moved the insert_object function into the Cumulocity structure [CIT-102] Moved create value object inside Cumulocity Struct [CIT-102] Move the into_cumulocity_json method into CumulocityJson structure [CIT-102] Refactored translate functions [CIT-102] Renamed type of message to ThinEdgeMeasurement [CIT-102] Moved create methods to resepective structs * [CIT-102] Check timestamp for iso8601 complaint * [CIT-102] Fixed example, removed type from thin-edge message [CIT-102] Added a function to deserialize the c8yjson [CIT-102] Expose only CumulocityJson API [CIT-102] Added test for deserialization check [CIT-102] Fixed pretty printing, with extra white spaces * [CIT-102] Moved time-stamp into ThinEdgeJson struct * [CIT-102] Remove unwrap for timestamp validation and return proper error * [CIT-102] Removed unwrap and returning error * [CIT-102] check time key before checking value * [CIT-102] Check for keywords type and time * [CIT-102] Fixed the invalid json in example * [CIT-102] Implemented test cases to check thin-edge-json validity * [CIT-102] Fixed doc test and fixed comments * [CIT-102] Renamed create_* functions as new * [CIT-102] Fixed thinedge hierarchy test * [CIT-102] Added and updated the comments * [CIT-102] Added proptest * [CIT-102] Fixed minor test issues * [CIT-102] move proptest inside test module, proptest crate inside the dev-dependancy Co-authored-by: Pradeep K J <pradeekumar.kj@softwareag.com>
2020-12-22[CIT-122] A library to build MQTT client (#11)Didier Wenzek
[CIT-122] Cargo fmt [CIT-122] Improve naming [CIT-122] Remove magic number [CIT-122] Spawn a task for `publish_temperature` [CIT-122] Use futures_timer::Delay instead of tokio::sleep [CIT-122] Use futures::select! [CIT-122] Avoid to redefine variables [CIT-122] Rearrange imports [CIT-122] Remove unused file [CIT-122] Fix error handling [CIT-122] Fix typo and error messages [CIT-122] Clean required tokio's features list [CIT-122] Removing author from cargo [CIT-122] Use `log` instead of `println` [CIT-122] Upgrade to rumqttc 0.3 [CIT-122] Fix system tests [CIT-122] Add first integration test [CIT-122] Document the API [CIT-122] Refactore example `temperature_publisher` [CIT-122] Check topic name and filter validity [CIT-122] Break the event loop on disconnect [CIT-122] Treat error receiver lag as an error [CIT-122] Publish the internal MQTT errors on a stream [CIT-122] First working version [CIT-122] Initial API
2020-12-10Add basic tests for cli.Your Name
2020-12-09Initial implementation of the cli using clapYour Name
2020-11-26[CIT-33] Basic CI/CD workflow for thin edgePradeep K J
Signed-off-by: Pradeep K J <pradeekumar.kj@softwareag.com>