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
Richard Alpe and Joachim Wiberg
e1080a5412
test: cli: use random ipv6 addresses in bloated.json
...
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-11-06 20:10:43 +01:00
Richard Alpe and Joachim Wiberg
8d2c3f862a
test: cli: use random mac addresses in bloated.json
2023-11-06 20:10:43 +01:00
Richard Alpe and Joachim Wiberg
429e1463af
cli: add support for printing veth pair
...
They have link set in there json data from ip link show.
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-11-06 20:10:43 +01:00
Richard Alpe and Joachim Wiberg
c0a1c7f259
cli: print iface auto-negotiation in detailed view
...
Print autoneg status as "on" or "off" if the data exists in the
operational datastore.
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-11-06 11:28:53 +01:00
Mattias Walström and Joachim Wiberg
941fc31581
infix-vlan: Create a custom vlan model
...
This implements the new model infix-if-vlan.
The new CLI is:
root@infix-00-00-00:/config/interfaces/interface/vlan10/> set vlan id 10 lower-layer-if eth0
with an possible extra option for tag-type, default tag-type is c-vlan.
2023-10-27 10:53:55 +02:00
Mattias Walström and Joachim Wiberg
d66740250c
confd: Add support for timezone-utc-offset
...
Some deviations has been done the yang model to comply with tzdata
on linux.
This fixes #106
2023-10-20 12:55:02 +02:00
Richard Alpe and Joachim Wiberg
1a3105c06d
cli: pretty print existing Ethernet frame stats
...
Pretty print all Ethernet frame statistics from the operational
datastore. Only in the detailed interface view.
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-10-17 18:17:59 +02:00
Joachim Wiberg
c6fae88268
Fix #166 : drop SSDP entirely from Infix
...
mDNS-SD was added in Windows 10 Creators Update[1] (build 1703), relased
April 11, 2017. This makes SSDP no longer critical for finding an Infix
device in Windows, both ping infix-01-02-03.local and using Chrome work.
Since all major operating systems now support mDNS-SD[2] we've decided
to standardize on that and LLDP for Infix and its derivatives. Other
reasons for dropping it include, but is not limited to: lack of IPv6 in
the implementation we use, and potential security implications[3].
[1]: https://en.wikipedia.org/wiki/Windows_10,_version_1703
[2]: https://techcommunity.microsoft.com/t5/networking-blog/mdns-in-the-enterprise/ba-p/3275777
[3]: https://blog.cloudflare.com/ssdp-100gbps/
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-10-17 16:32:41 +02:00
Richard Alpe and Joachim Wiberg
7d8b876cc7
cli: handle missing oper-status
...
Use known data from .self to avoid crashing if the oper-status is
missing for a interface.
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-10-12 10:10:30 +02:00
Richard Alpe and Joachim Wiberg
484b12611b
cli: use infix interfaces types in cli-pretty
...
Don't use iana-if-type, use infix-if-type.
Signed-off-by: Richard Alpe <richard@bit42.se >
2023-09-25 12:38:33 +02:00
Joachim Wiberg
f7e877ebcc
test/case: add new test to suite
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-09-21 16:34:48 +02:00
Joachim Wiberg
e528fe0e34
test/case: new test, verify custom mac address
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2023-09-21 16:34:48 +02:00