Page MenuHomeVyOS Platform

Correct rendering of childless non-leaf nodes
Open, NormalPublic

Description

Right now, our config rendering cannot handle childless non-leaf nodes. It always renders them as if they were valueless nodes:

utop # Vyos1x.Parser.from_string {|
system {
  /* This is a non-leaf childless node */
  login {
  }
}

|} |> Vyos1x.Config_tree.render_config |> Printf.printf "Rendered config:\n\n%s\n" ;;
Rendered config:

system {
    /* This is a non-leaf childless node */
    login
}

- : unit = ()

That can cause incorrect behavior and, and even when it doesn't, it's still wrong and breaks the expectation that parsed configs will be rendered exactly as they came.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

dmbaturin triaged this task as Normal priority.
dmbaturin updated the task description. (Show Details)