summaryrefslogtreecommitdiffstats
path: root/controlloop/common
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common')
-rw-r--r--controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment1
-rw-r--r--controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java1
-rw-r--r--controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java1
-rw-r--r--controlloop/common/model-impl/vfc/pom.xml6
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java13
5 files changed, 19 insertions, 3 deletions
diff --git a/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment b/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment
index daa98799c..ec5023b2e 100644
--- a/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment
+++ b/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment
@@ -23,4 +23,5 @@
aai.url=http://localhost:6666
so.url=http://localhost:6667
vfc.url=http://localhost:6668
+guard.url=http://localhost:6669/pdp/api/getDecision
diff --git a/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java b/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java
index 50876311c..3cee70eda 100644
--- a/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java
+++ b/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java
@@ -46,6 +46,7 @@ public class ControlLoopUtilsFeature implements PolicyEngineFeatureAPI {
Util.buildAaiSim();
Util.buildSoSim();
Util.buildVfcSim();
+ Util.buildGuardSim();
} catch (final InterruptedException e) {
logger.error("{}: initialization aborted", ControlLoopUtilsFeature.class.getName(), e);
Thread.currentThread().interrupt();
diff --git a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java
index 5ba375847..2a8bc35ea 100644
--- a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java
+++ b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java
@@ -41,6 +41,7 @@ public class ControlLoopUtilsFeatureTest {
assertNotNull(HttpServletServer.factory.get(Util.AAISIM_SERVER_PORT));
assertNotNull(HttpServletServer.factory.get(Util.SOSIM_SERVER_PORT));
assertNotNull(HttpServletServer.factory.get(Util.SOSIM_SERVER_PORT));
+ assertNotNull(HttpServletServer.factory.get(Util.GUARDSIM_SERVER_PORT));
}
}
diff --git a/controlloop/common/model-impl/vfc/pom.xml b/controlloop/common/model-impl/vfc/pom.xml
index 7672b1bc9..6b4efb879 100644
--- a/controlloop/common/model-impl/vfc/pom.xml
+++ b/controlloop/common/model-impl/vfc/pom.xml
@@ -51,5 +51,11 @@
<version>6.5.0.Final</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.onap.policy.drools-pdp</groupId>
+ <artifactId>policy-management</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java
index 5cb6d6624..2d635b401 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.drools.core.WorkingMemory;
import org.onap.policy.vfc.util.Serialization;
+import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.rest.RESTManager;
import org.onap.policy.rest.RESTManager.Pair;
import org.slf4j.Logger;
@@ -42,9 +43,15 @@ public final class VFCManager implements Runnable {
public VFCManager(WorkingMemory wm, VFCRequest request) {
workingMem = wm;
vfcRequest = request;
- // TODO: Get base URL, username and password from MSB?
- // TODO: Following code is a placeholder, needs to be updated
- setVFCParams("http://localhost:6668", "username", "password");
+
+ /*
+ * TODO: What if these are null?
+ */
+ String url = PolicyEngine.manager.getEnvironmentProperty("vfc.url");
+ String username = PolicyEngine.manager.getEnvironmentProperty("vfc.username");
+ String password = PolicyEngine.manager.getEnvironmentProperty("vfc.password");
+
+ setVFCParams(url, username, password);
}