From 30b314d16a7d9529fc0ed15b4df17b0ef6980618 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Sun, 29 Oct 2023 22:22:13 +0100 Subject: [PATCH] Remove old test code --- src/main.rs | 67 ----------------------------------------------------- 1 file changed, 67 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9fda6f9..ed3b05b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,71 +73,4 @@ async fn main() { .serve(main_router.into_make_service()) .await .unwrap(); - - /* - let mut tx = config_manager.start_transaction().unwrap(); - - tx.changes - .firewall - .forward_rules - .push(definitions::firewall::ForwardRule { - name: "name".to_string(), - comment: "test".to_string(), - counter: true, - verdict: definitions::firewall::Verdict::Accept, - services: Vec::new(), - destination_addresses: Vec::new(), - source_addresses: Vec::new(), - }); - - tx.commit().unwrap(); - - config_manager.apply_pending_changes().unwrap(); - - let mut tx2 = config_manager.start_transaction().unwrap(); - - tx2.changes.network.interfaces.insert( - "inter1".to_string(), - definitions::network::NetworkInterface { - alias: "test".to_owned(), - comment: "test comment".to_owned(), - interface_type: definitions::network::NetworkInterfaceType::Hardware { - device: "eth0".to_owned(), - }, - addressing_mode: definitions::network::AddressingMode::None, - }, - ); - - tx2.changes.network.interfaces.insert( - "inter2".to_string(), - definitions::network::NetworkInterface { - alias: "test2".to_owned(), - comment: "test comment".to_owned(), - interface_type: definitions::network::NetworkInterfaceType::Hardware { - device: "eth0".to_owned(), - }, - addressing_mode: definitions::network::AddressingMode::Static { - address: "192.168.1.1".to_owned(), - }, - }, - ); - - tx2.changes - .network - .static_routes - .push(definitions::network::StaticRoute { - name: "test1".to_string(), - interface: "eth0".to_string(), - gateway: "192.168.1.1".parse().unwrap(), - destination: "10.42.42.0/24".parse().unwrap(), - metric: 0, - }); - - tx2.commit().unwrap(); - - config_manager.apply_pending_changes().unwrap(); - - let applied_config = config_manager.get_current_config(); - info!("applied_config = {:#?}", applied_config); - */ }