From 2265bb4dc27965da3dce7e3f476366b7d1e911f3 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 1 Apr 2023 13:14:30 +0200 Subject: xml: include building block file name should end with .i and not .in --- interface-definitions/include/ospf/protocol-common-config.xml.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'interface-definitions/include/ospf/protocol-common-config.xml.i') diff --git a/interface-definitions/include/ospf/protocol-common-config.xml.i b/interface-definitions/include/ospf/protocol-common-config.xml.i index 25b54b181..f39b9c5e3 100644 --- a/interface-definitions/include/ospf/protocol-common-config.xml.i +++ b/interface-definitions/include/ospf/protocol-common-config.xml.i @@ -358,7 +358,7 @@ Interface name - #include + #include -- cgit v1.2.3 From 3ffb5ff16543576e73f23125e4590fa57b02f0b7 Mon Sep 17 00:00:00 2001 From: Cheeze_It Date: Sun, 19 Mar 2023 19:24:50 -0600 Subject: T5081: ISIS and OSPF syncronization with IGP-LDP sync --- data/templates/frr/isisd.frr.j2 | 11 ++++++ data/templates/frr/ospfd.frr.j2 | 11 ++++++ .../include/isis/protocol-common-config.xml.i | 4 +- .../include/ldp-sync-interface.xml.i | 22 +++++++++++ .../include/ldp-sync-protocol.xml.i | 21 +++++++++++ .../include/ospf/protocol-common-config.xml.i | 4 +- op-mode-definitions/include/isis-common.xml.i | 26 ++++++++++++- op-mode-definitions/include/ospf-common.xml.i | 26 ++++++++++++- smoketest/scripts/cli/test_protocols_isis.py | 43 ++++++++++++++++++++++ smoketest/scripts/cli/test_protocols_ospf.py | 41 +++++++++++++++++++++ 10 files changed, 205 insertions(+), 4 deletions(-) create mode 100644 interface-definitions/include/ldp-sync-interface.xml.i create mode 100644 interface-definitions/include/ldp-sync-protocol.xml.i (limited to 'interface-definitions/include/ospf/protocol-common-config.xml.i') diff --git a/data/templates/frr/isisd.frr.j2 b/data/templates/frr/isisd.frr.j2 index 8df1e9513..3c37e28b9 100644 --- a/data/templates/frr/isisd.frr.j2 +++ b/data/templates/frr/isisd.frr.j2 @@ -25,6 +25,12 @@ interface {{ iface }} {% if iface_config.hello_padding is vyos_defined %} isis hello padding {% endif %} +{% if iface_config.ldp_sync.disable is vyos_defined %} + no isis mpls ldp-sync +{% elif iface_config.ldp_sync.holddown is vyos_defined %} + isis mpls ldp-sync + isis mpls ldp-sync holddown {{ iface_config.ldp_sync.holddown }} +{% endif %} {% if iface_config.metric is vyos_defined %} isis metric {{ iface_config.metric }} {% endif %} @@ -84,6 +90,11 @@ router isis VyOS {{ 'vrf ' + vrf if vrf is vyos_defined }} {% if max_lsp_lifetime is vyos_defined %} max-lsp-lifetime {{ max_lsp_lifetime }} {% endif %} +{% if ldp_sync.holddown is vyos_defined %} + mpls ldp-sync holddown {{ ldp_sync.holddown }} +{% elif ldp_sync is vyos_defined %} + mpls ldp-sync +{% endif %} {% if spf_interval is vyos_defined %} spf-interval {{ spf_interval }} {% endif %} diff --git a/data/templates/frr/ospfd.frr.j2 b/data/templates/frr/ospfd.frr.j2 index 8c4a81c57..3f97b7325 100644 --- a/data/templates/frr/ospfd.frr.j2 +++ b/data/templates/frr/ospfd.frr.j2 @@ -44,6 +44,12 @@ interface {{ iface }} {% if iface_config.bfd.profile is vyos_defined %} ip ospf bfd profile {{ iface_config.bfd.profile }} {% endif %} +{% if iface_config.ldp_sync.disable is vyos_defined %} + no ip ospf mpls ldp-sync +{% elif iface_config.ldp_sync.holddown is vyos_defined %} + ip ospf mpls ldp-sync + ip ospf mpls ldp-sync holddown {{ iface_config.ldp_sync.holddown }} +{% endif %} {% if iface_config.mtu_ignore is vyos_defined %} ip ospf mtu-ignore {% endif %} @@ -133,6 +139,11 @@ router ospf {{ 'vrf ' ~ vrf if vrf is vyos_defined }} {% if maximum_paths is vyos_defined %} maximum-paths {{ maximum_paths }} {% endif %} +{% if ldp_sync.holddown is vyos_defined %} + mpls ldp-sync holddown {{ ldp_sync.holddown }} +{% elif ldp_sync is vyos_defined %} + mpls ldp-sync +{% endif %} {% if distance.global is vyos_defined %} distance {{ distance.global }} {% endif %} diff --git a/interface-definitions/include/isis/protocol-common-config.xml.i b/interface-definitions/include/isis/protocol-common-config.xml.i index 0e6f19480..983a085ec 100644 --- a/interface-definitions/include/isis/protocol-common-config.xml.i +++ b/interface-definitions/include/isis/protocol-common-config.xml.i @@ -152,6 +152,7 @@ +#include A Network Entity Title for this process (ISO only) @@ -172,7 +173,7 @@ - Show IS-IS neighbor adjacencies + IS-IS traffic engineering extensions @@ -631,6 +632,7 @@ #include + #include Set network type diff --git a/interface-definitions/include/ldp-sync-interface.xml.i b/interface-definitions/include/ldp-sync-interface.xml.i new file mode 100644 index 000000000..b24831bbe --- /dev/null +++ b/interface-definitions/include/ldp-sync-interface.xml.i @@ -0,0 +1,22 @@ + + + + LDP-IGP synchronization configuration for interface + + + #include + + + Hold down timer for LDP-IGP cost restoration + + u32:0-10000 + Time to wait in seconds for LDP-IGP synchronization to occur before restoring interface cost + + + + + + + + + diff --git a/interface-definitions/include/ldp-sync-protocol.xml.i b/interface-definitions/include/ldp-sync-protocol.xml.i new file mode 100644 index 000000000..c82c811f6 --- /dev/null +++ b/interface-definitions/include/ldp-sync-protocol.xml.i @@ -0,0 +1,21 @@ + + + + Protocol wide LDP-IGP synchronization configuration + + + + + Protocol wide hold down timer for LDP-IGP cost restoration + + u32:0-10000 + Time to wait in seconds for LDP-IGP synchronization to occur before restoring interface cost + + + + + + + + + diff --git a/interface-definitions/include/ospf/protocol-common-config.xml.i b/interface-definitions/include/ospf/protocol-common-config.xml.i index f39b9c5e3..425d3b01c 100644 --- a/interface-definitions/include/ospf/protocol-common-config.xml.i +++ b/interface-definitions/include/ospf/protocol-common-config.xml.i @@ -331,6 +331,7 @@ +#include Administrative distance @@ -385,6 +386,7 @@ #include #include #include + #include Interface bandwidth (Mbit/s) @@ -875,4 +877,4 @@ - + \ No newline at end of file diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i index 0e20861c7..53e85a7ef 100644 --- a/op-mode-definitions/include/isis-common.xml.i +++ b/op-mode-definitions/include/isis-common.xml.i @@ -54,6 +54,30 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + Show IS-IS MPLS specific information + + + + + Show IS-IS LDP-IGP synchronization information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show specific IS-IS LDP-IGP synchronization for an interface + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + Show IS-IS MPLS traffic engineering information @@ -176,4 +200,4 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + \ No newline at end of file diff --git a/op-mode-definitions/include/ospf-common.xml.i b/op-mode-definitions/include/ospf-common.xml.i index 098254f4e..7d9e541cf 100644 --- a/op-mode-definitions/include/ospf-common.xml.i +++ b/op-mode-definitions/include/ospf-common.xml.i @@ -517,6 +517,30 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + Show OSPF MPLS specific information + + + + + Show OSPF LDP-IGP synchronization information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show specific OSPF LDP-IGP synchronization for an interface + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + Show IPv4 OSPF neighbor information @@ -547,4 +571,4 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - + \ No newline at end of file diff --git a/smoketest/scripts/cli/test_protocols_isis.py b/smoketest/scripts/cli/test_protocols_isis.py index d11d80a1f..61e29c449 100755 --- a/smoketest/scripts/cli/test_protocols_isis.py +++ b/smoketest/scripts/cli/test_protocols_isis.py @@ -308,5 +308,48 @@ class TestProtocolsISIS(VyOSUnitTestSHIM.TestCase): self.assertIn(f' segment-routing prefix {prefix_three} absolute {prefix_three_value} explicit-null', tmp) self.assertIn(f' segment-routing prefix {prefix_four} absolute {prefix_four_value} no-php-flag', tmp) + def test_isis_08_ldp_sync(self): + holddown = "500" + interface = 'lo' + + self.cli_set(base_path + ['net', net]) + self.cli_set(base_path + ['interface', interface]) + self.cli_set(base_path + ['ldp-sync', 'holddown', holddown]) + + # Commit main ISIS changes + self.cli_commit() + + # Verify main ISIS changes + tmp = self.getFRRconfig(f'router isis {domain}', daemon='isisd') + self.assertIn(f' net {net}', tmp) + self.assertIn(f' mpls ldp-sync', tmp) + self.assertIn(f' mpls ldp-sync holddown {holddown}', tmp) + + for interface in self._interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'holddown', holddown]) + + # Commit interface changes for holddown + self.cli_commit() + + # Verify interface changes for holddown + tmp = self.getFRRconfig(f'interface {interface}', daemon='isisd') + self.assertIn(f'interface {interface}', tmp) + self.assertIn(f' ip router isis {domain}', tmp) + self.assertIn(f' ipv6 router isis {domain}', tmp) + self.assertIn(f' isis mpls ldp-sync holddown {holddown}', tmp) + + for interface in self._interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'disable']) + + # Commit interface changes for disable + self.cli_commit() + + # Verify interface changes for disable + tmp = self.getFRRconfig(f'interface {interface}', daemon='isisd') + self.assertIn(f'interface {interface}', tmp) + self.assertIn(f' ip router isis {domain}', tmp) + self.assertIn(f' ipv6 router isis {domain}', tmp) + self.assertIn(f' no isis mpls ldp-sync', tmp) + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/smoketest/scripts/cli/test_protocols_ospf.py b/smoketest/scripts/cli/test_protocols_ospf.py index 581959b15..d4c85f2b2 100755 --- a/smoketest/scripts/cli/test_protocols_ospf.py +++ b/smoketest/scripts/cli/test_protocols_ospf.py @@ -434,6 +434,47 @@ class TestProtocolsOSPF(VyOSUnitTestSHIM.TestCase): self.assertIn(f' segment-routing prefix {prefix_one} index {prefix_one_value} explicit-null', frrconfig) self.assertIn(f' segment-routing prefix {prefix_two} index {prefix_two_value} no-php-flag', frrconfig) + def test_ospf_15_ldp_sync(self): + holddown = "500" + interface = 'lo' + interfaces = Section.interfaces('ethernet') + + self.cli_set(base_path + ['interface', interface]) + self.cli_set(base_path + ['ldp-sync', 'holddown', holddown]) + + # Commit main OSPF changes + self.cli_commit() + + # Verify main OSPF changes + frrconfig = self.getFRRconfig('router ospf') + self.assertIn(f'router ospf', frrconfig) + self.assertIn(f' timers throttle spf 200 1000 10000', frrconfig) + self.assertIn(f' mpls ldp-sync holddown {holddown}', frrconfig) + + for interface in interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'holddown', holddown]) + + # Commit interface changes for holddown + self.cli_commit() + + # Verify interface changes for holddown + config = self.getFRRconfig(f'interface {interface}') + self.assertIn(f'interface {interface}', config) + self.assertIn(f' ip ospf dead-interval 40', config) + self.assertIn(f' ip ospf mpls ldp-sync', config) + self.assertIn(f' ip ospf mpls ldp-sync holddown {holddown}', config) + + for interface in interfaces: + self.cli_set(base_path + ['interface', interface, 'ldp-sync', 'disable']) + + # Commit interface changes for disable + self.cli_commit() + + # Verify interface changes for disable + config = self.getFRRconfig(f'interface {interface}') + self.assertIn(f'interface {interface}', config) + self.assertIn(f' ip ospf dead-interval 40', config) + self.assertIn(f' no ip ospf mpls ldp-sync', config) if __name__ == '__main__': unittest.main(verbosity=2) -- cgit v1.2.3 From 8cb0b59fce842c9e69ebf1b9099abce2c6e21447 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 12 Apr 2023 21:36:27 +0200 Subject: xml: T5081: generate common holddown XML building block for IS-IS and OSPF --- .../include/isis/ldp-sync-holddown.xml.i | 14 ++++++++++++++ .../include/isis/ldp-sync-interface.xml.i | 11 +++++++++++ .../include/isis/ldp-sync-protocol.xml.i | 10 ++++++++++ .../include/isis/protocol-common-config.xml.i | 4 ++-- .../include/ldp-sync-interface.xml.i | 22 ---------------------- .../include/ldp-sync-protocol.xml.i | 21 --------------------- .../include/ospf/protocol-common-config.xml.i | 4 ++-- 7 files changed, 39 insertions(+), 47 deletions(-) create mode 100644 interface-definitions/include/isis/ldp-sync-holddown.xml.i create mode 100644 interface-definitions/include/isis/ldp-sync-interface.xml.i create mode 100644 interface-definitions/include/isis/ldp-sync-protocol.xml.i delete mode 100644 interface-definitions/include/ldp-sync-interface.xml.i delete mode 100644 interface-definitions/include/ldp-sync-protocol.xml.i (limited to 'interface-definitions/include/ospf/protocol-common-config.xml.i') diff --git a/interface-definitions/include/isis/ldp-sync-holddown.xml.i b/interface-definitions/include/isis/ldp-sync-holddown.xml.i new file mode 100644 index 000000000..15ac26f07 --- /dev/null +++ b/interface-definitions/include/isis/ldp-sync-holddown.xml.i @@ -0,0 +1,14 @@ + + + + Hold down timer for LDP-IGP cost restoration + + u32:0-10000 + Time to wait in seconds for LDP-IGP synchronization to occur before restoring interface cost + + + + + + + diff --git a/interface-definitions/include/isis/ldp-sync-interface.xml.i b/interface-definitions/include/isis/ldp-sync-interface.xml.i new file mode 100644 index 000000000..222a35256 --- /dev/null +++ b/interface-definitions/include/isis/ldp-sync-interface.xml.i @@ -0,0 +1,11 @@ + + + + LDP-IGP synchronization configuration for interface + + + #include + #include + + + diff --git a/interface-definitions/include/isis/ldp-sync-protocol.xml.i b/interface-definitions/include/isis/ldp-sync-protocol.xml.i new file mode 100644 index 000000000..b2e696a70 --- /dev/null +++ b/interface-definitions/include/isis/ldp-sync-protocol.xml.i @@ -0,0 +1,10 @@ + + + + Protocol wide LDP-IGP synchronization configuration + + + #include + + + diff --git a/interface-definitions/include/isis/protocol-common-config.xml.i b/interface-definitions/include/isis/protocol-common-config.xml.i index 983a085ec..8103b5c5d 100644 --- a/interface-definitions/include/isis/protocol-common-config.xml.i +++ b/interface-definitions/include/isis/protocol-common-config.xml.i @@ -152,7 +152,7 @@ -#include +#include A Network Entity Title for this process (ISO only) @@ -632,7 +632,7 @@ #include - #include + #include Set network type diff --git a/interface-definitions/include/ldp-sync-interface.xml.i b/interface-definitions/include/ldp-sync-interface.xml.i deleted file mode 100644 index b24831bbe..000000000 --- a/interface-definitions/include/ldp-sync-interface.xml.i +++ /dev/null @@ -1,22 +0,0 @@ - - - - LDP-IGP synchronization configuration for interface - - - #include - - - Hold down timer for LDP-IGP cost restoration - - u32:0-10000 - Time to wait in seconds for LDP-IGP synchronization to occur before restoring interface cost - - - - - - - - - diff --git a/interface-definitions/include/ldp-sync-protocol.xml.i b/interface-definitions/include/ldp-sync-protocol.xml.i deleted file mode 100644 index c82c811f6..000000000 --- a/interface-definitions/include/ldp-sync-protocol.xml.i +++ /dev/null @@ -1,21 +0,0 @@ - - - - Protocol wide LDP-IGP synchronization configuration - - - - - Protocol wide hold down timer for LDP-IGP cost restoration - - u32:0-10000 - Time to wait in seconds for LDP-IGP synchronization to occur before restoring interface cost - - - - - - - - - diff --git a/interface-definitions/include/ospf/protocol-common-config.xml.i b/interface-definitions/include/ospf/protocol-common-config.xml.i index 425d3b01c..e400119dd 100644 --- a/interface-definitions/include/ospf/protocol-common-config.xml.i +++ b/interface-definitions/include/ospf/protocol-common-config.xml.i @@ -331,7 +331,7 @@ -#include +#include Administrative distance @@ -386,7 +386,7 @@ #include #include #include - #include + #include Interface bandwidth (Mbit/s) -- cgit v1.2.3 From f9aa4c6312a773c216e65400db7e66849d5a02c7 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 8 Apr 2023 22:15:41 +0200 Subject: T5150: do not apply zebra route-map from routing-daemon config level --- data/templates/frr/vrf.route-map.frr.j2 | 10 ---------- data/templates/frr/vrf.route-map.v6.frr.j2 | 10 ---------- .../include/bgp/protocol-common-config.xml.i | 1 - .../include/eigrp/protocol-common-config.xml.i | 1 - .../include/isis/protocol-common-config.xml.i | 1 - .../include/ospf/protocol-common-config.xml.i | 1 - .../include/ospfv3/protocol-common-config.xml.i | 1 - smoketest/scripts/cli/test_protocols_bgp.py | 21 --------------------- src/conf_mode/protocols_bgp.py | 11 ----------- src/conf_mode/protocols_eigrp.py | 10 ---------- src/conf_mode/protocols_isis.py | 14 ++------------ src/conf_mode/protocols_ospf.py | 11 +---------- src/conf_mode/protocols_ospfv3.py | 10 ---------- src/conf_mode/protocols_static.py | 1 + 14 files changed, 4 insertions(+), 99 deletions(-) delete mode 100644 data/templates/frr/vrf.route-map.frr.j2 delete mode 100644 data/templates/frr/vrf.route-map.v6.frr.j2 (limited to 'interface-definitions/include/ospf/protocol-common-config.xml.i') diff --git a/data/templates/frr/vrf.route-map.frr.j2 b/data/templates/frr/vrf.route-map.frr.j2 deleted file mode 100644 index 5e0c56a7b..000000000 --- a/data/templates/frr/vrf.route-map.frr.j2 +++ /dev/null @@ -1,10 +0,0 @@ -! -{% if vrf is vyos_defined and route_map is vyos_defined %} -vrf {{ vrf }} - ip protocol {{ protocol }} route-map {{ route_map }} - exit-vrf -! -{% elif route_map is vyos_defined %} -ip protocol {{ protocol }} route-map {{ route_map }} -{% endif %} -! diff --git a/data/templates/frr/vrf.route-map.v6.frr.j2 b/data/templates/frr/vrf.route-map.v6.frr.j2 deleted file mode 100644 index 7dc59a046..000000000 --- a/data/templates/frr/vrf.route-map.v6.frr.j2 +++ /dev/null @@ -1,10 +0,0 @@ -! -{% if vrf is vyos_defined and route_map is vyos_defined %} -vrf {{ vrf }} - ipv6 protocol {{ protocol }} route-map {{ route_map }} - exit-vrf -! -{% elif route_map is vyos_defined %} -ipv6 protocol {{ protocol }} route-map {{ route_map }} -{% endif %} -! diff --git a/interface-definitions/include/bgp/protocol-common-config.xml.i b/interface-definitions/include/bgp/protocol-common-config.xml.i index a9122db57..527eaf991 100644 --- a/interface-definitions/include/bgp/protocol-common-config.xml.i +++ b/interface-definitions/include/bgp/protocol-common-config.xml.i @@ -1565,7 +1565,6 @@ #include -#include BGP protocol timers diff --git a/interface-definitions/include/eigrp/protocol-common-config.xml.i b/interface-definitions/include/eigrp/protocol-common-config.xml.i index 88365187a..a21d18424 100644 --- a/interface-definitions/include/eigrp/protocol-common-config.xml.i +++ b/interface-definitions/include/eigrp/protocol-common-config.xml.i @@ -107,7 +107,6 @@ -#include #include diff --git a/interface-definitions/include/isis/protocol-common-config.xml.i b/interface-definitions/include/isis/protocol-common-config.xml.i index 8103b5c5d..4ca7061db 100644 --- a/interface-definitions/include/isis/protocol-common-config.xml.i +++ b/interface-definitions/include/isis/protocol-common-config.xml.i @@ -687,5 +687,4 @@ -#include diff --git a/interface-definitions/include/ospf/protocol-common-config.xml.i b/interface-definitions/include/ospf/protocol-common-config.xml.i index e400119dd..b7f22cb88 100644 --- a/interface-definitions/include/ospf/protocol-common-config.xml.i +++ b/interface-definitions/include/ospf/protocol-common-config.xml.i @@ -816,7 +816,6 @@ -#include Adjust routing timers diff --git a/interface-definitions/include/ospfv3/protocol-common-config.xml.i b/interface-definitions/include/ospfv3/protocol-common-config.xml.i index 1c33ca920..a7de50638 100644 --- a/interface-definitions/include/ospfv3/protocol-common-config.xml.i +++ b/interface-definitions/include/ospfv3/protocol-common-config.xml.i @@ -256,5 +256,4 @@ -#include diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py index f6eede87a..ce9590fc2 100755 --- a/smoketest/scripts/cli/test_protocols_bgp.py +++ b/smoketest/scripts/cli/test_protocols_bgp.py @@ -713,7 +713,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): for prefix in listen_ranges: self.assertIn(f' bgp listen range {prefix} peer-group {peer_group}', frrconfig) - def test_bgp_07_l2vpn_evpn(self): vnis = ['10010', '10020', '10030'] neighbors = ['192.0.2.10', '192.0.2.20', '192.0.2.30'] @@ -743,26 +742,6 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): self.assertIn(f' advertise-default-gw', vniconfig) self.assertIn(f' advertise-svi-ip', vniconfig) - def test_bgp_08_zebra_route_map(self): - # Implemented because of T3328 - self.cli_set(base_path + ['route-map', route_map_in]) - # commit changes - self.cli_commit() - - # Verify FRR configuration - zebra_route_map = f'ip protocol bgp route-map {route_map_in}' - frrconfig = self.getFRRconfig(zebra_route_map) - self.assertIn(zebra_route_map, frrconfig) - - # Remove the route-map again - self.cli_delete(base_path + ['route-map']) - # commit changes - self.cli_commit() - - # Verify FRR configuration - frrconfig = self.getFRRconfig(zebra_route_map) - self.assertNotIn(zebra_route_map, frrconfig) - def test_bgp_09_distance_and_flowspec(self): distance_external = '25' distance_internal = '30' diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index cf553f0e8..66505e58d 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -484,26 +484,15 @@ def generate(bgp): if not bgp or 'deleted' in bgp: return None - bgp['protocol'] = 'bgp' # required for frr/vrf.route-map.frr.j2 - bgp['frr_zebra_config'] = render_to_string('frr/vrf.route-map.frr.j2', bgp) bgp['frr_bgpd_config'] = render_to_string('frr/bgpd.frr.j2', bgp) - return None def apply(bgp): bgp_daemon = 'bgpd' - zebra_daemon = 'zebra' # Save original configuration prior to starting any commit actions frr_cfg = frr.FRRConfig() - # The route-map used for the FIB (zebra) is part of the zebra daemon - frr_cfg.load_configuration(zebra_daemon) - frr_cfg.modify_section(r'(\s+)?ip protocol bgp route-map [-a-zA-Z0-9.]+', stop_pattern='(\s|!)') - if 'frr_zebra_config' in bgp: - frr_cfg.add_before(frr.default_add_before, bgp['frr_zebra_config']) - frr_cfg.commit_configuration(zebra_daemon) - # Generate empty helper string which can be ammended to FRR commands, it # will be either empty (default VRF) or contain the "vrf