Fix handling of CIDR values in warewulf.conf

- Fixes: #1541
- Fixes: #1594

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-02-03 17:01:57 -07:00
parent 8088112c30
commit 2e1466fc7e
11 changed files with 520 additions and 192 deletions

View File

@@ -19,8 +19,10 @@ func Test_debugOverlay(t *testing.T) {
env := testenv.New(t)
defer env.RemoveAll()
env.ImportFile("etc/warewulf/warewulf.conf", "warewulf.conf")
env.ImportFile("etc/warewulf/nodes.conf", "nodes.conf")
env.ImportFile("var/lib/warewulf/overlays/debug/rootfs/tstruct.md.ww", "../rootfs/tstruct.md.ww")
env.Configure()
tests := []struct {
name string
@@ -86,11 +88,12 @@ data from other structures.
### Network
- Ipaddr:
- Ipaddr: 192.168.0.1
- IpCIDR: 192.168.0.1/24
- Ipaddr6:
- Netmask:
- Network:
- NetworkCIDR:
- Netmask: 255.255.255.0
- Network: 192.168.0.0
- NetworkCIDR: 192.168.0.0/24
- Ipv6: false
### DHCP