Page MenuHomeVyOS Platform

Cleanup custom python validators
In progress, NormalPublicFEATURE REQUEST


The maintainers came to the conclusion that there are a lot of validators available that are implemented using custom Python code.

Despite the fact that Python is THE language for vyos-1x - it might be the wrong language for CLI validators. This is b/c of the performance penalty of the python interpreter startup for every CLI node which has such a validator.

There are already regex and numeric range validators available in OCaml thich have prooven to be much faster compared to Python (compiled code vs interpreted code).

This is the umbrealla task for cleaning up the current state of the python validators.

  • mac-address and mac-address-firewall are best suited for an inline <regex> validator
  • allowed-vlan can be superseeded by the new OCaml range validator
  • tcp-flag is not used at all
  • dotted-decimal is not used at all

Others can be implemented using the new constraintGroup functionality by combining multiple base validators


Difficulty level
Normal (likely a few hours)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

c-po changed the task status from Open to In progress.Nov 3 2022, 4:15 PM
c-po triaged this task as Normal priority.
c-po created this task.
c-po changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po changed Issue type from Unspecified (please specify) to Internal change (not visible to end users).