diff options
author | Daniil Baturin <daniil@baturin.org> | 2020-03-18 16:21:08 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2020-03-18 16:21:08 +0100 |
commit | c7b9230c418662fb08d6b4557c9ba003dff50e08 (patch) | |
tree | 61511fe728fbbae04952757884e3b4d277494d7a /scripts | |
parent | b6e368f265447ba391f0424d7cb73ad22f464c63 (diff) | |
download | vyos-1x-c7b9230c418662fb08d6b4557c9ba003dff50e08.tar.gz vyos-1x-c7b9230c418662fb08d6b4557c9ba003dff50e08.zip |
T2136: fail the build for interface definitions with valueless or multi flags set for non-leaf nodes.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-command-templates | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/build-command-templates b/scripts/build-command-templates index dbf4ad9c5..c6534a6d8 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -264,6 +264,11 @@ def process_node(n, tmpl_dir): if node_type == "tagNode": props["tag"] = "True" + if node_type != "leafNode": + if "multi" in props: + raise ValueError("<multi/> tag is only allowed in <leafNode>") + if "valueless" in props: + raise ValueError("<valueless/> is only allowed in <leafNode>") nodedef_path = os.path.join(make_path(my_tmpl_dir), "node.def") if not os.path.exists(nodedef_path): |