summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2017-12-06 19:01:29 +0100
committerChristian Poessinger <christian@poessinger.com>2017-12-09 10:35:54 +0100
commitf5c24a9e91f8ea5e0983697e4350cead206cea4e (patch)
tree7a33a992e6c1336f19e0c839eb371292ffd53ffc /scripts
parent8a482c1a98ec2959368eb9d3f88bf04358d90354 (diff)
downloadvyos-1x-f5c24a9e91f8ea5e0983697e4350cead206cea4e.tar.gz
vyos-1x-f5c24a9e91f8ea5e0983697e4350cead206cea4e.zip
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]
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-command-templates10
1 files changed, 5 insertions, 5 deletions
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))