feat: remove the getMacAddress

This commit is contained in:
Sylvain Tremblay 2024-12-18 09:38:17 -05:00
parent 58f81f0e58
commit 51c6f1818c
5 changed files with 3 additions and 30 deletions

13
harmony-rs/Cargo.lock generated
View File

@ -711,17 +711,6 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "fqm"
version = "0.1.0"
dependencies = [
"cidr",
"env_logger",
"harmony",
"log",
"tokio",
]
[[package]] [[package]]
name = "funty" name = "funty"
version = "2.0.0" version = "2.0.0"
@ -2800,8 +2789,10 @@ name = "wk"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"cidr", "cidr",
"env_logger",
"harmony", "harmony",
"harmony_macros", "harmony_macros",
"log",
"tokio", "tokio",
] ]

View File

@ -41,10 +41,6 @@ impl ManagementInterface for ManualManagementInterface {
todo!() todo!()
} }
fn get_mac_address(&self) -> MacAddress {
todo!()
}
fn get_supported_protocol_names(&self) -> String { fn get_supported_protocol_names(&self) -> String {
todo!() todo!()
} }
@ -52,15 +48,13 @@ impl ManagementInterface for ManualManagementInterface {
pub trait ManagementInterface: Send + Sync { pub trait ManagementInterface: Send + Sync {
fn boot_to_pxe(&self); fn boot_to_pxe(&self);
fn get_mac_address(&self) -> MacAddress;
fn get_supported_protocol_names(&self) -> String; fn get_supported_protocol_names(&self) -> String;
} }
impl std::fmt::Debug for dyn ManagementInterface { impl std::fmt::Debug for dyn ManagementInterface {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!( f.write_fmt(format_args!(
"ManagementInterface mac : {}, protocols : {}", "ManagementInterface protocols : {}",
self.get_mac_address(),
self.get_supported_protocol_names(), self.get_supported_protocol_names(),
)) ))
} }

View File

@ -11,10 +11,6 @@ impl ManagementInterface for HPIlo {
todo!() todo!()
} }
fn get_mac_address(&self) -> MacAddress {
todo!()
}
fn get_supported_protocol_names(&self) -> String { fn get_supported_protocol_names(&self) -> String {
todo!() todo!()
} }

View File

@ -14,10 +14,6 @@ impl ManagementInterface for IntelAmtManagement {
todo!() todo!()
} }
fn get_mac_address(&self) -> MacAddress {
self.mac_address.clone()
}
fn get_supported_protocol_names(&self) -> String { fn get_supported_protocol_names(&self) -> String {
"IntelAMT".to_string() "IntelAMT".to_string()
} }

View File

@ -10,10 +10,6 @@ impl ManagementInterface for OPNSenseManagementInterface {
todo!() todo!()
} }
fn get_mac_address(&self) -> MacAddress {
todo!("OPNSense can have multiple mac addresses using SSH. I'm not sure it even belongs in the ManagementInterface trait")
}
fn get_supported_protocol_names(&self) -> String { fn get_supported_protocol_names(&self) -> String {
"OPNSenseSSH".to_string() "OPNSenseSSH".to_string()
} }