aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api-active-standby-management/pom.xml2
-rw-r--r--api-server-pool-state-control/pom.xml2
-rw-r--r--api-state-management/pom.xml2
-rw-r--r--feature-active-standby-management/pom.xml2
-rw-r--r--feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/AllSeemsWellTest.java6
-rw-r--r--feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/DroolsPdpObjectTest.java12
-rw-r--r--feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/StandbyStateManagementTest.java64
-rwxr-xr-xfeature-controller-logging/pom.xml2
-rw-r--r--feature-distributed-locking/pom.xml2
-rw-r--r--feature-drools-init/pom.xml2
-rw-r--r--feature-eelf/pom.xml2
-rw-r--r--feature-eelf/src/main/feature/config/logback-eelf.xml9
-rw-r--r--feature-healthcheck/pom.xml2
-rw-r--r--feature-lifecycle/pom.xml2
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java7
-rwxr-xr-xfeature-mdc-filters/pom.xml2
-rw-r--r--feature-pooling-dmaap/pom.xml2
-rw-r--r--feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/state/ProcessingStateTest.java3
-rw-r--r--feature-server-pool/pom.xml2
-rw-r--r--feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/Server.java1
-rw-r--r--feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/TargetLock.java8
-rw-r--r--feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/persistence/Persistence.java8
-rw-r--r--feature-session-persistence/pom.xml2
-rw-r--r--feature-simulators/pom.xml2
-rw-r--r--feature-state-management/pom.xml2
-rw-r--r--feature-test-transaction/pom.xml2
-rw-r--r--packages/base/pom.xml2
-rw-r--r--packages/docker/pom.xml2
-rw-r--r--packages/install/pom.xml2
-rw-r--r--packages/pom.xml2
-rw-r--r--policy-core/pom.xml2
-rw-r--r--policy-domains/pom.xml2
-rw-r--r--policy-management/pom.xml2
-rw-r--r--policy-management/src/main/server/config/logback.xml9
-rw-r--r--policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java6
-rw-r--r--policy-utils/pom.xml2
-rw-r--r--policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransaction.java42
-rw-r--r--policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionConstants.java23
-rw-r--r--policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionImpl.java69
-rw-r--r--pom.xml8
-rw-r--r--version.properties4
41 files changed, 231 insertions, 98 deletions
diff --git a/api-active-standby-management/pom.xml b/api-active-standby-management/pom.xml
index aa5daa9c..ff706fcf 100644
--- a/api-active-standby-management/pom.xml
+++ b/api-active-standby-management/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>api-active-standby-management</artifactId>
diff --git a/api-server-pool-state-control/pom.xml b/api-server-pool-state-control/pom.xml
index 3c0a9222..a26e8025 100644
--- a/api-server-pool-state-control/pom.xml
+++ b/api-server-pool-state-control/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>api-server-pool-state-control</artifactId>
diff --git a/api-state-management/pom.xml b/api-state-management/pom.xml
index 4e551058..e41e0d7c 100644
--- a/api-state-management/pom.xml
+++ b/api-state-management/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>api-state-management</artifactId>
diff --git a/feature-active-standby-management/pom.xml b/feature-active-standby-management/pom.xml
index f84f77b0..96bb3c0c 100644
--- a/feature-active-standby-management/pom.xml
+++ b/feature-active-standby-management/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-active-standby-management</artifactId>
diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/AllSeemsWellTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/AllSeemsWellTest.java
index 2616ac34..9457ce18 100644
--- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/AllSeemsWellTest.java
+++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/AllSeemsWellTest.java
@@ -20,6 +20,7 @@
package org.onap.policy.drools.activestandby;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -337,8 +338,7 @@ public class AllSeemsWellTest {
logger.debug("testAllSeemsWell: After isStalled=true, PDP= {} "
+ "has standbyStatus= {}", thisPdpId, smf.getStandbyStatus(thisPdpId));
-
- assertTrue(smf.getStandbyStatus().equals(StateManagement.COLD_STANDBY));
+ assertEquals(StateManagement.COLD_STANDBY, smf.getStandbyStatus());
//Now lets resume the election handler
DroolsPdpsElectionHandler.setIsStalled(false);
@@ -349,7 +349,7 @@ public class AllSeemsWellTest {
logger.debug("testAllSeemsWell: After isStalled=false, PDP= {} "
+ "has standbyStatus= {}", thisPdpId, smf.getStandbyStatus(thisPdpId));
- assertTrue(smf.getStandbyStatus().equals(StateManagement.PROVIDING_SERVICE));
+ assertEquals(StateManagement.PROVIDING_SERVICE, smf.getStandbyStatus());
//resumedElectionHandlerSleepTime = 5000;
logger.debug("\n\ntestAllSeemsWell: Exiting\n\n");
diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/DroolsPdpObjectTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/DroolsPdpObjectTest.java
index 52000fd5..3f4a31b2 100644
--- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/DroolsPdpObjectTest.java
+++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/DroolsPdpObjectTest.java
@@ -22,7 +22,7 @@ package org.onap.policy.drools.activestandby;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotEquals;
import java.util.Date;
import lombok.Getter;
@@ -50,19 +50,19 @@ public class DroolsPdpObjectTest {
@Test
public void testEqualsObject() {
// self
- assertTrue(pdp.equals(pdp));
+ assertEquals(pdp,pdp);
// same id
MyPdp pdp2 = new MyPdp();
pdp2.setPdpId(PDP_ID);
- assertTrue(pdp.equals(pdp2));
+ assertEquals(pdp,pdp2);
// different id
pdp2.setPdpId(PDP_ID2);
- assertFalse(pdp.equals(pdp2));
+ assertNotEquals(pdp,pdp2);
// different type of object
- assertFalse(pdp.equals(""));
+ assertNotEquals(pdp,"");
}
@Test
@@ -74,7 +74,7 @@ public class DroolsPdpObjectTest {
assertEquals(hc, makePdp(PDP_ID, SITE, PRIORITY).hashCode());
// different data should yield different hash code
- assertTrue(makePdp(PDP_ID2, SITE, PRIORITY).hashCode() != hc);
+ assertNotEquals(hc, makePdp(PDP_ID2, SITE, PRIORITY).hashCode());
// these fields have no impact on hash code
assertEquals(hc, makePdp(PDP_ID, SITE, PRIORITY2).hashCode());
diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/StandbyStateManagementTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/StandbyStateManagementTest.java
index f51d620f..866ad5ef 100644
--- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/StandbyStateManagementTest.java
+++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/StandbyStateManagementTest.java
@@ -20,8 +20,10 @@
package org.onap.policy.drools.activestandby;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -261,55 +263,55 @@ public class StandbyStateManagementTest {
//At this point the standbystatus = 'null'
sm.lock();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(StateManagement.NULL_VALUE));
+ assertEquals(StateManagement.NULL_VALUE, pmNotifier.getPreviousStandbyStatus());
sm.unlock();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(StateManagement.NULL_VALUE));
+ assertEquals(StateManagement.NULL_VALUE, pmNotifier.getPreviousStandbyStatus());
//Adding standbystatus=hotstandby
sm.demote();
System.out.println(pmNotifier.getPreviousStandbyStatus());
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ assertEquals(PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY,
+ pmNotifier.getPreviousStandbyStatus());
//Now making standbystatus=coldstandby
sm.lock();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ assertEquals(PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY,
+ pmNotifier.getPreviousStandbyStatus());
//standbystatus = hotstandby
sm.unlock();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ assertEquals(PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY,
+ pmNotifier.getPreviousStandbyStatus());
//standbystatus = providingservice
sm.promote();
//The previousStandbyStatus is not updated until after the delay activation expires
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ assertEquals(PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY,
+ pmNotifier.getPreviousStandbyStatus());
//Sleep long enough for the delayActivationTimer to run
sleep(5000);
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(StateManagement.PROVIDING_SERVICE));
+ assertEquals(StateManagement.PROVIDING_SERVICE, pmNotifier.getPreviousStandbyStatus());
//standbystatus = providingservice
sm.promote();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(StateManagement.PROVIDING_SERVICE));
+ assertEquals(StateManagement.PROVIDING_SERVICE, pmNotifier.getPreviousStandbyStatus());
//standbystatus = coldstandby
sm.lock();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ assertEquals(PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY,
+ pmNotifier.getPreviousStandbyStatus());
//standbystatus = hotstandby
sm.unlock();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ assertEquals(PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY,
+ pmNotifier.getPreviousStandbyStatus());
//standbystatus = hotstandby
sm.demote();
- assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ assertEquals(PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY,
+ pmNotifier.getPreviousStandbyStatus());
}
/**
@@ -359,7 +361,7 @@ public class StandbyStateManagementTest {
logger.debug("\n\ntestSanitizeDesignatedList: listOfDesignated.size = {}\n\n",listOfDesignated.size());
- assertTrue(listOfDesignated.size() == 4);
+ assertEquals(4, listOfDesignated.size());
// Now make 2 designated
@@ -371,7 +373,7 @@ public class StandbyStateManagementTest {
logger.debug("\n\ntestSanitizeDesignatedList: listOfDesignated.size after 2 designated = {}\n\n",
listOfDesignated.size());
- assertTrue(listOfDesignated.size() == 2);
+ assertEquals(2, listOfDesignated.size());
assertTrue(listOfDesignated.contains(pdp1));
assertTrue(listOfDesignated.contains(pdp2));
@@ -388,7 +390,7 @@ public class StandbyStateManagementTest {
logger.debug("\n\ntestSanitizeDesignatedList: listOfDesignated.size after all designated = {}\n\n",
listOfDesignated.size());
- assertTrue(listOfDesignated.size() == 4);
+ assertEquals(4, listOfDesignated.size());
}
@@ -465,7 +467,7 @@ public class StandbyStateManagementTest {
// the one which has the most recent designated date.
- assertTrue(mostRecentPrimary.getPdpId().equals("pdp4"));
+ assertEquals("pdp4", mostRecentPrimary.getPdpId());
// Now let's designate all of those on the listOfDesignated. It will choose the first one designated
@@ -487,7 +489,7 @@ public class StandbyStateManagementTest {
// the one which was designated first
- assertTrue(mostRecentPrimary.getPdpId().equals("pdp2"));
+ assertEquals("pdp2", mostRecentPrimary.getPdpId());
// Now we will designate only 2 and put just them in the listOfDesignated. The algorithm will now
@@ -505,7 +507,7 @@ public class StandbyStateManagementTest {
logger.debug("\n\ntestComputeMostRecentPrimary: mostRecentPrimary.getPdpId() = {}\n\n",
mostRecentPrimary.getPdpId());
- assertTrue(mostRecentPrimary.getPdpId().equals("pdp4"));
+ assertEquals("pdp4", mostRecentPrimary.getPdpId());
@@ -521,7 +523,7 @@ public class StandbyStateManagementTest {
logger.debug("\n\ntestComputeMostRecentPrimary: 2 on list mostRecentPrimary.getPdpId() = {}\n\n",
mostRecentPrimary.getPdpId());
- assertTrue(mostRecentPrimary.getPdpId().equals("pdp4"));
+ assertEquals("pdp4", mostRecentPrimary.getPdpId());
// If we have only one pdp on in the listOfDesignated,
@@ -536,7 +538,7 @@ public class StandbyStateManagementTest {
logger.debug("\n\ntestComputeMostRecentPrimary: 1 on list mostRecentPrimary.getPdpId() = {}\n\n",
mostRecentPrimary.getPdpId());
- assertTrue(mostRecentPrimary.getPdpId().equals("pdp4"));
+ assertEquals("pdp4", mostRecentPrimary.getPdpId());
// Finally, if none are on the listOfDesignated, it will again choose the most recently designated pdp.
@@ -549,7 +551,7 @@ public class StandbyStateManagementTest {
logger.debug("\n\ntestComputeMostRecentPrimary: 0 on list mostRecentPrimary.getPdpId() = {}\n\n",
mostRecentPrimary.getPdpId());
- assertTrue(mostRecentPrimary.getPdpId().equals("pdp4"));
+ assertEquals("pdp4", mostRecentPrimary.getPdpId());
}
@@ -624,7 +626,7 @@ public class StandbyStateManagementTest {
// The designatedPdp should be null
- assertTrue(designatedPdp == null);
+ assertNull(designatedPdp);
// Now let's try having only one pdp in listOfDesignated, but not in the same site as the most recent primary
@@ -637,7 +639,7 @@ public class StandbyStateManagementTest {
// Now the designatedPdp should be the one and only selection in the listOfDesignated
- assertTrue(designatedPdp.getPdpId().equals(pdp2.getPdpId()));
+ assertEquals(designatedPdp.getPdpId(), pdp2.getPdpId());
// Now let's put 2 pdps in the listOfDesignated, neither in the same site as the mostRecentPrimary
@@ -651,7 +653,7 @@ public class StandbyStateManagementTest {
// The designatedPdp should now be the one with the lowest lexiographic score - pdp1
- assertTrue(designatedPdp.getPdpId().equals(pdp1.getPdpId()));
+ assertEquals(designatedPdp.getPdpId(), pdp1.getPdpId());
// Finally, we will have 2 pdps in the listOfDesignated, one in the same site with the mostRecentPrimary
@@ -666,7 +668,7 @@ public class StandbyStateManagementTest {
// The designatedPdp should now be the one on the same site as the mostRecentPrimary
- assertTrue(designatedPdp.getPdpId().equals(pdp3.getPdpId()));
+ assertEquals(designatedPdp.getPdpId(), pdp3.getPdpId());
}
/**
diff --git a/feature-controller-logging/pom.xml b/feature-controller-logging/pom.xml
index 89145e38..7f31c37d 100755
--- a/feature-controller-logging/pom.xml
+++ b/feature-controller-logging/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-controller-logging</artifactId>
diff --git a/feature-distributed-locking/pom.xml b/feature-distributed-locking/pom.xml
index 986aeaa0..f657c39e 100644
--- a/feature-distributed-locking/pom.xml
+++ b/feature-distributed-locking/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-distributed-locking</artifactId>
diff --git a/feature-drools-init/pom.xml b/feature-drools-init/pom.xml
index 48d8e739..71affc95 100644
--- a/feature-drools-init/pom.xml
+++ b/feature-drools-init/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-drools-init</artifactId>
diff --git a/feature-eelf/pom.xml b/feature-eelf/pom.xml
index 54dcc086..d736fb83 100644
--- a/feature-eelf/pom.xml
+++ b/feature-eelf/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-eelf</artifactId>
diff --git a/feature-eelf/src/main/feature/config/logback-eelf.xml b/feature-eelf/src/main/feature/config/logback-eelf.xml
index 8a7dcb25..7acd33fa 100644
--- a/feature-eelf/src/main/feature/config/logback-eelf.xml
+++ b/feature-eelf/src/main/feature/config/logback-eelf.xml
@@ -2,7 +2,7 @@
============LICENSE_START=======================================================
feature-eelf
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 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.
@@ -27,14 +27,13 @@
<property name="networkLogName" value="network" />
<property name="defaultPattern"
- value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity:-NA}|%X{TargetServiceName:-NA}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%class||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
<property name="defaultMetricPattern"
- value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ value="${defaultPattern}" />
<property name="defaultAuditPattern"
- value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%class|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
<property name="defaultErrorPattern"
value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestID}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDescription}|%msg%replace(%xException){'\n',' - '}%nopex%n" />
-
<property name="networkPattern" value="[%d|%t]%m%n" />
<property name="abstractNetworkPattern"
value="[%d] [%X{networkEventType:-NULL}|%X{networkProtocol:-NULL}|%X{networkTopic:-NULL}|%X{requestID:-NULL}]%n" />
diff --git a/feature-healthcheck/pom.xml b/feature-healthcheck/pom.xml
index 6bcba7d8..2263f716 100644
--- a/feature-healthcheck/pom.xml
+++ b/feature-healthcheck/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-healthcheck</artifactId>
diff --git a/feature-lifecycle/pom.xml b/feature-lifecycle/pom.xml
index 5b192ba0..90b2d2a8 100644
--- a/feature-lifecycle/pom.xml
+++ b/feature-lifecycle/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-lifecycle</artifactId>
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
index d9e21b83..90492098 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java
@@ -45,7 +45,9 @@ import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
+import org.onap.policy.common.endpoints.http.server.YamlJacksonHandler;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
+import org.onap.policy.common.gson.JacksonHandler;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.common.utils.network.NetworkUtil;
@@ -110,7 +112,10 @@ public class RestLifecycleManagerTest {
.build());
HttpServletServer server =
- HttpServletServerFactoryInstance.getServerFactory().build("lifecycle", "localhost", 8765, "/", true, true);
+ HttpServletServerFactoryInstance.getServerFactory().build("lifecycle", "localhost", 8765, "/",
+ true, true);
+ server.setSerializationProvider(
+ String.join(",", JacksonHandler.class.getName(), YamlJacksonHandler.class.getName()));
server.addServletClass("/*", RestLifecycleManager.class.getName());
server.waitedStart(5000L);
diff --git a/feature-mdc-filters/pom.xml b/feature-mdc-filters/pom.xml
index 512adf79..7b2399af 100755
--- a/feature-mdc-filters/pom.xml
+++ b/feature-mdc-filters/pom.xml
@@ -24,7 +24,7 @@
<parent>
<artifactId>drools-pdp</artifactId>
<groupId>org.onap.policy.drools-pdp</groupId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-mdc-filters</artifactId>
diff --git a/feature-pooling-dmaap/pom.xml b/feature-pooling-dmaap/pom.xml
index f9b80178..47db8909 100644
--- a/feature-pooling-dmaap/pom.xml
+++ b/feature-pooling-dmaap/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-pooling-dmaap</artifactId>
diff --git a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/state/ProcessingStateTest.java b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/state/ProcessingStateTest.java
index 14784fc2..3682dcb4 100644
--- a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/state/ProcessingStateTest.java
+++ b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/state/ProcessingStateTest.java
@@ -23,6 +23,7 @@ package org.onap.policy.drools.pooling.state;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
@@ -268,7 +269,7 @@ public class ProcessingStateTest extends SupportBasicStateTester {
String[] arr = captureHostArray();
- assertTrue(arr != HOST_ARR3);
+ assertNotSame(arr, HOST_ARR3);
assertEquals(Arrays.asList(HOST_ARR3), Arrays.asList(arr));
}
diff --git a/feature-server-pool/pom.xml b/feature-server-pool/pom.xml
index ec0df72e..d8b0cc45 100644
--- a/feature-server-pool/pom.xml
+++ b/feature-server-pool/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-server-pool</artifactId>
diff --git a/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/Server.java b/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/Server.java
index 8ee0f2d2..ad0e25ee 100644
--- a/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/Server.java
+++ b/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/Server.java
@@ -72,7 +72,6 @@ import java.util.Properties;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.UUID;
-import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
import java.util.concurrent.LinkedTransferQueue;
diff --git a/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/TargetLock.java b/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/TargetLock.java
index 65804082..dc4c0a79 100644
--- a/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/TargetLock.java
+++ b/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/TargetLock.java
@@ -2576,14 +2576,14 @@ public class TargetLock implements Lock, Serializable {
Bucket bucket = Bucket.getBucket(i);
// client data
- build_clientData(bucket);
+ buildClientData(bucket);
// server data
- build_serverData(bucket);
+ buildServerData(bucket);
}
}
- private void build_clientData(Bucket bucket) {
+ private void buildClientData(Bucket bucket) {
// client data
LocalLocks localLocks =
bucket.getAdjunctDontCreate(LocalLocks.class);
@@ -2603,7 +2603,7 @@ public class TargetLock implements Lock, Serializable {
}
}
- private void build_serverData(Bucket bucket) {
+ private void buildServerData(Bucket bucket) {
// server data
GlobalLocks globalLocks =
bucket.getAdjunctDontCreate(GlobalLocks.class);
diff --git a/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/persistence/Persistence.java b/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/persistence/Persistence.java
index 60e740c5..0f7321de 100644
--- a/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/persistence/Persistence.java
+++ b/feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/persistence/Persistence.java
@@ -667,10 +667,10 @@ public class Persistence implements PolicySessionFeatureApi, ServerPoolApi {
// one entry for each Drools session being restored --
// indicates when the restore is complete (restore runs within
// the Drools session thread)
- List<CountDownLatch> sessionLatches = restoreBucket_droolsSessions();
+ List<CountDownLatch> sessionLatches = restoreBucketDroolsSessions();
// restore lock data
- restoreBucket_locks(bucket);
+ restoreBucketLocks(bucket);
// wait for all of the sessions to update
try {
@@ -686,7 +686,7 @@ public class Persistence implements PolicySessionFeatureApi, ServerPoolApi {
}
}
- private List<CountDownLatch> restoreBucket_droolsSessions() {
+ private List<CountDownLatch> restoreBucketDroolsSessions() {
List<CountDownLatch> sessionLatches = new LinkedList<>();
for (Map.Entry<String, ReceiverSessionBucketData> entry : sessionData.entrySet()) {
String sessionName = entry.getKey();
@@ -769,7 +769,7 @@ public class Persistence implements PolicySessionFeatureApi, ServerPoolApi {
return sessionLatches;
}
- private void restoreBucket_locks(Bucket bucket) {
+ private void restoreBucketLocks(Bucket bucket) {
if (lockData != null) {
Object obj = null;
try {
diff --git a/feature-session-persistence/pom.xml b/feature-session-persistence/pom.xml
index 666658c0..c81e7b13 100644
--- a/feature-session-persistence/pom.xml
+++ b/feature-session-persistence/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-session-persistence</artifactId>
diff --git a/feature-simulators/pom.xml b/feature-simulators/pom.xml
index edbab136..beda57b7 100644
--- a/feature-simulators/pom.xml
+++ b/feature-simulators/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-simulators</artifactId>
diff --git a/feature-state-management/pom.xml b/feature-state-management/pom.xml
index e774c2b3..a61f7818 100644
--- a/feature-state-management/pom.xml
+++ b/feature-state-management/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-state-management</artifactId>
diff --git a/feature-test-transaction/pom.xml b/feature-test-transaction/pom.xml
index 545562e2..353d3421 100644
--- a/feature-test-transaction/pom.xml
+++ b/feature-test-transaction/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>feature-test-transaction</artifactId>
diff --git a/packages/base/pom.xml b/packages/base/pom.xml
index 649bca56..4bc9887d 100644
--- a/packages/base/pom.xml
+++ b/packages/base/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-packages</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>base</artifactId>
diff --git a/packages/docker/pom.xml b/packages/docker/pom.xml
index 19327fde..0b22c9ca 100644
--- a/packages/docker/pom.xml
+++ b/packages/docker/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-packages</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>docker</artifactId>
diff --git a/packages/install/pom.xml b/packages/install/pom.xml
index ab07702c..b1b68503 100644
--- a/packages/install/pom.xml
+++ b/packages/install/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-packages</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>install-drools</artifactId>
diff --git a/packages/pom.xml b/packages/pom.xml
index 94ffb4b9..c99ee1c3 100644
--- a/packages/pom.xml
+++ b/packages/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>drools-packages</artifactId>
<packaging>pom</packaging>
diff --git a/policy-core/pom.xml b/policy-core/pom.xml
index 61417bad..34eeea13 100644
--- a/policy-core/pom.xml
+++ b/policy-core/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/policy-domains/pom.xml b/policy-domains/pom.xml
index 40feaf6e..f09ebb43 100644
--- a/policy-domains/pom.xml
+++ b/policy-domains/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>policy-domains</artifactId>
diff --git a/policy-management/pom.xml b/policy-management/pom.xml
index 7423e6eb..92d8d92b 100644
--- a/policy-management/pom.xml
+++ b/policy-management/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<artifactId>policy-management</artifactId>
diff --git a/policy-management/src/main/server/config/logback.xml b/policy-management/src/main/server/config/logback.xml
index 04ec8937..2d0697d0 100644
--- a/policy-management/src/main/server/config/logback.xml
+++ b/policy-management/src/main/server/config/logback.xml
@@ -2,7 +2,7 @@
============LICENSE_START=======================================================
policy-management
================================================================================
- Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2020 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.
@@ -35,11 +35,10 @@
<property name="networkPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
<property name="abstractNetworkPattern"
value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}] [%X{networkEventType:-NULL}|%X{networkProtocol:-NULL}|%X{networkTopic:-NULL}|%X{requestID:-NULL}]%n" />
-
<property name="metricPattern"
- value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}|%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}||%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
- <property name="transactionPattern" value="${metricPattern}" />
-
+ value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity:-NA}|%X{TargetServiceName:-NA}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%class|%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
+ <property name="transactionPattern"
+ value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%class|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
<appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDir}/${errorLog}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
diff --git a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
index 1afac164..40af2845 100644
--- a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
+++ b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java
@@ -46,7 +46,9 @@ import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
+import org.onap.policy.common.endpoints.http.server.YamlJacksonHandler;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
+import org.onap.policy.common.gson.JacksonHandler;
import org.onap.policy.common.utils.network.NetworkUtil;
import org.onap.policy.drools.persistence.SystemPersistenceConstants;
import org.onap.policy.drools.system.PolicyControllerConstants;
@@ -126,6 +128,10 @@ public class RestManagerTest {
+ PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME
+ PolicyEndPointProperties.PROPERTY_HTTP_AUTH_PASSWORD_SUFFIX,
TELEMETRY_PASSWORD);
+ engineProps.put(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+ + PolicyEngineConstants.TELEMETRY_SERVER_DEFAULT_NAME
+ + PolicyEndPointProperties.PROPERTY_HTTP_SERIALIZATION_PROVIDER,
+ String.join(",", JacksonHandler.class.getName(), YamlJacksonHandler.class.getName()));
/* other properties */
engineProps.put(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS, UEB_TOPIC);
diff --git a/policy-utils/pom.xml b/policy-utils/pom.xml
index 42854f39..6c1fa571 100644
--- a/policy-utils/pom.xml
+++ b/policy-utils/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransaction.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransaction.java
index a2cf07fb..94fc9769 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransaction.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransaction.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* policy-utils
* ================================================================================
- * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2020 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.
@@ -197,6 +197,26 @@ public interface MdcTransaction {
MdcTransaction setRemoteHost(String remoteHost);
/**
+ * sets CustomField1 data.
+ */
+ MdcTransaction setCustomField1(String customField1);
+
+ /**
+ * sets CustomField2 data.
+ */
+ MdcTransaction setCustomField2(String customField2);
+
+ /**
+ * sets CustomField3 data.
+ */
+ MdcTransaction setCustomField3(String customField3);
+
+ /**
+ * sets CustomField4 data.
+ */
+ MdcTransaction setCustomField4(String customField4);
+
+ /**
* get start time.
*/
Instant getStartTime();
@@ -312,6 +332,26 @@ public interface MdcTransaction {
String getServerIpAddress();
/**
+ * get customer field1.
+ */
+ String getCustomField1();
+
+ /**
+ * get customer field2.
+ */
+ String getCustomField2();
+
+ /**
+ * get customer field3 which contains notification info.
+ */
+ String getCustomField3();
+
+ /**
+ * get customer field4.
+ */
+ String getCustomField4();
+
+ /**
* generate timestamp used for logging.
*/
String timestamp(Instant time);
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionConstants.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionConstants.java
index eb37d0c7..936449c8 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionConstants.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionConstants.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* policy-utils
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -144,6 +144,26 @@ public class MdcTransactionConstants {
public static final String TARGET_VIRTUAL_ENTITY = "TargetVirtualEntity";
/**
+ * Custom Field1.
+ */
+ public static final String CUSTOM_FIELD1 = "CustomField1";
+
+ /**
+ * Custom Field2.
+ */
+ public static final String CUSTOM_FIELD2 = "CustomField2";
+
+ /**
+ * Custom Field3.
+ */
+ public static final String CUSTOM_FIELD3 = "CustomField3";
+
+ /**
+ * Custom Field4.
+ */
+ public static final String CUSTOM_FIELD4 = "CustomField4";
+
+ /**
* Default Service Name.
*/
public static final String DEFAULT_SERVICE_NAME = "PDP-D";
@@ -168,7 +188,6 @@ public class MdcTransactionConstants {
*/
public static final String STATUS_CODE_FAILURE = "ERROR";
-
private MdcTransactionConstants() {
// do nothing
}
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionImpl.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionImpl.java
index 4e1690ba..7af6c0cb 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionImpl.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MdcTransactionImpl.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 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.
@@ -22,6 +22,10 @@ package org.onap.policy.drools.utils.logging;
import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.BEGIN_TIMESTAMP;
import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.CLIENT_IP_ADDRESS;
+import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.CUSTOM_FIELD1;
+import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.CUSTOM_FIELD2;
+import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.CUSTOM_FIELD3;
+import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.CUSTOM_FIELD4;
import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.DEFAULT_HOSTIP;
import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.DEFAULT_HOSTNAME;
import static org.onap.policy.drools.utils.logging.MdcTransactionConstants.DEFAULT_SERVICE_NAME;
@@ -100,6 +104,10 @@ class MdcTransactionImpl implements MdcTransaction {
private String targetVirtualEntity;
private String clientIpAddress;
private String remoteHost;
+ private String customField1;
+ private String customField2;
+ private String customField3;
+ private String customField4;
/**
* Transaction with no information set.
@@ -145,8 +153,8 @@ class MdcTransactionImpl implements MdcTransaction {
this.setServerFqdn(MDC.get(SERVER_FQDN));
this.setVirtualServerName(MDC.get(VIRTUAL_SERVER_NAME));
- this.setStartTime(Instant.now());
this.setInvocationId(invocationId);
+ this.setStartTime(Instant.now());
}
/**
@@ -179,6 +187,10 @@ class MdcTransactionImpl implements MdcTransaction {
this.setTargetServiceName(transaction.getTargetServiceName());
this.setTargetVirtualEntity(transaction.getTargetVirtualEntity());
this.setVirtualServerName(transaction.getVirtualServerName());
+ this.setCustomField1(transaction.getCustomField1());
+ this.setCustomField2(transaction.getCustomField2());
+ this.setCustomField3(transaction.getCustomField3());
+ this.setCustomField4(transaction.getCustomField4());
}
/**
@@ -248,6 +260,10 @@ class MdcTransactionImpl implements MdcTransaction {
setMdc(TARGET_VIRTUAL_ENTITY, this.targetVirtualEntity);
setMdc(CLIENT_IP_ADDRESS, this.clientIpAddress);
setMdc(REMOTE_HOST, this.remoteHost);
+ setMdc(CUSTOM_FIELD1, this.customField1);
+ setMdc(CUSTOM_FIELD2, this.customField2);
+ setMdc(CUSTOM_FIELD3, this.customField3);
+ setMdc(CUSTOM_FIELD4, this.customField4);
return this;
}
@@ -352,6 +368,26 @@ class MdcTransactionImpl implements MdcTransaction {
return this.serviceInstanceId;
}
+ @Override
+ public String getCustomField1() {
+ return this.customField1;
+ }
+
+ @Override
+ public String getCustomField2() {
+ return this.customField2;
+ }
+
+ @Override
+ public String getCustomField3() {
+ return this.customField3;
+ }
+
+ @Override
+ public String getCustomField4() {
+ return this.customField4;
+ }
+
/* transaction and subtransaction fields */
@Override
@@ -458,6 +494,30 @@ class MdcTransactionImpl implements MdcTransaction {
}
@Override
+ public MdcTransaction setCustomField1(String customField1) {
+ this.customField1 = customField1;
+ return this;
+ }
+
+ @Override
+ public MdcTransaction setCustomField2(String customField2) {
+ this.customField2 = customField2;
+ return this;
+ }
+
+ @Override
+ public MdcTransaction setCustomField3(String customField3) {
+ this.customField3 = customField3;
+ return this;
+ }
+
+ @Override
+ public MdcTransaction setCustomField4(String customField4) {
+ this.customField4 = customField4;
+ return this;
+ }
+
+ @Override
public String getInvocationId() {
return invocationId;
}
@@ -641,8 +701,11 @@ class MdcTransactionImpl implements MdcTransaction {
sb.append(", targetVirtualEntity='").append(targetVirtualEntity).append('\'');
sb.append(", clientIpAddress='").append(clientIpAddress).append('\'');
sb.append(", remoteHost='").append(remoteHost).append('\'');
+ sb.append(", customField1='").append(customField1).append('\'');
+ sb.append(", customField2='").append(customField2).append('\'');
+ sb.append(", customField3='").append(customField3).append('\'');
+ sb.append(", customField4='").append(customField4).append('\'');
sb.append('}');
return sb.toString();
}
-
}
diff --git a/pom.xml b/pom.xml
index 2ce73af4..84795de9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,13 +26,13 @@
<parent>
<groupId>org.onap.policy.parent</groupId>
<artifactId>integration</artifactId>
- <version>3.1.3</version>
+ <version>3.2.0-SNAPSHOT</version>
<relativePath />
</parent>
<groupId>org.onap.policy.drools-pdp</groupId>
<artifactId>drools-pdp</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>policy-drools-pdp</name>
@@ -52,8 +52,8 @@
<hibernate.commons.annotations.version>5.0.1.Final</hibernate.commons.annotations.version>
<commons.io.version>2.5</commons.io.version>
<xml.apis.version>1.4.01</xml.apis.version>
- <policy.common.version>1.6.5</policy.common.version>
- <policy.models.version>2.2.6</policy.models.version>
+ <policy.common.version>1.7.0-SNAPSHOT</policy.common.version>
+ <policy.models.version>2.3.0-SNAPSHOT</policy.models.version>
</properties>
<modules>
diff --git a/version.properties b/version.properties
index 6d9c3d35..e377fcf8 100644
--- a/version.properties
+++ b/version.properties
@@ -3,8 +3,8 @@
# because they are used in Jenkins, whose plug-in doesn't support
major=1
-minor=6
-patch=3
+minor=7
+patch=0
base_version=${major}.${minor}.${patch}