Page MenuHomeVyOS Platform

XML command definition convertor doesn't disallow tag nodes with multi flag on
Closed, ResolvedPublicBUG

Description

The <multi/> option only makes sense for leaf nodes. It allows a node to have more than one value, and it's only leaf nodes that can have values. Other nodes (tag or not) can only have child nodes. It's impossible for a node to have both values and child nodes. It's a misconception to think that "eth0" in "interfaces ethernet eth0" is a value—it's a name of a child node. The only difference between normal and tag nodes is that tag node can have children with arbitrary names, while non-tag nodes can only have children with names from a predefined list.

However, the XML schema doesn't reflect it, and the convertor happily creates malformed node.def's that fail to parse. This error should be detected at package build time.

This won't break any existing code, since such definitions wouldn't work to begin with.

Details

Difficulty level
Easy (less than an hour)
Version
1.2.0
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

dmbaturin changed the task status from Open to Needs testing.Mar 18 2020, 3:26 PM
dmbaturin claimed this task.
dmbaturin triaged this task as Low priority.
dmbaturin added a subscriber: kroy.
erkin set Issue type to Internal change (not visible to end users).Aug 31 2021, 5:17 PM