summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraapostoliuk <a.apostoliuk@vyos.io>2025-08-27 16:34:59 +0300
committeraapostoliuk <a.apostoliuk@vyos.io>2025-08-28 13:43:29 +0300
commit5098fa8eb575afed317207c325f9126d3e0b32ae (patch)
tree323083f4e853297b8defacc79f1a0b77db59ae82 /src
parent968409218f914d180b2f9781edf3423ddb8ac738 (diff)
downloadvyos-1x-5098fa8eb575afed317207c325f9126d3e0b32ae.tar.gz
vyos-1x-5098fa8eb575afed317207c325f9126d3e0b32ae.zip
isis: T7722: Added interface fast-reroute configuration commands
Added interface fast-reroute configuration commands
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_isis.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_isis.py b/src/conf_mode/protocols_isis.py
index 8b1408f57..f561d8458 100755
--- a/src/conf_mode/protocols_isis.py
+++ b/src/conf_mode/protocols_isis.py
@@ -68,7 +68,7 @@ def verify(config_dict):
if 'interface' not in isis:
raise ConfigError('Interface used for routing updates is mandatory!')
- for interface in isis['interface']:
+ for interface, interface_config in isis['interface'].items():
verify_interface_exists(isis, interface)
# Interface MTU must be >= configured lsp-mtu
mtu = Interface(interface).get_mtu()
@@ -90,6 +90,27 @@ def verify(config_dict):
if 'master' not in tmp or tmp['master'] != vrf:
raise ConfigError(f'Interface "{interface}" is not a member of VRF "{vrf}"!')
+ # Fast reroute validation
+ # LFA and TI-LFA of the same level can not be configured on the same interface
+ # To configure Remote LFA, LFA of the same level should be configured on this interface.
+ if 'fast_reroute' in interface_config:
+ isis_frr_config = interface_config['fast_reroute']
+ levels = ['level_1', 'level_2']
+ if 'lfa' and 'ti_lfa' in isis_frr_config:
+ for isis_level in levels:
+ if ((dict_search(f'lfa.{isis_level}.enable', isis_frr_config) is not None)
+ and (dict_search(f'ti_lfa.{isis_level}', isis_frr_config) is not None)):
+ raise ConfigError(
+ f'LFA and TI-LFA at the "{str(isis_level).replace("_","-")}" '
+ f'can not be configured on the same interface "{interface}"!')
+ if 'remote_lfa' in isis_frr_config:
+ for isis_level in levels:
+ if ((dict_search(f'remote_lfa.{isis_level}', isis_frr_config) is not None)
+ and (dict_search(f'lfa.{isis_level}.enable', isis_frr_config) is None)):
+ raise ConfigError(
+ f'To configure Remote LFA, LFA at the same level '
+ f'should be configured on interface "{interface}"!')
+
# If md5 and plaintext-password set at the same time
for password in ['area_password', 'domain_password']:
if password in isis: