mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-04 12:03:21 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
72 lines
1.9 KiB
Nix
72 lines
1.9 KiB
Nix
{ pkgs, lib, ... }:
|
|
|
|
{
|
|
name = "fastnetmon-advanced";
|
|
meta.maintainers = lib.teams.wdz.members;
|
|
|
|
nodes = {
|
|
bird =
|
|
{ ... }:
|
|
{
|
|
networking.firewall.allowedTCPPorts = [ 179 ];
|
|
services.bird2 = {
|
|
enable = true;
|
|
config = ''
|
|
router id 192.168.1.1;
|
|
|
|
protocol bgp fnm {
|
|
local 192.168.1.1 as 64513;
|
|
neighbor 192.168.1.2 as 64514;
|
|
multihop;
|
|
ipv4 {
|
|
import all;
|
|
export none;
|
|
};
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
fnm =
|
|
{ ... }:
|
|
{
|
|
networking.firewall.allowedTCPPorts = [ 179 ];
|
|
services.fastnetmon-advanced = {
|
|
enable = true;
|
|
settings = {
|
|
networks_list = [ "172.23.42.0/24" ];
|
|
gobgp = true;
|
|
gobgp_flow_spec_announces = true;
|
|
};
|
|
bgpPeers = {
|
|
bird = {
|
|
local_asn = 64514;
|
|
remote_asn = 64513;
|
|
local_address = "192.168.1.2";
|
|
remote_address = "192.168.1.1";
|
|
|
|
description = "Bird";
|
|
ipv4_unicast = true;
|
|
multihop = true;
|
|
active = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript =
|
|
{ nodes, ... }:
|
|
''
|
|
start_all()
|
|
fnm.wait_for_unit("fastnetmon.service")
|
|
bird.wait_for_unit("bird2.service")
|
|
|
|
fnm.wait_until_succeeds('journalctl -eu fastnetmon.service | grep "BGP daemon restarted correctly"')
|
|
fnm.wait_until_succeeds("journalctl -eu gobgp.service | grep BGP_FSM_OPENCONFIRM")
|
|
bird.wait_until_succeeds("birdc show protocol fnm | grep Estab")
|
|
fnm.wait_until_succeeds('journalctl -eu fastnetmon.service | grep "API server listening"')
|
|
fnm.succeed("fcli set blackhole 172.23.42.123")
|
|
bird.succeed("birdc show route | grep 172.23.42.123")
|
|
'';
|
|
}
|