summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/ri-base/src/main/resources/io/trygvis/rules/dba/dba.drl9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/ri-base/src/main/resources/io/trygvis/rules/dba/dba.drl b/modules/ri-base/src/main/resources/io/trygvis/rules/dba/dba.drl
index c31bc57..f1a1da2 100644
--- a/modules/ri-base/src/main/resources/io/trygvis/rules/dba/dba.drl
+++ b/modules/ri-base/src/main/resources/io/trygvis/rules/dba/dba.drl
@@ -14,19 +14,18 @@ global io.trygvis.rules.engine.TemplateEngine te;
dialect "mvel"
declare DbaMachineRole
- machine : String
+ machine : Machine
roles : String[]
end
rule "Assign containers to machine"
when
- $machine : Machine()
- $machineRole : DbaMachineRole(machine == $machine.name)
+ $machineRole : DbaMachineRole(machine)
$container : Container(machine == null, $machineRole.roles contains machineRole)
then
- System.out.println("Assigning container to machine: " + $machine.name);
+ System.out.println("Assigning container " + $container.cluster.name + "/" + $container.name + " to machine: " + $machineRole.machine.name);
modify ($container) {
- machine = $machine
+ machine = $machineRole.machine
}
end