diff --git a/test_bgp-ebgp-common-subnet-nexthop-unchanged.py b/test_bgp-ebgp-common-subnet-nexthop-unchanged.py index 62e9ecc..b35d153 100644 --- a/test_bgp-ebgp-common-subnet-nexthop-unchanged.py +++ b/test_bgp-ebgp-common-subnet-nexthop-unchanged.py @@ -40,7 +40,7 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r1' interface lo - ip address {{ routers.r1.lo_ip4[0] }} + ip address {{ routers.r1.lo_ip4[0] }} ! interface r1-eth0 ip address {{ routers.r1.ifaces[0].ip4[0].ip }} @@ -48,7 +48,7 @@ class Configs(FRRConfigs): #% endif #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding diff --git a/test_bgp_aggregate_address_origin.py b/test_bgp_aggregate_address_origin.py index 51d9f1a..c95c2b5 100644 --- a/test_bgp_aggregate_address_origin.py +++ b/test_bgp_aggregate_address_origin.py @@ -57,20 +57,20 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 + exit-address-family ! #% elif router.name == 'r1' router bgp 65000 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - redistribute connected - aggregate-address 172.16.255.0/24 origin igp - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + redistribute connected + aggregate-address 172.16.255.0/24 origin igp + exit-address-family ! #% endif #% endblock diff --git a/test_bgp_aggregate_address_route_map.py b/test_bgp_aggregate_address_route_map.py index 1302c11..a51d901 100644 --- a/test_bgp_aggregate_address_route_map.py +++ b/test_bgp_aggregate_address_route_map.py @@ -61,23 +61,23 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 + exit-address-family ! #% elif router.name == 'r1' router bgp 65000 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - redistribute connected - aggregate-address 172.16.255.0/24 route-map aggr-rmap - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + redistribute connected + aggregate-address 172.16.255.0/24 route-map aggr-rmap + exit-address-family ! route-map aggr-rmap permit 10 - set metric 123 + set metric 123 ! #% endif #% endblock diff --git a/test_bgp_as_wide_bgp_identifier.py b/test_bgp_as_wide_bgp_identifier.py index cda56f6..af92e26 100644 --- a/test_bgp_as_wide_bgp_identifier.py +++ b/test_bgp_as_wide_bgp_identifier.py @@ -53,26 +53,26 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r1' router bgp 65001 - bgp router-id 10.10.10.10 - no bgp ebgp-requires-policy - neighbor 192.168.255.1 remote-as 65002 - neighbor 192.168.255.1 timers 3 10 + bgp router-id 10.10.10.10 + no bgp ebgp-requires-policy + neighbor 192.168.255.1 remote-as 65002 + neighbor 192.168.255.1 timers 3 10 ! #% elif router.name == 'r2' router bgp 65002 - bgp router-id 10.10.10.10 - no bgp ebgp-requires-policy - neighbor 192.168.255.2 remote-as 65001 - neighbor 192.168.255.2 timers 3 10 - neighbor 192.168.255.3 remote-as 65002 - neighbor 192.168.255.3 timers 3 10 + bgp router-id 10.10.10.10 + no bgp ebgp-requires-policy + neighbor 192.168.255.2 remote-as 65001 + neighbor 192.168.255.2 timers 3 10 + neighbor 192.168.255.3 remote-as 65002 + neighbor 192.168.255.3 timers 3 10 ! #% elif router.name == 'r3' router bgp 65002 - bgp router-id 10.10.10.10 - no bgp ebgp-requires-policy - neighbor 192.168.255.1 remote-as 65002 - neighbor 192.168.255.1 timers 3 10 + bgp router-id 10.10.10.10 + no bgp ebgp-requires-policy + neighbor 192.168.255.1 remote-as 65002 + neighbor 192.168.255.1 timers 3 10 ! #% endif #% endblock diff --git a/test_bgp_aspath_zero.py b/test_bgp_aspath_zero.py index de22492..0dd9d08 100644 --- a/test_bgp_aspath_zero.py +++ b/test_bgp_aspath_zero.py @@ -31,7 +31,7 @@ class Configs(FRRConfigs): #% block main #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -40,16 +40,16 @@ class Configs(FRRConfigs): """ bgpd = """ - #% block main + #% block main #% if router.name == 'r1' router bgp 65534 - no bgp ebgp-requires-policy - neighbor {{ routers.peer1.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.peer1.ifaces[0].ip4[0].ip }} timers 3 10 + no bgp ebgp-requires-policy + neighbor {{ routers.peer1.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.peer1.ifaces[0].ip4[0].ip }} timers 3 10 ! #% endif - #% endblock - """ + #% endblock + """ class BGPAggregatorZero(TestBase, AutoFixture, topo=topology, configs=Configs): diff --git a/test_bgp_default-originate_route-map_match.py b/test_bgp_default-originate_route-map_match.py index c32c42c..736912d 100644 --- a/test_bgp_default-originate_route-map_match.py +++ b/test_bgp_default-originate_route-map_match.py @@ -49,31 +49,31 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - redistribute connected - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + redistribute connected + exit-address-family ! #% elif router.name == 'r1' router bgp 65000 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - redistribute connected - network 192.168.13.0/24 route-map internal - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} default-originate route-map default - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + redistribute connected + network 192.168.13.0/24 route-map internal + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} default-originate route-map default + exit-address-family ! bgp community-list standard default seq 5 permit 65000:1 ! route-map default permit 10 - match community default + match community default ! route-map internal permit 10 - set community 65000:1 + set community 65000:1 ! #% endif #% endblock diff --git a/test_bgp_default_originate.py b/test_bgp_default_originate.py index d6fa086..fc2af60 100644 --- a/test_bgp_default_originate.py +++ b/test_bgp_default_originate.py @@ -32,12 +32,12 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r1' interface lo - ip address {{ routers.r1.lo_ip4[0] }} + ip address {{ routers.r1.lo_ip4[0] }} ! #% endif #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -46,26 +46,26 @@ class Configs(FRRConfigs): """ bgpd = """ - #% block main + #% block main #% if router.name == 'r2' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 + exit-address-family ! #% elif router.name == 'r1' router bgp 65000 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} default-originate - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} default-originate + exit-address-family ! #% endif - #% endblock - """ + #% endblock + """ class BGPDefaultOriginate(TestBase, AutoFixture, topo=topology, configs=Configs): diff --git a/test_bgp_default_originate_route_map_match_set.py b/test_bgp_default_originate_route_map_match_set.py index f8f3bb7..60e6f98 100644 --- a/test_bgp_default_originate_route_map_match_set.py +++ b/test_bgp_default_originate_route_map_match_set.py @@ -57,33 +57,33 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - redistribute connected - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + redistribute connected + exit-address-family ! #% elif router.name == 'r1' router bgp 65000 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - redistribute connected - network 192.168.13.0/24 route-map internal - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} default-originate route-map default - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + redistribute connected + network 192.168.13.0/24 route-map internal + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} default-originate route-map default + exit-address-family ! bgp community-list standard default seq 5 permit 65000:1 ! route-map default permit 10 - match community default - set metric 123 - set as-path prepend 65000 65000 65000 + match community default + set metric 123 + set as-path prepend 65000 65000 65000 ! route-map internal permit 10 - set community 65000:1 + set community 65000:1 ! #% endif #% endblock diff --git a/test_bgp_disable_addpath_rx.py b/test_bgp_disable_addpath_rx.py index 06aaf74..f126e3f 100644 --- a/test_bgp_disable_addpath_rx.py +++ b/test_bgp_disable_addpath_rx.py @@ -52,7 +52,7 @@ class Configs(FRRConfigs): #% endif #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -61,7 +61,7 @@ class Configs(FRRConfigs): """ bgpd = """ - #% block main + #% block main #% if router.name == 'r1' router bgp 65001 timers 3 10 @@ -107,8 +107,8 @@ class Configs(FRRConfigs): exit-address-family ! #% endif - #% endblock - """ + #% endblock + """ class BGPDisableAddpathRx(TestBase, AutoFixture, topo=topology, configs=Configs): diff --git a/test_bgp_distance_change.py b/test_bgp_distance_change.py index 460aca0..2eb448f 100644 --- a/test_bgp_distance_change.py +++ b/test_bgp_distance_change.py @@ -39,12 +39,12 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' interface lo - ip address {{ routers.r2.lo_ip4[0] }} + ip address {{ routers.r2.lo_ip4[0] }} ! #% endif #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -56,17 +56,17 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 - address-family ipv4 - redistribute connected - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as 65000 + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} timers 3 10 + address-family ipv4 + redistribute connected + exit-address-family #% elif router.name == 'r1' router bgp 65000 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 ! #% endif #% endblock diff --git a/test_bgp_dont_capability_negotiate.py b/test_bgp_dont_capability_negotiate.py index 6ba48d9..882be2e 100644 --- a/test_bgp_dont_capability_negotiate.py +++ b/test_bgp_dont_capability_negotiate.py @@ -51,17 +51,17 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65002 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as external - address-family ipv4 unicast - redistribute connected - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as external + address-family ipv4 unicast + redistribute connected + exit-address-family ! #% elif router.name == 'r1' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as external - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} dont-capability-negotiate + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as external + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} dont-capability-negotiate ! #% endif #% endblock diff --git a/test_bgp_ebgp_common_subnet_nexthop_unchanged.py b/test_bgp_ebgp_common_subnet_nexthop_unchanged.py index 94971da..b81ac03 100644 --- a/test_bgp_ebgp_common_subnet_nexthop_unchanged.py +++ b/test_bgp_ebgp_common_subnet_nexthop_unchanged.py @@ -51,7 +51,7 @@ class Configs(FRRConfigs): #% endif #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -60,7 +60,7 @@ class Configs(FRRConfigs): """ bgpd = """ - #% block main + #% block main #% if router.name == 'r1' router bgp 65001 no bgp ebgp-requires-policy @@ -82,8 +82,8 @@ class Configs(FRRConfigs): neighbor {{ routers.r2.iface_to('s1').ip4[0].ip }} remote-as external ! #% endif - #% endblock - """ + #% endblock + """ class BGPEbgpCommonSubnetNexthopUnchanged( @@ -116,4 +116,4 @@ def bgp_nh_unchanged(self, _, r1, r2): f"show ip bgp {r1.lo_ip4[0]} json", maxwait=3.0, compare=expected, - ) \ No newline at end of file + ) diff --git a/test_bgp_extended_optional_parameters_length.py b/test_bgp_extended_optional_parameters_length.py index 13b045b..f908d7e 100644 --- a/test_bgp_extended_optional_parameters_length.py +++ b/test_bgp_extended_optional_parameters_length.py @@ -35,12 +35,12 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' interface lo - ip address {{ routers.r2.lo_ip4[0] }} + ip address {{ routers.r2.lo_ip4[0] }} ! #% endif #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -52,17 +52,17 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65002 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as external - neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} extended-optional-parameters - address-family ipv4 - redistribute connected - exit-address-family + no bgp ebgp-requires-policy + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} remote-as external + neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} extended-optional-parameters + address-family ipv4 + redistribute connected + exit-address-family #% elif router.name == 'r1' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as external - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} extended-optional-parameters + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as external + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} extended-optional-parameters ! #% endif #% endblock diff --git a/test_bgp_minimum_holdtime.py b/test_bgp_minimum_holdtime.py index b1f6ff7..a83faca 100644 --- a/test_bgp_minimum_holdtime.py +++ b/test_bgp_minimum_holdtime.py @@ -54,16 +54,16 @@ class Configs(FRRConfigs): #% block main #% if router.name == 'r2' router bgp 65001 - no bgp ebgp-requires-policy - neighbor 192.168.255.1 remote-as 65000 - neighbor 192.168.255.1 timers 3 10 + no bgp ebgp-requires-policy + neighbor 192.168.255.1 remote-as 65000 + neighbor 192.168.255.1 timers 3 10 ! #% elif router.name == 'r1' router bgp 65000 - bgp minimum-holdtime 20 - neighbor 192.168.255.2 remote-as 65001 - neighbor 192.168.255.2 timers 3 10 - neighbor 192.168.255.2 timers connect 10 + bgp minimum-holdtime 20 + neighbor 192.168.255.2 remote-as 65001 + neighbor 192.168.255.2 timers 3 10 + neighbor 192.168.255.2 timers connect 10 ! #% endif #% endblock diff --git a/test_bgp_sender_as_path_loop_detection.py b/test_bgp_sender_as_path_loop_detection.py index 06157c5..43368da 100644 --- a/test_bgp_sender_as_path_loop_detection.py +++ b/test_bgp_sender_as_path_loop_detection.py @@ -40,7 +40,7 @@ class Configs(FRRConfigs): #% endif #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -49,41 +49,40 @@ class Configs(FRRConfigs): """ bgpd = """ - #% block main + #% block main #% if router.name == 'r1' router bgp 65001 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.iface_to('s1').ip4[0].ip }} remote-as 65002 - neighbor {{ routers.r2.iface_to('s1').ip4[0].ip }} timers 3 10 - address-family ipv4 unicast - neighbor {{ routers.r2.iface_to('s1').ip4[0].ip }} route-map prepend out - redistribute connected - exit-address-family - ! + no bgp ebgp-requires-policy + neighbor {{ routers.r2.iface_to('s1').ip4[0].ip }} remote-as 65002 + neighbor {{ routers.r2.iface_to('s1').ip4[0].ip }} timers 3 10 + address-family ipv4 unicast + neighbor {{ routers.r2.iface_to('s1').ip4[0].ip }} route-map prepend out + redistribute connected + exit-address-family ! route-map prepend permit 10 - set as-path prepend 65003 + set as-path prepend 65003 ! #% elif router.name == 'r2' router bgp 65002 - no bgp ebgp-requires-policy - neighbor {{ routers.r1.iface_to('s1').ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r1.iface_to('s1').ip4[0].ip }} timers 3 10 - neighbor {{ routers.r1.iface_to('s1').ip4[0].ip }} solo - neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} remote-as 65003 - neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} timers 3 10 - neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} solo - neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} sender-as-path-loop-detection + no bgp ebgp-requires-policy + neighbor {{ routers.r1.iface_to('s1').ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r1.iface_to('s1').ip4[0].ip }} timers 3 10 + neighbor {{ routers.r1.iface_to('s1').ip4[0].ip }} solo + neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} remote-as 65003 + neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} timers 3 10 + neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} solo + neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} sender-as-path-loop-detection ! #% elif router.name == 'r3' router bgp 65003 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.iface_to('s2').ip4[0].ip }} remote-as 65002 - neighbor {{ routers.r2.iface_to('s2').ip4[0].ip }} timers 3 10 + no bgp ebgp-requires-policy + neighbor {{ routers.r2.iface_to('s2').ip4[0].ip }} remote-as 65002 + neighbor {{ routers.r2.iface_to('s2').ip4[0].ip }} timers 3 10 ! #% endif - #% endblock - """ + #% endblock + """ class BGPSenderAspathLoopDetection( diff --git a/test_bgp_set_local_preference_add_subtract.py b/test_bgp_set_local_preference_add_subtract.py index 5fdea0f..7ffb29f 100644 --- a/test_bgp_set_local_preference_add_subtract.py +++ b/test_bgp_set_local_preference_add_subtract.py @@ -62,7 +62,7 @@ class Configs(FRRConfigs): neighbor {{ routers.r3.iface_to('s1').ip4[0].ip }} timers 3 10 exit-address-family ! - #% elif router.name == 'r2' + #% elif router.name == 'r2' router bgp 65000 no bgp ebgp-requires-policy no bgp network import-check @@ -94,7 +94,7 @@ class Configs(FRRConfigs): route-map r1-out permit 10 set local-preference -50 route-map l3 permit 10 - set local-preference -10 + set local-preference -10 ! #% endif #% endblock diff --git a/test_exabgp_demo.py b/test_exabgp_demo.py index b29311b..9bc3be7 100644 --- a/test_exabgp_demo.py +++ b/test_exabgp_demo.py @@ -29,7 +29,7 @@ class Configs(FRRConfigs): #% block main #% for iface in router.ifaces interface {{ iface.ifname }} - ip address {{ iface.ip4[0] }} + ip address {{ iface.ip4[0] }} ! #% endfor ip forwarding @@ -38,18 +38,18 @@ class Configs(FRRConfigs): """ bgpd = """ - #% block main + #% block main #% if router.name == 'r1' router bgp 65534 - no bgp ebgp-requires-policy - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 - neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 - neighbor {{ routers.r3.ifaces[0].ip4[0].ip }} remote-as 65002 - neighbor {{ routers.r3.ifaces[0].ip4[0].ip }} timers 3 10 + no bgp ebgp-requires-policy + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} remote-as 65001 + neighbor {{ routers.r2.ifaces[0].ip4[0].ip }} timers 3 10 + neighbor {{ routers.r3.ifaces[0].ip4[0].ip }} remote-as 65002 + neighbor {{ routers.r3.ifaces[0].ip4[0].ip }} timers 3 10 ! #% endif - #% endblock - """ + #% endblock + """ class ExaBGPDemo(TestBase, AutoFixture, topo=topology, configs=Configs): @@ -58,8 +58,8 @@ def prepare(self, r2, r3): configuration = """ neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} { - router-id {{ routers.r2.ifaces[0].ip4[0].ip }}; - local-address {{ routers.r2.ifaces[0].ip4[0].ip }}; + router-id {{ routers.r2.ifaces[0].ip4[0].ip }}; + local-address {{ routers.r2.ifaces[0].ip4[0].ip }}; local-as 65001; peer-as 65534; } @@ -69,8 +69,8 @@ def prepare(self, r2, r3): configuration2 = """ neighbor {{ routers.r1.ifaces[0].ip4[0].ip }} { - router-id {{ routers.r3.ifaces[0].ip4[0].ip }}; - local-address {{ routers.r3.ifaces[0].ip4[0].ip }}; + router-id {{ routers.r3.ifaces[0].ip4[0].ip }}; + local-address {{ routers.r3.ifaces[0].ip4[0].ip }}; local-as 65002; peer-as 65534; }