diff options
author | Christian Poessinger <christian@poessinger.com> | 2018-01-06 13:15:00 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2018-01-06 13:15:00 +0100 |
commit | 52a2f56ec61935c9d54cfd0d011f534046e410d8 (patch) | |
tree | 0b3c66562bf38ab03275447ed975b346d34013b7 /scripts/build-command-templates | |
parent | 30eae347cc0482d79604fa8966bf0b225bb7e918 (diff) | |
parent | 4022a8820ccf0539f2eb5c19d9abd777810a48b4 (diff) | |
download | vyos-1x-52a2f56ec61935c9d54cfd0d011f534046e410d8.tar.gz vyos-1x-52a2f56ec61935c9d54cfd0d011f534046e410d8.zip |
Merge branch 't379-udp-bcast-relay' into current
* t379-udp-bcast-relay:
bcast-relay: Initial configuration nodes for 'service bcast-relay'
Support setting optional 'type' node in command templates other than 'txt'
Diffstat (limited to 'scripts/build-command-templates')
-rwxr-xr-x | scripts/build-command-templates | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/build-command-templates b/scripts/build-command-templates index ff0ce05f0..d1871c1c8 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -165,6 +165,12 @@ def get_properties(p): except: pass + # Get type + try: + props["type"] = p.find("type").text + except: + pass + # Get "multi" if p.find("multi") is not None: props["multi"] = True @@ -233,7 +239,8 @@ def process_node(n, tmpl_dir): props["owner"] = owner # Type should not be set for non-tag, non-leaf nodes if node_type != "node": - props["type"] = "txt" + if "type" not in props.keys(): + props["type"] = "txt" if node_type == "tagNode": props["tag"] = "True" |