removed NodeInfo and using NodeConf instead
This is a significant change in the undelying data model! nodeDb, err := node.New() will result in a structure which contains the on disk values. Only nodeDb.FindAllNodes() or nodeDb.GetNode(id) will give the nodes with its merged in profiles. Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
dc8fb2d6f2
commit
28a7b9fe84
@@ -491,9 +491,8 @@ func SplitValidPaths(input, delim string) []string {
|
||||
return (ret)
|
||||
}
|
||||
|
||||
func IncrementIPv4(start string, inc uint) string {
|
||||
ip_start := net.ParseIP(start)
|
||||
ipv4 := ip_start.To4()
|
||||
func IncrementIPv4(start net.IP, inc uint) net.IP {
|
||||
ipv4 := start.To4()
|
||||
v4_int := uint(ipv4[0])<<24 + uint(ipv4[1])<<16 + uint(ipv4[2])<<8 + uint(ipv4[3])
|
||||
v4_int += inc
|
||||
v4_o3 := byte(v4_int & 0xFF)
|
||||
@@ -501,7 +500,7 @@ func IncrementIPv4(start string, inc uint) string {
|
||||
v4_o1 := byte((v4_int >> 16) & 0xFF)
|
||||
v4_o0 := byte((v4_int >> 24) & 0xFF)
|
||||
ipv4_new := net.IPv4(v4_o0, v4_o1, v4_o2, v4_o3)
|
||||
return ipv4_new.String()
|
||||
return ipv4_new
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user