summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/frr/ldpd.frr.tmpl8
-rw-r--r--interface-definitions/protocols-mpls.xml.in12
-rwxr-xr-xsrc/conf_mode/protocols_mpls.py4
3 files changed, 22 insertions, 2 deletions
diff --git a/data/templates/frr/ldpd.frr.tmpl b/data/templates/frr/ldpd.frr.tmpl
index 3cdce8c70..4736adeb0 100644
--- a/data/templates/frr/ldpd.frr.tmpl
+++ b/data/templates/frr/ldpd.frr.tmpl
@@ -16,6 +16,9 @@ no neighbor {{neighbor_id}} ttl-security disable
no neighbor {{neighbor_id}} ttl-security hops {{old_ldp.neighbors[neighbor_id].ttl_security}}
{% endif -%}
{% endif -%}
+{% if 'session_holdtime' is defined -%}
+no neighbor {{neighbor_id}} session holdtime {{old_ldp.neighbors[neighbor_id].session_holdtime}}
+{% endif -%}
{% endfor -%}
{% for neighbor_id in ldp.neighbors -%}
neighbor {{neighbor_id}} password {{ldp.neighbors[neighbor_id].password}}
@@ -26,6 +29,9 @@ neighbor {{neighbor_id}} ttl-security disable
neighbor {{neighbor_id}} ttl-security hops {{ldp.neighbors[neighbor_id].ttl_security}}
{% endif -%}
{% endif -%}
+{% if 'session_holdtime' is defined -%}
+neighbor {{neighbor_id}} session holdtime {{ldp.neighbors[neighbor_id].session_holdtime}}
+{% endif -%}
{% endfor -%}
!
address-family ipv4
@@ -118,4 +124,4 @@ no address-family ipv6
{% else -%}
no mpls ldp
{% endif -%}
-!
+! \ No newline at end of file
diff --git a/interface-definitions/protocols-mpls.xml.in b/interface-definitions/protocols-mpls.xml.in
index 38c553489..0255b1275 100644
--- a/interface-definitions/protocols-mpls.xml.in
+++ b/interface-definitions/protocols-mpls.xml.in
@@ -59,6 +59,18 @@
</valueHelp>
</properties>
</leafNode>
+ <leafNode name="session-holdtime">
+ <properties>
+ <help>Session ipv4 holdtime</help>
+ <valueHelp>
+ <format>15-65535</format>
+ <description>Time in seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 15-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
</children>
</tagNode>
<node name="discovery">
diff --git a/src/conf_mode/protocols_mpls.py b/src/conf_mode/protocols_mpls.py
index d90c208ad..177fd265c 100755
--- a/src/conf_mode/protocols_mpls.py
+++ b/src/conf_mode/protocols_mpls.py
@@ -163,6 +163,7 @@ def get_config(config=None):
neighbor : {
'password' : conf.return_effective_value('neighbor {0} password'.format(neighbor), default=''),
'ttl_security' : conf.return_effective_value('neighbor {0} ttl-security'.format(neighbor), default=''),
+ 'session_holdtime' : conf.return_effective_value('neighbor {0} session-holdtime'.format(neighbor), default='')
}
})
@@ -171,6 +172,7 @@ def get_config(config=None):
neighbor : {
'password' : conf.return_value('neighbor {0} password'.format(neighbor), default=''),
'ttl_security' : conf.return_value('neighbor {0} ttl-security'.format(neighbor), default=''),
+ 'session_holdtime' : conf.return_value('neighbor {0} session-holdtime'.format(neighbor), default='')
}
})
@@ -243,4 +245,4 @@ if __name__ == '__main__':
apply(c)
except ConfigError as e:
print(e)
- exit(1)
+ exit(1) \ No newline at end of file