Merge "removing Conor Ward as committer from INFO.yaml per his resignation as committ...
authorFiachra Corcoran <fiachra.corcoran@est.tech>
Fri, 11 Oct 2019 08:56:49 +0000 (08:56 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 11 Oct 2019 08:56:49 +0000 (08:56 +0000)
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/GroupServlet.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/ProxyServlet.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/StatisticsServlet.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/BaseLogRecord.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/ExpiryRecord.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Feed.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/DRProvCadiFilter.java
docs/release-notes.rst

index 7a7167d..f8b5934 100755 (executable)
@@ -130,7 +130,6 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider {
     private static final int DEFAULT_MAX_SUBS = 100000;
     private static final int DEFAULT_POKETIMER1 = 5;
     private static final int DEFAULT_POKETIMER2 = 30;
-    private static final String DEFAULT_DOMAIN = "onap";
     private static final String DEFAULT_PROVSRVR_NAME = "dmaap-dr-prov";
 
     //Common Errors
@@ -228,11 +227,6 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider {
      */
     static int activeSubs = 0;
 
-    /**
-     * The domain used to generate a FQDN from the "bare" node names.
-     */
-    private static String provDomain = "web.att.com";
-
     /**
      * The standard FQDN of the provisioning server in this Data Router ecosystem.
      */
@@ -539,7 +533,6 @@ public class BaseServlet extends HttpServlet implements ProvDataProvider {
         pokeTimer2 = getInt(map, Parameters.PROV_POKETIMER2, DEFAULT_POKETIMER2);
 
         // The domain used to generate a FQDN from the "bare" node names
-        provDomain = getString(map, Parameters.PROV_DOMAIN, DEFAULT_DOMAIN);
         provName = getString(map, Parameters.PROV_NAME, DEFAULT_PROVSRVR_NAME);
         activeProvName = getString(map, Parameters.PROV_ACTIVE_NAME, provName);
         initialActivePod = getString(map, Parameters.ACTIVE_POD, "");
index c3cf887..73f859a 100644 (file)
@@ -257,7 +257,7 @@ public class GroupServlet extends ProxyServlet {
         // check content type is SUB_CONTENT_TYPE, version 1.0
         ContentHeader ch = getContentHeader(req);
         String ver = ch.getAttribute("version");
-        if (!ch.getType().equals(GROUP_BASECONTENT_TYPE) || !(ver.equals("1.0") || ver.equals("2.0"))) {
+        if (!ch.getType().equals(GROUP_BASECONTENT_TYPE) || !("1.0".equals(ver) || "2.0".equals(ver))) {
             intlogger.debug("Content-type is: " + req.getHeader("Content-Type"));
             message = "Incorrect content-type";
             elr.setMessage(message);
index 9a8037a..c9075b0 100755 (executable)
@@ -81,10 +81,8 @@ public class ProxyServlet extends BaseServlet {
         try {
             // Set up keystore
             Properties props = (new DB()).getProperties();
-            String store = props.getProperty(Main.KEYSTORE_PATH_PROPERTY);
-            String pass = props.getProperty(Main.KEYSTORE_PASS_PROPERTY);
-            store = props.getProperty(Main.TRUSTSTORE_PATH_PROPERTY);
-            pass = props.getProperty(Main.TRUSTSTORE_PASS_PROPERTY);
+            String store = props.getProperty(Main.TRUSTSTORE_PATH_PROPERTY);
+            String pass = props.getProperty(Main.TRUSTSTORE_PASS_PROPERTY);
             if (store == null || store.length() == 0) {
                 store = Main.DEFAULT_TRUSTSTORE;
                 pass = "changeit";
index aba230b..9f113ef 100755 (executable)
@@ -300,14 +300,11 @@ public class StatisticsServlet extends BaseServlet {
     private String queryGeneretor(Map<String, String> map) throws ParseException {\r
 \r
         String sql;\r
-        String eventType = null;\r
         String feedids = null;\r
         String startTime = null;\r
         String endTime = null;\r
         String subid = " ";\r
-        if (map.get(EVENT_TYPE) != null) {\r
-            eventType =  map.get(EVENT_TYPE);\r
-        }\r
+\r
         if (map.get(FEEDIDS) != null) {\r
             feedids = map.get(FEEDIDS);\r
         }\r
@@ -317,9 +314,6 @@ public class StatisticsServlet extends BaseServlet {
         if (map.get(END_TIME) != null) {\r
             endTime =  map.get(END_TIME);\r
         }\r
-        if ("all".equalsIgnoreCase(eventType)) {\r
-            eventType = "PUB','DEL, EXP, PBF";\r
-        }\r
         if (map.get(SUBID) != null) {\r
             subid = map.get(SUBID);\r
         }\r
index 8cb4c15..2d3aacf 100644 (file)
@@ -58,12 +58,12 @@ public class BaseLogRecord implements LOGJSONable, Loadable {
         this.eventTime     = dt.getTime();\r
         this.publishId     = pp[2];\r
         this.feedid        = Integer.parseInt(pp[3]);\r
-        if (pp[1].equals("DLX")) {\r
+        if ("DLX".equals(pp[1])) {\r
             this.requestUri    = "";\r
             this.method        = "GET";    // Note: we need a valid value in this field, even though unused\r
             this.contentType   = "";\r
             this.contentLength = Long.parseLong(pp[5]);\r
-        } else  if (pp[1].equals("PUB") || pp[1].equals("LOG") || pp[1].equals("PBF")) {\r
+        } else  if ("PUB".equals(pp[1]) || "LOG".equals(pp[1]) || "PBF".equals(pp[1])) {\r
             this.requestUri    = pp[4];\r
             this.method        = pp[5];\r
             this.contentType   = pp[6];\r
index 4c7fffa..2b4e5a3 100644 (file)
@@ -64,7 +64,7 @@ public class ExpiryRecord extends BaseLogRecord {
         this.fileid = thisFileid;\r
         this.deliveryAttempts = Integer.parseInt(pp[10]);\r
         this.reason = pp[9];\r
-        if (!reason.equals("notRetryable") && !reason.equals("retriesExhausted") && !reason.equals("diskFull")) {\r
+        if (!"notRetryable".equals(reason) && !"retriesExhausted".equals(reason) && !"diskFull".equals(reason)) {\r
             this.reason = "other";\r
         }\r
     }\r
index d38681f..3dccc02 100644 (file)
@@ -150,7 +150,7 @@ public class Feed extends Syncable {
             this.groupid = jo.optInt("groupid");\r
             this.name = jo.getString("name");\r
             this.aafInstance = jo.optString("aaf_instance", "legacy");\r
-            if (!(aafInstance.equalsIgnoreCase("legacy")) && aafInstance.length() > 255) {\r
+            if (!("legacy".equalsIgnoreCase(aafInstance)) && aafInstance.length() > 255) {\r
                 throw new InvalidObjectException("aaf_instance field is too long");\r
             }\r
             if (name.length() > 255) {\r
index 8b3d4eb..526bfd5 100644 (file)
@@ -66,9 +66,9 @@ public class DRProvCadiFilter extends CadiFilter {
                 || pathUrl.contains("group"))) {
 
             String method = httpRequest.getMethod().toUpperCase();
-            if (!(method.equals("POST"))) {
+            if (!("POST".equals(method))) {
                 // if request method is PUT method (publish or Feed update) Needs to check for DELETE
-                if (method.equals("PUT") || method.equals("DELETE")) {
+                if ("PUT".equals(method) || "DELETE".equals(method)) {
                     if ((pathUrl.contains("subs"))) { //edit subscriber
                         int subId = BaseServlet.getIdFromPath(httpRequest);
                         if (subId <= 0) {
@@ -209,7 +209,7 @@ public class DRProvCadiFilter extends CadiFilter {
         try {
             Feed feed = Feed.getFeedById(feedId);
             if (feed != null) {
-                if (!((feed.getAafInstance().equalsIgnoreCase("legacy")) || feed.getAafInstance() == null
+                if (!(("legacy".equalsIgnoreCase(feed.getAafInstance())) || feed.getAafInstance() == null
                               || feed.getAafInstance().equals(""))) { //also apply null check and empty check too
                     aafInstance = feed.getAafInstance();
                     String message = "DRProvCadiFilter.isAAFFeed: aafInstance-:" + aafInstance + "; feedId:- " + feedId;
@@ -241,9 +241,9 @@ public class DRProvCadiFilter extends CadiFilter {
         try {
             Subscription subscriber = Subscription.getSubscriptionById(subId);
             if (subscriber != null) {
-                if (!((subscriber.getAafInstance().equalsIgnoreCase("legacy"))
+                if (!(("legacy".equalsIgnoreCase(subscriber.getAafInstance()))
                               || subscriber.getAafInstance() == null
-                              || subscriber.getAafInstance().equals(""))) { //also apply null check and empty check too
+                              || "".equals(subscriber.getAafInstance()))) { //also apply null check and empty check too
                     aafInstance = subscriber.getAafInstance();
                     String message = "DRProvCadiFilter.isAAFSubscriber: aafInstance-:" + aafInstance + "; subId:- "
                                              + subId;
index 88bd296..ba6df5d 100644 (file)
@@ -7,13 +7,50 @@
 Release-notes
 ==============
 
+Version: 2.1.2 (El Alto)
+---------------------------
+
+:Release Date: 2019-09-05
+
+The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and subscriptions.
+
+New Features:
+
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+| JIRA ID        | Description                                                                                                                     |
++================+=================================================================================================================================+
+| DMAAP-1227     | Updating logging functionality to log events into correct log files as specified in logging spec                                |                                                                        |
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+| DMAAP-1228     | Updating Logging pattern to match logging spec                                                                                  |
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+| DMAAP-1049     | [DR] Update DR logging to match Platform maturity Logging Spec                                                                  |
++----------------+---------------------------------------------------------------------------------------------------------------------------------+
+
+Bug Fixes:
+N/A
+
+Known Issues:
+N/A
+
+Security Issues:
+N/A
+
+Upgrade Notes:
+N/A
+
+Deprecation Notes:
+N/A
+
+Other:
+N/A
+
+
 Version: 2.1.0 (Dublin)
 ---------------------------
 
 :Release Date: 2019-06-06
 
-The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and
-subscriptions.
+The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and subscriptions.
 
 New Features:
 
@@ -43,10 +80,10 @@ Bug Fixes:
 | DMAAP-1161     | [DR] filebeat container on DR-Node and DR-Prov are unable to publish to kibana                   |
 +----------------+--------------------------------------------------------------------------------------------------+
 
-Known Issues
+Known Issues:
 N/A
 
-Security Issues
+Security Issues:
 
 *Fixed Security Issues*
 
@@ -64,13 +101,13 @@ Critical security vulnerabilities and their risk assessment have been documented
 - `Passing Badge information for DMAAP DataRouter <https://bestpractices.coreinfrastructure.org/en/projects/2192>`_
 - `Project Vulnerability Review Table for DMAAP <https://wiki.onap.org/pages/viewpage.action?pageId=42598688>`_
 
-Upgrade Notes
+Upgrade Notes:
 N/A
 
-Deprecation Notes
+Deprecation Notes:
 N/A
 
-Other
+Other:
 N/A
 
 
@@ -79,8 +116,7 @@ Version: 1.0.8 (Casablanca)
 
 :Release Date: 2019-02-28
 
-The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and
-subscriptions.
+The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and subscriptions.
 
 New Features:
 
@@ -97,10 +133,10 @@ Bug Fixes:
 | DMAAP-1065     | [DR] Casablanca - AAF certs expired on dmaap-dr-prov and dmaap-dr-node                           |
 +----------------+--------------------------------------------------------------------------------------------------+
 
-Known Issues
+Known Issues:
 N/A
 
-Security Issues
+Security Issues:
 DMAAP code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been
 addressed, items that remain open have been assessed for risk and determined to be false positive. The DMAAP open
 Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=42598688>`_.
@@ -109,13 +145,13 @@ Critical security vulnerabilities and their risk assessment have been documented
 - `Passing Badge information for DMAAP DataRouter <https://bestpractices.coreinfrastructure.org/en/projects/2192>`_
 - `Project Vulnerability Review Table for DMAAP <https://wiki.onap.org/pages/viewpage.action?pageId=42598688>`_
 
-Upgrade Notes
+Upgrade Notes:
 N/A
 
-Deprecation Notes
+Deprecation Notes:
 N/A
 
-Other
+Other:
 N/A
 
 
@@ -124,8 +160,7 @@ Version: 1.0.3 (Casablanca)
 
 :Release Date: 2018-11-30
 
-The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and
-subscriptions.
+The DataRouter(DR) provisioning API is a HTTPS-based, REST-like API for creating and managing DR feeds and subscriptions.
 
 New Features:
 
@@ -151,10 +186,10 @@ Bug Fixes:
 | DMAAP-565      | Incorrect nexusUrl parameter in datarouter pom files                                                                            |
 +----------------+---------------------------------------------------------------------------------------------------------------------------------+
 
-Known Issues
+Known Issues:
 N/A
 
-Security Issues
+Security Issues:
 DMAAP code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been
 addressed, items that remain open have been assessed for risk and determined to be false positive. The DMAAP open
 Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=42598688>`_.
@@ -163,11 +198,11 @@ Critical security vulnerabilities and their risk assessment have been documented
 - `Passing Badge information for DMAAP DataRouter <https://bestpractices.coreinfrastructure.org/en/projects/2192>`_
 - `Project Vulnerability Review Table for DMAAP <https://wiki.onap.org/pages/viewpage.action?pageId=42598688>`_
 
-Upgrade Notes
+Upgrade Notes:
 N/A
 
-Deprecation Notes
+Deprecation Notes:
 N/A
 
-Other
-N/A
+Other:
+N/A
\ No newline at end of file