Age | Commit message (Collapse) | Author |
|
Clippy: Remove let unit
|
|
* the log directory configured in tedge config set logs.path
is now used in --init
Signed-off-by: initard <alex.solomes@softwareag.com>
|
|
This patch fixes `clippy::let_unit_value`.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
This patch changs the calls of the fs helper functions where the
interface of the functions was changed from taking `&str` as path
argument to `impl AsRef<Path>`.
Because of this, it is not necessary anymore that `&str` is passed, but
`Path`es can be passed or, as in most cases, the ad-hoc created
`String` objects can be passed by value instead of by reference,
resulting in less mental load on the calling side.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
* tedge watchdog for c8y-log-plugin and c8y-config-plugin
This PR also refactors the health check by removing the duplicate code. Pushed the duplicate code to one place and
reused it across all the thin-edge services.
Signed-off-by: Pradeep Kumar K J <pradeepkumar.kj@softwareag.com>
|
|
Signed-off-by: initard <solo@softwareag.com>
|
|
* temp tedge dir poc
Signed-off-by: initard <solo@softwareag.com>
* renaming crate and removing TedgeChildTempDir
- renamed the crate to tedge_test_utils
- removed TedgeChildTempDir as TempTedgeDir already had the same
functions
Signed-off-by: Alex Solomes <alex.solomes@softwareag.com>
* changing agent.rs tests to use TempTedgeDir
- changing agent.rs to use TempTedgeDir
- un-ignoring a test to check if agent restart creates a file in the
right place
Signed-off-by: Alex Solomes <alex.solomes@softwareag.com>
* changing tedge_mapper tests to use TempTedgeDir
Signed-off-by: Alex Solomes <alex.solomes@softwareag.com>
* changing tedge_config tests to use TempTedgeDir
Signed-off-by: Alex Solomes <alex.solomes@softwareag.com>
* changing c8y_configuration_plugin tests to use TempTedgeDir
Signed-off-by: Alex Solomes <alex.solomes@softwareag.com>
* changing tedge_apama_plugin tests to use TempTedgeDir
Signed-off-by: Alex Solomes <alex.solomes@softwareag.com>
* changing logged_command tests to use TempTedgeDir
Signed-off-by: Alex Solomes <alex.solomes@softwareag.com>
* adding another method to TempTedgeDir
Signed-off-by: initard <solo@softwareag.com>
Co-authored-by: initard <solo@softwareag.com>
|
|
|
|
|
|
Signed-off-by: initard <solo@softwareag.com>
|
|
- moved operation logs out of agent to be used in mapper
Signed-off-by: initard <solo@softwareag.com>
|
|
- changed operation logs to allow other log types not just software
list and software update
Signed-off-by: initard <solo@softwareag.com>
|
|
* Closes #1031 single tedge user
Signed-off-by: Pradeep Kumar K J <pradeepkumar.kj@softwareag.com>
* Add script to upgrade tedge from 0.6
Signed-off-by: Pradeep Kumar K J <pradeepkumar.kj@softwareag.com>
|
|
Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
|
|
|
|
|
|
|
|
Closes #769 MQTT health endpoint for tedge-daemons
|
|
|
|
* tedge init #Closes 761
* add file/directory creation errors
* add the clear session to az and collectd mappers
* refactor tedgecomponent
* remove redundant code
* subscribe to az/collectd topics in init_session
* remove duplicate init_sessions
|
|
- this was causing the software list operation
to fail with permission denied
Signed-off-by: initard <solo@softwareag.com>
|
|
Signed-off-by: initard <solo@softwareag.com>
Co-authored-by: Pradeep Kumar K J <pradeepkumar.kj@sofwareag.com>
|
|
- ensuring success status is sent if no sm-plugins dir present (with
empty software list)
- added test confirming this
Signed-off-by: initard <solo@softwareag.com>
|
|
- added logs.path to `tedge` command
- can now use `tedge config set run.path /some/run/path`
- agent and mapper use the run config
Signed-off-by: initard <solo@softwareag.com>
|
|
- added logs.path to `tedge` command
- can now use `tedge config set logs.path /some/log/path`
Signed-off-by: initard <solo@softwareag.com>
|
|
* [823] add mqtt.bind_address option
* ipaddress instead of string
|
|
When the tedge command is called, you can now pass `--config-dir` as a
cli option. The default value for this option is "/etc/tedge" and is
defined in tedge_config/src/tedge_config_location.rs.
- removed if/else tedge_config::TEdgeConfigLocation::from_users_home_location logic
from tedge main.rs
- added --config-dir option to tedge command
- fixed failing tests
Signed-off-by: initard <solo@softwareag.com>
|
|
Clippy fixes for: tedge_agent
|
|
This fixes clippy lint `clippy::redundant_static_lifetimes`.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
This fixes clippy lint `clippy::needless_borrow`.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
This fixes clippy lint `clippy::new_without_default`.
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
|
|
* add init to tedge_agent
* init mapper
* init mapper and agent postinst
* separate init and clear session functions
* use tokio::mutex instead of std::mutex
* pysys test for agent init
* system test for mapper init session
* use mqtt_channel init/clear session apis
Co-authored-by: Pradeep Kumar K J <pradeepkumar.kj@sofwareag.com>
|
|
* Basic data types for MQTT channels
* Mqtt connection
* Mqtt-channel: subscribe to topics
* Mqtt-channel: publish messages
Signed-off-by: Wenzek <diw@softwareag.com>
* Mqtt-channel: an MQTT client as no direct dependency to MQTT
Signed-off-by: Wenzek <diw@softwareag.com>
* Mqtt-chanels: no message lost on reconnect
Signed-off-by: Wenzek <diw@softwareag.com>
* Cargo fmt
Signed-off-by: Wenzek <diw@softwareag.com>
* Merge with child device management
* Remove the dependency to the `async-broadcast` and `async-channel` crates
* Moving the helper functions to the `mqtt_tests` crate
* Ensure an MQTT client can be tested without an MQTT broker
* Removing dependency on the mqtt_client crate
* Use the new `mqtt_channel` crate in the `sm-c8y` mapper
This actually fixes the bug #570
* [570] Cargo fmt
* Remove the dependency of the collectd mapper on the `mqtt_client` crate
Signed-off-by: Wenzek <diw@softwareag.com>
* Make configurable the maximum size of a message
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Fix typo in comment
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Use mqtt_channel instead of mqtt_client in tedge_agent
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Improve doc comments
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Add error case on closed channel
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Add PubChannel & SubChannel traits
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Cargo fmt
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Revert erroneously added changes
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Add a channel for errors
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Log MQTT connection errors
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Fix HTTP_proxy port
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Remove unused code
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Improve tests
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Move session configuration from Connection to Config
* Set max_packet_size default to 1M
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Cargo fmt
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
* Fix broken tests (on missing operation directory)
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Co-authored-by: Wenzek <diw@softwareag.com>
Co-authored-by: Didier Wenzek <didier.wenzek@free.fr>
|
|
* configurable download path (WIP) (#651)
Signed-off-by: initard <solo@softwareag.com>
* download path test (WIP) (#651)
Signed-off-by: initard <solo@softwareag.com>
* default download path #651
Signed-off-by: initard <solo@softwareag.com>
* install to download.path test (#651)
Signed-off-by: initard <solo@softwareag.com>
* formatting issues (#651)
Signed-off-by: initard <solo@softwareag.com>
* formatting issues (#651)
Signed-off-by: initard <solo@softwareag.com>
* rename download path to tmp path & test fix (#651)
Signed-off-by: initard <solo@softwareag.com>
* cargo fmt
Signed-off-by: initard <solo@softwareag.com>
* download path integration test (#651)
Signed-off-by: initard <solo@softwareag.com>
* adding doc detailing how to set temp path (#651)
Signed-off-by: initard <solo@softwareag.com>
* test fix (#651)
Signed-off-by: initard <solo@softwareag.com>
* adding sudo to doc (#651)
Signed-off-by: initard <solo@softwareag.com>
* removing unused test (#651)
Signed-off-by: initard <solo@softwareag.com>
* renaming, refactoring and extra documentation (#651)
Signed-off-by: initard <solo@softwareag.com>
* fixing naming of tmp.path (#651)
Signed-off-by: initard <solo@softwareag.com>
* changes to tmp dto #651
Signed-off-by: initard <solo@softwareag.com>
Co-authored-by: initard <solo@softwareag.com>
|
|
* move topics to json_sm crate
* rename json_sm to sm_interface
* format
* rename agent interface
* fix order of crates
* rename crate
* rename topics enum
* refactor downloader code
* move topicerror to error.rs
* trigger wf
* cargo fmt
* address review comments
* separate c8y topics
* add tests
* cargo fmt
* change match cases
* use download from common crate
* update test names
* fix the match issue
* fix the topic matching
* address review comments
* remove mqtt dependancy
* simplify try_from
Co-authored-by: Pradeep Kumar K J <pradeepkumar.kj@sofwareag.com>
|
|
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Co-authored-by: Didier Wenzek <didier.wenzek@free.fr>
|
|
* creating runtime directory /run/tedge_agent (#683)
Signed-off-by: initard <solo@softwareag.com>
* ignoring test due to permission error (#683)
Signed-off-by: initard <solo@softwareag.com>
Co-authored-by: initard <solo@softwareag.com>
|
|
* cloud restart operation #599
Signed-off-by: initard <solo@softwareag.com>
* operation set to executing c8y #599
Signed-off-by: initard <solo@softwareag.com>
* cargo fmt
Signed-off-by: initard <solo@softwareag.com>
* removing debug hard-coded echo
Signed-off-by: initard <solo@softwareag.com>
* updated handle_restart_opeartion signature in test #599
Signed-off-by: initard <solo@softwareag.com>
* test update for c8y_Restart
Signed-off-by: initard <solo@softwareag.com>
* removed panic on empty restart request #599
Signed-off-by: initard <solo@softwareag.com>
Co-authored-by: initard <solo@softwareag.com>
|
|
* test
* fix the mqtt message missing issue
* fix typos
* rename function
Co-authored-by: Pradeep Kumar K J <pradeepkumar.kj@sofwareag.com>
|
|
* [CIT-659] operation status rename
Signed-off-by: Alex <solo@softwareag.com>
* [CIT-659] OperationStatus rename
Signed-off-by: Alex <solo@softwareag.com>
* [CIT-659] adding new structs to lib import
Signed-off-by: Alex <solo@softwareag.com>
* [CIT-659] restart operation implementation
Signed-off-by: Alex <solo@softwareag.com>
* [CIT-659] restart operation check (WIP)
Signed-off-by: Alex <solo@softwareag.com>
* [CIT-659] wip
Signed-off-by: Alex <solo@softwareag.com>
* [CIT-659] restart operation check when /run/tedge_agent_restart persists
after operation
Signed-off-by: Alex <solo@softwareag.com>
* [CIT-659] stash merge
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] restart operation refactoring, - chrono dependency
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] removed package feature, made file creation more explicit
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] dealing with some unwraps and error handling
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] reverting changes to operation_logs + error handling
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] changed operation from echo 6 to init 6
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] fixing restart check logic
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] refactored error handling and added unit
test for /run/tedge_agent_restart
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] refactoring of tests
Signed-off-by: initard <solo@softwareag.com>
* [CIT-659] ignored failed test
Signed-off-by: initard <solo@softwareag.com>
Co-authored-by: Alex <solo@softwareag.com>
|
|
* 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>
|