/usr/share/augeas/lenses/dist/tests/test_nut.aug is in nut-client 2.6.3-1ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | (* Tests for the Nut module *)
module Test_nut =
let nut_conf = "
MODE=standalone
"
test NutNutConf.nut_lns get nut_conf =
{ }
{ "MODE" = "standalone" }
let ups_conf = "
[testups]
driver = dummy-ups
port = auto
desc = \"Dummy UPS\"
"
test NutUpsConf.ups_lns get ups_conf =
{ }
{ "testups"
{ "driver" = "dummy-ups" }
{ "port" = "auto" }
{ "desc" = "\"Dummy UPS\"" } }
let upsd_conf = "
MAXAGE 30
LISTEN 0.0.0.0 3493
MAXCONN 1024
"
test NutUpsdConf.upsd_lns get upsd_conf =
{ }
{ "MAXAGE" = "30" }
{ "LISTEN"
{ "interface" = "0.0.0.0" }
{ "port" = "3493" } }
{ "MAXCONN" = "1024" }
let upsd_users = "
[admin]
password = upsman
actions = SET FSD
instcmds = ALL
[pfy]
password = duh
instcmds = test.panel.start
instcmds = test.panel.stop
[monmaster]
password = blah
upsmon master
[monslave]
password = abcd
upsmon slave
"
test NutUpsdUsers.upsd_users_lns get upsd_users =
{ }
{ "admin"
{ "password" = "upsman" }
{ "actions"
{ "SET" }
{ "FSD" } }
{ "instcmds" = "ALL" }
{ } }
{ "pfy"
{ "password" = "duh" }
{ "instcmds" = "test.panel.start" }
{ "instcmds" = "test.panel.stop" }
{ } }
{ "monmaster"
{ "password" = "blah" }
{ "upsmon" = "master" }
{ } }
{ "monslave"
{ "password" = "abcd" }
{ "upsmon" = "slave" } }
let upsmon_conf = "
MONITOR testups@localhost 1 monmaster blah master
MINSUPPLIES 1
SHUTDOWNCMD /sbin/shutdown -h +0
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 30
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
"
test NutUpsmonConf.upsmon_lns get upsmon_conf =
{ }
{ "MONITOR"
{ "system"
{ "upsname" = "testups" }
{ "hostname" = "localhost" } }
{ "powervalue" = "1" }
{ "username" = "monmaster" }
{ "password" = "blah" }
{ "type" = "master" } }
{ }
{ "MINSUPPLIES" = "1" }
{ "SHUTDOWNCMD" = "/sbin/shutdown -h +0" }
{ "POLLFREQ" = "5" }
{ "POLLFREQALERT" = "5" }
{ "HOSTSYNC" = "30" }
{ "DEADTIME" = "15" }
{ "POWERDOWNFLAG" = "/etc/killpower" }
{ "RBWARNTIME" = "43200" }
{ "NOCOMMWARNTIME" = "300" }
{ "FINALDELAY" = "5" }
let upsset_conf = "
I_HAVE_SECURED_MY_CGI_DIRECTORY
"
test NutUpssetConf.upsset_lns get upsset_conf =
{ }
{ "auth" = "I_HAVE_SECURED_MY_CGI_DIRECTORY" }
let upssched_conf = "
CMDSCRIPT /upssched-cmd
PIPEFN /var/state/ups/upssched/upssched.pipe
LOCKFN /var/state/ups/upssched/upssched.lock
AT COMMBAD * START-TIMER upsgone 10
AT COMMOK myups@localhost CANCEL-TIMER upsgone
AT ONLINE * EXECUTE ups-back-on-line
"
test NutUpsschedConf.upssched_lns get upssched_conf =
{ }
{ "CMDSCRIPT" = "/upssched-cmd" }
{ "PIPEFN" = "/var/state/ups/upssched/upssched.pipe" }
{ "LOCKFN" = "/var/state/ups/upssched/upssched.lock" }
{ "AT"
{ "notifytype" = "COMMBAD" }
{ "upsname" = "*" }
{ "START-TIMER"
{ "timername" = "upsgone" }
{ "interval" = "10" }
}
}
{ "AT"
{ "notifytype" = "COMMOK" }
{ "upsname" = "myups@localhost" }
{ "CANCEL-TIMER"
{ "timername" = "upsgone" }
}
}
{ "AT"
{ "notifytype" = "ONLINE" }
{ "upsname" = "*" }
{ "EXECUTE"
{ "command" = "ups-back-on-line" }
}
}
let hosts_conf = "
MONITOR myups@localhost \"Local UPS\"
MONITOR su2200@10.64.1.1 \"Finance department\"
MONITOR matrix@shs-server.example.edu \"Sierra High School data room #1\"
"
test NutHostsConf.hosts_lns get hosts_conf =
{ }
{ "MONITOR"
{ "system" = "myups@localhost" }
{ "description" = "Local UPS" }
}
{ "MONITOR"
{ "system" = "su2200@10.64.1.1" }
{ "description" = "Finance department" }
}
{ "MONITOR"
{ "system" = "matrix@shs-server.example.edu" }
{ "description" = "Sierra High School data room #1" }
}
|