diff options
Diffstat (limited to 'controlloop/templates')
-rw-r--r-- | controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index 77edee1e7..8dcc79866 100644 --- a/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -64,6 +64,7 @@ import org.onap.policy.guard.PolicyGuardRequest; import org.onap.policy.guard.PolicyGuardResponse; import org.onap.policy.guard.PolicyGuardXacmlRequestAttributes; import org.onap.policy.guard.PolicyGuardXacmlHelper; +import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; @@ -110,6 +111,22 @@ end /* * +* Called when a Tosca Policy fact is present. +* +*/ +rule "NEW TOSCA POLICY" + when + $policy : ToscaPolicy() + then + + Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage()); + logger.info("{}:{}: [{}|{}|{}|{}]: CONTENT: {}", drools.getRule().getName(), + $policy.getType(), $policy.getTypeVersion(), $policy.getName(), $policy.getVersion(), + $policy); +end + +/* +* * This rule responds to DCAE Events where there is no manager yet. Either it is * the first ONSET, or a subsequent badly formed Event (i.e. Syntax error, or is-closed-loop-disabled) * |