diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-05-03 17:07:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-03 17:07:03 +0000 |
commit | fdb7710e046a52603da074189969c13395ef2a09 (patch) | |
tree | dd34e1539847ed0c1ba5d3f28ba2f106c8ecc6c7 /controlloop/templates/template.demo | |
parent | 373d049804e85d0c9c28dc739c90d5d51942e368 (diff) | |
parent | 002248883ff9134cd66e39147c062ad3936e1a74 (diff) |
Merge "Change guard pdp rest to new api"
Diffstat (limited to 'controlloop/templates/template.demo')
3 files changed, 10 insertions, 9 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java index 395ecc234..0ac9c48df 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnBwControlLoopTest.java @@ -73,6 +73,7 @@ public class CcvpnBwControlLoopTest implements TopicListener { /* Set environment properties */ SupportUtil.setAaiProps(); SupportUtil.setSdncProps(); + SupportUtil.setGuardProps(); LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO"); } @@ -102,6 +103,7 @@ public class CcvpnBwControlLoopTest implements TopicListener { try { SupportUtil.buildAaiSim(); SupportUtil.buildSdncSim(); + SupportUtil.buildGuardSim(); } catch (Exception e) { fail(e.getMessage()); } @@ -370,4 +372,4 @@ public class CcvpnBwControlLoopTest implements TopicListener { logger.debug("FACT: " + handle); } } -}
\ No newline at end of file +} diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java index aa447ccd0..c546248f2 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/CcvpnControlLoopTest.java @@ -72,6 +72,7 @@ public class CcvpnControlLoopTest implements TopicListener { /* Set environment properties */ SupportUtil.setAaiProps(); SupportUtil.setSdncProps(); + SupportUtil.setGuardProps(); LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO"); } @@ -101,6 +102,7 @@ public class CcvpnControlLoopTest implements TopicListener { try { SupportUtil.buildAaiSim(); SupportUtil.buildSdncSim(); + SupportUtil.buildGuardSim(); } catch (Exception e) { fail(e.getMessage()); } @@ -158,7 +160,7 @@ public class CcvpnControlLoopTest implements TopicListener { sendEvent(pair.first); kieSession.fireUntilHalt(); - + // allow object clean-up kieSession.fireAllRules(); @@ -204,7 +206,7 @@ public class CcvpnControlLoopTest implements TopicListener { kieSession.insert(event); kieSession.fireUntilHalt(); - + // allow object clean-up kieSession.fireAllRules(); @@ -331,7 +333,7 @@ public class CcvpnControlLoopTest implements TopicListener { /** * This method is used to simulate event messages from DCAE that start the control loop (onset * message) or end the control loop (abatement message). - * + * * @param policy the controlLoopName comes from the policy */ protected void sendEvent(ControlLoopPolicy policy) { @@ -355,7 +357,7 @@ public class CcvpnControlLoopTest implements TopicListener { /** * Dumps the kie session facts. - * + * * @param kieSession input session */ public static void dumpFacts(KieSession kieSession) { 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 3091656c0..493ab9b2c 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 @@ -319,12 +319,9 @@ public final class SupportUtil { /* * Guard PDP-x connection Properties */ - PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_URL, "http://localhost:6669/pdp/api/getDecision"); + PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_URL, "http://localhost:6669/policy/pdpx/v1/decision"); PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_USER, "python"); PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_PASS, "test"); - PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_CLIENT_USER, "python"); - PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_CLIENT_PASS, "test"); - PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_ENV, "TEST"); PolicyEngine.manager.setEnvironmentProperty(org.onap.policy.guard.Util.PROP_GUARD_DISABLED, "false"); } |