summaryrefslogtreecommitdiff
path: root/module/ri-wireguard/src/main/resources
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2021-01-06 16:04:22 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2021-01-06 16:04:22 +0100
commit149cf9efadb1da64b9ee716ac9bee1ac0c0e1329 (patch)
tree4e4de8f953d1d3ae96911eb190c281476f08b363 /module/ri-wireguard/src/main/resources
parente84ef1adb8ff0d3b121ea12b2d3e15fa52eb2f00 (diff)
downloadrules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.tar.gz
rules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.tar.bz2
rules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.tar.xz
rules-sandbox-149cf9efadb1da64b9ee716ac9bee1ac0c0e1329.zip
Using agenda groups to sequence phases.
Diffstat (limited to 'module/ri-wireguard/src/main/resources')
-rw-r--r--module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/generate.drl18
1 files changed, 18 insertions, 0 deletions
diff --git a/module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/generate.drl b/module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/generate.drl
new file mode 100644
index 0000000..3ee0583
--- /dev/null
+++ b/module/ri-wireguard/src/main/resources/io/trygvis/rules/wireguard/generate.drl
@@ -0,0 +1,18 @@
+package io.trygvis.rules.wireguard;
+
+import java.util.ArrayList
+import io.trygvis.rules.dns.DnsEntry;
+import io.trygvis.rules.machine.Machine;
+import io.trygvis.rules.network.Ipv4Address
+import io.trygvis.rules.network.Ipv4Cidr
+import io.trygvis.rules.network.IpCalc
+
+rule "Generate base"
+ agenda-group "generate"
+ salience 10
+when
+ $net : WgNet()
+ $h : WgHost(net == $net.name)
+then
+ System.out.println("%s : %s".formatted($net.name, $h.name));
+end