use serde::{Deserialize, Serialize}; use crate::net::cidr::CidrV4; use std::net::Ipv4Addr; #[derive(Debug, Serialize, Deserialize)] pub struct NewInstance { pub name: String, pub title: Option, pub description: Option, pub subnet: String, pub base_image: String, pub cores: u8, pub memory: u32, pub disk_sizes: (u32, Option), pub ci_userdata: Option>, } #[derive(Debug, Serialize, Deserialize)] pub struct NewSubnet { pub if_name: String, pub network: CidrV4, pub start_addr: Option, pub end_addr: Option, pub gateway: Option, pub dns: Vec, }