1import ./make-test-python.nix ({ pkgs, lib, ... }: {
2 name = "snmpd";
3
4 nodes.snmpd = {
5 environment.systemPackages = with pkgs; [
6 net-snmp
7 ];
8
9 services.snmpd = {
10 enable = true;
11 configText = ''
12 rocommunity public
13 '';
14 };
15 };
16
17 testScript = ''
18 start_all();
19 machine.wait_for_unit("snmpd.service")
20 machine.succeed("snmpwalk -v 2c -c public localhost | grep SNMPv2-MIB::sysName.0");
21 '';
22
23})