summaryrefslogtreecommitdiffstats
path: root/crates/core/plugin_sm
diff options
context:
space:
mode:
authorPradeepKiruvale <PRADEEPKIRUVALE@gmail.com>2022-01-11 19:11:07 +0530
committerGitHub <noreply@github.com>2022-01-11 19:11:07 +0530
commit141e93c03c8f9d9a9dd7076830445b3fd9cd5154 (patch)
tree794582fdad064c6021fb02db200f8a7d00260d67 /crates/core/plugin_sm
parent1f41ff7f0909cee0452801f31ab983a581abfd8d (diff)
[663] agent topics (#731)
* 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>
Diffstat (limited to 'crates/core/plugin_sm')
-rw-r--r--crates/core/plugin_sm/Cargo.toml2
-rw-r--r--crates/core/plugin_sm/src/plugin.rs2
-rw-r--r--crates/core/plugin_sm/src/plugin_manager.rs2
-rw-r--r--crates/core/plugin_sm/tests/plugin.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/crates/core/plugin_sm/Cargo.toml b/crates/core/plugin_sm/Cargo.toml
index d6967a48..59171ed4 100644
--- a/crates/core/plugin_sm/Cargo.toml
+++ b/crates/core/plugin_sm/Cargo.toml
@@ -5,10 +5,10 @@ authors = ["thin-edge.io team <info@thin-edge.io>"]
edition = "2018"
[dependencies]
+agent_interface = { path = "../agent_interface" }
async-trait = "0.1"
csv = "1.1"
download = { path = "../../common/download" }
-json_sm = { path = "../json_sm" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tedge_utils = { path = "../../common/tedge_utils" }
diff --git a/crates/core/plugin_sm/src/plugin.rs b/crates/core/plugin_sm/src/plugin.rs
index 2eabad91..c4f45ebc 100644
--- a/crates/core/plugin_sm/src/plugin.rs
+++ b/crates/core/plugin_sm/src/plugin.rs
@@ -1,8 +1,8 @@
use crate::logged_command::LoggedCommand;
+use agent_interface::*;
use async_trait::async_trait;
use csv::ReaderBuilder;
use download::Downloader;
-use json_sm::*;
use serde::Deserialize;
use std::{path::PathBuf, process::Output};
use tokio::io::BufWriter;
diff --git a/crates/core/plugin_sm/src/plugin_manager.rs b/crates/core/plugin_sm/src/plugin_manager.rs
index 44e7b1bc..90bcd6ba 100644
--- a/crates/core/plugin_sm/src/plugin_manager.rs
+++ b/crates/core/plugin_sm/src/plugin_manager.rs
@@ -1,6 +1,6 @@
use crate::plugin::{Plugin, LIST};
use crate::{log_file::LogFile, plugin::ExternalPluginCommand};
-use json_sm::{
+use agent_interface::{
SoftwareError, SoftwareListRequest, SoftwareListResponse, SoftwareType, SoftwareUpdateRequest,
SoftwareUpdateResponse, DEFAULT,
};
diff --git a/crates/core/plugin_sm/tests/plugin.rs b/crates/core/plugin_sm/tests/plugin.rs
index 11b31f3f..966f666c 100644
--- a/crates/core/plugin_sm/tests/plugin.rs
+++ b/crates/core/plugin_sm/tests/plugin.rs
@@ -1,8 +1,8 @@
#[cfg(test)]
mod tests {
+ use agent_interface::{SoftwareError, SoftwareModule, SoftwareModuleUpdate};
use assert_matches::assert_matches;
- use json_sm::{SoftwareError, SoftwareModule, SoftwareModuleUpdate};
use plugin_sm::plugin::{deserialize_module_info, ExternalPluginCommand, Plugin};
use serial_test::serial;
use std::{fs, io::Write, path::PathBuf, str::FromStr};