From 732938ad3410b3dce4a49ef6cf16723c4ac04000 Mon Sep 17 00:00:00 2001 From: sever-sever Date: Mon, 16 Nov 2020 09:21:37 +0000 Subject: frr-is-is: T1316: Add new routing feature IS-IS --- Makefile | 1 - interface-definitions/protocols-isis.xml.in | 12 ++++++------ op-mode-definitions/show-ip-route.xml | 6 ++++++ src/conf_mode/protocols_isis.py | 10 ++++------ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index fffd1c9c3..d18676619 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,6 @@ interface_definitions: $(BUILD_DIR) $(obj) rm -f $(TMPL_DIR)/interfaces/wirelessmodem/node.tag/ipv6/node.def rm -f $(TMPL_DIR)/protocols/node.def rm -rf $(TMPL_DIR)/protocols/nbgp - rm -rf $(TMPL_DIR)/protocols/isis rm -f $(TMPL_DIR)/protocols/static/node.def rm -f $(TMPL_DIR)/system/node.def rm -f $(TMPL_DIR)/vpn/node.def diff --git a/interface-definitions/protocols-isis.xml.in b/interface-definitions/protocols-isis.xml.in index 988231108..c98b04220 100644 --- a/interface-definitions/protocols-isis.xml.in +++ b/interface-definitions/protocols-isis.xml.in @@ -5,7 +5,7 @@ - Intermediate System to Intermediate System (ISIS) + Intermediate System to Intermediate System (IS-IS) text(TAG) ISO Routing area tag @@ -264,7 +264,7 @@ - Redistribute connected routes into ISIS + Redistribute connected routes into IS-IS #include @@ -272,7 +272,7 @@ - Redistribute kernel routes into ISIS + Redistribute kernel routes into IS-IS #include @@ -280,7 +280,7 @@ - Redistribute OSPF routes into ISIS + Redistribute OSPF routes into IS-IS #include @@ -288,7 +288,7 @@ - Redistribute RIP routes into ISIS + Redistribute RIP routes into IS-IS #include @@ -296,7 +296,7 @@ - Redistribute static routes into ISIS + Redistribute static routes into IS-IS #include diff --git a/op-mode-definitions/show-ip-route.xml b/op-mode-definitions/show-ip-route.xml index 48ebbc74a..a98048785 100644 --- a/op-mode-definitions/show-ip-route.xml +++ b/op-mode-definitions/show-ip-route.xml @@ -55,6 +55,12 @@ ip -s route list $5 + + + Show IP IS-IS routes + + /usr/bin/vtysh -c "show ip route isis" + Show IP kernel routes diff --git a/src/conf_mode/protocols_isis.py b/src/conf_mode/protocols_isis.py index d5e5b64fb..b0b8d705b 100755 --- a/src/conf_mode/protocols_isis.py +++ b/src/conf_mode/protocols_isis.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2017-2020 VyOS maintainers and contributors +# Copyright (C) 2020 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -106,9 +106,6 @@ def generate(isis): process = list(isis.keys())[0] isis[process]['process'] = process - import pprint - pprint.pprint(isis[process]) - # render(config) not needed, its only for debug render(config_file, 'frr/isis.frr.tmpl', isis[process], trim_blocks=True) @@ -122,15 +119,16 @@ def apply(isis): # Save original configration prior to starting any commit actions frr_cfg = {} frr_cfg['original_config'] = frr.get_configuration(daemon='isisd') - frr_cfg['modified_config'] = frr.replace_section(frr_cfg['original_config'], isis['new_frr_config'], from_re='router isis .*') + frr_cfg['modified_config'] = frr.replace_section(frr_cfg['original_config'], isis['new_frr_config'], from_re='interface .*') # Debugging + ''' print('') print('--------- DEBUGGING ----------') print(f'Existing config:\n{frr_cfg["original_config"]}\n\n') print(f'Replacement config:\n{isis["new_frr_config"]}\n\n') print(f'Modified config:\n{frr_cfg["modified_config"]}\n\n') - + ''' # FRR mark configuration will test for syntax errors and throws an # exception if any syntax errors is detected frr.mark_configuration(frr_cfg['modified_config']) -- cgit v1.2.3