summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authoremartin <ephraim.martin@est.tech>2019-02-12 17:12:08 +0000
committeremartin <ephraim.martin@est.tech>2019-02-12 17:12:08 +0000
commit85d315a40fa48255e1104a0c2d6c5ad984952c9c (patch)
tree8ba6342009b1020750e02f2dbbc863aaab720763 /src/main
parenta8e48cfb480f325f0d359428672cc7f5cc20d13e (diff)
Fix mapper configuration to use CBS
Change-Id: I17bb9577ac2dd9267eeade948e5bf05cdadbac57 Issue-ID: DCAEGEN2-1186 Signed-off-by: emartin <ephraim.martin@est.tech>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/App.java9
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java52
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java22
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/exceptions/ConsulServerError.java26
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/model/BusControllerConfig.java40
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/model/CBSConfig.java46
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java34
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java80
-rw-r--r--src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java2
9 files changed, 111 insertions, 200 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/App.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/App.java
index 784e0f1..3c075ba 100644
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/App.java
+++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/App.java
@@ -28,11 +28,9 @@ import org.onap.dcaegen2.services.pmmapper.config.ConfigHandler;
import org.onap.dcaegen2.services.pmmapper.datarouter.DataRouterSubscriber;
import org.onap.dcaegen2.services.pmmapper.exceptions.CBSConfigException;
import org.onap.dcaegen2.services.pmmapper.exceptions.CBSServerError;
-import org.onap.dcaegen2.services.pmmapper.exceptions.ConsulServerError;
import org.onap.dcaegen2.services.pmmapper.exceptions.EnvironmentConfigException;
import org.onap.dcaegen2.services.pmmapper.exceptions.MapperConfigException;
import org.onap.dcaegen2.services.pmmapper.exceptions.TooManyTriesException;
-import org.onap.dcaegen2.services.pmmapper.model.BusControllerConfig;
import org.onap.dcaegen2.services.pmmapper.model.MapperConfig;
import org.onap.dcaegen2.services.pmmapper.healthcheck.HealthCheckHandler;
@@ -41,17 +39,14 @@ import java.net.URL;
public class App {
- public static void main(String[] args) throws MalformedURLException, InterruptedException, TooManyTriesException, CBSConfigException, ConsulServerError, EnvironmentConfigException, CBSServerError, MapperConfigException {
+ public static void main(String[] args) throws MalformedURLException, InterruptedException, TooManyTriesException, CBSConfigException, EnvironmentConfigException, CBSServerError, MapperConfigException {
HealthCheckHandler healthCheckHandler = new HealthCheckHandler();
DataRouterSubscriber dataRouterSubscriber = new DataRouterSubscriber(event -> {
event.getHttpServerExchange().unDispatch();
event.getHttpServerExchange().getResponseSender().send(StatusCodes.OK_STRING);
- System.out.println(event.getMetadata().getProductName());
});
MapperConfig mapperConfig = new ConfigHandler().getMapperConfig();
- BusControllerConfig busConfig = mapperConfig.getBusControllerConfig();
- busConfig.setDataRouterSubscribeEndpoint(new URL("http://" + System.getenv("DMAAP_BC_SERVICE_HOST") + ":" + System.getenv("DMAAP_BC_SERVICE_PORT") + "/webapi/dr_subs"));
- dataRouterSubscriber.start(busConfig);
+ dataRouterSubscriber.start(mapperConfig);
Undertow.builder()
.addHttpListener(8081, "0.0.0.0")
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java
index 0087826..fe2f247 100644
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java
+++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/config/ConfigHandler.java
@@ -19,15 +19,10 @@
*/
package org.onap.dcaegen2.services.pmmapper.config;
-import java.util.Arrays;
-import java.util.UUID;
-
import org.onap.dcaegen2.services.pmmapper.exceptions.CBSConfigException;
import org.onap.dcaegen2.services.pmmapper.exceptions.CBSServerError;
-import org.onap.dcaegen2.services.pmmapper.exceptions.ConsulServerError;
import org.onap.dcaegen2.services.pmmapper.exceptions.EnvironmentConfigException;
import org.onap.dcaegen2.services.pmmapper.exceptions.MapperConfigException;
-import org.onap.dcaegen2.services.pmmapper.model.CBSConfig;
import org.onap.dcaegen2.services.pmmapper.model.EnvironmentConfig;
import org.onap.dcaegen2.services.pmmapper.model.MapperConfig;
import org.onap.dcaegen2.services.pmmapper.utils.RequestSender;
@@ -45,7 +40,6 @@ import com.google.gson.GsonBuilder;
public class ConfigHandler {
private static final ONAPLogAdapter logger = new ONAPLogAdapter(LoggerFactory.getLogger(ConfigHandler.class));
- private static final String EMPTY_MESSAGE = "";
private RequestSender sender;
/**
@@ -72,42 +66,23 @@ public class ConfigHandler {
* @throws CBSServerError
* @throws MapperConfigException
*/
- public MapperConfig getMapperConfig() throws CBSConfigException, ConsulServerError, EnvironmentConfigException,
+ public MapperConfig getMapperConfig() throws CBSConfigException, EnvironmentConfigException,
CBSServerError, MapperConfigException {
String mapperConfigJson = "";
- CBSConfig cbsConfig = convertCBSConfigToObject(getCBSConfigFromConsul());
- String cbsSocketAddress = cbsConfig.getServiceAddress() + ":" + cbsConfig.getServicePort();
- String requestURL = "http://" + cbsSocketAddress + "/service_component/" + cbsConfig.getServiceName();
+ String cbsSocketAddress = EnvironmentConfig.getCBSHostName() + ":" + EnvironmentConfig.getCBSPort();
+ String requestURL = "http://" + cbsSocketAddress + "/service_component/" + EnvironmentConfig.getServiceName();
try {
logger.unwrap().info(ONAPLogConstants.Markers.ENTRY, "Fetching pm-mapper configuration from Configbinding Service");
mapperConfigJson = sender.send(requestURL);
} catch (Exception exception) {
throw new CBSServerError("Error connecting to Configbinding Service: ", exception);
} finally {
- logger.unwrap().info(ONAPLogConstants.Markers.EXIT, EMPTY_MESSAGE);
+ logger.unwrap().info(ONAPLogConstants.Markers.EXIT, "Received pm-mapper configuration from ConfigBinding Service:\n{}", mapperConfigJson);
}
- logger.unwrap().info("Received pm-mapper configuration from ConfigBinding Service:\n{}", mapperConfigJson);
return convertMapperConfigToObject(mapperConfigJson);
}
- private String getCBSConfigFromConsul() throws ConsulServerError, EnvironmentConfigException {
- String cbsParams="";
- String consulURL = "http://" + EnvironmentConfig.getConsulHost() + ":" + EnvironmentConfig.getConsultPort()
- + "/v1/catalog/service/" + EnvironmentConfig.getCbsName();
- try {
- logger.unwrap().info(ONAPLogConstants.Markers.ENTRY,
- "Retrieving ConfigBinding Service parameters from this Consul URL: {}", consulURL);
- cbsParams = sender.send(consulURL);
- } catch (Exception exception) {
- throw new ConsulServerError("Error connecting to Consul: ", exception);
- } finally {
- logger.unwrap().info(ONAPLogConstants.Markers.EXIT, "Received ConfigBinding Service parameters:\n{}", cbsParams);
- }
-
- return cbsParams;
- }
-
private MapperConfig convertMapperConfigToObject(String mapperConfigJson) throws MapperConfigException {
MapperConfig mapperConfig;
try {
@@ -122,23 +97,4 @@ public class ConfigHandler {
logger.unwrap().debug("Mapper configuration:\n{}", mapperConfig);
return mapperConfig;
}
-
- private CBSConfig convertCBSConfigToObject(String cbsParameters) throws CBSConfigException {
- CBSConfig cbsConfig;
- try {
- cbsConfig = Arrays
- .asList(new GsonBuilder()
- .registerTypeAdapter(CBSConfig.class, new RequiredFieldDeserializer<CBSConfig>())
- .create()
- .fromJson(cbsParameters, CBSConfig[].class))
- .get(0);
- logger.unwrap().debug("ConfigBinding Service Configurations: " + cbsConfig);
- } catch (Exception exception) {
- throw new CBSConfigException(
- "Error mapping the received ConfigBinding service configuration parameters: " + cbsParameters,
- exception);
- }
- return cbsConfig;
- }
-
}
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java
index a8211e6..e262d42 100644
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java
+++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/datarouter/DataRouterSubscriber.java
@@ -32,7 +32,6 @@ import org.onap.dcaegen2.services.pmmapper.exceptions.NoMetadataException;
import org.onap.dcaegen2.services.pmmapper.exceptions.TooManyTriesException;
import org.onap.dcaegen2.services.pmmapper.model.EventMetadata;
import org.onap.dcaegen2.services.pmmapper.model.MapperConfig;
-import org.onap.dcaegen2.services.pmmapper.model.BusControllerConfig;
import org.onap.dcaegen2.services.pmmapper.model.Event;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
@@ -49,6 +48,7 @@ import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.nio.charset.StandardCharsets;
+import java.time.Instant;
import java.util.Optional;
import java.util.Random;
import java.util.UUID;
@@ -91,7 +91,7 @@ public class DataRouterSubscriber implements HttpHandler {
* all non constant configuration for subscription through this endpoint.
* @throws TooManyTriesException in the event that timeout has occurred several times.
*/
- public void start(BusControllerConfig config) throws TooManyTriesException, InterruptedException {
+ public void start(MapperConfig config) throws TooManyTriesException, InterruptedException {
try {
logger.unwrap().info(ONAPLogConstants.Markers.ENTRY, "Starting subscription to DataRouter");
subscribe(NUMBER_OF_ATTEMPTS, DEFAULT_TIMEOUT, config);
@@ -100,8 +100,8 @@ public class DataRouterSubscriber implements HttpHandler {
}
}
- private HttpURLConnection getBusControllerConnection(BusControllerConfig config, int timeout) throws IOException {
- HttpURLConnection connection = (HttpURLConnection) config.getDataRouterSubscribeEndpoint()
+ private HttpURLConnection getBusControllerConnection(MapperConfig config, int timeout) throws IOException {
+ HttpURLConnection connection = (HttpURLConnection) config.getBusControllerSubscriptionUrl()
.openConnection();
connection.setRequestMethod("POST");
connection.setConnectTimeout(timeout);
@@ -118,18 +118,18 @@ public class DataRouterSubscriber implements HttpHandler {
return connection;
}
- private JsonObject getBusControllerSubscribeBody(BusControllerConfig config) {
+ private JsonObject getBusControllerSubscribeBody(MapperConfig config) {
JsonObject subscriberObj = new JsonObject();
subscriberObj.addProperty("dcaeLocationName", config.getDcaeLocation());
- subscriberObj.addProperty("deliveryURL", config.getDeliveryURL());
- subscriberObj.addProperty("feedId", config.getFeedId());
- subscriberObj.addProperty("lastMod", config.getLastMod());
- subscriberObj.addProperty("username", config.getUsername());
- subscriberObj.addProperty("userpwd", config.getPassword());
+ subscriberObj.addProperty("deliveryURL", config.getBusControllerDeliveryUrl());
+ subscriberObj.addProperty("feedId", config.getBusControllerFeedId());
+ subscriberObj.addProperty("lastMod", Instant.now().toString());
+ subscriberObj.addProperty("username", config.getBusControllerUserName());
+ subscriberObj.addProperty("userpwd", config.getBusControllerPassword());
return subscriberObj;
}
- private void subscribe(int attempts, int timeout, BusControllerConfig config) throws TooManyTriesException, InterruptedException {
+ private void subscribe(int attempts, int timeout, MapperConfig config) throws TooManyTriesException, InterruptedException {
int subResponse = 504;
String subMessage = "";
try {
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/exceptions/ConsulServerError.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/exceptions/ConsulServerError.java
deleted file mode 100644
index 4c2adab..0000000
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/exceptions/ConsulServerError.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.dcaegen2.services.pmmapper.exceptions;
-
-public class ConsulServerError extends Exception {
- public ConsulServerError(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/BusControllerConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/BusControllerConfig.java
deleted file mode 100644
index 3727099..0000000
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/BusControllerConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.dcaegen2.services.pmmapper.model;
-
-import lombok.Data;
-
-import java.net.URL;
-
-/**
- * Stub for BusControllerConfiguration object.
- */
-@Data
-public class BusControllerConfig {
-
- private String dcaeLocation = "dcaeLocation";
- private String deliveryURL = "deliveryURL";
- private int feedId = 2;
- private String lastMod = "lastMod";
- private String username = "username";
- private String password = "password";
- private URL dataRouterSubscribeEndpoint;
-
-}
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/CBSConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/CBSConfig.java
deleted file mode 100644
index 66fbed4..0000000
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/CBSConfig.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.dcaegen2.services.pmmapper.model;
-
-import org.onap.dcaegen2.services.pmmapper.utils.GSONRequired;
-
-import com.google.gson.annotations.SerializedName;
-import lombok.Data;
-
-@Data
-public class CBSConfig {
-
- @GSONRequired
- @SerializedName("ServiceID")
- private String serviceID;
-
- @GSONRequired
- @SerializedName("ServiceName")
- private String serviceName;
-
- @GSONRequired
- @SerializedName("ServiceAddress")
- private String serviceAddress;
-
- @GSONRequired
- @SerializedName("ServicePort")
- private String servicePort;
-
-}
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java
index f9dd178..fe48bfc 100644
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java
+++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/EnvironmentConfig.java
@@ -25,30 +25,32 @@ import org.onap.dcaegen2.services.pmmapper.exceptions.EnvironmentConfigException
public class EnvironmentConfig {
- private static Integer consulPort = 8500;
+ public static final int DEFAULT_CBS_PORT = 10000;
+ public static final String ENV_CBS_HOST_KEY = "CONFIG_BINDING_SERVICE_SERVICE_HOST";
+ public static final String ENV_CBS_PORT_KEY = "CONFIG_BINDING_SERVICE_SERVICE_PORT";
+ public static final String ENV_SERVICE_NAME_KEY = "HOSTNAME";
- public static String getConsulHost() throws EnvironmentConfigException {
- return Optional.ofNullable(System.getProperty("CONSUL_HOST"))
+ public static String getServiceName() throws EnvironmentConfigException {
+ return Optional.ofNullable(System.getenv("HOSTNAME"))
.orElseThrow(() -> new EnvironmentConfigException(
- "$CONSUL_HOST environment variable must be defined prior to pm-mapper initialization"));
+ ENV_SERVICE_NAME_KEY+ " environment variable must be defined prior to pm-mapper initialization."));
}
- public static Integer getConsultPort() throws EnvironmentConfigException {
- Integer port = consulPort;
+ public static String getCBSHostName() throws EnvironmentConfigException {
+ return Optional.ofNullable(System.getenv("CONFIG_BINDING_SERVICE_SERVICE_HOST"))
+ .orElseThrow(() -> new EnvironmentConfigException(
+ ENV_CBS_HOST_KEY+ " environment variable must be defined prior to pm-mapper initialization."));
+ }
+
+ public static Integer getCBSPort() throws EnvironmentConfigException {
+ Integer port = DEFAULT_CBS_PORT;
try {
- port = Optional.ofNullable(System.getProperty("CONSUL_PORT"))
- .map(Integer::valueOf)
- .orElse(consulPort);
+ port = Optional.ofNullable(System.getenv("CONFIG_BINDING_SERVICE_SERVICE_PORT"))
+ .map(Integer::valueOf).orElse(DEFAULT_CBS_PORT);
} catch (NumberFormatException e) {
- throw new EnvironmentConfigException("CONSUL_PORT must be valid: " + port);
+ throw new EnvironmentConfigException(ENV_CBS_PORT_KEY + " must be valid: " + port);
}
return port;
}
-
- public static String getCbsName() throws EnvironmentConfigException {
- return Optional.ofNullable(System.getProperty("CONFIG_BINDING_SERVICE"))
- .orElseThrow(() -> new EnvironmentConfigException(
- "$CONFIG_BINDING_SERVICE environment variable must be defined prior to pm-mapper initialization."));
- }
}
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java
index b4a9f01..1753c2c 100644
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java
+++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/model/MapperConfig.java
@@ -19,20 +19,88 @@
*/
package org.onap.dcaegen2.services.pmmapper.model;
+import java.net.MalformedURLException;
+import java.net.URL;
+
import org.onap.dcaegen2.services.pmmapper.utils.GSONRequired;
import com.google.gson.annotations.SerializedName;
-import lombok.Data;
+import lombok.Getter;
+import lombok.AccessLevel;
+import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
-@Data
+@Getter
+@EqualsAndHashCode
@NoArgsConstructor
public class MapperConfig {
+
public static final String CLIENT_NAME = "pm-mapper";
@GSONRequired
- @SerializedName("streams_subscribes.pm_mapper_handle_out.message_router_topic")
- private String messageRouterTopicName;
+ @Getter(AccessLevel.PRIVATE)
+ @SerializedName("streams_subscribes")
+ private StreamsSubscribes streamsSubscribes;
+
+ @GSONRequired
+ @SerializedName("buscontroller_feed_subscription_endpoint")
+ private String busControllerSubscriptionEndpoint;
+
+ @GSONRequired
+ @SerializedName("buscontroller_feed_id")
+ private String busControllerFeedId;
+
+ public String getBusControllerDeliveryUrl() {
+ return this.getStreamsSubscribes().getDmaapSubscriber().getDmaapInfo().getDeliveryUrl();
+ }
+
+ public String getDcaeLocation() {
+ return this.getStreamsSubscribes().getDmaapSubscriber().getDmaapInfo().getLocation();
+ }
+
+ public String getBusControllerUserName() {
+ return this.getStreamsSubscribes().getDmaapSubscriber().getDmaapInfo().getUsername();
+ }
+
+ public String getBusControllerPassword() {
+ return this.getStreamsSubscribes().getDmaapSubscriber().getDmaapInfo().getPassword();
+ }
+
+ public URL getBusControllerSubscriptionUrl() throws MalformedURLException {
+ return new URL(this.getBusControllerSubscriptionEndpoint());
+ }
+
+ @Getter
+ @EqualsAndHashCode
+ private class StreamsSubscribes {
+ @GSONRequired
+ @SerializedName("dmaap_subscriber")
+ DmaapSubscriber dmaapSubscriber;
+ }
+
+ @Getter
+ @EqualsAndHashCode
+ class DmaapSubscriber {
+ @GSONRequired
+ @SerializedName("dmaap_info")
+ DmaapInfo dmaapInfo;
+ }
+
+ @Getter
+ @EqualsAndHashCode
+ class DmaapInfo {
+ @GSONRequired
+ private String location;
+ private String username;
+ private String password;
+
+ @SerializedName("delivery_url")
+ private String deliveryUrl;
+
+ @SerializedName("subscriber_id")
+ private String subscriberId;
+ }
+}
+
+
- BusControllerConfig busControllerConfig;
-} \ No newline at end of file
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java
index 04f3431..25519a0 100644
--- a/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java
+++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java
@@ -76,6 +76,8 @@ public class RequestSender {
} catch (Exception e) {
if (retryLimitReached(i)) {
+ logger.unwrap()
+ .error("Execution error: "+connection.getResponseMessage(), e);
throw new Exception(SERVER_ERROR_MESSAGE + ": " + connection.getResponseMessage(), e);
}
}