diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-02-05 10:51:00 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-02-05 10:51:00 +0100 |
commit | ba6bd2c40a22a4a9cf2307ceec0f71e4fbdc842c (patch) | |
tree | bec9840fc8108d1ec9d656b7c905f1c4c1ab93ec /modules/ri-base/src/main/resources | |
parent | 6ae284b9b61558078e9003defc50966c3e41e45c (diff) | |
download | rules-sandbox-ba6bd2c40a22a4a9cf2307ceec0f71e4fbdc842c.tar.gz rules-sandbox-ba6bd2c40a22a4a9cf2307ceec0f71e4fbdc842c.tar.bz2 rules-sandbox-ba6bd2c40a22a4a9cf2307ceec0f71e4fbdc842c.tar.xz rules-sandbox-ba6bd2c40a22a4a9cf2307ceec0f71e4fbdc842c.zip |
Better dba rules.
Diffstat (limited to 'modules/ri-base/src/main/resources')
-rw-r--r-- | modules/ri-base/src/main/resources/io/trygvis/rules/dba/dba.drl | 9 |
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 |