summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-12-22 20:17:11 +0100
committerChristian Poessinger <christian@poessinger.com>2019-12-22 21:00:36 +0100
commit2f0119a2aa6cf6375657e7ab4b16f5b750b45f68 (patch)
treef193c82d194177c5772a39df86805bb9a0f9e3d9
parentf1eae1ba095319aca3e8e2ccbcd81758d7e1a638 (diff)
downloadvyos-1x-2f0119a2aa6cf6375657e7ab4b16f5b750b45f68.tar.gz
vyos-1x-2f0119a2aa6cf6375657e7ab4b16f5b750b45f68.zip
lldp: T393: add Emergency Location Identifier Number (ELIN) support
-rw-r--r--interface-definitions/lldp.xml.in13
-rwxr-xr-xsrc/conf_mode/lldp.py9
2 files changed, 21 insertions, 1 deletions
diff --git a/interface-definitions/lldp.xml.in b/interface-definitions/lldp.xml.in
index 4c927f603..8aaaaf102 100644
--- a/interface-definitions/lldp.xml.in
+++ b/interface-definitions/lldp.xml.in
@@ -233,6 +233,19 @@
</leafNode>
</children>
</node>
+ <leafNode name="elin">
+ <properties>
+ <help>ECS ELIN (Emergency location identifier number)</help>
+ <valueHelp>
+ <format>0-9999999999</format>
+ <description>Emergency Call Service ELIN number (between 10-25 numbers)</description>
+ </valueHelp>
+ <constraint>
+ <regex>[0-9]{10,25}$</regex>
+ </constraint>
+ <constraintErrorMessage>ELIN number must be between 10-25 numbers</constraintErrorMessage>
+ </properties>
+ </leafNode>
</children>
</node>
</children>
diff --git a/src/conf_mode/lldp.py b/src/conf_mode/lldp.py
index 15c0f7812..be7880c55 100755
--- a/src/conf_mode/lldp.py
+++ b/src/conf_mode/lldp.py
@@ -41,6 +41,13 @@ configure system description "VyOS {{ options.description }}"
configure system interface pattern "{{ options.listen_on | join(",") }}"
{% endif %}
+{% for loc in location %}
+{%- if loc.elin %}
+configure ports {{ loc.name }} med location elin "{{ loc.elin }}"
+{%- endif %}
+{% endfor %}
+
+
"""
default_config_data = {
@@ -99,7 +106,7 @@ def get_location_intf(config, name):
config.set_level('{} location'.format(path))
civic_based = {}
- elin = None
+ elin = ''
coordinate_based = {}
if config.exists('civic-based'):