summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-03 19:43:12 +0100
committerGitHub <noreply@github.com>2020-11-03 19:43:12 +0100
commitd0de9cc5d69020a9d5260e23755d83a7b674c22f (patch)
tree4e6ffdd6a4f3d00c795b34c107d9de6f54ed7762 /src
parentc0959295e49ff98eafadd6ff7faaca8fa39e26da (diff)
parentec727d66a187ee50c303e103c6d09c7842cd1809 (diff)
downloadvyos-1x-d0de9cc5d69020a9d5260e23755d83a7b674c22f.tar.gz
vyos-1x-d0de9cc5d69020a9d5260e23755d83a7b674c22f.zip
Merge pull request #585 from Cheeze-It/current
mpls-conf: T915: Separate IPv4 and IPv6 hello timers, add IPv6 timers
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_mpls.py80
1 files changed, 48 insertions, 32 deletions
diff --git a/src/conf_mode/protocols_mpls.py b/src/conf_mode/protocols_mpls.py
index 904d219e2..d2ff0a2ea 100755
--- a/src/conf_mode/protocols_mpls.py
+++ b/src/conf_mode/protocols_mpls.py
@@ -38,30 +38,32 @@ def get_config(config=None):
'router_id' : None,
'mpls_ldp' : False,
'old_ldp' : {
- 'interfaces' : [],
- 'neighbors' : {},
- 'd_transp_ipv4' : None,
- 'd_transp_ipv6' : None,
- 'hello_holdtime' : None,
- 'hello_interval' : None,
- 'ses_ipv4_hold' : None,
- 'ses_ipv6_hold' : None,
- 'export_ipv4_exp' : False,
- 'export_ipv6_exp' : False
-
+ 'interfaces' : [],
+ 'neighbors' : {},
+ 'd_transp_ipv4' : None,
+ 'd_transp_ipv6' : None,
+ 'hello_ipv4_holdtime' : None,
+ 'hello_ipv4_interval' : None,
+ 'hello_ipv6_holdtime' : None,
+ 'hello_ipv6_interval' : None,
+ 'ses_ipv4_hold' : None,
+ 'ses_ipv6_hold' : None,
+ 'export_ipv4_exp' : False,
+ 'export_ipv6_exp' : False
},
'ldp' : {
- 'interfaces' : [],
- 'neighbors' : {},
- 'd_transp_ipv4' : None,
- 'd_transp_ipv6' : None,
- 'hello_holdtime' : None,
- 'hello_interval' : None,
- 'ses_ipv4_hold' : None,
- 'ses_ipv6_hold' : None,
- 'export_ipv4_exp' : False,
- 'export_ipv6_exp' : False
-
+ 'interfaces' : [],
+ 'neighbors' : {},
+ 'd_transp_ipv4' : None,
+ 'd_transp_ipv6' : None,
+ 'hello_ipv4_holdtime' : None,
+ 'hello_ipv4_interval' : None,
+ 'hello_ipv6_holdtime' : None,
+ 'hello_ipv6_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')):
@@ -78,19 +80,33 @@ def get_config(config=None):
if conf.exists('router-id'):
mpls_conf['router_id'] = conf.return_value('router-id')
- # Get hello holdtime
- if conf.exists_effective('discovery hello-holdtime'):
- mpls_conf['old_ldp']['hello_holdtime'] = conf.return_effective_value('discovery hello-holdtime')
+ # Get hello-ipv4-holdtime
+ if conf.exists_effective('discovery hello-ipv4-holdtime'):
+ mpls_conf['old_ldp']['hello_ipv4_holdtime'] = conf.return_effective_value('discovery hello-ipv4-holdtime')
+
+ if conf.exists('discovery hello-ipv4-holdtime'):
+ mpls_conf['ldp']['hello_ipv4_holdtime'] = conf.return_value('discovery hello-ipv4-holdtime')
+
+ # Get hello-ipv4-interval
+ if conf.exists_effective('discovery hello-ipv4-interval'):
+ mpls_conf['old_ldp']['hello_ipv4_interval'] = conf.return_effective_value('discovery hello-ipv4-interval')
+
+ if conf.exists('discovery hello-ipv4-interval'):
+ mpls_conf['ldp']['hello_ipv4_interval'] = conf.return_value('discovery hello-ipv4-interval')
+
+ # Get hello-ipv6-holdtime
+ if conf.exists_effective('discovery hello-ipv6-holdtime'):
+ mpls_conf['old_ldp']['hello_ipv6_holdtime'] = conf.return_effective_value('discovery hello-ipv6-holdtime')
- if conf.exists('discovery hello-holdtime'):
- mpls_conf['ldp']['hello_holdtime'] = conf.return_value('discovery hello-holdtime')
+ if conf.exists('discovery hello-ipv6-holdtime'):
+ mpls_conf['ldp']['hello_ipv6_holdtime'] = conf.return_value('discovery hello-ipv6-holdtime')
- # Get hello interval
- if conf.exists_effective('discovery hello-interval'):
- mpls_conf['old_ldp']['hello_interval'] = conf.return_effective_value('discovery hello-interval')
+ # Get hello-ipv6-interval
+ if conf.exists_effective('discovery hello-ipv6-interval'):
+ mpls_conf['old_ldp']['hello_ipv6_interval'] = conf.return_effective_value('discovery hello-ipv6-interval')
- if conf.exists('discovery hello-interval'):
- mpls_conf['ldp']['hello_interval'] = conf.return_value('discovery hello-interval')
+ if conf.exists('discovery hello-ipv6-interval'):
+ mpls_conf['ldp']['hello_ipv6_interval'] = conf.return_value('discovery hello-ipv6-interval')
# Get session-ipv4-holdtime
if conf.exists_effective('discovery session-ipv4-holdtime'):