From ee6fa61e2cd7df99891092709765235b6166a041 Mon Sep 17 00:00:00 2001 From: egernug Date: Mon, 4 Feb 2019 14:27:11 +0000 Subject: Replace ATT headers Change-Id: I27b9240e33381b91c40c21a04f7ec6bdb7c16ce0 Issue-ID: DMAAP-997 Signed-off-by: egernug --- README.md | 4 +- datarouter-docker-compose/pom.xml | 2 +- datarouter-node/pom.xml | 2 +- .../onap/dmaap/datarouter/node/DeliveryTask.java | 6 +- .../onap/dmaap/datarouter/node/NodeServlet.java | 26 +- .../dmaap/datarouter/node/NodeServletTest.java | 12 +- datarouter-prov/pom.xml | 2 +- .../datarouter/authz/impl/ProvAuthorizer.java | 4 +- .../dmaap/datarouter/provisioning/BaseServlet.java | 28 +- .../datarouter/provisioning/DRFeedsServlet.java | 2 +- .../dmaap/datarouter/provisioning/FeedServlet.java | 4 +- .../datarouter/provisioning/GroupServlet.java | 2 +- .../datarouter/provisioning/SubscribeServlet.java | 2 +- .../provisioning/SubscriptionServlet.java | 6 +- .../provisioning/beans/EventLogRecord.java | 2 +- .../dmaap/datarouter/provisioning/beans/Feed.java | 2 +- .../dmaap/datarouter/provisioning/beans/Group.java | 2 +- .../provisioning/beans/Subscription.java | 2 +- .../provisioning/IntegrationTestDrFeedsPost.java | 4 +- .../provisioning/DRFeedsServletTest.java | 8 +- .../datarouter/provisioning/FeedServletTest.java | 8 +- .../datarouter/provisioning/GroupServletTest.java | 18 +- .../provisioning/SubscribeServletTest.java | 6 +- .../provisioning/SubscriptionServletTest.java | 28 +- datarouter-prov/src/test/resources/create.sql | 2 +- datarouter-subscriber/pom.xml | 2 +- .../subscriber/SampleSubscriberServlet.java | 4 +- .../subscriber/SampleSubscriberServletTest.java | 4 +- docs/data-router/data-router.rst | 294 ++++++++++----------- pom.xml | 2 +- version.properties | 4 +- 31 files changed, 247 insertions(+), 247 deletions(-) diff --git a/README.md b/README.md index 778a35d3..97b35af8 100644 --- a/README.md +++ b/README.md @@ -117,11 +117,11 @@ Curl Commands to test: create a feed: -curl -v -X POST -H "Content-Type : application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addFeed3.txt --post301 --location-trusted -k https://dmaap-dr-prov:8443 +curl -v -X POST -H "Content-Type : application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addFeed3.txt --post301 --location-trusted -k https://dmaap-dr-prov:8443 Subscribe to feed: -curl -v -X POST -H "Content-Type: application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addSubscriber.txt --post301 --location-trusted -k https://dmaap-dr-prov:8443/subscribe/1 +curl -v -X POST -H "Content-Type: application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addSubscriber.txt --post301 --location-trusted -k https://dmaap-dr-prov:8443/subscribe/1 Publish to feed: diff --git a/datarouter-docker-compose/pom.xml b/datarouter-docker-compose/pom.xml index 05faa5ae..0bcb9db4 100644 --- a/datarouter-docker-compose/pom.xml +++ b/datarouter-docker-compose/pom.xml @@ -26,7 +26,7 @@ org.onap.dmaap.datarouter parent - 1.1.0-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml datarouter-docker-compose diff --git a/datarouter-node/pom.xml b/datarouter-node/pom.xml index 7df19895..133de4a3 100755 --- a/datarouter-node/pom.xml +++ b/datarouter-node/pom.xml @@ -26,7 +26,7 @@ org.onap.dmaap.datarouter parent - 1.1.0-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml datarouter-node diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryTask.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryTask.java index 4d570b55..80729905 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryTask.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/DeliveryTask.java @@ -102,7 +102,7 @@ public class DeliveryTask implements Runnable, Comparable { i = s.indexOf('\t'); String h = s.substring(0, i); String v = s.substring(i + 1); - if ("x-att-dr-routing".equalsIgnoreCase(h)) { + if ("x-dmaap-dr-routing".equalsIgnoreCase(h)) { subid = v.replaceAll("[^ ]*/", ""); feedid = dth.getFeedId(subid.replaceAll(" .*", "")); } @@ -187,7 +187,7 @@ public class DeliveryTask implements Runnable, Comparable { uc.setRequestMethod(method); uc.setRequestProperty("Content-Length", Long.toString(length)); uc.setRequestProperty("Authorization", di.getAuth()); - uc.setRequestProperty("X-ATT-DR-PUBLISH-ID", pubid); + uc.setRequestProperty("X-DMAAP-DR-PUBLISH-ID", pubid); for (String[] nv : hdrs) { uc.addRequestProperty(nv[0], nv[1]); } @@ -244,7 +244,7 @@ public class DeliveryTask implements Runnable, Comparable { InputStream is; if (rc >= 200 && rc <= 299) { is = uc.getInputStream(); - xpubid = uc.getHeaderField("X-ATT-DR-PUBLISH-ID"); + xpubid = uc.getHeaderField("X-DMAAP-DR-PUBLISH-ID"); } else { if (rc >= 300 && rc <= 399) { rmsg = uc.getHeaderField("Location"); diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java index b1ab44fb..7e1d46d3 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java @@ -105,7 +105,7 @@ public class NodeServlet extends HttpServlet { NodeUtils.setRequestIdAndInvocationId(req); eelflogger.info(EelfMsgs.ENTRY); try { - eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader("X-ATT-DR-ON-BEHALF-OF"), + eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader("X-DMAAP-DR-ON-BEHALF-OF"), getIdFromPath(req) + ""); try { if (down(resp)) { @@ -148,7 +148,7 @@ public class NodeServlet extends HttpServlet { NodeUtils.setIpAndFqdnForEelf("doPut"); NodeUtils.setRequestIdAndInvocationId(req); eelflogger.info(EelfMsgs.ENTRY); - eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader("X-ATT-DR-ON-BEHALF-OF"), + eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader("X-DMAAP-DR-ON-BEHALF-OF"), getIdFromPath(req) + ""); try { common(req, resp, true); @@ -168,7 +168,7 @@ public class NodeServlet extends HttpServlet { NodeUtils.setIpAndFqdnForEelf("doDelete"); NodeUtils.setRequestIdAndInvocationId(req); eelflogger.info(EelfMsgs.ENTRY); - eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader("X-ATT-DR-ON-BEHALF-OF"), + eelflogger.info(EelfMsgs.MESSAGE_WITH_BEHALF_AND_FEEDID, req.getHeader("X-DMAAP-DR-ON-BEHALF-OF"), getIdFromPath(req) + ""); try { common(req, resp, false); @@ -235,7 +235,7 @@ public class NodeServlet extends HttpServlet { feedid = fileid.substring(0, i); fileid = fileid.substring(i + 1); pubid = config.getPublishId(); - xpubid = req.getHeader("X-ATT-DR-PUBLISH-ID"); + xpubid = req.getHeader("X-DMAAP-DR-PUBLISH-ID"); targets = config.getTargets(feedid); } else if (fileid.startsWith("/internal/publish/")) { if (!config.isAnotherNode(credentials, ip)) { @@ -245,8 +245,8 @@ public class NodeServlet extends HttpServlet { return; } fileid = fileid.substring(18); - pubid = req.getHeader("X-ATT-DR-PUBLISH-ID"); - targets = config.parseRouting(req.getHeader("X-ATT-DR-ROUTING")); + pubid = req.getHeader("X-DMAAP-DR-PUBLISH-ID"); + targets = config.parseRouting(req.getHeader("X-DMAAP-DR-ROUTING")); } else { logger.info("NODE0105 Rejecting bad URI for PUT or DELETE of " + req.getPathInfo() + " from " + req .getRemoteAddr()); @@ -302,7 +302,7 @@ public class NodeServlet extends HttpServlet { eelflogger.info(EelfMsgs.EXIT); return; } - resp.setHeader("X-ATT-DR-PUBLISH-ID", pubid); + resp.setHeader("X-DMAAP-DR-PUBLISH-ID", pubid); } String fbase = config.getSpoolDir() + "/" + pubid; File data = new File(fbase); @@ -324,9 +324,9 @@ public class NodeServlet extends HttpServlet { "content-language".equals(hnlc) || "content-md5".equals(hnlc) || "content-range".equals(hnlc))) || - "x-att-dr-meta".equals(hnlc) || - (feedid == null && "x-att-dr-received".equals(hnlc)) || - (hnlc.startsWith("x-") && !hnlc.startsWith("x-att-dr-"))) { + "x-dmaap-dr-meta".equals(hnlc) || + (feedid == null && "x-dmaap-dr-received".equals(hnlc)) || + (hnlc.startsWith("x-") && !hnlc.startsWith("x-dmaap-dr-"))) { Enumeration hvals = req.getHeaders(hn); while (hvals.hasMoreElements()) { String hv = (String) hvals.nextElement(); @@ -339,7 +339,7 @@ public class NodeServlet extends HttpServlet { if ("x-invocationid".equals(hnlc)) { hasInvocationIdHeader = true; } - if ("x-att-dr-meta".equals(hnlc)) { + if ("x-dmaap-dr-meta".equals(hnlc)) { if (hv.length() > 4096) { logger.info( "NODE0109 Rejecting publish attempt with metadata too long for feed " + feedid @@ -367,7 +367,7 @@ public class NodeServlet extends HttpServlet { if(!hasInvocationIdHeader){ mx.append("X-InvocationID\t").append(MDC.get("InvocationId")).append('\n'); } - mx.append("X-ATT-DR-RECEIVED\t").append(rcvd).append('\n'); + mx.append("X-DMAAP-DR-RECEIVED\t").append(rcvd).append('\n'); String metadata = mx.toString(); byte[] buf = new byte[1024 * 1024]; int i; @@ -404,7 +404,7 @@ public class NodeServlet extends HttpServlet { mw = new FileWriter(meta); mw.write(metadata); if (di.getSubId() == null) { - mw.write("X-ATT-DR-ROUTING\t" + t.getRouting() + "\n"); + mw.write("X-DMAAP-DR-ROUTING\t" + t.getRouting() + "\n"); } mw.close(); meta.renameTo(new File(dbase + ".M")); diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java index 4f31e922..2a659aaf 100644 --- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java +++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java @@ -68,7 +68,7 @@ public class NodeServletTest { setUpConfig(); setUpNodeMainDelivery(); when(request.getHeader("Authorization")).thenReturn("User1"); - when(request.getHeader("X-ATT-DR-PUBLISH-ID")).thenReturn("User1"); + when(request.getHeader("X-DMAAP-DR-PUBLISH-ID")).thenReturn("User1"); } @Test @@ -215,7 +215,7 @@ public class NodeServletTest { private void setBehalfHeader(String headerValue) { - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF")).thenReturn(headerValue); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF")).thenReturn(headerValue); } private ListAppender setTestLogger() { @@ -302,15 +302,15 @@ public class NodeServletTest { } List headers = new ArrayList<>(); headers.add("Content-Type"); - headers.add("X-ATT-DR-ON-BEHALF-OF"); - headers.add("X-ATT-DR-META"); + headers.add("X-DMAAP-DR-ON-BEHALF-OF"); + headers.add("X-DMAAP-DR-META"); Enumeration headerNames = Collections.enumeration(headers); when(request.getHeaderNames()).thenReturn(headerNames); Enumeration contentTypeHeader = Collections.enumeration(Arrays.asList("text/plain")); Enumeration behalfHeader = Collections.enumeration(Arrays.asList("User1")); Enumeration metaDataHeader = Collections.enumeration(Arrays.asList(metaDataString)); when(request.getHeaders("Content-Type")).thenReturn(contentTypeHeader); - when(request.getHeaders("X-ATT-DR-ON-BEHALF-OF")).thenReturn(behalfHeader); - when(request.getHeaders("X-ATT-DR-META")).thenReturn(metaDataHeader); + when(request.getHeaders("X-DMAAP-DR-ON-BEHALF-OF")).thenReturn(behalfHeader); + when(request.getHeaders("X-DMAAP-DR-META")).thenReturn(metaDataHeader); } } diff --git a/datarouter-prov/pom.xml b/datarouter-prov/pom.xml index 95c2de8f..4cbb97f3 100755 --- a/datarouter-prov/pom.xml +++ b/datarouter-prov/pom.xml @@ -26,7 +26,7 @@ org.onap.dmaap.datarouter parent - 1.1.0-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml datarouter-prov diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/ProvAuthorizer.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/ProvAuthorizer.java index c76ce42a..525c518e 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/ProvAuthorizer.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/ProvAuthorizer.java @@ -42,8 +42,8 @@ public class ProvAuthorizer implements Authorizer { private Logger log; private ProvDataProvider provData; - private static final String SUBJECT_HEADER = "X-ATT-DR-ON-BEHALF-OF"; // HTTP header carrying requester identity - private static final String SUBJECT_HEADER_GROUP = "X-ATT-DR-ON-BEHALF-OF-GROUP"; // HTTP header carrying requester identity by group Rally : US708115 + private static final String SUBJECT_HEADER = "X-DMAAP-DR-ON-BEHALF-OF"; // HTTP header carrying requester identity + private static final String SUBJECT_HEADER_GROUP = "X-DMAAP-DR-ON-BEHALF-OF-GROUP"; // HTTP header carrying requester identity by group Rally : US708115 /** Constructor. For the moment, do nothing special. Make it a singleton? * */ diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java index d916a21c..2d4f85f6 100755 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/BaseServlet.java @@ -97,25 +97,25 @@ import javax.mail.internet.MimeMultipart; @SuppressWarnings("serial") public class BaseServlet extends HttpServlet implements ProvDataProvider { - public static final String BEHALF_HEADER = "X-ATT-DR-ON-BEHALF-OF"; - static final String FEED_BASECONTENT_TYPE = "application/vnd.att-dr.feed"; - public static final String FEED_CONTENT_TYPE = "application/vnd.att-dr.feed; version=2.0"; - public static final String FEEDFULL_CONTENT_TYPE = "application/vnd.att-dr.feed-full; version=2.0"; - public static final String FEEDLIST_CONTENT_TYPE = "application/vnd.att-dr.feed-list; version=1.0"; - static final String SUB_BASECONTENT_TYPE = "application/vnd.att-dr.subscription"; - public static final String SUB_CONTENT_TYPE = "application/vnd.att-dr.subscription; version=2.0"; - public static final String SUBFULL_CONTENT_TYPE = "application/vnd.att-dr.subscription-full; version=2.0"; - static final String SUBLIST_CONTENT_TYPE = "application/vnd.att-dr.subscription-list; version=1.0"; + public static final String BEHALF_HEADER = "X-DMAAP-DR-ON-BEHALF-OF"; + static final String FEED_BASECONTENT_TYPE = "application/vnd.dmaap-dr.feed"; + public static final String FEED_CONTENT_TYPE = "application/vnd.dmaap-dr.feed; version=2.0"; + public static final String FEEDFULL_CONTENT_TYPE = "application/vnd.dmaap-dr.feed-full; version=2.0"; + public static final String FEEDLIST_CONTENT_TYPE = "application/vnd.dmaap-dr.feed-list; version=1.0"; + static final String SUB_BASECONTENT_TYPE = "application/vnd.dmaap-dr.subscription"; + public static final String SUB_CONTENT_TYPE = "application/vnd.dmaap-dr.subscription; version=2.0"; + public static final String SUBFULL_CONTENT_TYPE = "application/vnd.dmaap-dr.subscription-full; version=2.0"; + static final String SUBLIST_CONTENT_TYPE = "application/vnd.dmaap-dr.subscription-list; version=1.0"; //Adding groups functionality, ...1610 - static final String GROUP_BASECONTENT_TYPE = "application/vnd.att-dr.group"; - static final String GROUPFULL_CONTENT_TYPE = "application/vnd.att-dr.group-full; version=2.0"; + static final String GROUP_BASECONTENT_TYPE = "application/vnd.dmaap-dr.group"; + static final String GROUPFULL_CONTENT_TYPE = "application/vnd.dmaap-dr.group-full; version=2.0"; - public static final String LOGLIST_CONTENT_TYPE = "application/vnd.att-dr.log-list; version=1.0"; - public static final String PROVFULL_CONTENT_TYPE1 = "application/vnd.att-dr.provfeed-full; version=1.0"; - public static final String PROVFULL_CONTENT_TYPE2 = "application/vnd.att-dr.provfeed-full; version=2.0"; + public static final String LOGLIST_CONTENT_TYPE = "application/vnd.dmaap-dr.log-list; version=1.0"; + public static final String PROVFULL_CONTENT_TYPE1 = "application/vnd.dmaap-dr.provfeed-full; version=1.0"; + public static final String PROVFULL_CONTENT_TYPE2 = "application/vnd.dmaap-dr.provfeed-full; version=2.0"; public static final String CERT_ATTRIBUTE = "javax.servlet.request.X509Certificate"; static final String DB_PROBLEM_MSG = "There has been a problem with the DB. It is suggested you try the operation again."; diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServlet.java index 28b2a3ca..895eba08 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServlet.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServlet.java @@ -299,7 +299,7 @@ public class DRFeedsServlet extends ProxyServlet { sendResponseError(resp, HttpServletResponse.SC_BAD_REQUEST, message, eventlogger); return; } - feed.setPublisher(bhdr); // set from X-ATT-DR-ON-BEHALF-OF header + feed.setPublisher(bhdr); // set from X-DMAAP-DR-ON-BEHALF-OF header // Check if this feed already exists Feed feed2 = Feed.getFeedByNameVersion(feed.getName(), feed.getVersion()); diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/FeedServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/FeedServlet.java index 33097cd5..e64f2c69 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/FeedServlet.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/FeedServlet.java @@ -298,9 +298,9 @@ public class FeedServlet extends ProxyServlet { return; } feed.setFeedid(feedid); - feed.setPublisher(bhdr); // set from X-ATT-DR-ON-BEHALF-OF header + feed.setPublisher(bhdr); // set from X-DMAAP-DR-ON-BEHALF-OF header - String subjectgroup = (req.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")); //Adding for group feature:Rally US708115 + String subjectgroup = (req.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")); //Adding for group feature:Rally US708115 if (!oldFeed.getPublisher().equals(feed.getPublisher()) && subjectgroup == null) { message = "This feed must be modified by the same publisher that created it."; elr.setMessage(message); diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/GroupServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/GroupServlet.java index 17a1d752..151c0b26 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/GroupServlet.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/GroupServlet.java @@ -357,7 +357,7 @@ public class GroupServlet extends ProxyServlet { return; } //gup.setFeedid(feedid); - //sub.setSubscriber(bhdr); // set from X-ATT-DR-ON-BEHALF-OF header + //sub.setSubscriber(bhdr); // set from X-DMAAP-DR-ON-BEHALF-OF header // Check if this group already exists; not an error (yet), just warn Group gb2 = Group.getGroupMatching(gup); diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscribeServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscribeServlet.java index 226b5fc9..2127f004 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscribeServlet.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscribeServlet.java @@ -285,7 +285,7 @@ public class SubscribeServlet extends ProxyServlet { return; } sub.setFeedid(feedid); - sub.setSubscriber(bhdr); // set from X-ATT-DR-ON-BEHALF-OF header + sub.setSubscriber(bhdr); // set from X-DMAAP-DR-ON-BEHALF-OF header // Check if this subscription already exists; not an error (yet), just warn Subscription sub2 = Subscription.getSubscriptionMatching(sub); diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServlet.java index be79e2ff..ec4d33a0 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServlet.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServlet.java @@ -58,7 +58,7 @@ import static org.onap.dmaap.datarouter.provisioning.utils.HttpServletUtils.send @SuppressWarnings("serial") public class SubscriptionServlet extends ProxyServlet { - public static final String SUBCNTRL_CONTENT_TYPE = "application/vnd.att-dr.subscription-control"; + public static final String SUBCNTRL_CONTENT_TYPE = "application/vnd.dmaap-dr.subscription-control"; //Adding EELF Logger Rally:US664892 private static EELFLogger eelflogger = EELFManager.getInstance() .getLogger(SubscriptionServlet.class); @@ -316,9 +316,9 @@ public class SubscriptionServlet extends ProxyServlet { } sub.setSubid(oldsub.getSubid()); sub.setFeedid(oldsub.getFeedid()); - sub.setSubscriber(bhdr); // set from X-ATT-DR-ON-BEHALF-OF header + sub.setSubscriber(bhdr); // set from X-DMAAP-DR-ON-BEHALF-OF header - String subjectgroup = (req.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")); //Adding for group feature:Rally US708115 + String subjectgroup = (req.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")); //Adding for group feature:Rally US708115 if (!oldsub.getSubscriber().equals(sub.getSubscriber()) && subjectgroup == null) { message = "This subscriber must be modified by the same subscriber that created it."; elr.setMessage(message); diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java index b8a3aa53..4d0b6acc 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/EventLogRecord.java @@ -32,7 +32,7 @@ import org.onap.dmaap.datarouter.provisioning.BaseServlet; /** * This class is used to log provisioning server events. Each event consists of a who - * (who made the provisioning request including the IP address, the X-ATT-DR-ON-BEHALF-OF + * (who made the provisioning request including the IP address, the X-DMAAP-DR-ON-BEHALF-OF * header value, and the client certificate), a what (what request was made; the method * and servlet involved), and a how (how the request was handled; the result code and * message returned to the client). EventLogRecords are logged using log4j at the INFO level. diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Feed.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Feed.java index f1873424..a2076b04 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Feed.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Feed.java @@ -320,7 +320,7 @@ public class Feed extends Syncable { public Feed(JSONObject jo) throws InvalidObjectException { this("", "", "", ""); try { - // The JSONObject is assumed to contain a vnd.att-dr.feed representation + // The JSONObject is assumed to contain a vnd.dmaap-dr.feed representation this.feedid = jo.optInt("feedid", -1); this.groupid = jo.optInt("groupid"); //New field is added - Groups feature Rally:US708115 - 1610 this.name = jo.getString("name"); diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java index 3f5f7c76..30fc87c4 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Group.java @@ -209,7 +209,7 @@ public class Group extends Syncable { public Group(JSONObject jo) throws InvalidObjectException { this("", "", ""); try { - // The JSONObject is assumed to contain a vnd.att-dr.group representation + // The JSONObject is assumed to contain a vnd.dmaap-dr.group representation this.groupid = jo.optInt("groupid", -1); String gname = jo.getString("name"); String gdescription = jo.getString("description"); diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java index f4275255..e1b24c53 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Subscription.java @@ -219,7 +219,7 @@ public class Subscription extends Syncable { public Subscription(JSONObject jo) throws InvalidObjectException { this("", "", ""); try { - // The JSONObject is assumed to contain a vnd.att-dr.subscription representation + // The JSONObject is assumed to contain a vnd.dmaap-dr.subscription representation this.subid = jo.optInt(SUBID_KEY, -1); this.feedid = jo.optInt(FEEDID_KEY, -1); this.groupid = jo.optInt(GROUPID_KEY, -1); //New field is added - Groups feature Rally:US708115 - 1610 diff --git a/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestDrFeedsPost.java b/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestDrFeedsPost.java index ca328b1f..dfe7f787 100644 --- a/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestDrFeedsPost.java +++ b/datarouter-prov/src/test/java/datarouter/provisioning/IntegrationTestDrFeedsPost.java @@ -63,7 +63,7 @@ public class IntegrationTestDrFeedsPost extends IntegrationTestBase { @Test public void testNormalNoCtVersion() { JSONObject jo = buildFeedRequest(); - testCommon(jo, HttpServletResponse.SC_CREATED, "application/vnd.att-dr.feed", "JUnit"); + testCommon(jo, HttpServletResponse.SC_CREATED, "application/vnd.dmaap-dr.feed", "JUnit"); } @Test @@ -302,7 +302,7 @@ public class IntegrationTestDrFeedsPost extends IntegrationTestBase { } } /* -curl -v -X POST -H 'X-ATT-DR-ON-BEHALF-OF: tester' -H 'Content-type: application/vnd.att-dr.feed' \ +curl -v -X POST -H 'X-DMAAP-DR-ON-BEHALF-OF: tester' -H 'Content-type: application/vnd.dmaap-dr.feed' \ --user publisher:tomcat \ --data "$data" http://127.0.0.1:8080/prov/feed/ */ diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServletTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServletTest.java index 1c8040f6..a8f9c56a 100755 --- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServletTest.java +++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/DRFeedsServletTest.java @@ -197,7 +197,7 @@ public class DRFeedsServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_POST_And_Content_Header_Is_Not_Supported_Type_Then_Unsupported_Media_Type_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.feed; version=1.1"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.feed; version=1.1"); when(request.getContentType()).thenReturn("stub_contentType"); drfeedsServlet.doPost(request, response); verify(response) @@ -235,7 +235,7 @@ public class DRFeedsServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_POST_And_Feed_Is_Not_Valid_Object_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn(null); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn(null); JSONObject JSObject = buildRequestJsonObject(); DRFeedsServlet drfeedsServlet = new DRFeedsServlet() { @@ -400,8 +400,8 @@ public class DRFeedsServletTest extends DrServletTestBase { } private void setUpValidContentHeadersAndJSONOnHttpRequest() { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.feed; version=1.0"); - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.feed; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); } } diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/FeedServletTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/FeedServletTest.java index ca4ccd8c..f042e11d 100755 --- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/FeedServletTest.java +++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/FeedServletTest.java @@ -262,7 +262,7 @@ public class FeedServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_PUT_And_Content_Header_Is_Not_Supported_Type_Then_Unsupported_Media_Type_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.feed-fail; version=2.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.feed-fail; version=2.0"); when(request.getContentType()).thenReturn("stub_contentType"); feedServlet.doPut(request, response); verify(response) @@ -291,7 +291,7 @@ public class FeedServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_PUT_And_Feed_Change_Is_Not_Publisher_Who_Requested_Feed_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn(null); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn(null); JSONObject JSObject = buildRequestJsonObject(); FeedServlet feedServlet = new FeedServlet() { protected JSONObject getJSONfromInput(HttpServletRequest req) { @@ -466,8 +466,8 @@ public class FeedServletTest extends DrServletTestBase { } private void setUpValidContentHeadersAndJSONOnHttpRequest() { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.feed; version=1.0"); - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.feed; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); } private void reinsertFeedIntoDb() throws SQLException { diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/GroupServletTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/GroupServletTest.java index d6f1e6dc..a0781264 100755 --- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/GroupServletTest.java +++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/GroupServletTest.java @@ -154,7 +154,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_PUT_And_Request_Contains_Badly_Formed_JSON_Then_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); ServletInputStream inStream = mock(ServletInputStream.class); when(request.getInputStream()).thenReturn(inStream); groupServlet.doPut(request, response); @@ -163,7 +163,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_PUT_And_Group_Name_Is_Too_Long_Then_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); GroupServlet groupServlet = overideGetJSONFromInputToReturnAnInvalidGroup(true); groupServlet.doPut(request, response); verify(response).sendError(eq(HttpServletResponse.SC_BAD_REQUEST), argThat(notNullValue(String.class))); @@ -171,7 +171,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_PUT_And_PUT_Fails_Then_Internal_Server_Error_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); GroupServlet groupServlet = overideGetJSONFromInputToReturnAValidGroupWithFail(); groupServlet.doPut(request, response); verify(response).sendError(eq(HttpServletResponse.SC_INTERNAL_SERVER_ERROR), argThat(notNullValue(String.class))); @@ -179,7 +179,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_PUT_And_Request_Succeeds() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); GroupServlet groupServlet = overideGetJSONFromInputToReturnGroupInDb(); ServletOutputStream outStream = mock(ServletOutputStream.class); when(response.getOutputStream()).thenReturn(outStream); @@ -210,7 +210,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_POST_And_Request_Contains_Badly_Formed_JSON_Then_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); ServletInputStream inStream = mock(ServletInputStream.class); when(request.getInputStream()).thenReturn(inStream); groupServlet.doPost(request, response); @@ -219,7 +219,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_POST_And_Group_Description_Is_Too_Long_Then_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); GroupServlet groupServlet = overideGetJSONFromInputToReturnAnInvalidGroup(false); groupServlet.doPost(request, response); verify(response).sendError(eq(HttpServletResponse.SC_BAD_REQUEST), argThat(notNullValue(String.class))); @@ -227,7 +227,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_POST_And_Group_Name_Already_Exists_Then_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); GroupServlet groupServlet = overideGetJSONFromInputToReturnGroupInDb(); groupServlet.doPost(request, response); verify(response).sendError(eq(HttpServletResponse.SC_BAD_REQUEST), argThat(notNullValue(String.class))); @@ -235,7 +235,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_POST_And_POST_Fails_Then_Internal_Server_Error_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); GroupServlet groupServlet = overideGetJSONFromInputToReturnAValidGroupWithFail(); groupServlet.doPost(request, response); verify(response).sendError(eq(HttpServletResponse.SC_INTERNAL_SERVER_ERROR), argThat(notNullValue(String.class))); @@ -243,7 +243,7 @@ public class GroupServletTest { @Test public void Given_Request_Is_HTTP_POST_And_Request_Succeeds() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.group; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.group; version=1.0"); GroupServlet groupServlet = overideGetJSONFromInputToReturnNewGroupToInsert(); ServletOutputStream outStream = mock(ServletOutputStream.class); when(response.getOutputStream()).thenReturn(outStream); diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java index a3431ce9..0b5c23fe 100755 --- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java +++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscribeServletTest.java @@ -185,7 +185,7 @@ public class SubscribeServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_POST_And_Content_Header_Is_Not_Supported_Type_Then_Unsupported_Media_Type_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.feed; version=1.1"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.feed; version=1.1"); when(request.getContentType()).thenReturn("stub_contentType"); subscribeServlet.doPost(request, response); verify(response).sendError(eq(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE), argThat(notNullValue(String.class))); @@ -340,8 +340,8 @@ public class SubscribeServletTest extends DrServletTestBase { } private void setUpValidContentHeadersAndJSONOnHttpRequest() { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription; version=1.0"); - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); } } diff --git a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServletTest.java b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServletTest.java index 02d73cc1..fd1e68ef 100755 --- a/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServletTest.java +++ b/datarouter-prov/src/test/java/org/onap/dmaap/datarouter/provisioning/SubscriptionServletTest.java @@ -251,7 +251,7 @@ public class SubscriptionServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_PUT_And_Request_Contains_Badly_Formed_JSON_Then_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription; version=1.0"); ServletInputStream inStream = mock(ServletInputStream.class); when(request.getInputStream()).thenReturn(inStream); subscriptionServlet.doPut(request, response); @@ -260,7 +260,7 @@ public class SubscriptionServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_PUT_And_Subscription_Object_Is_Invalid_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription; version=1.0"); SubscriptionServlet subscriptionServlet = new SubscriptionServlet() { protected JSONObject getJSONfromInput(HttpServletRequest req) { JSONObject jo = new JSONObject(); @@ -273,8 +273,8 @@ public class SubscriptionServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_PUT_And_Subscriber_Modified_By_Different_Creator_Then_Bad_Request_Is_Generated() throws Exception { - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn(null); - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn(null); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription; version=1.0"); JSONObject JSObject = buildRequestJsonObject(); SubscriptionServlet subscriptionServlet = new SubscriptionServlet() { protected JSONObject getJSONfromInput(HttpServletRequest req) { @@ -295,8 +295,8 @@ public class SubscriptionServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_PUT_And_Update_Fails() throws Exception { - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription; version=1.0"); JSONObject JSObject = buildRequestJsonObject(); SubscriptionServlet subscriptionServlet = new SubscriptionServlet() { protected JSONObject getJSONfromInput(HttpServletRequest req) { @@ -323,8 +323,8 @@ public class SubscriptionServletTest extends DrServletTestBase { public void Given_Request_Is_HTTP_PUT_And_Update_Succeeds() throws Exception { ServletOutputStream outStream = mock(ServletOutputStream.class); when(response.getOutputStream()).thenReturn(outStream); - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription; version=1.0"); JSONObject JSObject = buildRequestJsonObject(); SubscriptionServlet subscriptionServlet = new SubscriptionServlet() { protected JSONObject getJSONfromInput(HttpServletRequest req) { @@ -383,7 +383,7 @@ public class SubscriptionServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_POST_And_Request_Is_Not_Authorized_Then_Forbidden_Response_Is_Generated() throws Exception { - when(request.getHeader(anyString())).thenReturn("application/vnd.att-dr.subscription-control"); + when(request.getHeader(anyString())).thenReturn("application/vnd.dmaap-dr.subscription-control"); setAuthoriserToReturnRequestNotAuthorized(); subscriptionServlet.doPost(request, response); verify(response).sendError(eq(HttpServletResponse.SC_FORBIDDEN), argThat(notNullValue(String.class))); @@ -391,7 +391,7 @@ public class SubscriptionServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_POST_And_Request_Contains_Badly_Formed_JSON_Then_Bad_Request_Response_Is_Generated() throws Exception { - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription-control; version=1.0"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription-control; version=1.0"); ServletInputStream inStream = mock(ServletInputStream.class); when(request.getInputStream()).thenReturn(inStream); subscriptionServlet.doPost(request, response); @@ -400,8 +400,8 @@ public class SubscriptionServletTest extends DrServletTestBase { @Test public void Given_Request_Is_HTTP_POST_And_Post_Fails() throws Exception { - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription-control; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription-control; version=1.0"); JSONObject JSObject = buildRequestJsonObject(); SubscriptionServlet subscriptionServlet = new SubscriptionServlet() { protected JSONObject getJSONfromInput(HttpServletRequest req) { @@ -422,8 +422,8 @@ public class SubscriptionServletTest extends DrServletTestBase { public void Given_Request_Is_HTTP_POST_And_Post_Succeeds() throws Exception { ServletOutputStream outStream = mock(ServletOutputStream.class); when(response.getOutputStream()).thenReturn(outStream); - when(request.getHeader("X-ATT-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); - when(request.getHeader("Content-Type")).thenReturn("application/vnd.att-dr.subscription-control; version=1.0"); + when(request.getHeader("X-DMAAP-DR-ON-BEHALF-OF-GROUP")).thenReturn("stub_subjectGroup"); + when(request.getHeader("Content-Type")).thenReturn("application/vnd.dmaap-dr.subscription-control; version=1.0"); JSONObject JSObject = buildRequestJsonObject(); SubscriptionServlet subscriptionServlet = new SubscriptionServlet() { protected JSONObject getJSONfromInput(HttpServletRequest req) { diff --git a/datarouter-prov/src/test/resources/create.sql b/datarouter-prov/src/test/resources/create.sql index b2906035..b704602f 100755 --- a/datarouter-prov/src/test/resources/create.sql +++ b/datarouter-prov/src/test/resources/create.sql @@ -168,7 +168,7 @@ insert into NODESETS(SETID, NODEID) VALUES (2,2); insert into LOG_RECORDS(RECORD_ID,TYPE,EVENT_TIME,PUBLISH_ID,FEEDID,REQURI,METHOD,CONTENT_TYPE,CONTENT_LENGTH,FEED_FILEID,REMOTE_ADDR,USER,STATUS,DELIVERY_SUBID,DELIVERY_FILEID,RESULT,ATTEMPTS,REASON) -VALUES(1,'pub',2536159564422,'ID',1,'URL','GET','application/vnd.att-dr.log-list; version=1.0',100,1,'172.0.0.8','user',204,1,1,204,0,'other'); +VALUES(1,'pub',2536159564422,'ID',1,'URL','GET','application/vnd.dmaap-dr.log-list; version=1.0',100,1,'172.0.0.8','user',204,1,1,204,0,'other'); CREATE ALIAS IF NOT EXISTS `SUBSTRING_INDEX` AS $$ String Function(String one, String two, String three){ diff --git a/datarouter-subscriber/pom.xml b/datarouter-subscriber/pom.xml index b5c149c3..8300b170 100755 --- a/datarouter-subscriber/pom.xml +++ b/datarouter-subscriber/pom.xml @@ -26,7 +26,7 @@ org.onap.dmaap.datarouter parent - 1.1.0-SNAPSHOT + 2.0.0-SNAPSHOT ../pom.xml datarouter-subscriber diff --git a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java index 28051285..315207eb 100644 --- a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java +++ b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java @@ -135,7 +135,7 @@ public class SampleSubscriberServlet extends HttpServlet { if (queryString != null) { fileid = fileid + "?" + queryString; } - String publishid = req.getHeader("X-ATT-DR-PUBLISH-ID"); + String publishid = req.getHeader("X-DMAAP-DR-PUBLISH-ID"); String filename = URLEncoder.encode(fileid, "UTF-8").replaceAll("^\\.", "%2E").replaceAll("\\*", "%2A"); String fullPath = outputDirectory + "/" + filename; @@ -168,7 +168,7 @@ public class SampleSubscriberServlet extends HttpServlet { } Files.move(Paths.get(tmpPath), Paths.get(fullPath), StandardCopyOption.REPLACE_EXISTING); try (PrintWriter writer = new PrintWriter(new FileOutputStream(tmpMetaDataPath))) { - String metaData = req.getHeader("X-ATT-DR-META"); + String metaData = req.getHeader("X-DMAAP-DR-META"); writer.print(metaData); } Files.move(Paths.get(tmpMetaDataPath), Paths.get(fullMetaDataPath), StandardCopyOption.REPLACE_EXISTING); diff --git a/datarouter-subscriber/src/test/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServletTest.java b/datarouter-subscriber/src/test/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServletTest.java index f3700e9f..109c63a9 100755 --- a/datarouter-subscriber/src/test/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServletTest.java +++ b/datarouter-subscriber/src/test/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServletTest.java @@ -99,8 +99,8 @@ public class SampleSubscriberServletTest { private void setUpSuccessfulFlow() throws IOException { when(request.getHeader("Authorization")).thenReturn("Basic TE9HSU46UEFTU1dPUkQ="); when(request.getPathInfo()).thenReturn("/publish/1/testfile"); - when(request.getHeader("X-ATT-DR-PUBLISH-ID")).thenReturn("1"); - when(request.getHeader("X-ATT-DR-META")).thenReturn("{\"Key\":\"Value\"}"); + when(request.getHeader("X-DMAAP-DR-PUBLISH-ID")).thenReturn("1"); + when(request.getHeader("X-DMAAP-DR-META")).thenReturn("{\"Key\":\"Value\"}"); when(request.getQueryString()).thenReturn(null); ServletInputStream inStream = mock(ServletInputStream.class); when(request.getInputStream()).thenReturn(inStream); diff --git a/docs/data-router/data-router.rst b/docs/data-router/data-router.rst index cd466a7e..2c3e1a69 100755 --- a/docs/data-router/data-router.rst +++ b/docs/data-router/data-router.rst @@ -52,7 +52,7 @@ Create a Feed Sample Request ============== -``curl -k -X POST -H "Content-Type:application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF:{user}" --data-ascii @createFeed.json https://{host}:{port}`` +``curl -k -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" --data-ascii @createFeed.json https://{host}:{port}`` Request Parameters: =================== @@ -77,10 +77,10 @@ Request Parameters: | group-id | | Body | Integer | | Y | | | | | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| content-type | To specify type of message | Header | String | | Y | application/vnd.att-dr.feed | +| content-type | To specify type of message | Header | String | | Y | application/vnd.dmaap-dr.feed | | | (feed,subscriber,publisher) | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| X-ATT-DR-ON-BEHALF-OF | User id of owner of feed | Header | String | <=8 | Y | username | +| X-DMAAP-DR-ON-BEHALF-OF| User id of owner of feed | Header | String | <=8 | Y | username | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ Response/Error Codes @@ -110,7 +110,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -166,7 +166,7 @@ Updating a Feed Sample Request ============== -``curl -k -X PUT -H "Content-Type: application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF: {user}" --data-ascii @updateFeed.json --location-trusted https://{host}:{port}/feed/{feedId}`` +``curl -k -X PUT -H "Content-Type: application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" --data-ascii @updateFeed.json --location-trusted https://{host}:{port}/feed/{feedId}`` Request Parameters: =================== @@ -187,10 +187,10 @@ Request Parameters: | group-id | | Body | Integer | | Y | | | | | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| content-type | To specify type of message | Header | String | | Y | application/vnd.att-dr.feed | +| content-type | To specify type of message | Header | String | | Y | application/vnd.dmaap-dr.feed | | | (feed,subscriber,publisher) | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| X-ATT-DR-ON-BEHALF-OF | User id of owner of feed | Header | String | <=8 | Y | username | +| X-DMAAP-DR-ON-BEHALF-OF| User id of owner of feed | Header | String | <=8 | Y | username | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ Response/Error Codes @@ -220,7 +220,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -283,7 +283,7 @@ http[s]://{host}:{port}/feed/{feedId} Sample Request ============== -``curl -k -H "X-ATT-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}`` +``curl -k -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}`` Response/Error Codes ==================== @@ -305,7 +305,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -344,7 +344,7 @@ http[s]://{host}:{port}/feed/{feedId} Sample Request ============== -``curl -k -X DELETE -H "X-ATT-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}`` +``curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF: {user}" https://{host}:{port}/feed/{feedId}`` Response/Error Codes ==================== @@ -366,7 +366,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -406,7 +406,7 @@ http[s]://{host}:{port}/subscribe/{feedId} Sample Request ============== -``curl -k -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:{user}" --data-ascii @addSubscriber.json https://{host}:{port}/subscribe/{feedId}`` +``curl -k -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" --data-ascii @addSubscriber.json https://{host}:{port}/subscribe/{feedId}`` Request Parameters: =================== @@ -432,10 +432,10 @@ Request Parameters: | group-id | | Body | Integer | | Y | | | | | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| content-type | To specify type of message | Header | String | | Y | application/vnd.att-dr.subscription | +| content-type | To specify type of message | Header | String | | Y | application/vnd.dmaap-dr.subscription| | | (feed,subscriber,publisher) | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| X-ATT-DR-ON-BEHALF-OF | User id of subscriber | Header | String | <=8 | Y | username | +| X-DMAAP-DR-ON-BEHALF-OF| User id of subscriber | Header | String | <=8 | Y | username | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ Response/Error Codes @@ -465,7 +465,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -520,7 +520,7 @@ http[s]://{host}:{port}/subs/{subId} Sample Request ============== -``curl -k -X PUT -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:{user}" --data-ascii @updateSubscriber.json https://{host}:{port}/subs/{subId}`` +``curl -k -X PUT -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" --data-ascii @updateSubscriber.json https://{host}:{port}/subs/{subId}`` Request Parameters: =================== @@ -546,10 +546,10 @@ Request Parameters: | group-id | | Body | Integer | | Y | | | | | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| content-type | To specify type of message | Header | String | | Y | application/vnd.att-dr.subscription | +| content-type | To specify type of message | Header | String | | Y | application/vnd.dmaap-dr.subscription| | | (feed,subscriber,publisher) | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ -| X-ATT-DR-ON-BEHALF-OF | User id of subscriber | Header | String | 8 | Y | username | +| X-DMAAP-DR-ON-BEHALF-OF| User id of subscriber | Header | String | 8 | Y | username | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ Response/Error Codes @@ -579,7 +579,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -635,7 +635,7 @@ http[s]://{host}:{port}/subs/{subId} Sample Request ============== -``curl -k -H "X-ATT-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}`` +``curl -k -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}`` Response/Error Codes ==================== @@ -657,7 +657,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -696,7 +696,7 @@ http[s]://{host}:{port}/subs/{subId} Sample Request ============== -``curl -k -X DELETE -H "X-ATT-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}`` +``curl -k -X DELETE -H "X-DMAAP-DR-ON-BEHALF-OF:{user}" https://{host}:{port}/subs/{subId}`` Response/Error Codes ==================== @@ -718,7 +718,7 @@ Response/Error Codes | | IP address | | | * Client certificate subject is not on | | | the API’s authorized list. | -| | * X-ATT-DR-ON-BEHALF-OF identity is not | +| | * X-DMAAP-DR-ON-BEHALF-OF identity is not | | | authorized to perform | +------------------------+-------------------------------------------+ | 404 | Not Found - The Request-URI does not point| @@ -758,7 +758,7 @@ http[s]://{host}:{port}/publish/{feedId}/{fileName} Sample Request ============== -``curl -k -X PUT --user {user}:{password} -H "Content-Type:application/octet-stream" -H "X-ATT-DR-META:{\"filetype\":\"txt\"}" --data-binary @sampleFile.txt --post301 --location-trusted https://{host}:{port}/publish/{feedId}/sampleFile`` +``curl -k -X PUT --user {user}:{password} -H "Content-Type:application/octet-stream" -H "X-DMAAP-DR-META:{\"filetype\":\"txt\"}" --data-binary @sampleFile.txt --post301 --location-trusted https://{host}:{port}/publish/{feedId}/sampleFile`` Request parameters ================== @@ -775,7 +775,7 @@ Request parameters | content-type | To specify type of message | Header | String | | Y | application/octet-stream | | | format | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------------------------------------------+ -| X-ATT-DR-META | Metadata for the file. Accepts | Header | String | 4096 | N | '{"compressionType":"gzip","id": 1234, "transferred":true, "size":null}' | +| X-DMAAP-DR-META | Metadata for the file. Accepts | Header | String | 4096 | N | '{"compressionType":"gzip","id": 1234, "transferred":true, "size":null}' | | | only non nested json objects | | | | | | | | of the following type : | | | | | | | | -Numbers | | | | | | @@ -895,8 +895,8 @@ Request parameters +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ | publishId | Select records with specified | Path | String | | N | | | | publish id, carried in the | | | | | | -| | X-ATT-DR-PUBLISH-ID header from | | | | | | -| | original publish request | | | | | | +| | X-DMAAP-DR-PUBLISH-ID header | | | | | | +| | from original publish request | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ | start | Select records created at or | Path | String | | N | A date-time expressed in the format | | | after specified date | | | | | specified by RFC 3339 | @@ -918,63 +918,63 @@ Request parameters Response Parameters =================== -+------------------------+-------------------------------------------+ -| Name | Description | -+========================+===========================================+ -| type | Record type: | -| | | -| | * pub: publication attempt | -| | * del: delivery attempt | -| | * exp: delivery expiry | -+------------------------+-------------------------------------------+ -| date | The UTC date and time at which the record | -| | was generated, with millisecond resolution| -| | in the format specified by RFC 3339 | -+------------------------+-------------------------------------------+ -| publishId | The unique identifier assigned by the DR | -| | at the time of the initial publication | -| | request (carried in the X-ATT-DRPUBLISH-ID| -| | header in the response to the original | -| | publish request) | -+------------------------+-------------------------------------------+ -| requestURI | The Request-URI associated with the | -| | request | -+------------------------+-------------------------------------------+ -| method | The HTTP method (PUT or DELETE) for the | -| | request | -+------------------------+-------------------------------------------+ -| contentType | The media type of the payload of the | -| | request | -+------------------------+-------------------------------------------+ -| contentLength | The size (in bytes) of the payload of | -| | the request | -+------------------------+-------------------------------------------+ -| sourceIp | The IP address from which the request | -| | originated | -+------------------------+-------------------------------------------+ -| endpointId | The identity used to submit a publish | -| | request to the DR | -+------------------------+-------------------------------------------+ -| deliveryId | The identity used to submit a delivery | -| | request to a subscriber endpoint | -+------------------------+-------------------------------------------+ -| statusCode | The HTTP status code in the response to | -| | the request. A value of -1 indicates that | -| | the DR was not able to obtain an HTTP | -| | status code | -+------------------------+-------------------------------------------+ -| expiryReason | The reason that delivery attempts were | -| | discontinued: | -| | | -| | * notRetryable: The last delivery attempt | -| | encountered an error condition for which| -| | the DR does not make retries. | -| | * retriesExhausted: The DR reached its | -| | limit for making further retry attempts | -+------------------------+-------------------------------------------+ -| attempts | Total number of attempts made before | -| | delivery attempts were discontinued | -+------------------------+-------------------------------------------+ ++------------------------+----------------------------------------------+ +| Name | Description | ++========================+==============================================+ +| type | Record type: | +| | | +| | * pub: publication attempt | +| | * del: delivery attempt | +| | * exp: delivery expiry | ++------------------------+----------------------------------------------+ +| date | The UTC date and time at which the record | +| | was generated, with millisecond resolution | +| | in the format specified by RFC 3339 | ++------------------------+----------------------------------------------+ +| publishId | The unique identifier assigned by the DR | +| | at the time of the initial publication | +| | request (carried in the X-DMAAP-DR-PUBLISH-ID| +| | header in the response to the original | +| | publish request) | ++------------------------+----------------------------------------------+ +| requestURI | The Request-URI associated with the | +| | request | ++------------------------+----------------------------------------------+ +| method | The HTTP method (PUT or DELETE) for the | +| | request | ++------------------------+----------------------------------------------+ +| contentType | The media type of the payload of the | +| | request | ++------------------------+----------------------------------------------+ +| contentLength | The size (in bytes) of the payload of | +| | the request | ++------------------------+----------------------------------------------+ +| sourceIp | The IP address from which the request | +| | originated | ++------------------------+----------------------------------------------+ +| endpointId | The identity used to submit a publish | +| | request to the DR | ++------------------------+----------------------------------------------+ +| deliveryId | The identity used to submit a delivery | +| | request to a subscriber endpoint | ++------------------------+----------------------------------------------+ +| statusCode | The HTTP status code in the response to | +| | the request. A value of -1 indicates that | +| | the DR was not able to obtain an HTTP | +| | status code | ++------------------------+----------------------------------------------+ +| expiryReason | The reason that delivery attempts were | +| | discontinued: | +| | | +| | * notRetryable: The last delivery attempt | +| | encountered an error condition for which | +| | the DR does not make retries. | +| | * retriesExhausted: The DR reached its | +| | limit for making further retry attempts | ++------------------------+----------------------------------------------+ +| attempts | Total number of attempts made before | +| | delivery attempts were discontinued | ++------------------------+----------------------------------------------+ Response/Error Codes ==================== @@ -1001,7 +1001,7 @@ Response/Error Codes | 406 | Not Acceptable - The request has an Accept| | | header indicating that the requester will | | | not accept a response with | -| | application/vnd.att-dr.log-list content. | +| | application/vnd.dmaap-dr.log-list content.| +------------------------+-------------------------------------------+ | 500 | Internal Server Error - The DR API server | | | encountered an internal error and could | @@ -1046,8 +1046,8 @@ Request parameters +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ | publishId | Select records with specified | Path | String | | N | | | | publish id, carried in the | | | | | | -| | X-ATT-DR-PUBLISH-ID header from | | | | | | -| | original publish request | | | | | | +| | X-DMAAP-DR-PUBLISH-ID header | | | | | | +| | from original publish request | | | | | | +------------------------+---------------------------------+------------------+------------+--------------+-------------+--------------------------------------+ | start | Select records created at or | Path | String | | N | A date-time expressed in the format | | | after specified date | | | | | specified by RFC 3339 | @@ -1070,64 +1070,64 @@ Request parameters Response Parameters =================== -+------------------------+-------------------------------------------+ -| Name | Description | -+========================+===========================================+ -| type | Record type: | -| | | -| | * pub: publication attempt | -| | * del: delivery attempt | -| | * exp: delivery expiry | -+------------------------+-------------------------------------------+ -| date | The UTC date and time at which the record | -| | was generated, with millisecond resolution| -| | in the format specified by RFC 3339 | -+------------------------+-------------------------------------------+ -| publishId | The unique identifier assigned by the DR | -| | at the time of the initial publication | -| | request(carried in the X-ATT-DR-PUBLISH-ID| -| | header in the response to the original | -| | publish request) to a feed log URL or | -| | subscription log URL known to the system | -+------------------------+-------------------------------------------+ -| requestURI | The Request-URI associated with the | -| | request | -+------------------------+-------------------------------------------+ -| method | The HTTP method (PUT or DELETE) for the | -| | request | -+------------------------+-------------------------------------------+ -| contentType | The media type of the payload of the | -| | request | -+------------------------+-------------------------------------------+ -| contentLength | The size (in bytes) of the payload of | -| | the request | -+------------------------+-------------------------------------------+ -| sourceIp | The IP address from which the request | -| | originated | -+------------------------+-------------------------------------------+ -| endpointId | The identity used to submit a publish | -| | request to the DR | -+------------------------+-------------------------------------------+ -| deliveryId | The identity used to submit a delivery | -| | request to a subscriber endpoint | -+------------------------+-------------------------------------------+ -| statusCode | The HTTP status code in the response to | -| | the request. A value of -1 indicates that | -| | the DR was not able to obtain an HTTP | -| | status code | -+------------------------+-------------------------------------------+ -| expiryReason | The reason that delivery attempts were | -| | discontinued: | -| | | -| | * notRetryable: The last delivery attempt | -| | encountered an error condition for which| -| | the DR does not make retries. | -| | * retriesExhausted: The DR reached its | -| | limit for making further retry attempts | -+------------------------+-------------------------------------------+ -| attempts | Total number of attempts made before | -| | delivery attempts were discontinued | -+------------------------+-------------------------------------------+ ++------------------------+---------------------------------------------+ +| Name | Description | ++========================+=============================================+ +| type | Record type: | +| | | +| | * pub: publication attempt | +| | * del: delivery attempt | +| | * exp: delivery expiry | ++------------------------+---------------------------------------------+ +| date | The UTC date and time at which the record | +| | was generated, with millisecond resolution | +| | in the format specified by RFC 3339 | ++------------------------+---------------------------------------------+ +| publishId | The unique identifier assigned by the DR | +| | at the time of the initial publication | +| | request(carried in the X-DMAAP-DR-PUBLISH-ID| +| | header in the response to the original | +| | publish request) to a feed log URL or | +| | subscription log URL known to the system | ++------------------------+---------------------------------------------+ +| requestURI | The Request-URI associated with the | +| | request | ++------------------------+---------------------------------------------+ +| method | The HTTP method (PUT or DELETE) for the | +| | request | ++------------------------+---------------------------------------------+ +| contentType | The media type of the payload of the | +| | request | ++------------------------+---------------------------------------------+ +| contentLength | The size (in bytes) of the payload of | +| | the request | ++------------------------+---------------------------------------------+ +| sourceIp | The IP address from which the request | +| | originated | ++------------------------+---------------------------------------------+ +| endpointId | The identity used to submit a publish | +| | request to the DR | ++------------------------+---------------------------------------------+ +| deliveryId | The identity used to submit a delivery | +| | request to a subscriber endpoint | ++------------------------+---------------------------------------------+ +| statusCode | The HTTP status code in the response to | +| | the request. A value of -1 indicates that | +| | the DR was not able to obtain an HTTP | +| | status code | ++------------------------+---------------------------------------------+ +| expiryReason | The reason that delivery attempts were | +| | discontinued: | +| | | +| | * notRetryable: The last delivery attempt | +| | encountered an error condition for which | +| | the DR does not make retries. | +| | * retriesExhausted: The DR reached its | +| | limit for making further retry attempts | ++------------------------+---------------------------------------------+ +| attempts | Total number of attempts made before | +| | delivery attempts were discontinued | ++------------------------+---------------------------------------------+ Response/Error Codes ==================== @@ -1154,7 +1154,7 @@ Response/Error Codes | 406 | Not Acceptable - The request has an Accept| | | header indicating that the requester will | | | not accept a response with | -| | application/vnd.att-dr.log-list content. | +| | application/vnd.dmaap-dr.log-list content.| +------------------------+-------------------------------------------+ | 500 | Internal Server Error - The DR API server | | | encountered an internal error and could | diff --git a/pom.xml b/pom.xml index 01d8afc2..3bdb2845 100755 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ org.onap.dmaap.datarouter parent dmaap-datarouter - 1.1.0-SNAPSHOT + 2.0.0-SNAPSHOT pom https://github.com/att/DMAAP_DATAROUTER diff --git a/version.properties b/version.properties index af11c22b..63898a13 100644 --- a/version.properties +++ b/version.properties @@ -25,8 +25,8 @@ # Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) # because they are used in Jenkins, whose plug-in doesn't support -major=1 -minor=1 +major=2 +minor=0 patch=0 base_version=${major}.${minor}.${patch} -- cgit 1.2.3-korg