lang: Add internal, resource specific edges

This adds the ability to specify internal, resource specific edges, with
and without notifications. We use the special words: "Notify", "Before",
"Listen", and "Depend". They must have the first character capitalized.
They also support the "elvis" operator.
This commit is contained in:
James Shubin
2018-02-27 21:18:17 -05:00
parent 8e01b6db48
commit 3ad7097c8a
7 changed files with 649 additions and 175 deletions

18
examples/lang/edges1.mcl Normal file
View File

@@ -0,0 +1,18 @@
$b = true
if $b {
exec "exec0" {
cmd => "sleep 10s",
shell => "/bin/bash",
}
}
exec "exec1" {
cmd => "sleep 10s",
shell => "/bin/bash",
Depend => $b ?: Exec["exec0"],
Before => Exec["exec2"],
}
exec "exec2" {
cmd => "sleep 10s",
shell => "/bin/bash",
}