From 9504c7efb9b57aeacf5e2717a43c3cf178a65aee Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 6 Jan 2021 12:37:26 +0100 Subject: Splitting ACME out from the generic parts. --- .../src/main/java/io/trygvis/acme/AcmeMyApp.java | 6 ++++++ .../src/main/java/io/trygvis/acme/AcmeOps.java | 4 ++++ .../src/main/java/io/trygvis/acme/VpnMain.java | 25 ++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 module/acme/src/main/java/io/trygvis/acme/AcmeMyApp.java create mode 100644 module/acme/src/main/java/io/trygvis/acme/AcmeOps.java create mode 100644 module/acme/src/main/java/io/trygvis/acme/VpnMain.java (limited to 'module/acme/src/main/java/io/trygvis') diff --git a/module/acme/src/main/java/io/trygvis/acme/AcmeMyApp.java b/module/acme/src/main/java/io/trygvis/acme/AcmeMyApp.java new file mode 100644 index 0000000..dfe374b --- /dev/null +++ b/module/acme/src/main/java/io/trygvis/acme/AcmeMyApp.java @@ -0,0 +1,6 @@ +package io.trygvis.acme; + +public class AcmeMyApp { + public String environment; + public String dockerTag; +} diff --git a/module/acme/src/main/java/io/trygvis/acme/AcmeOps.java b/module/acme/src/main/java/io/trygvis/acme/AcmeOps.java new file mode 100644 index 0000000..844c7f0 --- /dev/null +++ b/module/acme/src/main/java/io/trygvis/acme/AcmeOps.java @@ -0,0 +1,4 @@ +package io.trygvis.acme; + +public class AcmeOps { +} diff --git a/module/acme/src/main/java/io/trygvis/acme/VpnMain.java b/module/acme/src/main/java/io/trygvis/acme/VpnMain.java new file mode 100644 index 0000000..d5f986d --- /dev/null +++ b/module/acme/src/main/java/io/trygvis/acme/VpnMain.java @@ -0,0 +1,25 @@ +package io.trygvis.acme; + +import io.trygvis.rules.dns.DnsEntry; +import io.trygvis.rules.engine.Engine; +import io.trygvis.rules.machine.Machine; +import io.trygvis.rules.network.Ipv4Address; +import io.trygvis.rules.network.Ipv4Cidr; + +import java.io.IOException; + +public class VpnMain { + public static void main(String[] args) throws IOException { + try (var engine = new Engine("acme.yaml")) { + engine.io.dump("phase-1", engine.session.getFactHandles()); + + engine.io.dump("vpn0", engine.session.getFactHandles(), (Object o) -> + o.getClass().getName().contains("Wg") + || o instanceof Machine + || o instanceof DnsEntry + || o instanceof Ipv4Cidr + || o instanceof Ipv4Address + ); + } + } +} -- cgit v1.2.3