2021-02-09 18:41:05 +01:00
|
|
|
-- { actor_connections = [] : List { _1 : Text, _2 : Text }
|
2021-09-21 07:48:19 +02:00
|
|
|
{ actor_connections =
|
2021-09-21 09:22:54 +02:00
|
|
|
-- Link up machines to actors
|
2021-09-21 18:45:35 +02:00
|
|
|
[ { _1 = "Testmachine", _2 = "Shelly_1234" }
|
2021-09-21 09:00:42 +02:00
|
|
|
, { _1 = "Another", _2 = "Bash" }
|
2021-09-21 09:22:54 +02:00
|
|
|
-- One machine can have as many actors as it wants
|
2021-09-21 09:00:42 +02:00
|
|
|
, { _1 = "Yetmore", _2 = "Bash2" }
|
2021-09-21 09:22:54 +02:00
|
|
|
, { _1 = "Yetmore", _2 = "FailBash"}
|
2021-09-21 07:48:19 +02:00
|
|
|
]
|
2020-12-15 13:04:21 +01:00
|
|
|
, actors =
|
2021-09-21 18:45:35 +02:00
|
|
|
{ Shelly_1234 = { module = "Shelly", params = {=} }
|
2021-09-21 09:00:42 +02:00
|
|
|
, Bash = { module = "Process", params =
|
|
|
|
{ cmd = "./examples/actor.sh"
|
|
|
|
, args = "your ad could be here"
|
|
|
|
}}
|
|
|
|
, Bash2 = { module = "Process", params =
|
|
|
|
{ cmd = "./examples/actor.sh"
|
|
|
|
, args = "this is a different one"
|
|
|
|
}}
|
2021-09-21 09:22:54 +02:00
|
|
|
, FailBash = { module = "Process", params =
|
|
|
|
{ cmd = "./examples/fail-actor.sh"
|
2021-09-21 09:00:42 +02:00
|
|
|
}}
|
2020-12-15 13:04:21 +01:00
|
|
|
}
|
2021-02-08 19:28:27 +01:00
|
|
|
, init_connections = [] : List { _1 : Text, _2 : Text }
|
|
|
|
--, init_connections = [{ _1 = "Initiator", _2 = "Testmachine" }]
|
2021-09-21 18:45:35 +02:00
|
|
|
, initiators = {=}
|
|
|
|
--{ Initiator = { module = "Dummy", params = {=} } }
|
2021-01-20 12:55:15 +01:00
|
|
|
, listens =
|
|
|
|
[ { address = "127.0.0.1", port = Some 59661 }
|
|
|
|
, { address = "::1", port = Some 59661 }
|
2021-09-21 07:48:19 +02:00
|
|
|
, { address = "192.168.0.114", port = Some 59661 }
|
2021-01-20 12:55:15 +01:00
|
|
|
]
|
2020-12-15 13:04:21 +01:00
|
|
|
, machines =
|
|
|
|
{ Testmachine =
|
|
|
|
{ description = Some "A test machine"
|
|
|
|
, disclose = "lab.test.read"
|
|
|
|
, manage = "lab.test.admin"
|
|
|
|
, name = "Testmachine"
|
|
|
|
, read = "lab.test.read"
|
|
|
|
, write = "lab.test.write"
|
2021-02-08 19:28:27 +01:00
|
|
|
},
|
|
|
|
Another =
|
|
|
|
{ description = Some "Another test machine"
|
|
|
|
, disclose = "lab.test.read"
|
|
|
|
, manage = "lab.test.admin"
|
|
|
|
, name = "Another"
|
|
|
|
, read = "lab.test.read"
|
|
|
|
, write = "lab.test.write"
|
|
|
|
},
|
|
|
|
Yetmore =
|
|
|
|
{ description = Some "Yet more test machines"
|
|
|
|
, disclose = "lab.test.read"
|
|
|
|
, manage = "lab.test.admin"
|
|
|
|
, name = "Yetmore"
|
|
|
|
, read = "lab.test.read"
|
|
|
|
, write = "lab.test.write"
|
|
|
|
}
|
|
|
|
}
|
2021-09-21 18:45:35 +02:00
|
|
|
, mqtt_url = "tcp://localhost:1883"
|
2021-09-19 19:47:29 +02:00
|
|
|
, db_path = "/tmp/bffh"
|
2021-09-20 15:11:38 +02:00
|
|
|
, roles =
|
2021-09-21 07:48:19 +02:00
|
|
|
{ testrole =
|
|
|
|
{ permissions = [ "lab.test.*" ] }
|
|
|
|
, somerole =
|
|
|
|
{ parents = ["testparent"]
|
|
|
|
, permissions = [ "lab.some.admin" ]
|
|
|
|
}
|
|
|
|
, testparent =
|
|
|
|
{ permissions =
|
|
|
|
[ "lab.some.write"
|
|
|
|
, "lab.some.read"
|
|
|
|
, "lab.some.disclose"
|
|
|
|
]
|
2021-09-20 15:11:38 +02:00
|
|
|
}
|
|
|
|
}
|
2020-12-15 13:04:21 +01:00
|
|
|
}
|