diff options
3 files changed, 12 insertions, 7 deletions
diff --git a/aai-service/features/src/main/resources/features.xml b/aai-service/features/src/main/resources/features.xml index bd3d0bc1..4baca838 100644 --- a/aai-service/features/src/main/resources/features.xml +++ b/aai-service/features/src/main/resources/features.xml @@ -19,16 +19,16 @@ --> -<features name="ccsdk-aai-service-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" +<features name="sdnc-aai-service-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0"> <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository> - <feature name='ccsdk-aai-service' description="ccsdk-aai-service" version='${project.version}'> + <feature name='sdnc-aai-service' description="sdnc-aai-service" version='${project.version}'> <!-- Most applications will have a dependency on the ODL MD-SAL Broker --> <feature version="${odl.mdsal.version}">odl-mdsal-broker</feature> - <feature>ccsdk-sli</feature> + <feature>sdnc-sli</feature> <bundle>mvn:org.onap.ccsdk.sli.adaptors/aai-service-provider/${project.version}</bundle> <bundle>mvn:com.sun.jersey/jersey-client/${jersey.client.version}</bundle> <bundle>mvn:com.sun.jersey/jersey-core/${jersey.version}</bundle> diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java index 46e03df3..3090e498 100644 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIService.java @@ -109,6 +109,7 @@ import org.onap.ccsdk.sli.adaptors.aai.data.notify.NotifyEvent; import org.onap.ccsdk.sli.adaptors.aai.data.v1507.VServer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.MDC; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.AnnotationIntrospector; @@ -673,9 +674,13 @@ public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicRe // protected static AtomicLong tracker = new AtomicLong(); public static String getNextTransactionId() { -// long id = tracker.getAndIncrement(); -// String transactionId = String.format("N%016X", id); - String transactionId = UUID.randomUUID().toString(); + // Check if RequestId exists as MDC. If not, create new. + String transactionId = MDC.get("RequestId"); + if ("".equals(transactionId) || transactionId == null) { + transactionId = UUID.randomUUID().toString(); + LOG.info("Missing requestID. Assigned " + transactionId); + MDC.put("RequestId", transactionId); + } return transactionId; } diff --git a/aai-service/provider/src/test/resources/aaiclient.properties b/aai-service/provider/src/test/resources/aaiclient.properties index 732a96d0..bf0ab4e1 100644 --- a/aai-service/provider/src/test/resources/aaiclient.properties +++ b/aai-service/provider/src/test/resources/aaiclient.properties @@ -35,7 +35,7 @@ org.onap.ccsdk.sli.adaptors.aai.host.certificate.ignore=true org.onap.ccsdk.sli.adaptors.aai.client.name=SDNC org.onap.ccsdk.sli.adaptors.aai.client.psswd=SDNC -org.onap.ccsdk.sli.adaptors.aai.application=openECOMP +org.onap.ccsdk.sli.adaptors.aai.application=CCSDK # # Configuration file for A&AI Client |