Page MenuHomeVyOS Platform

Make the operational command tree cache suitable for use with the op mode runner
Open, HighPublic

Description

The current JSON cache format for op mode commands is behind current the state of affairs elsewhere in the op mode world.

  1. It's stored in the Python library dir, which is an awkward path for non-Python tools — and the runner cannot be in Python because it needs CAP_SETUID and that's not possible to do safely in Python (it can't be set on scripts).
  2. It uses the old (name, type) format — a compromise we made when we had ambiguous paths in op mode. That format makes lookup very difficult and it's no longer necessary after T7541.
  3. The generator script still offers path ambiguity check as an option, but now we need to make it the default so that accidental ambiguous paths fail the build.
  4. It doesn't properly support virtual tag nodes yet.
  5. It injects named placehoders like ethernet-tag_value in place of numeric parameters like $4 but doesn't mark them as something distinct from fixed parts of the command. We could use {{ethernet-tag_value}} and similar to enable rendering commands with a simple template processor.

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)