use crate::hardware::ManagementInterface;
use crate::topology::IpAddress;
use derive_new::new;
use harmony_types::net::MacAddress;
use log::info;
use serde::Serialize;

#[derive(new, Serialize)]
pub struct HPIlo {
    ip_address: Option<IpAddress>,
    mac_address: Option<MacAddress>,
}

impl ManagementInterface for HPIlo {
    fn boot_to_pxe(&self) {
        info!(
            "Launching boot to pxe for ip {} mac address {}",
            &self.ip_address.map_or(String::new(), |i| i.to_string()),
            &self.mac_address.map_or(String::new(), |m| m.to_string()),
        );
        todo!()
    }

    fn get_supported_protocol_names(&self) -> String {
        "ipmi,redfish".to_string()
    }
}
