-
Story
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
rhel-net-mgmt
-
ssg_networking
-
5
-
False
-
False
-
-
No
-
None
-
-
Pass
-
Automated
-
Unspecified Release Note Type - Unknown
-
None
Similar to the validations performed on the nmstate YAML in the Go package, we need equivalent validations for the YAML used with nmpolicy in the Go package.
Today, we are using GenerateConfiguration to validate regular nmstate YAML. If an error is returned, we treat the YAML as invalid and provide the error back to the user (screenshot):
We’re looking for something similar to policies since we want users to provide the policy as input. We need a validator in Go, similar to what GenerateConfiguration has, but designed to validate YAML files containing nmpolicy. For example, it should validate the following:
capture: iface1: interfaces.mac-address == "00:00:5E:00:00:01" desiredState: interfaces: - name: "{{ capture.iface1.interfaces.0.name }}" type: ethernet state: up ipv4: dhcp: false enabled: true address: - ip: 10.244.0.1 prefix-length: 24 - ip: 169.254.1.0 prefix-length: 16
- links to
-
RHBA-2025:154283 nmstate update