summaryrefslogtreecommitdiff
path: root/durable_rules-test/py/acme/rai/acme.py
diff options
context:
space:
mode:
Diffstat (limited to 'durable_rules-test/py/acme/rai/acme.py')
-rw-r--r--durable_rules-test/py/acme/rai/acme.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/durable_rules-test/py/acme/rai/acme.py b/durable_rules-test/py/acme/rai/acme.py
deleted file mode 100644
index e75d492..0000000
--- a/durable_rules-test/py/acme/rai/acme.py
+++ /dev/null
@@ -1,39 +0,0 @@
-from durable.lang import *
-
-from . import dba
-
-class Acme:
- @staticmethod
- def make(env: str, tag: str):
- return {"type": "acme-application", "key": env, "env": env, "tag": tag}
-
- @staticmethod
- def declare_rules():
- @when_all((m.type == "acme-application"))
- def acmeApp(c):
- cluster = f"acme-{c.m.env}"
- tag = f"{c.m.tag}"
- # c.assert_fact(dba.cluster(cluster))
- for f in [
- dba.container(cluster, "app", "statera", "statera", tag),
- dba.container(cluster, "app", "statera-console", "statera-console", tag),
- dba.container(cluster, "app", "4tune-web", "4tune-web", tag),
- dba.container(cluster, "app", "4tune-api", "4tune-api", tag),
- dba.container(cluster, "db", "pdb", "postgresql", "13"),
- dba.container(cluster, "db", "mdb", "mongodb", "3.2"),
- ]:
- c.assert_fact(f)
-
-class AcmeOperations:
- @staticmethod
- def make():
- return {"type": "acme-ops", "key": "acme-ops"}
-
- @staticmethod
- def declare_rules():
- @when_all((m.type == "acme-ops"))
- def acmeOps(c):
- cluster = "acme-ops"
- c.assert_fact(dba.cluster(cluster))
- c.assert_fact(dba.container(cluster, "app", "pdb", "postgresql", "11"))
- c.assert_fact(dba.container(cluster, "app", "n8n", "n8n", "0.84.1"))