Page MenuHomeVyOS Platform

Allow using list_nodes on paths that do not exist
Open, LowPublic

Description

There are many cases when we need to get a list of nodes and it's perfectly fine if there are no nodes.

One case is migration scripts: if we are migrating, say, OpenVPN syntax, then if there are no nodes under 'interfaces openvpn', the correct logic is simply to do nothing.

But the list_nodes(path) function assumes that the path must exist and raises an exception if it doesn't. It would be nice to have a way to just get an empty list is a path doesn't exist.

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
Internal change (not visible to end users)