Skip to content

Commit

Permalink
Rename tedge_api::messages -> commands
Browse files Browse the repository at this point in the history
This module contains only command related messages.

Signed-off-by: Didier Wenzek <[email protected]>
  • Loading branch information
didier-wenzek committed Apr 9, 2024
1 parent 4a31a93 commit 383e62e
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 61 deletions.
4 changes: 2 additions & 2 deletions crates/core/c8y_api/src/json_c8y.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use std::collections::HashMap;
use std::fmt;
use tedge_api::alarm::ThinEdgeAlarm;
use tedge_api::alarm::ThinEdgeAlarmData;
use tedge_api::commands::SoftwareListCommand;
use tedge_api::entity_store::EntityMetadata;
use tedge_api::entity_store::EntityType;
use tedge_api::event::ThinEdgeEvent;
use tedge_api::messages::SoftwareListCommand;
use tedge_api::EntityStore;
use tedge_api::Jsonify;
use tedge_api::SoftwareModule;
Expand Down Expand Up @@ -366,11 +366,11 @@ mod tests {
use std::collections::HashSet;
use tedge_api::alarm::ThinEdgeAlarm;
use tedge_api::alarm::ThinEdgeAlarmData;
use tedge_api::commands::SoftwareListCommandPayload;
use tedge_api::entity_store::EntityExternalId;
use tedge_api::entity_store::EntityRegistrationMessage;
use tedge_api::entity_store::InvalidExternalIdError;
use tedge_api::event::ThinEdgeEventData;
use tedge_api::messages::SoftwareListCommandPayload;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_api::mqtt_topics::MqttSchema;
use test_case::test_case;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/c8y_api/src/smartrest/smartrest_serializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub trait OperationStatusMessage {
#[cfg(test)]
mod tests {
use super::*;
use tedge_api::messages::SoftwareListCommandPayload;
use tedge_api::commands::SoftwareListCommandPayload;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_api::Jsonify;

Expand Down
6 changes: 3 additions & 3 deletions crates/core/plugin_sm/src/plugin_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ use std::io::{self};
use std::path::Path;
use std::path::PathBuf;
use std::process::Stdio;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::SoftwareListCommand;
use tedge_api::messages::SoftwareUpdateCommand;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::SoftwareListCommand;
use tedge_api::commands::SoftwareUpdateCommand;
use tedge_api::SoftwareError;
use tedge_api::SoftwareType;
use tedge_api::DEFAULT;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/tedge_agent/src/operation_file_cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use tedge_actors::RuntimeRequestSink;
use tedge_actors::Sender;
use tedge_actors::Service;
use tedge_actors::SimpleMessageBoxBuilder;
use tedge_api::messages::ConfigUpdateCmdPayload;
use tedge_api::commands::ConfigUpdateCmdPayload;
use tedge_api::mqtt_topics::Channel;
use tedge_api::mqtt_topics::ChannelFilter;
use tedge_api::mqtt_topics::EntityFilter;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/tedge_agent/src/restart_manager/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tedge_actors::RuntimeError;
use tedge_actors::RuntimeRequest;
use tedge_actors::Sender;
use tedge_actors::SimpleMessageBox;
use tedge_api::messages::CommandStatus;
use tedge_api::commands::CommandStatus;
use tedge_api::RestartCommand;
use tedge_config::system_services::SystemConfig;
use tedge_config::system_services::SystemSpecificCommands;
Expand Down
4 changes: 2 additions & 2 deletions crates/core/tedge_agent/src/restart_manager/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use tedge_actors::NoConfig;
use tedge_actors::Sender;
use tedge_actors::SimpleMessageBox;
use tedge_actors::SimpleMessageBoxBuilder;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::RestartCommandPayload;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::RestartCommandPayload;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_api::RestartCommand;
use tedge_config::SudoCommandBuilder;
Expand Down
8 changes: 4 additions & 4 deletions crates/core/tedge_agent/src/software_manager/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ use tedge_actors::RuntimeError;
use tedge_actors::RuntimeRequest;
use tedge_actors::Sender;
use tedge_actors::SimpleMessageBox;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::SoftwareCommandMetadata;
use tedge_api::messages::SoftwareListCommand;
use tedge_api::messages::SoftwareUpdateCommand;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::SoftwareCommandMetadata;
use tedge_api::commands::SoftwareListCommand;
use tedge_api::commands::SoftwareUpdateCommand;
use tedge_api::SoftwareType;
use tedge_config::TEdgeConfigError;
use tracing::error;
Expand Down
16 changes: 8 additions & 8 deletions crates/core/tedge_agent/src/software_manager/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ use tedge_actors::NoConfig;
use tedge_actors::Sender;
use tedge_actors::SimpleMessageBox;
use tedge_actors::SimpleMessageBoxBuilder;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::SoftwareCommandMetadata;
use tedge_api::messages::SoftwareListCommand;
use tedge_api::messages::SoftwareModuleAction;
use tedge_api::messages::SoftwareModuleItem;
use tedge_api::messages::SoftwareRequestResponseSoftwareList;
use tedge_api::messages::SoftwareUpdateCommand;
use tedge_api::messages::SoftwareUpdateCommandPayload;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::SoftwareCommandMetadata;
use tedge_api::commands::SoftwareListCommand;
use tedge_api::commands::SoftwareModuleAction;
use tedge_api::commands::SoftwareModuleItem;
use tedge_api::commands::SoftwareRequestResponseSoftwareList;
use tedge_api::commands::SoftwareUpdateCommand;
use tedge_api::commands::SoftwareUpdateCommandPayload;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_config::SudoCommandBuilder;
use tedge_config::TEdgeConfigLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use tedge_actors::MessageReceiver;
use tedge_actors::RuntimeError;
use tedge_actors::Sender;
use tedge_actors::UnboundedLoggingReceiver;
use tedge_api::messages::RestartCommand;
use tedge_api::messages::SoftwareCommandMetadata;
use tedge_api::messages::SoftwareListCommand;
use tedge_api::messages::SoftwareUpdateCommand;
use tedge_api::commands::RestartCommand;
use tedge_api::commands::SoftwareCommandMetadata;
use tedge_api::commands::SoftwareListCommand;
use tedge_api::commands::SoftwareUpdateCommand;
use tedge_api::mqtt_topics::Channel;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_api::mqtt_topics::MqttSchema;
Expand Down
16 changes: 8 additions & 8 deletions crates/core/tedge_agent/src/tedge_operation_converter/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ use tedge_actors::RequestEnvelope;
use tedge_actors::Sender;
use tedge_actors::SimpleMessageBox;
use tedge_actors::SimpleMessageBoxBuilder;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::RestartCommandPayload;
use tedge_api::messages::SoftwareCommandMetadata;
use tedge_api::messages::SoftwareListCommand;
use tedge_api::messages::SoftwareModuleAction;
use tedge_api::messages::SoftwareModuleItem;
use tedge_api::messages::SoftwareRequestResponseSoftwareList;
use tedge_api::messages::SoftwareUpdateCommandPayload;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::RestartCommandPayload;
use tedge_api::commands::SoftwareCommandMetadata;
use tedge_api::commands::SoftwareListCommand;
use tedge_api::commands::SoftwareModuleAction;
use tedge_api::commands::SoftwareModuleItem;
use tedge_api::commands::SoftwareRequestResponseSoftwareList;
use tedge_api::commands::SoftwareUpdateCommandPayload;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_api::mqtt_topics::MqttSchema;
use tedge_api::workflow::WorkflowSupervisor;
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions crates/core/tedge_api/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
pub mod alarm;
pub mod commands;
pub mod entity_store;
pub mod error;
pub mod event;
pub mod health;
pub mod measurement;
pub mod messages;
pub mod mqtt_topics;
pub mod path;
mod software;
mod store;
pub mod workflow;

pub use commands::CommandStatus;
pub use commands::Jsonify;
pub use commands::OperationStatus;
pub use commands::RestartCommand;
pub use commands::SoftwareListCommand;
pub use commands::SoftwareUpdateCommand;
pub use download::*;
pub use entity_store::EntityStore;
pub use error::*;
pub use health::*;
pub use messages::CommandStatus;
pub use messages::Jsonify;
pub use messages::OperationStatus;
pub use messages::RestartCommand;
pub use messages::SoftwareListCommand;
pub use messages::SoftwareUpdateCommand;
pub use software::*;
pub use store::pending_entity_store;

Expand Down
10 changes: 5 additions & 5 deletions crates/extensions/c8y_mapper_ext/src/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ use std::path::PathBuf;
use std::sync::Arc;
use tedge_actors::LoggingSender;
use tedge_actors::Sender;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::RestartCommand;
use tedge_api::commands::SoftwareCommandMetadata;
use tedge_api::commands::SoftwareListCommand;
use tedge_api::commands::SoftwareUpdateCommand;
use tedge_api::entity_store;
use tedge_api::entity_store::EntityExternalId;
use tedge_api::entity_store::EntityRegistrationMessage;
Expand All @@ -72,11 +77,6 @@ use tedge_api::entity_store::Error;
use tedge_api::entity_store::InvalidExternalIdError;
use tedge_api::event::error::ThinEdgeJsonDeserializerError;
use tedge_api::event::ThinEdgeEvent;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::RestartCommand;
use tedge_api::messages::SoftwareCommandMetadata;
use tedge_api::messages::SoftwareListCommand;
use tedge_api::messages::SoftwareUpdateCommand;
use tedge_api::mqtt_topics::Channel;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_api::mqtt_topics::IdGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use c8y_http_proxy::messages::CreateEvent;
use camino::Utf8PathBuf;
use std::collections::HashMap;
use tedge_actors::Sender;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::ConfigSnapshotCmdPayload;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::ConfigSnapshotCmdPayload;
use tedge_api::mqtt_topics::Channel;
use tedge_api::mqtt_topics::ChannelFilter;
use tedge_api::mqtt_topics::EntityFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use c8y_api::smartrest::smartrest_serializer::set_operation_executing;
use c8y_api::smartrest::smartrest_serializer::succeed_operation_no_payload;
use c8y_api::smartrest::smartrest_serializer::CumulocitySupportedOperations;
use std::sync::Arc;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::ConfigUpdateCmdPayload;
use tedge_api::entity_store::EntityExternalId;
use tedge_api::entity_store::EntityMetadata;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::ConfigUpdateCmdPayload;
use tedge_api::mqtt_topics::Channel;
use tedge_api::mqtt_topics::ChannelFilter;
use tedge_api::mqtt_topics::EntityFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use c8y_api::smartrest::smartrest_serializer::fail_operation;
use c8y_api::smartrest::smartrest_serializer::set_operation_executing;
use c8y_api::smartrest::smartrest_serializer::succeed_operation_no_payload;
use c8y_api::smartrest::smartrest_serializer::CumulocitySupportedOperations;
use tedge_api::commands::FirmwareInfo;
use tedge_api::commands::FirmwareUpdateCmdPayload;
use tedge_api::entity_store::EntityExternalId;
use tedge_api::messages::FirmwareInfo;
use tedge_api::messages::FirmwareUpdateCmdPayload;
use tedge_api::mqtt_topics::Channel;
use tedge_api::mqtt_topics::ChannelFilter::Command;
use tedge_api::mqtt_topics::ChannelFilter::CommandMetadata;
Expand Down
6 changes: 3 additions & 3 deletions crates/extensions/c8y_mapper_ext/src/operations/log_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use c8y_http_proxy::messages::CreateEvent;
use camino::Utf8PathBuf;
use std::collections::HashMap;
use tedge_actors::Sender;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::LogMetadata;
use tedge_api::messages::LogUploadCmdPayload;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::LogMetadata;
use tedge_api::commands::LogUploadCmdPayload;
use tedge_api::mqtt_topics::Channel;
use tedge_api::mqtt_topics::ChannelFilter::Command;
use tedge_api::mqtt_topics::ChannelFilter::CommandMetadata;
Expand Down
2 changes: 1 addition & 1 deletion crates/extensions/c8y_mapper_ext/src/operations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use crate::converter::CumulocityConverter;
use crate::error::ConversionError;
use tedge_api::messages::ConfigMetadata;
use tedge_api::commands::ConfigMetadata;
use tedge_api::mqtt_topics::EntityTopicId;
use tedge_api::Jsonify;
use tedge_mqtt_ext::MqttMessage;
Expand Down
6 changes: 3 additions & 3 deletions crates/extensions/tedge_config_manager/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use tedge_actors::LoggingSender;
use tedge_actors::MessageReceiver;
use tedge_actors::RuntimeError;
use tedge_actors::Sender;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::ConfigSnapshotCmdPayload;
use tedge_api::messages::ConfigUpdateCmdPayload;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::ConfigSnapshotCmdPayload;
use tedge_api::commands::ConfigUpdateCmdPayload;
use tedge_api::Jsonify;
use tedge_downloader_ext::DownloadRequest;
use tedge_downloader_ext::DownloadResult;
Expand Down
4 changes: 2 additions & 2 deletions crates/extensions/tedge_log_manager/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use tedge_actors::NoMessage;
use tedge_actors::RuntimeError;
use tedge_actors::Sender;
use tedge_actors::SimpleMessageBox;
use tedge_api::messages::CommandStatus;
use tedge_api::messages::LogUploadCmdPayload;
use tedge_api::commands::CommandStatus;
use tedge_api::commands::LogUploadCmdPayload;
use tedge_api::Jsonify;
use tedge_file_system_ext::FsWatchEvent;
use tedge_mqtt_ext::MqttMessage;
Expand Down

0 comments on commit 383e62e

Please sign in to comment.