Merge branch 'master' into feat/settingUpNDC

This commit is contained in:
2025-05-06 11:58:12 -04:00
103 changed files with 8763 additions and 946 deletions

View File

@@ -11,6 +11,7 @@ use crate::{
use log::{debug, info, trace, warn};
use opnsense_config_xml::OPNsense;
use russh::client;
use serde::Serialize;
use super::{ConfigManager, OPNsenseShell};
@@ -21,6 +22,15 @@ pub struct Config {
shell: Arc<dyn OPNsenseShell>,
}
impl Serialize for Config {
fn serialize<S>(&self, _serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
todo!()
}
}
impl Config {
pub async fn new(
repository: Arc<dyn ConfigManager>,

View File

@@ -4,16 +4,17 @@ pub mod modules;
pub use config::Config;
pub use error::Error;
#[cfg(test)]
mod test {
#[cfg(e2e_test)]
mod e2e_test {
use opnsense_config_xml::StaticMap;
use std::net::Ipv4Addr;
use crate::Config;
use pretty_assertions::assert_eq;
#[tokio::test]
async fn test_public_sdk() {
use pretty_assertions::assert_eq;
let mac = "11:22:33:44:55:66";
let ip = Ipv4Addr::new(10, 100, 8, 200);
let hostname = "test_hostname";