This will be required to preserve platform network configuration in a
cache across boots. Network configuration will be marshaled to YAML and
unmarshaled back.
Changes are pretty simple and most of the code is auto-generated:
replace `stringer` codegen with `enumer` which produces also methods
which convert from string back to enum values.
Added tests to verify YAML marshaling/unmarshaling.
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
Related to #4420
This removes `linux` build tags to make sure all `nethelpers` build on
any OS, as it's part of Talos API (via resources). Constants were
replaced with literal values. Code generated by `stringer` serves as
proof of the change: constant values haven't changed.
Remove build tags from `pkgs/resources/network` now, marking only a part
of single file `_linux` (which converts link spec to low-level netlink
messages).
Theere should be no functional changes.
Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>