diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-01-21 20:45:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-21 20:45:55 +0100 |
| commit | 774de4b11330e7d3d30ddf6af0ad75e8be0f7bb3 (patch) | |
| tree | 92725d5ed66c015476ca0ee348d3f71dab82b512 /smoketest | |
| parent | 0868f3dc7246ea44a1765cee04649cd08c188982 (diff) | |
| parent | 2471f686979fd83bd015f124b6faa66f27b8c9ba (diff) | |
| download | vyos-1x-774de4b11330e7d3d30ddf6af0ad75e8be0f7bb3.tar.gz vyos-1x-774de4b11330e7d3d30ddf6af0ad75e8be0f7bb3.zip | |
Merge pull request #4921 from hedrok/T7664-update-smoketest-script
T7664: support FRR 10.5
Diffstat (limited to 'smoketest')
| -rw-r--r-- | smoketest/configs/assert/basic-system-ip-protocol | 30 | ||||
| -rw-r--r-- | smoketest/configs/basic-system-ip-protocol | 302 | ||||
| -rwxr-xr-x | smoketest/scripts/cli/test_protocols_bgp.py | 10 | ||||
| -rwxr-xr-x | smoketest/scripts/cli/test_protocols_segment-routing.py | 22 | ||||
| -rwxr-xr-x | smoketest/scripts/cli/test_system_ip.py | 3 | ||||
| -rwxr-xr-x | smoketest/scripts/cli/test_system_ipv6.py | 3 | ||||
| -rwxr-xr-x | smoketest/scripts/cli/test_vrf.py | 4 |
7 files changed, 362 insertions, 12 deletions
diff --git a/smoketest/configs/assert/basic-system-ip-protocol b/smoketest/configs/assert/basic-system-ip-protocol new file mode 100644 index 000000000..870ffa8f5 --- /dev/null +++ b/smoketest/configs/assert/basic-system-ip-protocol @@ -0,0 +1,30 @@ +set system ip protocol any route-map 'stub' +set system ip protocol babel route-map 'stub' +set system ip protocol bgp route-map 'stub' +set system ip protocol eigrp route-map 'stub' +set system ip protocol isis route-map 'stub' +set system ip protocol ospf route-map 'stub' +set system ip protocol rip route-map 'stub' +set system ip protocol static route-map 'stub' +set system ipv6 protocol any route-map 'stub' +set system ipv6 protocol babel route-map 'stub' +set system ipv6 protocol bgp route-map 'stub' +set system ipv6 protocol isis route-map 'stub' +set system ipv6 protocol ospfv3 route-map 'stub' +set system ipv6 protocol ripng route-map 'stub' +set system ipv6 protocol static route-map 'stub' +set vrf name red ip protocol any route-map 'stub' +set vrf name red ip protocol babel route-map 'stub' +set vrf name red ip protocol bgp route-map 'stub' +set vrf name red ip protocol eigrp route-map 'stub' +set vrf name red ip protocol isis route-map 'stub' +set vrf name red ip protocol ospf route-map 'stub' +set vrf name red ip protocol rip route-map 'stub' +set vrf name red ip protocol static route-map 'stub' +set vrf name red ipv6 protocol any route-map 'stub' +set vrf name red ipv6 protocol babel route-map 'stub' +set vrf name red ipv6 protocol bgp route-map 'stub' +set vrf name red ipv6 protocol isis route-map 'stub' +set vrf name red ipv6 protocol ospfv3 route-map 'stub' +set vrf name red ipv6 protocol ripng route-map 'stub' +set vrf name red ipv6 protocol static route-map 'stub' diff --git a/smoketest/configs/basic-system-ip-protocol b/smoketest/configs/basic-system-ip-protocol new file mode 100644 index 000000000..84c2c8da7 --- /dev/null +++ b/smoketest/configs/basic-system-ip-protocol @@ -0,0 +1,302 @@ +interfaces { + ethernet eth0 { + address "192.168.0.1/24" + address "fe88::1/56" + duplex "auto" + offload { + gro + gso + sg + tso + } + speed "auto" + } + loopback lo { + } +} +policy { + route-map stub { + } +} +protocols { + static { + arp { + interface eth0 { + address 192.168.0.20 { + mac "00:50:00:00:00:20" + } + address 192.168.0.30 { + mac "00:50:00:00:00:30" + } + address 192.168.0.40 { + mac "00:50:00:00:00:40" + } + } + interface eth2.100 { + address 100.100.0.2 { + mac "00:50:00:00:02:02" + } + address 100.100.0.3 { + mac "00:50:00:00:02:03" + } + address 100.100.0.4 { + mac "00:50:00:00:02:04" + } + } + interface eth2.200 { + address 100.64.200.1 { + mac "00:50:00:00:00:01" + } + address 100.64.200.2 { + mac "00:50:00:00:00:02" + } + } + interface eth2.200.201 { + address 100.64.201.10 { + mac "00:50:00:00:00:10" + } + address 100.64.201.20 { + mac "00:50:00:00:00:20" + } + } + interface eth2.200.202 { + address 100.64.202.30 { + mac "00:50:00:00:00:30" + } + address 100.64.202.40 { + mac "00:50:00:00:00:40" + } + } + } + route 0.0.0.0/0 { + next-hop 100.64.0.1 { + } + } + } +} +system { + config-management { + commit-revisions "100" + } + conntrack { + ignore { + ipv4 { + rule 1 { + destination { + address "192.0.2.2" + } + source { + address "192.0.2.1" + } + } + } + } + modules { + ftp + h323 + nfs + pptp + sip + sqlnet + tftp + } + } + console { + device ttyS0 { + speed "115200" + } + } + host-name "vyos" + ip { + protocol any { + route-map "stub" + } + protocol babel { + route-map "stub" + } + protocol bgp { + route-map "stub" + } + protocol connected { + route-map "stub" + } + protocol eigrp { + route-map "stub" + } + protocol isis { + route-map "stub" + } + protocol kernel { + route-map "stub" + } + protocol ospf { + route-map "stub" + } + protocol rip { + route-map "stub" + } + protocol static { + route-map "stub" + } + protocol table { + route-map "stub" + } + } + ipv6 { + protocol any { + route-map "stub" + } + protocol babel { + route-map "stub" + } + protocol bgp { + route-map "stub" + } + protocol connected { + route-map "stub" + } + protocol isis { + route-map "stub" + } + protocol kernel { + route-map "stub" + } + protocol ospfv3 { + route-map "stub" + } + protocol ripng { + route-map "stub" + } + protocol static { + route-map "stub" + } + protocol table { + route-map "stub" + } + } + login { + user vyos { + authentication { + encrypted-password "$6$O5gJRlDYQpj$MtrCV9lxMnZPMbcxlU7.FI793MImNHznxGoMFgm3Q6QP3vfKJyOSRCt3Ka/GzFQyW1yZS4NS616NLHaIPPFHc0" + plaintext-password "" + } + } + } + name-server "192.168.0.1" + syslog { + console { + facility all { + level "emerg" + } + facility mail { + level "info" + } + } + global { + facility all { + level "info" + } + facility auth { + level "info" + } + facility local7 { + level "debug" + } + marker { + interval "1000" + } + preserve-fqdn + } + host syslog.vyos.net { + facility auth { + level "warning" + } + facility local7 { + level "notice" + } + format { + octet-counted + } + port "8000" + protocol "tcp" + } + } + time-zone "Europe/Berlin" +} +vrf { + name red { + ip { + protocol any { + route-map "stub" + } + protocol babel { + route-map "stub" + } + protocol bgp { + route-map "stub" + } + protocol connected { + route-map "stub" + } + protocol eigrp { + route-map "stub" + } + protocol isis { + route-map "stub" + } + protocol kernel { + route-map "stub" + } + protocol ospf { + route-map "stub" + } + protocol rip { + route-map "stub" + } + protocol static { + route-map "stub" + } + protocol table { + route-map "stub" + } + } + ipv6 { + protocol any { + route-map "stub" + } + protocol babel { + route-map "stub" + } + protocol bgp { + route-map "stub" + } + protocol connected { + route-map "stub" + } + protocol isis { + route-map "stub" + } + protocol kernel { + route-map "stub" + } + protocol ospfv3 { + route-map "stub" + } + protocol ripng { + route-map "stub" + } + protocol static { + route-map "stub" + } + protocol table { + route-map "stub" + } + } + table "1234" + } +} + + +// Warning: Do not remove the following line. +// vyos-config-version: "bgp@6:broadcast-relay@1:cluster@2:config-management@1:conntrack@6:conntrack-sync@2:container@2:dhcp-relay@2:dhcp-server@8:dhcpv6-server@1:dns-dynamic@4:dns-forwarding@4:firewall@15:flow-accounting@1:https@6:ids@1:interfaces@32:ipoe-server@3:ipsec@13:isis@3:l2tp@9:lldp@2:mdns@1:monitoring@1:nat@8:nat66@3:ntp@3:openconnect@3:ospf@2:pim@1:policy@8:pppoe-server@10:pptp@5:qos@2:quagga@11:reverse-proxy@1:rip@1:rpki@2:salt@1:snmp@3:ssh@2:sstp@6:system@27:vrf@3:vrrp@4:vyos-accel-ppp@2:wanloadbalance@3:webproxy@2" +// Release version: 1.4.3 diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py index d7c2a924f..06377eee3 100755 --- a/smoketest/scripts/cli/test_protocols_bgp.py +++ b/smoketest/scripts/cli/test_protocols_bgp.py @@ -398,7 +398,9 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): self.assertIn(f' bgp bestpath compare-routerid', frrconfig) self.assertIn(f' bgp bestpath peer-type multipath-relax', frrconfig) self.assertIn(f' bgp minimum-holdtime {min_hold_time}', frrconfig) - self.assertIn(f' bgp reject-as-sets', frrconfig) + self.assertNotIn( + f'bgp reject-as-sets', frrconfig + ) # default was changed in FRR 10.5 to 'reject-as-sets' self.assertIn(f' bgp route-reflector allow-outbound-policy', frrconfig) self.assertIn(f' no bgp ipv6-auto-ra', frrconfig) self.assertIn(f' bgp shutdown', frrconfig) @@ -425,6 +427,12 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase): self.assertIn(f' maximum-paths {max_path_v6}', afiv6_config) self.assertIn(f' maximum-paths ibgp {max_path_v6ibgp}', afiv6_config) + # Verify reject-as-sets + self.cli_delete(base_path + ['parameters', 'reject-as-sets']) + self.cli_commit() + frrconfig = self.getFRRconfig(f'router bgp {ASN}', stop_section='^exit') + self.assertIn(f'no bgp reject-as-sets', frrconfig) + def test_bgp_02_neighbors(self): # Test out individual neighbor configuration items, not all of them are # also available to a peer-group! diff --git a/smoketest/scripts/cli/test_protocols_segment-routing.py b/smoketest/scripts/cli/test_protocols_segment-routing.py index 8d826f07c..a5c0d5983 100755 --- a/smoketest/scripts/cli/test_protocols_segment-routing.py +++ b/smoketest/scripts/cli/test_protocols_segment-routing.py @@ -57,7 +57,7 @@ class TestProtocolsSegmentRouting(VyOSUnitTestSHIM.TestCase): 'prefix': '2001:d::/48', 'block-len': '32', 'node-len': '16', - 'func-bits': '16', + 'func-bits': '12', 'usid': {}, 'format': 'usid-f3216', }, @@ -131,13 +131,25 @@ class TestProtocolsSegmentRouting(VyOSUnitTestSHIM.TestCase): self.assertIn(' locators', frrconfig) for locator, locator_config in locators.items(): prefix = locator_config['prefix'] - block_len = locator_config.get('block-len', '40') - node_len = locator_config.get('node-len', '24') - func_bits = locator_config.get('func-bits', '16') + block_len = ( + f' block-len {locator_config["block-len"]}' + if 'block-len' in locator_config + else '' + ) + node_len = ( + f' node-len {locator_config["node-len"]}' + if 'node-len' in locator_config + else '' + ) + func_bits = ( + f' func-bits {locator_config["func-bits"]}' + if 'func-bits' in locator_config + else '' + ) self.assertIn(f' locator {locator}', frrconfig) self.assertIn( - f' prefix {prefix} block-len {block_len} node-len {node_len} func-bits {func_bits}', + f' prefix {prefix}{block_len}{node_len}{func_bits}', frrconfig, ) diff --git a/smoketest/scripts/cli/test_system_ip.py b/smoketest/scripts/cli/test_system_ip.py index 3784d4630..25dbeef1d 100755 --- a/smoketest/scripts/cli/test_system_ip.py +++ b/smoketest/scripts/cli/test_system_ip.py @@ -83,8 +83,7 @@ class TestSystemIP(VyOSUnitTestSHIM.TestCase): _verify_gc_thres(size) def test_system_ip_protocol_route_map(self): - protocols = ['any', 'babel', 'bgp', 'connected', 'eigrp', 'isis', - 'kernel', 'ospf', 'rip', 'static', 'table'] + protocols = ['any', 'babel', 'bgp', 'eigrp', 'isis', 'ospf', 'rip', 'static'] rule_num = '10' diff --git a/smoketest/scripts/cli/test_system_ipv6.py b/smoketest/scripts/cli/test_system_ipv6.py index 0f94765bd..f7d74eb58 100755 --- a/smoketest/scripts/cli/test_system_ipv6.py +++ b/smoketest/scripts/cli/test_system_ipv6.py @@ -97,8 +97,7 @@ class TestSystemIPv6(VyOSUnitTestSHIM.TestCase): _verify_gc_thres(size) def test_system_ipv6_protocol_route_map(self): - protocols = ['any', 'babel', 'bgp', 'connected', 'isis', - 'kernel', 'ospfv3', 'ripng', 'static', 'table'] + protocols = ['any', 'babel', 'bgp', 'isis', 'ospfv3', 'ripng', 'static'] for protocol in protocols: route_map = 'route-map-' + protocol.replace('ospfv3', 'ospf6') diff --git a/smoketest/scripts/cli/test_vrf.py b/smoketest/scripts/cli/test_vrf.py index 9349f43c6..2b364dea3 100755 --- a/smoketest/scripts/cli/test_vrf.py +++ b/smoketest/scripts/cli/test_vrf.py @@ -40,8 +40,8 @@ from vyos.xml_ref import default_value base_path = ['vrf'] vrfs = ['red', 'green', 'blue', 'foo-bar', 'baz_foo'] -v4_protocols = ['any', 'babel', 'bgp', 'connected', 'eigrp', 'isis', 'kernel', 'ospf', 'rip', 'static', 'table'] -v6_protocols = ['any', 'babel', 'bgp', 'connected', 'isis', 'kernel', 'ospfv3', 'ripng', 'static', 'table'] +v4_protocols = ['any', 'babel', 'bgp', 'eigrp', 'isis', 'ospf', 'rip', 'static'] +v6_protocols = ['any', 'babel', 'bgp', 'isis', 'ospfv3', 'ripng', 'static'] class VRFTest(VyOSUnitTestSHIM.TestCase): _interfaces = [] |
