Use quick-xml to serialize network definitions
This commit is contained in:
		@@ -123,7 +123,7 @@ impl NetworkInfo {
 | 
			
		||||
                        .hosts
 | 
			
		||||
                        .iter()
 | 
			
		||||
                        .map(|c| NetworkDHCPHostXML {
 | 
			
		||||
                            mac: c.mac.to_string(),
 | 
			
		||||
                            mac: Some(c.mac.to_string()),
 | 
			
		||||
                            name: c.name.to_string(),
 | 
			
		||||
                            ip: c.ip.into(),
 | 
			
		||||
                        })
 | 
			
		||||
@@ -150,7 +150,7 @@ impl NetworkInfo {
 | 
			
		||||
                        .hosts
 | 
			
		||||
                        .iter()
 | 
			
		||||
                        .map(|h| NetworkDHCPHostXML {
 | 
			
		||||
                            mac: "".to_string(),
 | 
			
		||||
                            mac: None,
 | 
			
		||||
                            name: h.name.to_string(),
 | 
			
		||||
                            ip: h.ip.into(),
 | 
			
		||||
                        })
 | 
			
		||||
@@ -221,7 +221,7 @@ impl NetworkInfo {
 | 
			
		||||
                            .hosts
 | 
			
		||||
                            .iter()
 | 
			
		||||
                            .map(|h| DHCPv4HostReservation {
 | 
			
		||||
                                mac: h.mac.to_string(),
 | 
			
		||||
                                mac: h.mac.clone().unwrap_or_default(),
 | 
			
		||||
                                name: h.name.to_string(),
 | 
			
		||||
                                ip: extract_ipv4(h.ip),
 | 
			
		||||
                            })
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user