diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-12 23:06:32 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-12 23:06:32 +0100 |
commit | e2f4aefa956bb06b1ee52d95ad8275757605678d (patch) | |
tree | ed4810a3ced1b49adf09d171cefc37eb7b5c3e51 /module/ri-engine/src/main/resources | |
parent | 0e8048146ddf85adf28c1da09e45b98760f23210 (diff) | |
download | rules-sandbox-e2f4aefa956bb06b1ee52d95ad8275757605678d.tar.gz rules-sandbox-e2f4aefa956bb06b1ee52d95ad8275757605678d.tar.bz2 rules-sandbox-e2f4aefa956bb06b1ee52d95ad8275757605678d.tar.xz rules-sandbox-e2f4aefa956bb06b1ee52d95ad8275757605678d.zip |
Switching WG code to use object references.
Diffstat (limited to 'module/ri-engine/src/main/resources')
-rw-r--r-- | module/ri-engine/src/main/resources/io/trygvis/rules/dba/dba.drl | 4 | ||||
-rw-r--r-- | module/ri-engine/src/main/resources/io/trygvis/rules/terraform/terraform.drl | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/module/ri-engine/src/main/resources/io/trygvis/rules/dba/dba.drl b/module/ri-engine/src/main/resources/io/trygvis/rules/dba/dba.drl index 9bdc0a5..0bee004 100644 --- a/module/ri-engine/src/main/resources/io/trygvis/rules/dba/dba.drl +++ b/module/ri-engine/src/main/resources/io/trygvis/rules/dba/dba.drl @@ -18,14 +18,14 @@ declare DbaMachineRole roles : String[] end -rule "Assign containers to hosts" +rule "Assign containers to machine" when $machine : Machine() $machineRole : DbaMachineRole(machine == $machine.name) $container : Container(machine == null, $machineRole.roles contains machineRole) then System.out.println("Assigning container to machine: " + $machine.name); - modify($container) { + modify ($container) { machine = $machine } end diff --git a/module/ri-engine/src/main/resources/io/trygvis/rules/terraform/terraform.drl b/module/ri-engine/src/main/resources/io/trygvis/rules/terraform/terraform.drl index c1293fe..07a96e2 100644 --- a/module/ri-engine/src/main/resources/io/trygvis/rules/terraform/terraform.drl +++ b/module/ri-engine/src/main/resources/io/trygvis/rules/terraform/terraform.drl @@ -10,6 +10,8 @@ import java.util.Map; global io.trygvis.rules.engine.TemplateEngine te; +dialect "mvel" + declare ScalewayMachine machine : Machine key : String |