Commit Graph

6 Commits

Author SHA1 Message Date
Christian Goll
7f502c1f8a added test for tag from profile
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-11-25 01:54:02 -07:00
Christian Goll
fdd233a25f Add recursive getter functions
When transforming a NodeConf struct to a NodeInfo (get the NodeInfo from
the Nodconf) nested structures were seperately handled. This means there
were seperate handles for e.g *Netdevs and *IpmiConfig. The new getter
traverses through the datastucture and sets the right value for an Entry
struct, but calls itself again if a Pointer is detected.

This adds the posiblity to add new nested structures to NodeConf and
NodeInfo without the need of seperate handling them in the transformer
functions.

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
4d50f053d7 Minor test fixes
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
96644be621 allow UNSET for IP addresses
added more tests for GetFrom
allow UNSET and handle empty hwaddr

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:17:38 +01:00
Christian Goll
b0602133ec use netParseIP and ParseMAC
check also MAC addresses and common formating

Signed-off-by: Christian Goll <cgoll@suse.de>

reformat ipaddr for test coverage

fixed processing of default values

updated transformer tests

correct behavior for tags

add tests for tags

new tests for primary network

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:17:07 +01:00
Christian Goll
79ed2a33ff added simple test for transformer.go 2022-11-29 14:30:41 +01:00