From f5c24a9e91f8ea5e0983697e4350cead206cea4e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 6 Dec 2017 19:01:29 +0100 Subject: Bugfix: 'multi:' statement must be on top of generated 'node.def' file If 'multi:' is not on the first line of the auto generated 'node.def' file, VyOS will throw a CLI error: get_parsed_tmpl: failed to parse tmpl [.../interfaces] DEBUG vexit_internal: get_parsed_tmpl: failed to parse tmpl [.../interfaces] --- scripts/build-command-templates | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/build-command-templates') diff --git a/scripts/build-command-templates b/scripts/build-command-templates index 09c7dc8c4..ff0ce05f0 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -113,7 +113,7 @@ def get_properties(p): error_msg = p.find("constraintErrorMessage").text except: pass - + vce = p.findall("constraint") vc = [] for v in vce: @@ -180,12 +180,12 @@ def make_node_def(props): if "tag" in props: node_def += "tag:\n" - if "type" in props: - node_def += "type: {0}\n".format(props["type"]) - if "multi" in props: node_def += "multi:\n" + if "type" in props: + node_def += "type: {0}\n".format(props["type"]) + if "priority" in props: node_def += "priority: {0}\n".format(props["priority"]) @@ -236,7 +236,7 @@ def process_node(n, tmpl_dir): props["type"] = "txt" if node_type == "tagNode": props["tag"] = "True" - + with open(os.path.join(make_path(my_tmpl_dir), "node.def"), "w") as f: f.write(make_node_def(props)) -- cgit v1.2.3