diff options
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/lldp.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/conf_mode/lldp.py b/src/conf_mode/lldp.py index be7880c55..9fd32d83f 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="-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 %}" +DAEMON_ARGS="-M 4{% if options.snmp %} -x{% endif %}{% if options.cdp %} -c{% endif %}{% if options.edp %} -e{% endif %}{% if options.fdp %} -f{% endif %}{% if options.sonmp %} -s{% endif %}" """ @@ -37,17 +37,17 @@ vyos_tmpl = """ configure system platform VyOS configure system description "VyOS {{ options.description }}" -{% if listen_on %} +{%- if listen_on -%} configure system interface pattern "{{ options.listen_on | join(",") }}" -{% endif %} - -{% for loc in location %} -{%- if loc.elin %} +{%- endif %} +{% if options.addr -%} +configure system ip management pattern "{{ options.addr }}" +{%- endif %} +{%- for loc in location -%} +{%- if loc.elin -%} configure ports {{ loc.name }} med location elin "{{ loc.elin }}" {%- endif %} {% endfor %} - - """ default_config_data = { @@ -289,7 +289,6 @@ def apply(lldp): os.system('sudo systemctl stop lldpd.service') os.unlink(config_file) - if __name__ == '__main__': try: c = get_config() |