Page MenuHomeVyOS Platform

Allow using list_nodes on paths that do not exist
Closed, ResolvedPublic

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

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