aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/feature-controlloop-management
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/feature-controlloop-management')
-rw-r--r--controlloop/common/feature-controlloop-management/pom.xml5
-rw-r--r--controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java13
-rw-r--r--controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java12
3 files changed, 11 insertions, 19 deletions
diff --git a/controlloop/common/feature-controlloop-management/pom.xml b/controlloop/common/feature-controlloop-management/pom.xml
index 965e38d7c..2fcb0dee5 100644
--- a/controlloop/common/feature-controlloop-management/pom.xml
+++ b/controlloop/common/feature-controlloop-management/pom.xml
@@ -155,11 +155,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
- <artifactId>guard</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
<artifactId>actorServiceProvider</artifactId>
<version>${policy.models.version}</version>
diff --git a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java
index b733b01ba..ba7885678 100644
--- a/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java
+++ b/controlloop/common/feature-controlloop-management/src/main/java/org/onap/policy/drools/server/restful/RestControlLoopManager.java
@@ -38,8 +38,8 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.onap.policy.aai.AaiManager;
import org.onap.policy.controlloop.drl.legacy.ControlLoopParams;
-import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager;
import org.onap.policy.drools.apps.controlloop.feature.management.ControlLoopManagementFeature;
+import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.system.PolicyEngineConstants;
import org.onap.policy.rest.RestManager;
import org.slf4j.Logger;
@@ -124,16 +124,15 @@ public class RestControlLoopManager {
@Path("engine/tools/controlloops/aai/customQuery/{vserverId}")
@ApiOperation(value = "AAI Custom Query")
public Response aaiCustomQuery(@ApiParam(value = "vserver Identifier") String vserverId) {
+ PolicyEngine mgr = PolicyEngineConstants.getManager();
+
return Response
.status(Status.OK)
.entity(new AaiManager(new RestManager())
.getCustomQueryResponse(
- PolicyEngineConstants.getManager()
- .getEnvironmentProperty(ControlLoopEventManager.AAI_URL),
- PolicyEngineConstants.getManager().getEnvironmentProperty(
- ControlLoopEventManager.AAI_USERNAME_PROPERTY),
- PolicyEngineConstants.getManager().getEnvironmentProperty(
- ControlLoopEventManager.AAI_PASS_PROPERTY),
+ mgr.getEnvironmentProperty("aai.url"),
+ mgr.getEnvironmentProperty("aai.username"),
+ mgr.getEnvironmentProperty("aai.password"),
UUID.randomUUID(),
vserverId))
.build();
diff --git a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java
index 2a5bffc7f..94aa22485 100644
--- a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java
+++ b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java
@@ -39,10 +39,10 @@ import org.kie.api.builder.ReleaseId;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.network.NetworkUtil;
-import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager;
import org.onap.policy.drools.persistence.SystemPersistenceConstants;
import org.onap.policy.drools.properties.DroolsPropertyConstants;
import org.onap.policy.drools.system.PolicyControllerConstants;
+import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.drools.system.PolicyEngineConstants;
import org.onap.policy.drools.util.KieUtils;
import org.onap.policy.drools.utils.logging.LoggerUtil;
@@ -122,12 +122,10 @@ public class RestControlLoopManagerTest {
await().atMost(1, TimeUnit.MINUTES).until(isContainerAlive());
- PolicyEngineConstants.getManager().setEnvironmentProperty(ControlLoopEventManager.AAI_URL,
- "http://localhost:6666");
- PolicyEngineConstants.getManager()
- .setEnvironmentProperty(ControlLoopEventManager.AAI_USERNAME_PROPERTY, "AAI");
- PolicyEngineConstants.getManager()
- .setEnvironmentProperty(ControlLoopEventManager.AAI_PASS_PROPERTY, "AAI");
+ PolicyEngine mgr = PolicyEngineConstants.getManager();
+ mgr.setEnvironmentProperty("aai.url", "http://localhost:6666");
+ mgr.setEnvironmentProperty("aai.username", "AAI");
+ mgr.setEnvironmentProperty("aai.password", "AAI");
Util.buildAaiSim();
}