summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-10-16 08:43:23 +0200
committerGitHub <noreply@github.com>2020-10-16 08:43:23 +0200
commita5a77c47168b888bf008dab139d1e5d023568bfe (patch)
treef793520db5e8ea534a3bee0ac1e88b2879a612e1 /src
parent741cd00fb687a1ce1e5f9e65c324bc229700e10b (diff)
parent2bc0e445bc09103b2a74af187a4babb2c3531f17 (diff)
downloadvyos-1x-a5a77c47168b888bf008dab139d1e5d023568bfe.tar.gz
vyos-1x-a5a77c47168b888bf008dab139d1e5d023568bfe.zip
Merge pull request #571 from sever-sever/T915_holdtime_explicit
conf-mode: T915: Add mpls ldp explicit and holdtime commands
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_mpls.py42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/conf_mode/protocols_mpls.py b/src/conf_mode/protocols_mpls.py
index e515490d0..904d219e2 100755
--- a/src/conf_mode/protocols_mpls.py
+++ b/src/conf_mode/protocols_mpls.py
@@ -43,7 +43,12 @@ def get_config(config=None):
'd_transp_ipv4' : None,
'd_transp_ipv6' : None,
'hello_holdtime' : None,
- 'hello_interval' : None
+ 'hello_interval' : None,
+ 'ses_ipv4_hold' : None,
+ 'ses_ipv6_hold' : None,
+ 'export_ipv4_exp' : False,
+ 'export_ipv6_exp' : False
+
},
'ldp' : {
'interfaces' : [],
@@ -51,7 +56,12 @@ def get_config(config=None):
'd_transp_ipv4' : None,
'd_transp_ipv6' : None,
'hello_holdtime' : None,
- 'hello_interval' : None
+ 'hello_interval' : None,
+ 'ses_ipv4_hold' : None,
+ 'ses_ipv6_hold' : None,
+ 'export_ipv4_exp' : False,
+ 'export_ipv6_exp' : False
+
}
}
if not (conf.exists('protocols mpls') or conf.exists_effective('protocols mpls')):
@@ -82,6 +92,20 @@ def get_config(config=None):
if conf.exists('discovery hello-interval'):
mpls_conf['ldp']['hello_interval'] = conf.return_value('discovery hello-interval')
+ # Get session-ipv4-holdtime
+ if conf.exists_effective('discovery session-ipv4-holdtime'):
+ mpls_conf['old_ldp']['ses_ipv4_hold'] = conf.return_effective_value('discovery session-ipv4-holdtime')
+
+ if conf.exists('discovery session-ipv4-holdtime'):
+ mpls_conf['ldp']['ses_ipv4_hold'] = conf.return_value('discovery session-ipv4-holdtime')
+
+ # Get session-ipv6-holdtime
+ if conf.exists_effective('discovery session-ipv6-holdtime'):
+ mpls_conf['old_ldp']['ses_ipv6_hold'] = conf.return_effective_value('discovery session-ipv6-holdtime')
+
+ if conf.exists('discovery session-ipv6-holdtime'):
+ mpls_conf['ldp']['ses_ipv6_hold'] = conf.return_value('discovery session-ipv6-holdtime')
+
# Get discovery transport-ipv4-address
if conf.exists_effective('discovery transport-ipv4-address'):
mpls_conf['old_ldp']['d_transp_ipv4'] = conf.return_effective_value('discovery transport-ipv4-address')
@@ -96,6 +120,20 @@ def get_config(config=None):
if conf.exists('discovery transport-ipv6-address'):
mpls_conf['ldp']['d_transp_ipv6'] = conf.return_value('discovery transport-ipv6-address')
+ # Get export ipv4 explicit-null
+ if conf.exists_effective('export ipv4 explicit-null'):
+ mpls_conf['old_ldp']['export_ipv4_exp'] = True
+
+ if conf.exists('export ipv4 explicit-null'):
+ mpls_conf['ldp']['export_ipv4_exp'] = True
+
+ # Get export ipv6 explicit-null
+ if conf.exists_effective('export ipv6 explicit-null'):
+ mpls_conf['old_ldp']['export_ipv6_exp'] = True
+
+ if conf.exists('export ipv6 explicit-null'):
+ mpls_conf['ldp']['export_ipv6_exp'] = True
+
# Get interfaces
if conf.exists_effective('interface'):
mpls_conf['old_ldp']['interfaces'] = conf.return_effective_values('interface')