Page MenuHomeVyOS Platform

XML: make node validator mandatory
Open, LowPublicFEATURE REQUEST

Description

While we implement more and more stuff using the new XML definitions there is a repeating pattern of missing validators.

VyOS has leafNodes like port and tagNodes like interface. An IP port is a 16 bit number and thus can only consist of values from a range 1-65535 and thus any value not matching this criteria must result in a CLI error. Interface names need to match a pattern, like macsec[0-9]+.

In the past we noticeds that some implementations lack a validator - which can cause abnormal system behavior. It is also a pain in the ass to introduce a validator once an image is widely used (LTS).

Proposal

Make the XML <constraint> node mandatory and error out during generation of the CLI if it's missing. If there is realla a reason to have no validator for a node, A must should explicitly declare it using:

<constraint>
  <none/>
</constraint>

Details

Difficulty level
Normal (likely a few hours)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Stricter validation
Issue type
Improvement (missing useful functionality)

Event Timeline

c-po created this task.
c-po changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
dmbaturin edited projects, added VyOS 1.5 Circinus; removed VyOS 1.4 Sagitta.