summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshaoqiu <tim.huang@est.tech>2019-04-02 12:33:04 +0000
committerPamela Dragosh <pdragosh@research.att.com>2019-04-08 13:47:01 -0400
commite55d256a9eeb411bb485919eb4c1d449cbae5d46 (patch)
tree6694558deac959fe295b4148ceb4438f09ad65f9
parent93206cf9624df06a518a8016b965b9104e687f14 (diff)
update dependency to policy/models
Update the dependency of model-impl from drools-applications to policy/models. Issue-ID: POLICY-1264 Change-Id: I07fcb29501499a97689d2d27c845bf8e411e7825 Signed-off-by: shaoqiu <tim.huang@est.tech> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rw-r--r--controlloop/common/controller-usecases/pom.xml75
-rw-r--r--controlloop/common/eventmanager/pom.xml73
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java49
-rw-r--r--controlloop/common/feature-controlloop-management/pom.xml75
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/resources/op.pom9
-rw-r--r--controlloop/common/feature-controlloop-trans/pom.xml5
-rw-r--r--controlloop/common/feature-controlloop-utils/pom.xml21
-rw-r--r--controlloop/common/guard/pom.xml10
-rw-r--r--controlloop/common/policy-yaml/pom.xml9
-rw-r--r--controlloop/common/pom.xml4
-rw-r--r--controlloop/common/simulators/pom.xml17
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl41
-rw-r--r--controlloop/templates/archetype-cl-usecases/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl40
-rw-r--r--controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl27
-rw-r--r--controlloop/templates/template.demo/pom.xml7
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java2
16 files changed, 275 insertions, 189 deletions
diff --git a/controlloop/common/controller-usecases/pom.xml b/controlloop/common/controller-usecases/pom.xml
index 29fd55572..918f350b7 100644
--- a/controlloop/common/controller-usecases/pom.xml
+++ b/controlloop/common/controller-usecases/pom.xml
@@ -4,6 +4,7 @@
ONAP
================================================================================
Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -73,63 +74,63 @@
<dependencies>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>events</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>appc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>appclcm</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnr</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>vfc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>aai</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>trafficgenerator</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -145,51 +146,51 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actorServiceProvider</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.appc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.appclcm</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.sdnr</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.vfc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
- <artifactId>policy-yaml</artifactId>
- <version>${project.version}</version>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+ <artifactId>model-yaml</artifactId>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/controlloop/common/eventmanager/pom.xml b/controlloop/common/eventmanager/pom.xml
index 32cda44d4..55a6e4007 100644
--- a/controlloop/common/eventmanager/pom.xml
+++ b/controlloop/common/eventmanager/pom.xml
@@ -3,6 +3,7 @@
eventmanager
================================================================================
Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -42,45 +43,45 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actorServiceProvider</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.sdnr</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.appc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.vfc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.appclcm</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -90,45 +91,45 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>events</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnr</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>appc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>vfc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>appclcm</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>trafficgenerator</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -147,21 +148,21 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>aai</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -188,9 +189,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
<artifactId>simulators</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
index 9d60e2d86..1234a8ae1 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
@@ -29,10 +29,8 @@ import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Properties;
-
import javax.persistence.EntityManager;
import javax.persistence.Persistence;
-
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.onap.policy.aai.util.AaiException;
import org.onap.policy.appc.Response;
@@ -88,7 +86,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Construct an instance.
- *
+ *
* @param onset the onset event
* @param policy the policy
* @param em the event manager
@@ -114,7 +112,9 @@ public class ControlLoopOperationManager implements Serializable {
* yaml, the target vnf-id is retrieved by a named query to A&AI.
*/
String targetVnf = AppcLcmActorServiceProvider.vnfNamedQuery(policy.getTarget().getResourceID(),
- this.targetEntity);
+ this.targetEntity, PolicyEngine.manager.getEnvironmentProperty("aai.url"),
+ PolicyEngine.manager.getEnvironmentProperty("aai.username"),
+ PolicyEngine.manager.getEnvironmentProperty("aai.password"));
this.targetEntity = targetVnf;
}
break;
@@ -156,7 +156,7 @@ public class ControlLoopOperationManager implements Serializable {
//
private class Operation implements Serializable {
private static final long serialVersionUID = 1L;
-
+
private ControlLoopOperation clOperation = new ControlLoopOperation();
private PolicyResult policyResult = null;
private int attempt = 0;
@@ -182,7 +182,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Get the target for a policy.
- *
+ *
* @param policy the policy
* @return the target
* @throws ControlLoopException if an error occurs
@@ -233,7 +233,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Start an operation.
- *
+ *
* @param onset the onset event
* @return the operation request
* @throws ControlLoopException if an error occurs
@@ -288,7 +288,10 @@ public class ControlLoopOperationManager implements Serializable {
return operationRequest;
case "VFC":
this.operationRequest = VfcActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
- operation.clOperation, this.policy, this.eventManager.getVnfResponse());
+ operation.clOperation, this.policy, this.eventManager.getVnfResponse(),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.url"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.username"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.password"));
this.currentOperation = operation;
if (this.operationRequest == null) {
this.policyResult = PolicyResult.FAILURE;
@@ -325,7 +328,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Handle a response.
- *
+ *
* @param response the response
* @return a PolicyResult
*/
@@ -370,7 +373,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* This method handles operation responses from APPC.
- *
+ *
* @param appcResponse the APPC response
* @return The result of the response handling
*/
@@ -463,7 +466,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* This method handles operation responses from LCM.
- *
+ *
* @param dmaapResponse the LCM response
* @return The result of the response handling
*/
@@ -496,7 +499,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* This method handles operation responses from SDNR.
- *
+ *
* @param dmaapResponse the SDNR response
* @return the result of the response handling
*/
@@ -529,7 +532,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* This method handles operation responses from SO.
- *
+ *
* @param msoResponse the SO response
* @return The result of the response handling
*/
@@ -561,7 +564,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* This method handles operation responses from VFC.
- *
+ *
* @param vfcResponse the VFC response
* @return The result of the response handling
*/
@@ -621,7 +624,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Get the operation timeout.
- *
+ *
* @return the timeout
*/
public Integer getOperationTimeout() {
@@ -638,7 +641,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Get the operation timeout as a String.
- *
+ *
* @param defaultTimeout the default timeout
* @return the timeout as a String
*/
@@ -656,7 +659,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Get the operation as a message.
- *
+ *
* @return the operation as a message
*/
public String getOperationMessage() {
@@ -672,7 +675,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Get the operation as a message including the guard result.
- *
+ *
* @param guardResult the guard result
* @return the operation as a message including the guard result
*/
@@ -689,7 +692,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Get the operation history.
- *
+ *
* @return the operation history
*/
public String getOperationHistory() {
@@ -705,7 +708,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Get the history.
- *
+ *
* @return the list of control loop operations
*/
public List<ControlLoopOperation> getHistory() {
@@ -743,7 +746,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* Is the operation complete.
- *
+ *
* @return <code>true</code> if the operation is complete, <code>false</code> otherwise
*/
public boolean isOperationComplete() {
@@ -800,7 +803,7 @@ public class ControlLoopOperationManager implements Serializable {
/**
* This method verifies that the operation manager may run an operation.
- *
+ *
* @return True if the operation can run, false otherwise
* @throws ControlLoopException if the operation cannot run
*/
@@ -961,7 +964,7 @@ public class ControlLoopOperationManager implements Serializable {
*/
public void commitAbatement(String message, String outcome) {
logger.info("commitAbatement: {}. {}", message, outcome);
-
+
if (this.currentOperation == null) {
try {
this.currentOperation = this.operationHistory.getLast();
diff --git a/controlloop/common/feature-controlloop-management/pom.xml b/controlloop/common/feature-controlloop-management/pom.xml
index e4c2d3504..40e37beff 100644
--- a/controlloop/common/feature-controlloop-management/pom.xml
+++ b/controlloop/common/feature-controlloop-management/pom.xml
@@ -3,6 +3,7 @@
ONAP
================================================================================
Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -96,54 +97,54 @@
<dependencies>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>events</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>appc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>appclcm</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnr</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>vfc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>aai</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>trafficgenerator</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
<groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
@@ -156,9 +157,9 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actorServiceProvider</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
@@ -167,9 +168,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.appc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
@@ -178,9 +179,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.appclcm</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
@@ -189,9 +190,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.sdnr</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
@@ -200,9 +201,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
@@ -211,9 +212,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.vfc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
@@ -222,9 +223,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actor.sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
@@ -233,9 +234,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
- <artifactId>policy-yaml</artifactId>
- <version>${project.version}</version>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+ <artifactId>model-yaml</artifactId>
+ <version>${policy.models.version}</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
diff --git a/controlloop/common/feature-controlloop-management/src/test/resources/op.pom b/controlloop/common/feature-controlloop-management/src/test/resources/op.pom
index 133387217..4285acda6 100644
--- a/controlloop/common/feature-controlloop-management/src/test/resources/op.pom
+++ b/controlloop/common/feature-controlloop-management/src/test/resources/op.pom
@@ -4,6 +4,7 @@
ONAP
================================================================================
Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -25,9 +26,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>model-impl</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.policy.drools.apps.test</groupId>
@@ -36,9 +37,9 @@
<dependencies>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>events</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>2.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
diff --git a/controlloop/common/feature-controlloop-trans/pom.xml b/controlloop/common/feature-controlloop-trans/pom.xml
index 0aa320ad3..4d9080616 100644
--- a/controlloop/common/feature-controlloop-trans/pom.xml
+++ b/controlloop/common/feature-controlloop-trans/pom.xml
@@ -3,6 +3,7 @@
ONAP
================================================================================
Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -124,9 +125,9 @@
<dependencies>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>events</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
<groupId>org.onap.policy.common</groupId>
diff --git a/controlloop/common/feature-controlloop-utils/pom.xml b/controlloop/common/feature-controlloop-utils/pom.xml
index 92b783885..a96d62e07 100644
--- a/controlloop/common/feature-controlloop-utils/pom.xml
+++ b/controlloop/common/feature-controlloop-utils/pom.xml
@@ -3,6 +3,7 @@
ONAP
================================================================================
Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -105,29 +106,29 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
<artifactId>simulators</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>aai</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>rest</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
diff --git a/controlloop/common/guard/pom.xml b/controlloop/common/guard/pom.xml
index d1beed58d..07aa304b7 100644
--- a/controlloop/common/guard/pom.xml
+++ b/controlloop/common/guard/pom.xml
@@ -30,9 +30,9 @@
<dependencies>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
- <artifactId>policy-yaml</artifactId>
- <version>${project.version}</version>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+ <artifactId>model-yaml</artifactId>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -113,9 +113,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
<artifactId>simulators</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/controlloop/common/policy-yaml/pom.xml b/controlloop/common/policy-yaml/pom.xml
index 526945bbf..548c92896 100644
--- a/controlloop/common/policy-yaml/pom.xml
+++ b/controlloop/common/policy-yaml/pom.xml
@@ -3,6 +3,7 @@
drools-pdp-apps
================================================================================
Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -51,15 +52,15 @@
<version>0.9.2</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>aai</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/controlloop/common/pom.xml b/controlloop/common/pom.xml
index 020a1efbc..d9165ae3c 100644
--- a/controlloop/common/pom.xml
+++ b/controlloop/common/pom.xml
@@ -32,13 +32,9 @@
<artifactId>common</artifactId>
<modules>
- <module>actors</module>
<module>guard</module>
<module>coordination</module>
<module>eventmanager</module>
- <module>model-impl</module>
- <module>policy-yaml</module>
- <module>simulators</module>
<module>controller-usecases</module>
<module>feature-controlloop-utils</module>
<module>feature-controlloop-trans</module>
diff --git a/controlloop/common/simulators/pom.xml b/controlloop/common/simulators/pom.xml
index a837ce311..0bbb24b6e 100644
--- a/controlloop/common/simulators/pom.xml
+++ b/controlloop/common/simulators/pom.xml
@@ -3,6 +3,7 @@
simulators
================================================================================
Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ Modifications Copyright (C) 2019 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -41,19 +42,19 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>aai</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>so</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>vfc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -68,9 +69,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
<artifactId>sdnc</artifactId>
- <version>${project.version}</version>
+ <version>${policy.models.version}</version>
</dependency>
</dependencies>
</project>
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
index 5b012d3b5..6a73f8e8f 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
@@ -48,6 +48,7 @@ import org.onap.policy.sdnr.PciResponse;
import org.onap.policy.vfc.VfcRequest;
import org.onap.policy.vfc.VfcResponse;
import org.onap.policy.vfc.VfcManager;
+import org.onap.policy.so.SoManager;
import org.onap.policy.so.SoRequest;
import org.onap.policy.so.SoResponseWrapper;
import org.onap.policy.sdnc.SdncRequest;
@@ -579,14 +580,34 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
if(request instanceof SoRequest) {
// Call SO. The response will be inserted into memory once it's received
- SoActorServiceProvider.sendRequest($event.getRequestId().toString(), drools.getWorkingMemory(),
- request);
+ class mySoCallback implements SoManager.SoCallback {
+ public void onSoResponseWrapper(SoResponseWrapper wrapper) {
+ drools.getWorkingMemory().insert(wrapper);
+ }
+ }
+ SoActorServiceProvider.sendRequest($event.getRequestId().toString(),
+ new mySoCallback(),
+ request,
+ PolicyEngine.manager.getEnvironmentProperty("so.url"),
+ PolicyEngine.manager.getEnvironmentProperty("so.username"),
+ PolicyEngine.manager.getEnvironmentProperty("so.password"));
}
break;
case "VFC":
if (request instanceof VfcRequest) {
// Start VFC thread
- Thread t = new Thread(new VfcManager(drools.getWorkingMemory(), (VfcRequest)request));
+ class myVfcCallback implements VfcManager.VfcCallback {
+
+ public void onResponse(VfcResponse responseError) {
+ drools.getWorkingMemory().insert(responseError);
+ }
+ };
+ // Start VFC thread
+ Thread t = new Thread(new VfcManager(new myVfcCallback(),
+ (VfcRequest)request,
+ PolicyEngine.manager.getEnvironmentProperty("vfc.url"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.username"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.password")));
t.start();
}
break;
@@ -594,8 +615,18 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
case "SDNC":
if (request instanceof SdncRequest) {
// Start SDNC thread
- Thread t = new Thread(new SdncManager(drools.getWorkingMemory(), (SdncRequest)request));
- t.start();
+ class mySdncCallback implements SdncManager.SdncCallback {
+ public void onCallback(SdncResponse response) {
+ drools.getWorkingMemory().insert(response);
+ }
+ }
+ // Start SDNC thread
+ Thread t = new Thread(new SdncManager(new mySdncCallback(),
+ (SdncRequest)request,
+ PolicyEngine.manager.getEnvironmentProperty("sdnc.url"),
+ PolicyEngine.manager.getEnvironmentProperty("sdnc.username"),
+ PolicyEngine.manager.getEnvironmentProperty("sdnc.password")));
+ t.start();
}
break;
case "SDNR":
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 b0262f989..93bc63ea7 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
@@ -49,6 +49,7 @@ import org.onap.policy.sdnr.PciResponse;
import org.onap.policy.vfc.VfcRequest;
import org.onap.policy.vfc.VfcResponse;
import org.onap.policy.vfc.VfcManager;
+import org.onap.policy.so.SoManager;
import org.onap.policy.so.SoRequest;
import org.onap.policy.so.SoResponseWrapper;
import org.onap.policy.sdnc.SdncRequest;
@@ -529,13 +530,33 @@ rule "EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
if(request instanceof SoRequest) {
// Call SO. The response will be inserted into memory once it's received
- SoActorServiceProvider.sendRequest($event.getRequestId().toString(), drools.getWorkingMemory(), request);
+ class mySoCallback implements SoManager.SoCallback {
+ public void onSoResponseWrapper(SoResponseWrapper wrapper) {
+ drools.getWorkingMemory().insert(wrapper);
+ }
+ }
+ SoActorServiceProvider.sendRequest($event.getRequestId().toString(),
+ new mySoCallback(),
+ request,
+ PolicyEngine.manager.getEnvironmentProperty("so.url"),
+ PolicyEngine.manager.getEnvironmentProperty("so.username"),
+ PolicyEngine.manager.getEnvironmentProperty("so.password"));
}
break;
case "VFC":
if (request instanceof VfcRequest) {
+ class myVfcCallback implements VfcManager.VfcCallback {
+
+ public void onResponse(VfcResponse responseError) {
+ drools.getWorkingMemory().insert(responseError);
+ }
+ };
// Start VFC thread
- Thread t = new Thread(new VfcManager(drools.getWorkingMemory(), (VfcRequest)request));
+ Thread t = new Thread(new VfcManager(new myVfcCallback(),
+ (VfcRequest)request,
+ PolicyEngine.manager.getEnvironmentProperty("vfc.url"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.username"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.password")));
t.start();
}
break;
@@ -547,9 +568,18 @@ rule "EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
case "SDNC":
if (request instanceof SdncRequest) {
- // Start SDNC thread
- Thread t = new Thread(new SdncManager(drools.getWorkingMemory(), (SdncRequest)request));
- t.start();
+ class mySdncCallback implements SdncManager.SdncCallback {
+ public void onCallback(SdncResponse response) {
+ drools.getWorkingMemory().insert(response);
+ }
+ }
+ // Start SDNC thread
+ Thread t = new Thread(new SdncManager(new mySdncCallback(),
+ (SdncRequest)request,
+ PolicyEngine.manager.getEnvironmentProperty("sdnc.url"),
+ PolicyEngine.manager.getEnvironmentProperty("sdnc.username"),
+ PolicyEngine.manager.getEnvironmentProperty("sdnc.password")));
+ t.start();
}
break;
}
diff --git a/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl
index f2584c063..1d8e6c511 100644
--- a/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/template.demo.clc/src/main/resources/__closedLoopControlName__.drl
@@ -45,6 +45,7 @@ import org.onap.policy.appclcm.LcmCommonHeader;
import org.onap.policy.vfc.VfcRequest;
import org.onap.policy.vfc.VfcResponse;
import org.onap.policy.vfc.VfcManager;
+import org.onap.policy.so.SoManager;
import org.onap.policy.so.SoRequest;
import org.onap.policy.so.SoResponseWrapper;
import org.onap.policy.guard.PolicyGuard;
@@ -584,14 +585,32 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
if(request instanceof SoRequest) {
// Call SO. The response will be inserted into memory once it's received
- SoActorServiceProvider.sendRequest($event.getRequestId().toString(), drools.getWorkingMemory(),
- request);
- }
+ class mySoCallback implements SoManager.SoCallback {
+ public void onSoResponseWrapper(SoResponseWrapper wrapper) {
+ drools.getWorkingMemory().insert(wrapper);
+ }
+ }
+ SoActorServiceProvider.sendRequest($event.getRequestId().toString(),
+ new mySoCallback(),
+ request,
+ PolicyEngine.manager.getEnvironmentProperty("so.url"),
+ PolicyEngine.manager.getEnvironmentProperty("so.username"),
+ PolicyEngine.manager.getEnvironmentProperty("so.password")); }
break;
case "VFC":
if (request instanceof VfcRequest) {
// Start VFC thread
- Thread t = new Thread(new VfcManager(drools.getWorkingMemory(), (VfcRequest)request));
+ class myVfcCallback implements VfcManager.VfcCallback {
+ public void onResponse(VfcResponse responseError) {
+ drools.getWorkingMemory().insert(responseError);
+ }
+ };
+ // Start VFC thread
+ Thread t = new Thread(new VfcManager(new myVfcCallback(),
+ (VfcRequest)request,
+ PolicyEngine.manager.getEnvironmentProperty("vfc.url"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.username"),
+ PolicyEngine.manager.getEnvironmentProperty("vfc.password")));
t.start();
}
break;
diff --git a/controlloop/templates/template.demo/pom.xml b/controlloop/templates/template.demo/pom.xml
index 446117e1f..2471f9200 100644
--- a/controlloop/templates/template.demo/pom.xml
+++ b/controlloop/templates/template.demo/pom.xml
@@ -126,10 +126,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
- <!-- <groupId>org.onap.policy.models.policy-models-interactions</groupId> -->
- <artifactId>policy-yaml</artifactId>
- <version>${project.version}</version>
+ <groupId>org.onap.policy.models.policy-models-interactions</groupId>
+ <artifactId>model-yaml</artifactId>
+ <version>${policy.models.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
index 00949599e..d5eb28e23 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/SupportUtil.java
@@ -332,7 +332,7 @@ public final class SupportUtil {
* Set the VFC properties.
*/
public static void setVfcProps() {
- PolicyEngine.manager.setEnvironmentProperty("vfc.url", "http://localhost:6668");
+ PolicyEngine.manager.setEnvironmentProperty("vfc.url", "http://localhost:6668/api/nslcm/v1");
PolicyEngine.manager.setEnvironmentProperty("vfc.username", "VFC");
PolicyEngine.manager.setEnvironmentProperty("vfc.password", "VFC");
}