Joachim Wiberg
814d5f6a4d
test: update "show interfaces" template, bridge now has ethernet mac
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-04-03 16:08:37 +02:00
Mattias Walström
d9ffff2b5a
cli-pretty: Refactor to not take model as argument
...
Instead focus on the task to do 'show hardware', 'show interfaces' and more,
this to make it more logical.
2024-03-18 16:32:18 +01:00
Mattias Walström
89bcf7346f
test: igmp_basic: Speed up test and some renaming
...
Rename to more distinct names for netns and hostports
2024-03-07 12:45:55 +01:00
Mattias Walström
f91d36b8d1
test: igmp_vlan: Speed up test significantly
...
Remove a lot of extra sleeps.
2024-03-07 12:45:55 +01:00
Mattias Walström
400ae6ce1c
test: Add new test igmp_vlan and add igmp tests to suite
2024-03-07 12:45:55 +01:00
Mattias Walström
43d67044d0
test: igmp_basic: speed up test, remove unnecessary long timeout
...
And cleanup ASCII picture
2024-03-07 12:45:55 +01:00
Mattias Walström
c21f37c241
test: add new test igmp_basic
...
Simple test that tests (without VLAN):
* Multicast flooding works
* Join works as expected
2024-03-07 12:45:55 +01:00
Mattias Walström and Joachim Wiberg
c6626b6520
test: Increase timeouts for OSPF tests
...
This since when running the test in the cloud with github
supplied runner, everthing sometimes gets really slow.
2024-02-29 09:46:08 +01:00
Mattias Walström and Joachim Wiberg
2bf6ec7d1a
test: ipv4_autoconf: Fix racecondition on slow test-PCs
...
Refactor test, remove fragile solution with tcpdump started AFTER
the linklocal was activated, this opened for a race condition since
it was listening for a message sent once.
Now wait for the linklocal address instead.
2024-02-28 18:25:43 +01:00
Mattias Walström
d1b9f1fb45
Add new test start_from_startup.py to just see that the device can boot from startup config
...
Useful to run in a loop.
2024-02-28 13:18:51 +01:00
Mattias Walström
e77772e8c5
test: usb: Refactor to use a common function to wait boot
2024-02-28 13:18:51 +01:00
Richard Alpe and Mattias Walström
27a4278cce
statd: add good-octets counters
...
This patch adds out-good-octets and in-good-octets as augment in
the infix-ethernet-interface yang model. These counters represents
OctetsTransmittedOK and OctetsReceivedOK from ethtool.
Signed-off-by: Richard Alpe <richard@bit42.se >
2024-02-28 11:21:53 +01:00
Joachim Wiberg
b0b1a79aa5
statd: refactor to autotools, same as confd
...
Fix issue #299
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-02-27 08:14:41 +01:00
Joachim Wiberg
00c2c0c608
test/case: new test, container connected using physical interface
...
Verifies that a regular/physical port/interface can be handed over to a
container.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-02-25 19:49:27 +01:00
Joachim Wiberg
4856705803
test/case: new test, plain bridge + veth connection for container
...
Vanilla bridge and veth pair managed entirely by Infix.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-02-25 19:49:27 +01:00
Joachim Wiberg
a38f5902c8
test/case: new test, verify connectivity behind docker0 masquerade
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-02-25 19:49:27 +01:00
Joachim Wiberg
ec4c1b1d70
test/case: new test, basic container test
...
- New helper class for container testing
- New helper class to urllib, Furl
Due to extremely weak Python-fu in the undersigned, this patch changes
the __init__.py file to add new helper classes for container tests.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2024-02-25 19:49:27 +01:00
Mattias Walström
4869b73b14
test: usb: test startup with no hardware configuration
...
In this case the USB ports shall be locked.
2024-02-23 14:01:23 +01:00
Mattias Walström
15b32cfcc2
infamy: Add a simple USB test
2024-02-23 14:01:23 +01:00
Richard Alpe and Tobias Waldekranz
1827b65182
test: update cli-output to reflect new bridge output
...
Signed-off-by: Richard Alpe <richard@bit42.se >
2024-02-20 21:43:48 +01:00
Richard Alpe and Tobias Waldekranz
0937921cbc
test: add br1 to sysrepo emulator
...
Signed-off-by: Richard Alpe <richard@bit42.se >
2024-02-20 21:43:48 +01:00
Richard Alpe and Tobias Waldekranz
6ad80c80ab
test: make e2 into br1 bridge port in system output
...
Signed-off-by: Richard Alpe <richard@bit42.se >
2024-02-20 21:43:48 +01:00
Richard Alpe and Tobias Waldekranz
4150f45cc4
test: add system output for vlan filtering bridge
...
Signed-off-by: Richard Alpe <richard@bit42.se >
2024-02-20 21:43:48 +01:00
Richard Alpe and Joachim Wiberg
d73d5440c5
test: remove hardcoded interface type
...
This can now a days be inferred and isn't needed. Also, the interface
type in virtual testing is now etherlike not ethernet.
Signed-off-by: Richard Alpe <richard@bit42.se >
2024-02-05 18:01:30 +01:00
Richard Alpe and Joachim Wiberg
795f2615cb
test: update cli output test to reflect etherlike changes
...
* Remove bogus ethernet statistics for br0
* Change parentbus for e0 and e1 to make them ethernet devices (not
virtio -> etherlike).
Signed-off-by: Richard Alpe <richard@bit42.se >
2024-02-05 18:01:30 +01:00
Mattias Walström and Tobias Waldekranz
051658d36a
Add test to se that it is possible to get all operational data
...
Unlikley to fail though.
2024-01-27 23:56:31 +01:00
Mattias Walström and Joachim Wiberg
c9f426763a
Add new test to test suite
2024-01-15 16:29:06 +01:00
Mattias Walström and Joachim Wiberg
b48798b23a
test: Set hostname for OSPF tests to detect the role
2024-01-15 16:29:06 +01:00
Mattias Walström and Joachim Wiberg
388c02b29a
test: Create a larger OSPF test
...
This will test, multiple areas with cost and BFD (requires link
breakers in infamy, not yet implemented there yet)
Also test NSSA-areas.
2024-01-15 16:29:06 +01:00
Mattias Walström and Joachim Wiberg
34c807e955
OSPF: Add test case for unnumbered interfaces
2024-01-10 17:51:46 +01:00
Mattias Walström and Joachim Wiberg
7cce19d45c
test: Add show routes (ipv4 and ipv6) to test CLI test suite
2024-01-09 03:56:17 +01:00
Mattias Walström and Joachim Wiberg
4e7bdc58d4
Add OSPFv2 support
...
A very limited part of the YANG model is implemented so far, basicly it is OSPFv2 with multiple areas and you can change timers
for the interfaces. Limited operational support.
admin@infix-00-00-00:/config/> edit routing control-plane-protocol ietf-ospf:ospfv2 name default
admin@infix-00-00-00:/config/routing/control-plane-protocol/ietf-ospf:ospfv2/name/default/> set ospf area 0.0.0.0 interface e0 enabled true
admin@infix-00-00-00:/config/routing/control-plane-protocol/ietf-ospf:ospfv2/name/default/> leave
2023-12-18 17:28:00 +01:00
Joachim Wiberg and Mattias Walström
95c3e5c67c
test: new test, verify dhcp option 121 is preferred over option 3
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-12-14 16:40:41 +01:00
Joachim Wiberg and Mattias Walström
6b84bb4b13
test: new test, verify dhcp option 3 (router)
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-12-14 16:40:41 +01:00
Joachim Wiberg and Mattias Walström
cb5419c84c
test: new test, basic DHCP client
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-12-14 16:40:41 +01:00
Joachim Wiberg and Mattias Walström
4b08ccf842
test: rename method
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-12-14 16:40:41 +01:00
Mattias Walström and Joachim Wiberg
86557e447f
Routing: Fix regression when adding static routes
...
Add autotest to regresssion suite to catch this
2023-12-07 14:52:00 +01:00
Mattias Walström and Joachim Wiberg
eab3c4d191
Add support for IPv6 static routing
...
admin@example:/> configure
admin@example:/config/> edit routing control-plane-protocol static name default
admin@example:/config/routing/control-plane-protocol/static/name/default/> set ipv6 route 2001:db8:3c4d:200::/64 next-hop next-hop-address 2001:db8:3c4d:1::1
admin@example:/config/routing/control-plane-protocol/static/name/default/> leave
admin@example:/>
admin@infix-00-01-00:/> show routes ipv6
PREFIX NEXT-HOP METRIC PROTOCOL
2001:db8:3c4d:50::/64 eth4 256 kernel
2001:db8:3c4d:200::1/128 lo 256 kernel
fe80::/64 eth3 256 kernel
fe80::/64 eth2 256 kernel
fe80::/64 eth1 256 kernel
fe80::/64 eth0 256 kernel
fe80::/64 eth5 256 kernel
fe80::/64 eth4 256 kernel
::/0 2001:db8:3c4d:50::1 20 static
2023-12-07 14:52:00 +01:00
Richard Alpe and Mattias Walström
734cc18919
test: change iface e4 state to down in cli unit test
...
This commit illustrates how to update the system output and
corresponding cli output.
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-12-05 10:02:51 +01:00
Richard Alpe and Mattias Walström
a9fd58c772
test: add offline unit test for yanger and cli-pretty
...
In this patch we add some arbitrary system output files which contains
interface data. Such as the output from "ip link" and "ethtool". These
files are used by yanger instead of running the actual commands.
Yanger then generates a lot of YANG json data, which are merged using
jq into something that looks like the sysrepo operational data on
a running system. This data is then passed though cli-pretty and its
ouput is compared to the static expected output in the .txt files in
cli-output.
Here's a basic flow overview.
* system-output/foo.json -> yanger ->> data
* system-output/bar.json -> yanger ->> data
* data -> merge -> sysrepo-operational-data
* sysrepo-operational-data -> cli-pretty -> output.txt
* compare output.txt too cli-output/show-foobar.txt
The result of this is that if something changes in yanger OR in
cli-pretty. The corresponding system-output file needs to be updated
for the test to pass. This is indented to catch regression where the
output is unintentionally changed.
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-12-05 10:02:51 +01:00
Joachim Wiberg and Tobias Waldekranz
d69f51a173
Fix #224 : relocate /lib/infix to /libexec/infix
...
The /lib directory is not intended for executable scripts and programs.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-12-04 10:24:35 +01:00
Mattias Walström and Tobias Waldekranz
2cdb0a3d18
ietf_routing/static_routing: Fix test stability
...
Remove all sleeps and replace them with util.until()
2023-12-01 15:58:27 +01:00
Tobias Waldekranz and Mattias Walström
5f299ee151
test/infamy: Generalize wait functionality into "until"
2023-11-29 16:57:48 +01:00
Mattias Walström
f7e9c44516
Fix problems when running test on real hardware not qemu
...
* sniffer did not work correctly
* links did not come upp as quick as in qemu
* must_reach in netns was to narrow, increase timeout
* add wait function to handle poll
2023-11-29 16:57:48 +01:00
Mattias Walström
37f7b5ba92
Add support for reading routing operational data for IPv4
...
In the CLI:
admin@infix-00-00-00:/> show routes
PREFIX DESTINATION PROTOCOL METRIC
1.1.1.0/24 e0 kernel
192.168.100.0/24 1.1.1.1 static 20
192.168.110.2/32 blackhole static 20
192.168.120.2/32 blackhole static 20
192.168.130.2/32 unreachable static 20
2023-11-23 10:30:26 +01:00
Mattias Walström and Joachim Wiberg
2bcc9dbb3a
vlan_ping: add some negative test
...
Test that it works when removing interfaces.
2023-11-17 07:19:28 +01:00
Mattias Walström and Joachim Wiberg
ef740a8abc
test: routing/static_routing: Sleep some to wait FRR startup
...
This should be replaced with reading the operational status.
2023-11-17 07:19:28 +01:00
Mattias Walström and Joachim Wiberg
4ea1a682da
Add test-case for a static routing
2023-11-17 07:19:28 +01:00
Joachim Wiberg
c1fd4506e6
test: validate defconfigs, ensure root login is disabled
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-11-14 10:20:00 +01:00
Richard Alpe and Joachim Wiberg
5b58c60919
test: cli: use random ipv4 addresses in bloated.json
...
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-11-06 20:10:43 +01:00