diff options
author | 2023-10-12 13:07:28 +0100 | |
---|---|---|
committer | 2023-10-12 13:33:51 +0100 | |
commit | f0b1c5bf1662edf6a2a07b79c1ffe7e42e1bb054 (patch) | |
tree | 5456420b1c0e8f16455c65c248057e8fab4e9172 /plugins/forwarding-plugins/src | |
parent | 08ec52b6ed5ef7159087d708bddfa40d9ac03717 (diff) |
Remove AAF references from distribution.
Issue-ID: POLICY-4592
Change-Id: Ifa924a99a9429494052a1d36d4b7480b9ddce37d
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'plugins/forwarding-plugins/src')
4 files changed, 14 insertions, 15 deletions
diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarderTest.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarderTest.java index f28b52e5..6069b667 100644 --- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarderTest.java +++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiAutomationCompositionForwarderTest.java @@ -65,7 +65,7 @@ class LifecycleApiAutomationCompositionForwarderTest { "src/test/resources/parameters/LifecycleApiAutomationCompositionForwarderParameters.json", LifecycleApiAutomationCompositionForwarderParameters.class); ParameterService.register(parameterGroup); - simulator.startLifecycycleApiSimulator(); + simulator.startLifecycleApiSimulator(); if (!NetworkUtil.isTcpPortOpen("localhost", 6969, 50, 200L)) { throw new IllegalStateException("cannot connect to port 6969"); } diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarderTest.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarderTest.java index ba85505d..a78debee 100644 --- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarderTest.java +++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/lifecycle/api/LifecycleApiPolicyForwarderTest.java @@ -66,7 +66,7 @@ class LifecycleApiPolicyForwarderTest { "src/test/resources/parameters/LifecycleApiPolicyForwarderParameters.json", LifecycleApiForwarderParameters.class); ParameterService.register(parameterGroup); - simulator.startLifecycycleApiSimulator(); + simulator.startLifecycleApiSimulator(); if (!NetworkUtil.isTcpPortOpen("localhost", 6969, 50, 200L)) { throw new IllegalStateException("cannot connect to port 6969"); } @@ -78,7 +78,7 @@ class LifecycleApiPolicyForwarderTest { @AfterAll static void tearDown() { ParameterService.deregister(LifecycleApiForwarderParameters.class.getSimpleName()); - simulator.stopLifecycycleApiSimulator(); + simulator.stopLifecycleApiSimulator(); } @Test diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiAutomationCompositionSimulatorMain.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiAutomationCompositionSimulatorMain.java index 98615af0..be8cc827 100644 --- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiAutomationCompositionSimulatorMain.java +++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiAutomationCompositionSimulatorMain.java @@ -1,7 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2022 Nordix Foundation. - * Modifications Copyright (C) 2022 Nordix Foundation. + * Copyright (C) 2022-2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +20,7 @@ package org.onap.policy.distribution.forwarding.testclasses; +import java.util.List; import org.onap.policy.common.endpoints.http.server.RestServer; import org.onap.policy.common.endpoints.parameters.RestServerParameters; import org.onap.policy.common.utils.coder.CoderException; @@ -28,7 +28,6 @@ import org.onap.policy.common.utils.coder.StandardCoder; import org.onap.policy.common.utils.resources.ResourceUtils; import org.onap.policy.distribution.forwarding.PolicyForwardingException; import org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiAutomationCompositionForwarder; -import org.onap.policy.distribution.main.rest.aaf.AafDistributionFilter; /** * The class for starting/stopping simulator for testing {@link LifecycleApiAutomationCompositionForwarder} . @@ -44,13 +43,13 @@ public class LifecycleApiAutomationCompositionSimulatorMain { * @throws PolicyForwardingException if error occurs * @throws CoderException if error occurs */ - public void startLifecycycleApiSimulator() throws PolicyForwardingException, CoderException { + public void startLifecycleApiSimulator() throws PolicyForwardingException, CoderException { final StandardCoder standardCoder = new StandardCoder(); final RestServerParameters restServerParameters = standardCoder.decode( ResourceUtils.getResourceAsString("src/test/resources/parameters/RestServerParameters.json"), RestServerParameters.class); - restServer = new RestServer(restServerParameters, AafDistributionFilter.class, - LifecycleApiAutomationCompositionSimulatorEndpoint.class); + restServer = new RestServer(restServerParameters, List.of(), + List.of(LifecycleApiAutomationCompositionSimulatorEndpoint.class)); if (!restServer.start()) { throw new PolicyForwardingException("Failed to start rest simulator. Check log for more details..."); } diff --git a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiSimulatorMain.java b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiSimulatorMain.java index 07c4b6c6..ef89149c 100644 --- a/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiSimulatorMain.java +++ b/plugins/forwarding-plugins/src/test/java/org/onap/policy/distribution/forwarding/testclasses/LifecycleApiSimulatorMain.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. + * Copyright (C) 2019, 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ package org.onap.policy.distribution.forwarding.testclasses; +import java.util.List; import org.onap.policy.common.endpoints.http.server.RestServer; import org.onap.policy.common.endpoints.parameters.RestServerParameters; import org.onap.policy.common.utils.coder.CoderException; @@ -27,7 +28,6 @@ import org.onap.policy.common.utils.coder.StandardCoder; import org.onap.policy.common.utils.resources.ResourceUtils; import org.onap.policy.distribution.forwarding.PolicyForwardingException; import org.onap.policy.distribution.forwarding.lifecycle.api.LifecycleApiPolicyForwarder; -import org.onap.policy.distribution.main.rest.aaf.AafDistributionFilter; /** * The class for starting/stopping simulator for testing {@link LifecycleApiPolicyForwarder} . @@ -43,13 +43,13 @@ public class LifecycleApiSimulatorMain { * @throws PolicyForwardingException if error occurs * @throws CoderException if error occurs */ - public void startLifecycycleApiSimulator() throws PolicyForwardingException, CoderException { + public void startLifecycleApiSimulator() throws PolicyForwardingException, CoderException { final StandardCoder standardCoder = new StandardCoder(); final RestServerParameters restServerParameters = standardCoder.decode( ResourceUtils.getResourceAsString("src/test/resources/parameters/RestServerParameters.json"), RestServerParameters.class); - restServer = new RestServer(restServerParameters, AafDistributionFilter.class, - LifecycycleApiSimulatorEndpoint.class); + restServer = new RestServer(restServerParameters, List.of(), + List.of(LifecycycleApiSimulatorEndpoint.class)); if (!restServer.start()) { throw new PolicyForwardingException("Failed to start rest simulator. Check log for more details..."); } @@ -58,7 +58,7 @@ public class LifecycleApiSimulatorMain { /** * Shut down Execution. */ - public void stopLifecycycleApiSimulator() { + public void stopLifecycleApiSimulator() { if (restServer != null) { restServer.stop(); } |