feat: opnsense-config make sure file has not changed on remote since loading it before saving it, also fix group member Vec<u8> type was not able to deserialize when more than one member
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
This commit is contained in:
@@ -51,6 +51,7 @@ pub struct OPNsense {
|
||||
|
||||
impl From<String> for OPNsense {
|
||||
fn from(content: String) -> Self {
|
||||
|
||||
yaserde::de::from_str(&content)
|
||||
.map_err(|e| println!("{}", e))
|
||||
.expect("OPNSense received invalid string, should be full XML")
|
||||
@@ -267,12 +268,12 @@ pub struct Bogons {
|
||||
#[derive(Default, PartialEq, Debug, YaSerialize, YaDeserialize)]
|
||||
pub struct Group {
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub description: Option<String>,
|
||||
pub scope: String,
|
||||
pub gid: u32,
|
||||
pub member: Vec<u32>,
|
||||
pub member: String,
|
||||
#[yaserde(rename = "priv")]
|
||||
pub priv_field: String,
|
||||
pub priv_field: Option<String>,
|
||||
pub source_networks: Option<MaybeString>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user