blob: ebb5290cbb89b2a94e90666fbdf1539f107300e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{ pkgs, lib, ... }:
{
name = "rstp";
nodes = {
client = {
containers = {
peer = {
autoStart = true;
privateNetwork = true;
hostBridge = "br0";
config = {
networking = {
interfaces = {
eth0 = {
ipv4.addresses = [
{
address = "192.168.1.122";
prefixLength = 24;
}
];
};
};
};
nix.enable = false; # disabled by default on the test's host. See all-tests.nix / tag(no-nix-by-default)
};
};
};
networking = {
bridges = {
br0 = {
interfaces = [ ];
rstp = true;
};
};
interfaces = {
eth1 = {
ipv4.addresses = lib.mkForce [ ];
ipv6.addresses = lib.mkForce [ ];
};
br0 = {
ipv4.addresses = [
{
address = "192.168.1.2";
prefixLength = 24;
}
];
};
};
};
virtualisation = {
vlans = [ 1 ];
};
};
};
testScript = ''
client.start()
client.wait_for_unit("default.target")
client.wait_until_succeeds("journalctl | grep 'Port vb-peer : up'", timeout=10)
'';
}
|