Merge pull request #400 from jcsiadal/netdevfix

Fix wwctl bug deleting networks and ability to set default network
This commit is contained in:
Gregory M. Kurtzer
2022-05-03 22:04:53 -07:00
committed by GitHub
6 changed files with 18 additions and 12 deletions

View File

@@ -75,7 +75,7 @@ type NetDevs struct {
Prefix string `yaml:"prefix,omitempty"`
Netmask string `yaml:"netmask,omitempty"`
Gateway string `yaml:"gateway,omitempty"`
Default string `yaml:"default,omitempty"`
Default string `yaml:"primary,omitempty"`
Tags map[string]string `yaml:"tags,omitempty"`
}

View File

@@ -68,6 +68,8 @@ Set bool
func (ent *Entry) SetB(val bool) {
if val {
ent.value = []string{"true"}
} else {
ent.value = []string{"false"}
}
}
@@ -100,6 +102,9 @@ func (ent *Entry) SetAltB(val bool, from string) {
if val {
ent.altvalue = []string{"true"}
ent.from = from
} else {
ent.altvalue = []string{"false"}
ent.from = from
}
}