From cf8e9ac4d54b9deb7a8411fa2a3035fb706769d8 Mon Sep 17 00:00:00 2001 From: pwielebs Date: Fri, 14 Sep 2018 16:43:00 +0200 Subject: Bug fix 'sourceName' -> 'correlationId' In case of PNF_REGISTRATION event components like SO and Dmaap are expecting to get 'correlationId' parameter rather than 'sourceName'. This change simply maps 'sourceName' to 'correlationId' Change-Id: Ic99ffc6cd61a76f1a8c46c50da7c16660b1b7acf Issue-ID: DCAEGEN2-744 Signed-off-by: pwielebs --- .../onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'prh-app-server/src/main/java/org') diff --git a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java index 4e34f6e6..1d121b38 100644 --- a/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java +++ b/prh-app-server/src/main/java/org/onap/dcaegen2/services/prh/service/DmaapConsumerJsonParser.java @@ -43,6 +43,7 @@ public class DmaapConsumerJsonParser { private static final String OAM_IPV_4_ADDRESS = "oamV4IpAddress"; private static final String OAM_IPV_6_ADDRESS = "oamV6IpAddress"; private static final String SOURCE_NAME = "sourceName"; + private static final String CORRELATION_ID = "correlationId"; /** * Extract info from string and create @see {@link org.onap.dcaegen2.services.prh.model.ConsumerDmaapModel}. @@ -99,7 +100,7 @@ public class DmaapConsumerJsonParser { ? Mono.error(new DmaapNotFoundException("Incorrect json, consumerDmaapModel can not be created: " + printMessage(pnfSourceName, pnfOamIpv4Address, pnfOamIpv6Address))) : Mono.just(ImmutableConsumerDmaapModel.builder() - .sourceName(pnfSourceName) + .correlationId(pnfSourceName) .ipv4(pnfOamIpv4Address) .ipv6(pnfOamIpv6Address).build()); } @@ -118,7 +119,7 @@ public class DmaapConsumerJsonParser { private String printMessage(String sourceName, String oamIpv4Address, String oamIpv6Address) { return String.format("%n{" - + "\"" + SOURCE_NAME + "\": \"%s\"," + + "\"" + CORRELATION_ID + "\": \"%s\"," + "\"" + OAM_IPV_4_ADDRESS + "\": \"%s\"," + "\"" + OAM_IPV_6_ADDRESS + "\": \"%s\"" + "%n}", sourceName, oamIpv4Address, oamIpv6Address); -- cgit 1.2.3-korg