summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2017-09-07 03:26:56 +0200
committerDaniil Baturin <daniil@baturin.org>2017-09-07 03:26:56 +0200
commit08ecdea5e7b838e94b6654eb165f0f652ebbb584 (patch)
treea46f3bdfbd03230d0cb1d7b96838ad5eb6232ae9 /scripts
parent38051ef6a3e4bab7928fb16537771e395ff30619 (diff)
downloadvyos-1x-08ecdea5e7b838e94b6654eb165f0f652ebbb584.tar.gz
vyos-1x-08ecdea5e7b838e94b6654eb165f0f652ebbb584.zip
Add support for priority tags. In 1.x, there's no way around using it.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-command-templates14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/build-command-templates b/scripts/build-command-templates
index 70020ecc6..3c95bde21 100755
--- a/scripts/build-command-templates
+++ b/scripts/build-command-templates
@@ -79,7 +79,7 @@ def get_properties(p):
try:
props["help"] = p.find("help").text
except:
- props["help"] = None
+ pass
# Get value help strings
try:
@@ -91,9 +91,18 @@ def get_properties(p):
except:
props["val_help"] = []
+ # Get priority
+ try:
+ props["priority"] = p.find("priority").text
+ except:
+ pass
+
return props
def make_node_def(props):
+ # XXX: replace with a template processor if it grows
+ # out of control
+
node_def = ""
if "tag" in props:
@@ -101,6 +110,9 @@ def make_node_def(props):
node_def += "type: {0}\n".format(props["type"])
+ if "priority" in props:
+ node_def += "priority: {0}\n".format(props["priority"])
+
if "help" in props:
node_def += "help: {0}\n".format(props["help"])