diff options
-rwxr-xr-x | src/conf_mode/lldp.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/conf_mode/lldp.py b/src/conf_mode/lldp.py index 62bb6a52e..1b7676274 100755 --- a/src/conf_mode/lldp.py +++ b/src/conf_mode/lldp.py @@ -27,7 +27,7 @@ from vyos import ConfigError config_file = "/etc/default/lldpd" lldp_tmpl = """ ### Autogenerated by lldp.py ### -DAEMON_ARGS="-M4{% if snmp %} -x{% endif %}{% if addr %} -m {{ addr }}{% endif %}{% if cdp %} -c{% endif %}{% if edp %} -e{% endif %}{% if fdp %} -f{% endif %}{% if sonmp %} -s{% endif %}" +DAEMON_ARGS="-M 4{% if options.snmp %} -x{% endif %}{% if options.addr %} -m {{ options.addr }}{% endif %}{% if options.cdp %} -c{% endif %}{% if options.edp %} -e{% endif %}{% if options.fdp %} -f{% endif %}{% if options.sonmp %} -s{% endif %}" """ @@ -36,9 +36,9 @@ vyos_tmpl = """ ### Autogenerated by lldp.py ### configure system platform VyOS -configure system description "VyOS {{ description }}" +configure system description "VyOS {{ options.description }}" {% if listen_on %} -configure system interface pattern "{{ listen_on | join(",") }}" +configure system interface pattern "{{ options.listen_on | join(",") }}" {% endif %} """ @@ -267,13 +267,13 @@ def generate(lldp): # generate /etc/default/lldpd tmpl = jinja2.Template(lldp_tmpl) - config_text = tmpl.render(lldp['options']) + config_text = tmpl.render(lldp) with open(config_file, 'w') as f: f.write(config_text) # generate /etc/lldpd.d/01-vyos.conf tmpl = jinja2.Template(vyos_tmpl) - config_text = tmpl.render(lldp['options']) + config_text = tmpl.render(lldp) with open(vyos_config_file, 'w') as f: f.write(config_text) |