Skip to content
Snippets Groups Projects
Unverified Commit a86ce3b7 authored by Nikos Kontakis's avatar Nikos Kontakis
Browse files

Address comments

parent 8a2da83d
Branches
No related merge requests found
......@@ -14,3 +14,4 @@ futures = "0.3"
serde = "1.0"
serde_json = "1.0"
tokio = "1.28"
reqwest = "0.11"
\ No newline at end of file
......@@ -57,7 +57,6 @@ pub trait Provider {
async fn get_help_info(&mut self) -> Result<(), ProviderError>;
async fn destroy_namespace(&mut self) -> Result<(), ProviderError>;
async fn get_logs_command(&mut self, name: String) -> Result<String, ProviderError>;
// TODO: need to implement
async fn put_local_magic_file(
&self,
_name: String,
......
......@@ -29,17 +29,17 @@ use crate::{
};
#[derive(Debug, Serialize, Clone, PartialEq)]
pub struct NativeProvider<T: FileSystem + Send + Sync> {
/// Namespace of the client (isolation directory)
// Namespace of the client (isolation directory)
namespace: String,
/// Path where configuration relies, all the `files` are accessed relative to this.
// Path where configuration relies, all the `files` are accessed relative to this.
config_path: String,
/// Variable that shows if debug is activated
// Variable that shows if debug is activated
is_debug: bool,
/// The timeout for start the node
// The timeout for start the node
timeout: u32,
/// Command to use, e.g "bash"
// Command to use, e.g "bash"
command: String,
/// Temporary directory, root directory for the network
// Temporary directory, root directory for the network
tmp_dir: String,
local_magic_file_path: String,
remote_dir: String,
......@@ -174,8 +174,7 @@ impl<T: FileSystem + Send + Sync> Provider for NativeProvider<T> {
let script_path_in_pod = format!("{}/{}/{}", self.tmp_dir, identifier, script_filename);
// upload the script
let _ = self
.filesystem
self.filesystem
.copy(&script_path, &script_path_in_pod)
.await
.map_err(|e| ProviderError::FSError(Box::new(e)))?;
......@@ -342,8 +341,7 @@ impl<T: FileSystem + Send + Sync> Provider for NativeProvider<T> {
) -> Result<(), ProviderError> {
// TODO: log::debug!(format!("cp {} {}", pod_file_path, local_file_path));
let _ = self
.filesystem
self.filesystem
.copy(&pod_file_path, &local_file_path)
.await
.map_err(|e| ProviderError::FSError(Box::new(e)))?;
......
......@@ -9,5 +9,4 @@ edition = "2021"
thiserror = { workspace = true }
async-trait = { workspace = true }
futures = { workspace = true }
reqwest = "0.11.18"
......@@ -9,10 +9,6 @@ match_block_trailing_comma = true
use_field_init_shorthand = true
use_try_shorthand = true
# alignment
struct_field_align_threshold = 0
enum_discrim_align_threshold = 0
# normalization
normalize_comments = true
normalize_doc_attributes = true
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment