aboutsummaryrefslogtreecommitdiffstats
path: root/applications
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-03-17 15:10:17 -0400
committerJim Hahn <jrh3@att.com>2021-03-17 16:30:13 -0400
commit3e9fe84af892cd75c564da90481800a4131fc009 (patch)
tree8b54a93f852b43be17e43e909bd0ae8822a7a861 /applications
parent2cb02e53d2eb0374b13b92e87afaf86b0b4c7383 (diff)
Change RestServerParameters to BusTopicParams
HTTP client parameters should be based on BusTopicParams instead of RestServerParameters, modified the policyApiParameters. Issue-ID: POLICY-3147 Change-Id: I73aa34bec3ab7e27e7a3474260f411ed55b6f933 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'applications')
-rw-r--r--applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java21
-rw-r--r--applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java6
-rw-r--r--applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java7
-rw-r--r--applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java8
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java13
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java14
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java4
-rw-r--r--applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java4
-rw-r--r--applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java6
-rw-r--r--applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java6
-rw-r--r--applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java10
-rw-r--r--applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java6
-rw-r--r--applications/naming/src/test/java/org/onap/policy/xacml/pdp/application/naming/NamingPdpApplicationTest.java10
-rw-r--r--applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java6
-rw-r--r--applications/optimization/src/main/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplication.java6
-rw-r--r--applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java10
16 files changed, 63 insertions, 74 deletions
diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java
index 7d360da2..52ecd84b 100644
--- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java
+++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,7 +27,6 @@ import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
import org.slf4j.Logger;
@@ -50,20 +49,12 @@ public class PolicyApiCaller {
* @param params target specification
* @throws PolicyApiException if an error occurs
*/
- public PolicyApiCaller(RestServerParameters params) throws PolicyApiException {
- BusTopicParams busParams = new BusTopicParams();
- busParams.setClientName("policy-api");
- busParams.setHostname(params.getHost());
- busParams.setManaged(false);
- busParams.setPassword(params.getPassword());
- busParams.setPort(params.getPort());
- busParams.setUseHttps(params.isHttps());
- busParams.setUserName(params.getUserName());
-
+ public PolicyApiCaller(BusTopicParams params) throws PolicyApiException {
try {
- httpClient = makeClient(busParams);
+ params.setClientName("policy-api");
+ httpClient = makeClient(params);
} catch (HttpClientConfigException e) {
- throw new PolicyApiException("connection to host: " + busParams.getHostname(), e);
+ throw new PolicyApiException("connection to host: " + params.getHostname(), e);
}
}
@@ -92,7 +83,7 @@ public class PolicyApiCaller {
}
} catch (RuntimeException e) {
- logger.warn("policy-api connection error");
+ logger.warn("policy-api connection error, client info: {} ", httpClient);
throw new PolicyApiException(type.toString(), e);
}
}
diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java
index d80572a2..7512fb76 100644
--- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java
+++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java
@@ -1,7 +1,7 @@
/* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,7 +27,7 @@ import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
@@ -66,7 +66,7 @@ public interface XacmlApplicationServiceProvider {
* @param pathForData Local Path
* @param policyApiParameters API rest parameters
*/
- void initialize(Path pathForData, RestServerParameters policyApiParameters)
+ void initialize(Path pathForData, BusTopicParams policyApiParameters)
throws XacmlApplicationException;
/**
diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java
index 329a21ca..3222f4ad 100644
--- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java
+++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslator.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,7 +51,7 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.RuleType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.TargetType;
import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.coder.StandardYamlCoder;
@@ -92,7 +92,7 @@ public class StdMatchableTranslator extends StdBaseTranslator implements Matcha
private final Map<ToscaConceptIdentifier, MatchablePolicyType> matchableCache = new HashMap<>();
@Setter
- private RestServerParameters apiRestParameters;
+ private BusTopicParams apiRestParameters;
@Setter
private Path pathForData;
@@ -579,7 +579,6 @@ public class StdMatchableTranslator extends StdBaseTranslator implements Matcha
policyTemplate = api.getPolicyType(policyTypeId);
} catch (PolicyApiException e) {
LOGGER.error("Failed to make API call", e);
- LOGGER.error("parameters: {} ", this.apiRestParameters);
return null;
}
LOGGER.info("Successfully pulled {}", policyTypeId);
diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java
index fcfbf535..5e00499e 100644
--- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java
+++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,7 +41,7 @@ import java.util.Map;
import java.util.Properties;
import lombok.Getter;
import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
@@ -64,7 +64,7 @@ public abstract class StdXacmlApplicationServiceProvider implements XacmlApplica
private Path pathForData = null;
@Getter
- private RestServerParameters policyApiParameters;
+ private BusTopicParams policyApiParameters;
private Properties pdpProperties = null;
private PDPEngine pdpEngine = null;
private Map<ToscaPolicy, Path> mapLoadedPolicies = new HashMap<>();
@@ -84,7 +84,7 @@ public abstract class StdXacmlApplicationServiceProvider implements XacmlApplica
}
@Override
- public void initialize(Path pathForData, RestServerParameters policyApiParameters)
+ public void initialize(Path pathForData, BusTopicParams policyApiParameters)
throws XacmlApplicationException {
//
// Save our path
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java
index 31cb481f..23ebbaa9 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -47,7 +47,6 @@ import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
import org.onap.policy.common.gson.GsonMessageBodyHandler;
import org.onap.policy.common.utils.network.NetworkUtil;
@@ -69,7 +68,7 @@ public class PolicyApiCallerTest {
private static final String UNKNOWN_TYPE = "unknown";
private static int port;
- private static RestServerParameters clientParams;
+ private static BusTopicParams clientParams;
private PolicyApiCaller api;
@@ -83,8 +82,8 @@ public class PolicyApiCallerTest {
public static void setUpBeforeClass() throws Exception {
port = NetworkUtil.allocPort();
- clientParams = mock(RestServerParameters.class);
- when(clientParams.getHost()).thenReturn("localhost");
+ clientParams = mock(BusTopicParams.class);
+ when(clientParams.getHostname()).thenReturn("localhost");
when(clientParams.getPort()).thenReturn(port);
Properties props = new Properties();
@@ -93,7 +92,7 @@ public class PolicyApiCallerTest {
final String svcpfx =
PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + CLIENT_NAME;
- props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_HOST_SUFFIX, clientParams.getHost());
+ props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_HOST_SUFFIX, clientParams.getHostname());
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_PORT_SUFFIX,
Integer.toString(clientParams.getPort()));
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_REST_CLASSES_SUFFIX,
@@ -106,7 +105,7 @@ public class PolicyApiCallerTest {
HttpServletServerFactoryInstance.getServerFactory().build(props).forEach(HttpServletServer::start);
- assertTrue(NetworkUtil.isTcpPortOpen(clientParams.getHost(), clientParams.getPort(), 100, 100));
+ assertTrue(NetworkUtil.isTcpPortOpen(clientParams.getHostname(), clientParams.getPort(), 100, 100));
}
@AfterClass
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java
index 1de1d79d..5cd54e8f 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,9 +58,9 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
import org.onap.policy.common.gson.GsonMessageBodyHandler;
import org.onap.policy.common.utils.coder.CoderException;
@@ -85,7 +85,7 @@ public class StdMatchableTranslatorTest {
private static final String CLIENT_NAME = "policy-api";
private static final StandardYamlCoder yamlCoder = new StandardYamlCoder();
private static int port;
- private static RestServerParameters clientParams;
+ private static BusTopicParams clientParams;
private static ToscaServiceTemplate testTemplate;
@ClassRule
@@ -106,8 +106,8 @@ public class StdMatchableTranslatorTest {
//
port = NetworkUtil.allocPort();
- clientParams = mock(RestServerParameters.class);
- when(clientParams.getHost()).thenReturn("localhost");
+ clientParams = mock(BusTopicParams.class);
+ when(clientParams.getHostname()).thenReturn("localhost");
when(clientParams.getPort()).thenReturn(port);
Properties props = new Properties();
@@ -116,7 +116,7 @@ public class StdMatchableTranslatorTest {
final String svcpfx =
PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + CLIENT_NAME;
- props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_HOST_SUFFIX, clientParams.getHost());
+ props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_HOST_SUFFIX, clientParams.getHostname());
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_PORT_SUFFIX,
Integer.toString(clientParams.getPort()));
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_REST_CLASSES_SUFFIX,
@@ -129,7 +129,7 @@ public class StdMatchableTranslatorTest {
HttpServletServerFactoryInstance.getServerFactory().build(props).forEach(HttpServletServer::start);
- assertTrue(NetworkUtil.isTcpPortOpen(clientParams.getHost(), clientParams.getPort(), 100, 100));
+ assertTrue(NetworkUtil.isTcpPortOpen(clientParams.getHostname(), clientParams.getPort(), 100, 100));
//
// Load our test policy type
//
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
index 7d5dd664..76f22551 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
@@ -56,7 +56,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
@@ -80,7 +80,7 @@ public class StdXacmlApplicationServiceProviderTest {
private static final String POLICY_NAME = "my-name";
private static final String POLICY_VERSION = "1.2.3";
private static final String POLICY_TYPE = "my-type";
- private static final RestServerParameters apiRestParameters = new RestServerParameters();
+ private static final BusTopicParams apiRestParameters = new BusTopicParams();
@Mock
private ToscaPolicyTranslator trans;
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
index 5b32b2a8..f0e82d22 100644
--- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
+++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java
@@ -50,7 +50,7 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.MethodSorters;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.TextFileUtils;
@@ -73,7 +73,7 @@ public class GuardPdpApplicationTest {
private static final Logger LOGGER = LoggerFactory.getLogger(GuardPdpApplicationTest.class);
private static Properties properties = new Properties();
private static File propertiesFile;
- private static RestServerParameters clientParams = new RestServerParameters();
+ private static BusTopicParams clientParams = new BusTopicParams();
private static XacmlApplicationServiceProvider service;
private static DecisionRequest requestVfCount;
private static StandardCoder gson = new StandardCoder();
diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java
index ba51f556..a4f47789 100644
--- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java
+++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.MethodSorters;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.TextFileUtils;
@@ -66,7 +66,7 @@ public class SonCoordinationTest {
private static final Logger LOGGER = LoggerFactory.getLogger(SonCoordinationTest.class);
private static Properties properties = new Properties();
private static File propertiesFile;
- private static RestServerParameters clientParams = new RestServerParameters();
+ private static BusTopicParams clientParams = new BusTopicParams();
private static XacmlApplicationServiceProvider service;
private static DecisionRequest requestVpciNode1;
private static DecisionRequest requestVsonhNode1;
diff --git a/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java b/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java
index 444c481c..cd16a2ce 100644
--- a/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java
+++ b/applications/match/src/main/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplication.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,7 +25,7 @@ package org.onap.policy.xacml.pdp.application.match;
import java.nio.file.Path;
import java.util.Arrays;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.pdp.xacml.application.common.ToscaPolicyTranslator;
import org.onap.policy.pdp.xacml.application.common.XacmlApplicationException;
@@ -54,7 +54,7 @@ public class MatchPdpApplication extends StdXacmlApplicationServiceProvider {
}
@Override
- public void initialize(Path pathForData, RestServerParameters policyApiParameters)
+ public void initialize(Path pathForData, BusTopicParams policyApiParameters)
throws XacmlApplicationException {
//
// Store our API parameters and path for translator so it
diff --git a/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java b/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
index a8b1399a..ff154d93 100644
--- a/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
+++ b/applications/match/src/test/java/org/onap/policy/xacml/pdp/application/match/MatchPdpApplicationTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -44,7 +44,7 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.MethodSorters;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.ResourceUtils;
@@ -67,7 +67,7 @@ public class MatchPdpApplicationTest {
private static XacmlApplicationServiceProvider service;
private static StandardCoder gson = new StandardCoder();
private static DecisionRequest baseRequest;
- private static RestServerParameters clientParams;
+ private static BusTopicParams clientParams;
@ClassRule
public static final TemporaryFolder policyFolder = new TemporaryFolder();
@@ -79,8 +79,8 @@ public class MatchPdpApplicationTest {
*/
@BeforeClass
public static void setUp() throws Exception {
- clientParams = mock(RestServerParameters.class);
- when(clientParams.getHost()).thenReturn("localhost");
+ clientParams = mock(BusTopicParams.class);
+ when(clientParams.getHostname()).thenReturn("localhost");
when(clientParams.getPort()).thenReturn(6969);
//
// Load Single Decision Request
diff --git a/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java b/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java
index 1c2967de..a1f18927 100644
--- a/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java
+++ b/applications/monitoring/src/test/java/org/onap/policy/xacml/pdp/application/monitoring/MonitoringPdpApplicationTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,7 +41,7 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.MethodSorters;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.TextFileUtils;
@@ -67,7 +67,7 @@ public class MonitoringPdpApplicationTest {
private static DecisionRequest requestPolicyType;
private static StandardCoder gson = new StandardCoder();
- private static RestServerParameters clientParams = new RestServerParameters();
+ private static BusTopicParams clientParams = new BusTopicParams();
@ClassRule
public static final TemporaryFolder policyFolder = new TemporaryFolder();
diff --git a/applications/naming/src/test/java/org/onap/policy/xacml/pdp/application/naming/NamingPdpApplicationTest.java b/applications/naming/src/test/java/org/onap/policy/xacml/pdp/application/naming/NamingPdpApplicationTest.java
index 98385cae..841333dc 100644
--- a/applications/naming/src/test/java/org/onap/policy/xacml/pdp/application/naming/NamingPdpApplicationTest.java
+++ b/applications/naming/src/test/java/org/onap/policy/xacml/pdp/application/naming/NamingPdpApplicationTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,7 +48,7 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.MethodSorters;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.resources.ResourceUtils;
@@ -71,7 +71,7 @@ public class NamingPdpApplicationTest {
private static XacmlApplicationServiceProvider service;
private static StandardCoder gson = new StandardCoder();
private static DecisionRequest baseRequest;
- private static RestServerParameters clientParams;
+ private static BusTopicParams clientParams;
@ClassRule
public static final TemporaryFolder policyFolder = new TemporaryFolder();
@@ -83,8 +83,8 @@ public class NamingPdpApplicationTest {
*/
@BeforeClass
public static void setUp() throws Exception {
- clientParams = mock(RestServerParameters.class);
- when(clientParams.getHost()).thenReturn("localhost");
+ clientParams = mock(BusTopicParams.class);
+ when(clientParams.getHostname()).thenReturn("localhost");
when(clientParams.getPort()).thenReturn(6969);
//
// Load Single Decision Request
diff --git a/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java b/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java
index 9a0ebc01..3a405a89 100644
--- a/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java
+++ b/applications/native/src/test/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,7 +39,7 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.StandardYamlCoder;
import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.common.utils.resources.TextFileUtils;
@@ -61,7 +61,7 @@ public class NativePdpApplicationTest {
private static final StandardYamlCoder yamlCoder = new StandardYamlCoder();
private static Properties properties = new Properties();
private static File propertiesFile;
- private static RestServerParameters clientParams = new RestServerParameters();
+ private static BusTopicParams clientParams = new BusTopicParams();
private static NativePdpApplication service;
private static Request request;
diff --git a/applications/optimization/src/main/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplication.java b/applications/optimization/src/main/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplication.java
index 8b0442bb..50bc0bd8 100644
--- a/applications/optimization/src/main/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplication.java
+++ b/applications/optimization/src/main/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplication.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,7 +34,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.tuple.Pair;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.decisions.concepts.DecisionResponse;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
@@ -87,7 +87,7 @@ public class OptimizationPdpApplication extends StdXacmlApplicationServiceProvid
}
@Override
- public void initialize(Path pathForData, RestServerParameters policyApiParameters)
+ public void initialize(Path pathForData, BusTopicParams policyApiParameters)
throws XacmlApplicationException {
//
// Store our API parameters and path for translator so it
diff --git a/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java b/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java
index 44de7f02..a3b218c6 100644
--- a/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java
+++ b/applications/optimization/src/test/java/org/onap/policy/xacml/pdp/application/optimization/OptimizationPdpApplicationTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019-2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,7 +48,7 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runners.MethodSorters;
-import org.onap.policy.common.endpoints.parameters.RestServerParameters;
+import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.coder.StandardYamlCoder;
@@ -76,7 +76,7 @@ public class OptimizationPdpApplicationTest {
private static XacmlApplicationServiceProvider service;
private static StandardCoder gson = new StandardCoder();
private static DecisionRequest baseRequest;
- private static RestServerParameters clientParams;
+ private static BusTopicParams clientParams;
private static String[] listPolicyTypeFiles = {
"onap.policies.Optimization",
"onap.policies.optimization.Resource",
@@ -101,8 +101,8 @@ public class OptimizationPdpApplicationTest {
*/
@BeforeClass
public static void setUp() throws Exception {
- clientParams = mock(RestServerParameters.class);
- when(clientParams.getHost()).thenReturn("localhost");
+ clientParams = mock(BusTopicParams.class);
+ when(clientParams.getHostname()).thenReturn("localhost");
when(clientParams.getPort()).thenReturn(6969);
//
// Load Single Decision Request