File tree Expand file tree Collapse file tree 3 files changed +1
-29
lines changed Expand file tree Collapse file tree 3 files changed +1
-29
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use crate::{
1414pub ( crate ) use generate_hostname:: GenerateHostnameArgs ;
1515pub ( crate ) use generate_net_config:: GenerateNetConfigArgs ;
1616pub ( crate ) use node_ip:: NodeIpArgs ;
17- use serde:: { Deserialize , Serialize } ;
17+ use serde:: Serialize ;
1818pub ( crate ) use set_hostname:: SetHostnameArgs ;
1919use snafu:: { ensure, OptionExt , ResultExt } ;
2020use std:: fmt:: Write ;
@@ -25,24 +25,6 @@ use std::{fs, io};
2525pub ( crate ) use write_network_status:: WriteNetworkStatusArgs ;
2626pub ( crate ) use write_resolv_conf:: WriteResolvConfArgs ;
2727
28- #[ derive( Debug , PartialEq , Deserialize ) ]
29- #[ serde( rename_all = "kebab-case" ) ]
30- enum InterfaceType {
31- Dhcp ,
32- Static ,
33- }
34-
35- #[ derive( Debug , PartialEq , Deserialize ) ]
36- #[ serde( rename_all = "kebab-case" ) ]
37- enum InterfaceFamily {
38- Ipv4 ,
39- Ipv6 ,
40- }
41-
42- // Implement `from_str()` so argh can attempt to deserialize args into their proper types
43- derive_fromstr_from_deserialize ! ( InterfaceType ) ;
44- derive_fromstr_from_deserialize ! ( InterfaceFamily ) ;
45-
4628/// Helper function that serializes the input to JSON and prints it
4729fn print_json < S > ( val : S ) -> Result < ( ) >
4830where
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ supplementing any missing settings with DNS settings from the primary interface'
2626is meant to be used as a restart command for DNS API settings.
2727*/
2828
29- #[ macro_use]
3029extern crate serde_plain;
3130
3231mod addressing;
Original file line number Diff line number Diff line change @@ -42,15 +42,6 @@ impl Validate for NetworkDeviceV1 {
4242 }
4343}
4444
45- #[ derive( Debug , Deserialize ) ]
46- #[ serde( untagged) ]
47- pub ( crate ) enum DeviceType {
48- #[ serde( rename = "bond" ) ]
49- Bond ,
50- #[ serde( rename = "vlan" ) ]
51- Vlan ,
52- }
53-
5445pub ( crate ) trait HasIpAddressing {
5546 fn has_static ( & self ) -> bool ;
5647
You can’t perform that action at this time.
0 commit comments