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",
]
[[package]]
name = "fqm"
version = "0.1.0"
dependencies = [
"cidr",
"env_logger",
"harmony",
"log",
"tokio",
]
[[package]]
name = "funty"
version = "2.0.0"
@ -2800,8 +2789,10 @@ name = "wk"
version = "0.1.0"
dependencies = [
"cidr",
"env_logger",
"harmony",
"harmony_macros",
"log",
"tokio",
]

View File

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

View File

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

View File

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

View File

@ -10,10 +10,6 @@ impl ManagementInterface for OPNSenseManagementInterface {
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 {
"OPNSenseSSH".to_string()
}