feat: Add verification of opnsense package installation, fix opnsense-config tests, add log file to tui
This commit is contained in:
@@ -12,7 +12,7 @@ use super::{Interface, Pischem};
|
||||
pub struct OPNsense {
|
||||
pub theme: String,
|
||||
pub sysctl: Sysctl,
|
||||
pub system: RawXml,
|
||||
pub system: System,
|
||||
// pub interfaces: RawXml,
|
||||
pub interfaces: NamedList<Interface>,
|
||||
pub dhcpd: NamedList<DhcpInterface>,
|
||||
@@ -172,10 +172,8 @@ pub struct SysctlItem {
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
pub struct System {
|
||||
#[yaserde(rename = "use_mfs_tmp")]
|
||||
pub use_mfs_tmp: MaybeString,
|
||||
#[yaserde(rename = "use_mfs_var")]
|
||||
pub use_mfs_var: MaybeString,
|
||||
pub use_mfs_tmp: Option<MaybeString>,
|
||||
pub use_mfs_var: Option<MaybeString>,
|
||||
pub serialspeed: u32,
|
||||
pub primaryconsole: String,
|
||||
pub secondaryconsole: String,
|
||||
@@ -190,6 +188,7 @@ pub struct System {
|
||||
pub timeservers: String,
|
||||
pub webgui: WebGui,
|
||||
pub usevirtualterminal: u8,
|
||||
pub disablenatreflection: String,
|
||||
pub disableconsolemenu: u8,
|
||||
pub disablevlanhwfilter: u8,
|
||||
pub disablechecksumoffloading: u8,
|
||||
@@ -200,40 +199,34 @@ pub struct System {
|
||||
pub powerd_battery_mode: String,
|
||||
pub powerd_normal_mode: String,
|
||||
pub bogons: Bogons,
|
||||
pub crypto_hardware: String,
|
||||
pub crypto_hardware: Option<String>,
|
||||
pub pf_share_forward: u8,
|
||||
pub lb_use_sticky: u8,
|
||||
pub kill_states: u8,
|
||||
pub kill_states: Option<u8>,
|
||||
pub ssh: Ssh,
|
||||
pub rrdbackup: Option<i8>,
|
||||
pub netflowbackup: Option<i8>,
|
||||
pub firmware: Firmware,
|
||||
pub sudo_allow_wheel: u8,
|
||||
pub sudo_allow_group: String,
|
||||
pub enablenatreflectionhelper: String,
|
||||
pub rulesetoptimization: String,
|
||||
pub maximumstates: MaybeString,
|
||||
pub maximumfrags: MaybeString,
|
||||
pub aliasesresolveinterval: MaybeString,
|
||||
pub maximumtableentries: MaybeString,
|
||||
pub sudo_allow_wheel: Option<u8>,
|
||||
pub sudo_allow_group: Option<String>,
|
||||
pub enablenatreflectionhelper: Option<String>,
|
||||
pub rulesetoptimization: Option<String>,
|
||||
pub maximumstates: Option<MaybeString>,
|
||||
pub maximumfrags: Option<MaybeString>,
|
||||
pub aliasesresolveinterval: Option<MaybeString>,
|
||||
pub maximumtableentries: Option<MaybeString>,
|
||||
pub language: String,
|
||||
pub dnsserver: MaybeString,
|
||||
#[yaserde(rename = "dns1gw")]
|
||||
pub dns1gw: String,
|
||||
#[yaserde(rename = "dns2gw")]
|
||||
pub dns2gw: String,
|
||||
#[yaserde(rename = "dns3gw")]
|
||||
pub dns3gw: String,
|
||||
#[yaserde(rename = "dns4gw")]
|
||||
pub dns4gw: String,
|
||||
#[yaserde(rename = "dns5gw")]
|
||||
pub dns5gw: String,
|
||||
#[yaserde(rename = "dns6gw")]
|
||||
pub dns6gw: String,
|
||||
#[yaserde(rename = "dns7gw")]
|
||||
pub dns7gw: String,
|
||||
#[yaserde(rename = "dns8gw")]
|
||||
pub dns8gw: String,
|
||||
pub dns1gw: Option<String>,
|
||||
pub dns2gw: Option<String>,
|
||||
pub dns3gw: Option<String>,
|
||||
pub dns4gw: Option<String>,
|
||||
pub dns5gw: Option<String>,
|
||||
pub dns6gw: Option<String>,
|
||||
pub dns7gw: Option<String>,
|
||||
pub dns8gw: Option<String>,
|
||||
pub dnsallowoverride: u8,
|
||||
pub dnsallowoverride_exclude: MaybeString,
|
||||
pub dnsallowoverride_exclude: Option<MaybeString>,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
@@ -257,10 +250,11 @@ pub struct Firmware {
|
||||
pub version: String,
|
||||
pub mirror: MaybeString,
|
||||
pub flavour: MaybeString,
|
||||
pub plugins: String,
|
||||
pub plugins: MaybeString,
|
||||
#[yaserde(rename = "type")]
|
||||
pub firmware_type: MaybeString,
|
||||
pub subscription: MaybeString,
|
||||
pub reboot: MaybeString,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
@@ -284,14 +278,15 @@ pub struct User {
|
||||
pub name: String,
|
||||
pub descr: MaybeString,
|
||||
pub scope: String,
|
||||
pub groupname: MaybeString,
|
||||
pub groupname: Option<MaybeString>,
|
||||
pub password: String,
|
||||
pub uid: u32,
|
||||
pub expires: MaybeString,
|
||||
pub authorizedkeys: MaybeString,
|
||||
pub ipsecpsk: MaybeString,
|
||||
pub otp_seed: MaybeString,
|
||||
pub shell: MaybeString,
|
||||
pub expires: Option<MaybeString>,
|
||||
pub authorizedkeys: Option<MaybeString>,
|
||||
pub dashboard: Option<MaybeString>,
|
||||
pub ipsecpsk: Option<MaybeString>,
|
||||
pub otp_seed: Option<MaybeString>,
|
||||
pub shell: Option<MaybeString>,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
@@ -303,8 +298,8 @@ pub struct WebGui {
|
||||
#[yaserde(rename = "ssl-ciphers")]
|
||||
pub ssl_ciphers: MaybeString,
|
||||
pub interfaces: MaybeString,
|
||||
|
||||
pub compression: MaybeString,
|
||||
pub nohttpreferercheck: Option<u8>,
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
@@ -876,7 +871,7 @@ pub struct Servers {}
|
||||
pub struct Proxy {
|
||||
#[yaserde(attribute = true)]
|
||||
pub version: String,
|
||||
pub general: ConfigGeneral,
|
||||
pub general: ProxyGeneral,
|
||||
pub forward: Forward,
|
||||
pub pac: Option<Pac>,
|
||||
#[yaserde(rename = "error_pages")]
|
||||
@@ -884,7 +879,7 @@ pub struct Proxy {
|
||||
}
|
||||
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
pub struct ConfigGeneral {
|
||||
pub struct ProxyGeneral {
|
||||
pub enabled: i8,
|
||||
pub error_pages: String,
|
||||
#[yaserde(rename = "icpPort")]
|
||||
@@ -919,7 +914,7 @@ pub struct ConfigGeneral {
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
pub struct Logging {
|
||||
pub enable: Enable,
|
||||
#[yaserde(rename = "ifnoreLogACL")]
|
||||
#[yaserde(rename = "ignoreLogACL")]
|
||||
pub ignore_log_acl: MaybeString,
|
||||
pub target: MaybeString,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user