Merge "Replace classes in the org.json package"
authorvarun gudisena <vg411h@att.com>
Mon, 19 Feb 2018 17:04:30 +0000 (17:04 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 19 Feb 2018 17:04:30 +0000 (17:04 +0000)
datarouter-node/pom.xml
datarouter-prov/pom.xml
docs/data-router/data-router.rst [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
pom.xml

index d8c2be3..1db177f 100644 (file)
                <maven.compiler.source>1.8</maven.compiler.source>\r
                <maven.compiler.target>1.8</maven.compiler.target>\r
                <dockerLocation>${basedir}/target/</dockerLocation>\r
+               <sonar.language>java</sonar.language>\r
+                       <sonar.skip>false</sonar.skip>\r
+               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
+               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
+               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
+               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
+               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
+               <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
                <nexusproxy>https://nexus.onap.org</nexusproxy>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                                  </formats>\r
                                </configuration>\r
                        </plugin>\r
+<plugin>\r
+                               <groupId>org.sonatype.plugins</groupId>\r
+                               <artifactId>nexus-staging-maven-plugin</artifactId>\r
+                               <version>1.6.7</version>\r
+                               <extensions>true</extensions>\r
+                               <configuration>\r
+                                       <nexusUrl>${nexusproxy}</nexusUrl>\r
+                                       <stagingProfileId>176c31dfe190a</stagingProfileId>\r
+                                       <serverId>ecomp-staging</serverId>\r
+                               </configuration>\r
+                       </plugin>\r
+                       \r
+                       <plugin>\r
+          <groupId>org.jacoco</groupId>\r
+          <artifactId>jacoco-maven-plugin</artifactId>\r
+          <version>${jacoco.version}</version>\r
+          <configuration>\r
+            <excludes>\r
+              <exclude>**/gen/**</exclude>\r
+              <exclude>**/generated-sources/**</exclude>\r
+              <exclude>**/yang-gen/**</exclude>\r
+              <exclude>**/pax/**</exclude>\r
+            </excludes>\r
+          </configuration>\r
+          <executions>\r
+\r
+            <execution>\r
+              <id>pre-unit-test</id>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
+                <propertyName>surefireArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+            \r
+       \r
+            <execution>\r
+              <id>post-unit-test</id>\r
+              <phase>test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+            <execution>\r
+              <id>pre-integration-test</id>\r
+              <phase>pre-integration-test</phase>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
+\r
+                <propertyName>failsafeArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
 \r
+       \r
+            <execution>\r
+              <id>post-integration-test</id>\r
+              <phase>post-integration-test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>\r
                </plugins>\r
        </build>\r
 <distributionManagement>\r
                <repository>\r
                        <id>ecomp-releases</id>\r
-                       <name>AAF Release Repository</name>\r
+                       <name>DR Release Repository</name>\r
                        <url>${nexusproxy}${releaseNexusPath}</url>\r
                </repository>\r
                <snapshotRepository>\r
                        <id>ecomp-snapshots</id>\r
-                       <name>AAF Snapshot Repository</name>\r
+                       <name>DR Snapshot Repository</name>\r
                        <url>${nexusproxy}${snapshotNexusPath}</url>\r
                </snapshotRepository>\r
                <site>\r
             <url>https://nexus.onap.org/content/repositories/snapshots/</url>\r
         </pluginRepository>\r
     </pluginRepositories>\r
-       <repositories>\r
-               <repository>\r
-                       <id>central</id>\r
-                       <name>Maven 2 repository 2</name>\r
-                       <url>http://repo2.maven.org/maven2/</url>\r
-               </repository>\r
-               <repository>\r
-            <id>onap-jar-snapshots</id>\r
-            <url>https://nexus.onap.org/content/repositories/snapshots</url>\r
-        </repository>\r
-               <repository>\r
-                       <id>spring-repo</id>\r
-                       <name>Spring repo</name>\r
-                       <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>\r
-               </repository>\r
-               <repository>\r
-                       <id>repository.jboss.org-public</id>\r
-                       <name>JBoss.org Maven repository</name>\r
-                       <url>https://repository.jboss.org/nexus/content/groups/public</url>\r
-               </repository>\r
-       </repositories>\r
        \r
 \r
        \r
index cd846aa..c1eae74 100644 (file)
                <maven.compiler.source>1.8</maven.compiler.source>\r
                <maven.compiler.target>1.8</maven.compiler.target>\r
                <dockerLocation>${basedir}/target/</dockerLocation>\r
+               <sonar.language>java</sonar.language>\r
+                       <sonar.skip>false</sonar.skip>\r
+               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
+               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
+               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
+               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
+               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
+               <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
                <nexusproxy>https://nexus.onap.org</nexusproxy>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                                  </formats>\r
                                </configuration>\r
                        </plugin>\r
+                       \r
+                       \r
+               <plugin>\r
+                               <groupId>org.sonatype.plugins</groupId>\r
+                               <artifactId>nexus-staging-maven-plugin</artifactId>\r
+                               <version>1.6.7</version>\r
+                               <extensions>true</extensions>\r
+                               <configuration>\r
+                                       <nexusUrl>${nexusproxy}</nexusUrl>\r
+                                       <stagingProfileId>176c31dfe190a</stagingProfileId>\r
+                                       <serverId>ecomp-staging</serverId>\r
+                               </configuration>\r
+                       </plugin>\r
+                       \r
+                       <plugin>\r
+          <groupId>org.jacoco</groupId>\r
+          <artifactId>jacoco-maven-plugin</artifactId>\r
+          <version>${jacoco.version}</version>\r
+          <configuration>\r
+            <excludes>\r
+              <exclude>**/gen/**</exclude>\r
+              <exclude>**/generated-sources/**</exclude>\r
+              <exclude>**/yang-gen/**</exclude>\r
+              <exclude>**/pax/**</exclude>\r
+            </excludes>\r
+          </configuration>\r
+          <executions>\r
+\r
+            <execution>\r
+              <id>pre-unit-test</id>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
+                <propertyName>surefireArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+            \r
+       \r
+            <execution>\r
+              <id>post-unit-test</id>\r
+              <phase>test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+            <execution>\r
+              <id>pre-integration-test</id>\r
+              <phase>pre-integration-test</phase>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
+\r
+                <propertyName>failsafeArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+\r
+       \r
+            <execution>\r
+              <id>post-integration-test</id>\r
+              <phase>post-integration-test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>      \r
                </plugins>\r
        </build>\r
 <distributionManagement>\r
                <repository>\r
                        <id>ecomp-releases</id>\r
-                       <name>AAF Release Repository</name>\r
+                       <name>DR Release Repository</name>\r
                        <url>${nexusproxy}${releaseNexusPath}</url>\r
                </repository>\r
                <snapshotRepository>\r
                        <id>ecomp-snapshots</id>\r
-                       <name>AAF Snapshot Repository</name>\r
+                       <name>DR Snapshot Repository</name>\r
                        <url>${nexusproxy}${snapshotNexusPath}</url>\r
                </snapshotRepository>\r
                <site>\r
         </pluginRepository>\r
     </pluginRepositories>\r
 \r
-       <repositories>\r
-               <repository>\r
-                       <id>central</id>\r
-                       <name>Maven 2 repository 2</name>\r
-                       <url>http://repo2.maven.org/maven2/</url>\r
-               </repository>\r
-               <repository>\r
-            <id>onap-jar-snapshots</id>\r
-            <url>https://nexus.onap.org/content/repositories/snapshots</url>\r
-        </repository>\r
-               <repository>\r
-                       <id>spring-repo</id>\r
-                       <name>Spring repo</name>\r
-                       <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>\r
-               </repository>\r
-               <repository>\r
-                       <id>repository.jboss.org-public</id>\r
-                       <name>JBoss.org Maven repository</name>\r
-                       <url>https://repository.jboss.org/nexus/content/groups/public</url>\r
-               </repository>\r
-       </repositories>\r
        \r
 </project>\r
diff --git a/docs/data-router/data-router.rst b/docs/data-router/data-router.rst
new file mode 100644 (file)
index 0000000..16f44ba
--- /dev/null
@@ -0,0 +1,73 @@
+============================================\r
+Data Router (DR) API Guide\r
+============================================\r
+Introduction\r
+------------------\r
+\r
+The DataRouter(DR)provisioning API is an HTTPS-based,REST-like API for creating and managing DR feeds and subscriptions. The Data Routing System project is intended to provide a common framework by which data producers can make data available to data consumers and a way for potential consumers to find feeds with the data they require.\r
+\r
+\r
+HTTP Service APIs\r
+------------------\r
+\r
+DMaaP Message Router utilizes an HTTP REST API to service all transactions. HTTP and REST standards are followed so\r
+clients as varied as CURL, Java applications and even Web Browsers will\r
+work to interact with the Data Router.\r
+\r
+General HTTP Requirements\r
+=========================\r
+\r
+A DMaaP Message Router transactions consists of 4 distinct segments,\r
+HTTP URL, HTTP Header, HTTP Body (POST/PUT) and HTTP Response. The general\r
+considerations for each segment are as follows and are required for each\r
+of the specific transactions described in this section.\r
+\r
+HTTP URL\r
+========\r
+\r
+http[s]://serverBaseURL/{resourcePath}\r
+\r
+\r
+HTTP Header\r
+===========\r
+\r
+Specifies HTTP Headers, such as Content-Type, that define the parameters\r
+of the HTTP Transaction\r
+\r
+HTTP Body\r
+=========\r
+\r
+The HTTP Body contains the topic content when Publishing or Consuming.\r
+The Body may contain topic messages in several formats (like below) but\r
+it must be noted, that, except in very specific circumstances, messages\r
+are not inspected for content.\r
+\r
+Create a Feed\r
+-----------\r
+\r
+**Description**:Creates the feed\r
+\r
+Sample Request\r
+==============\r
+\r
+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://prov.datarouternew.com:8443\r
+\r
+Subscribe to Feed\r
+-----------\r
+\r
+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://prov.datarouternew.com:8443/subscribe/1\r
+\r
+Sample Request\r
+==============\r
+\r
+POST http(s)://{HOST:PORT}/events/{topicname}\r
+\r
+Publish to feed\r
+-----------\r
+\r
+**Description**:publish  the feed\r
+\r
+Sample Request\r
+==============\r
+\r
+curl -v -X PUT --user rs873m:rs873m -H "Content-Type: application/octet-stream" --data-binary @/opt/app/datartr/addFeed3.txt --post301 --location-trusted -k https://prov.datarouternew.com:8443/publish/1/test1\r
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..f7dae49
--- /dev/null
@@ -0,0 +1,28 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+.. Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
+\r
+============================================\r
+Data Router (DR) API Guide\r
+============================================\r
+Introduction\r
+------------------\r
+\r
+The DataRouter(DR)provisioning API is an HTTPS-based,REST-like API for creating and managing DR feeds and subscriptions. The Data Routing System project is intended to provide a common framework by which data producers can make data available to data consumers and a way for potential consumers to find feeds with the data they require.\r
+\r
+\r
+HTTP Service APIs\r
+------------------\r
+\r
+DMaaP Message Router utilizes an HTTP REST API to service all transactions. HTTP and REST standards are followed so\r
+clients as varied as CURL, Java applications and even Web Browsers will\r
+work to interact with the Data Router.\r
+\r
+\r
+\r
+.. toctree::\r
+   :maxdepth: 3\r
+   \r
+   data-router/data-router\r
+\r
+\r
diff --git a/pom.xml b/pom.xml
index d655282..edb9754 100644 (file)
--- a/pom.xml
+++ b/pom.xml
   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
                <maven.compiler.source>1.8</maven.compiler.source>\r
                <maven.compiler.target>1.8</maven.compiler.target>\r
+               <sonar.language>java</sonar.language>\r
+                       <sonar.skip>false</sonar.skip>\r
+               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
+               <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
+               <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
+               <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
+               <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>\r
+               <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
                <nexusproxy>https://nexus.onap.org</nexusproxy>\r
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                                <serverId>ecomp-staging</serverId>\r
                        </configuration>\r
        </plugin>\r
+       \r
+       <plugin>\r
+                               <groupId>org.sonatype.plugins</groupId>\r
+                               <artifactId>nexus-staging-maven-plugin</artifactId>\r
+                               <version>1.6.7</version>\r
+                               <extensions>true</extensions>\r
+                               <configuration>\r
+                                       <nexusUrl>${nexusproxy}</nexusUrl>\r
+                                       <stagingProfileId>176c31dfe190a</stagingProfileId>\r
+                                       <serverId>ecomp-staging</serverId>\r
+                               </configuration>\r
+                       </plugin>\r
+                       \r
+                       <plugin>\r
+          <groupId>org.jacoco</groupId>\r
+          <artifactId>jacoco-maven-plugin</artifactId>\r
+          <version>${jacoco.version}</version>\r
+          <configuration>\r
+            <excludes>\r
+              <exclude>**/gen/**</exclude>\r
+              <exclude>**/generated-sources/**</exclude>\r
+              <exclude>**/yang-gen/**</exclude>\r
+              <exclude>**/pax/**</exclude>\r
+            </excludes>\r
+          </configuration>\r
+          <executions>\r
+\r
+            <execution>\r
+              <id>pre-unit-test</id>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
+                <propertyName>surefireArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+            \r
+       \r
+            <execution>\r
+              <id>post-unit-test</id>\r
+              <phase>test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+            <execution>\r
+              <id>pre-integration-test</id>\r
+              <phase>pre-integration-test</phase>\r
+              <goals>\r
+                <goal>prepare-agent</goal>\r
+              </goals>\r
+              <configuration>\r
+                <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
+\r
+                <propertyName>failsafeArgLine</propertyName>\r
+              </configuration>\r
+            </execution>\r
+\r
+       \r
+            <execution>\r
+              <id>post-integration-test</id>\r
+              <phase>post-integration-test</phase>\r
+              <goals>\r
+                <goal>report</goal>\r
+              </goals>\r
+              <configuration>\r
+                <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
+              </configuration>\r
+            </execution>\r
+          </executions>\r
+        </plugin>\r
        </plugins>\r
   </build>\r
  <distributionManagement>\r
                <repository>\r
                        <id>ecomp-releases</id>\r
-                       <name>AAF Release Repository</name>\r
+                       <name>DR Release Repository</name>\r
                        <url>${nexusproxy}${releaseNexusPath}</url>\r
                </repository>\r
                <snapshotRepository>\r
                        <id>ecomp-snapshots</id>\r
-                       <name>AAF Snapshot Repository</name>\r
+                       <name>DR Snapshot Repository</name>\r
                        <url>${nexusproxy}${snapshotNexusPath}</url>\r
                </snapshotRepository>\r
                <site>\r
             <url>https://nexus.onap.org/content/repositories/snapshots/</url>\r
         </pluginRepository>\r
     </pluginRepositories>\r
-       \r
-<repositories>\r
-               <repository>\r
-                       <id>central</id>\r
-                       <name>Maven 2 repository 2</name>\r
-                       <url>http://repo2.maven.org/maven2/</url>\r
-               </repository>\r
-               <repository>\r
-            <id>onap-jar-snapshots</id>\r
-            <url>https://nexus.onap.org/content/repositories/snapshots</url>\r
-        </repository>\r
-               <repository>\r
-                       <id>spring-repo</id>\r
-                       <name>Spring repo</name>\r
-                       <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>\r
-               </repository>\r
-               <repository>\r
-                       <id>repository.jboss.org-public</id>\r
-                       <name>JBoss.org Maven repository</name>\r
-                       <url>https://repository.jboss.org/nexus/content/groups/public</url>\r
-               </repository>\r
-       </repositories>  \r
+  \r
 </project>\r