aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--datarouter-node/pom.xml108
-rw-r--r--datarouter-prov/pom.xml111
-rw-r--r--docs/data-router/data-router.rst73
-rw-r--r--docs/index.rst28
-rw-r--r--pom.xml112
5 files changed, 362 insertions, 70 deletions
diff --git a/datarouter-node/pom.xml b/datarouter-node/pom.xml
index d8c2be31..1db177f2 100644
--- a/datarouter-node/pom.xml
+++ b/datarouter-node/pom.xml
@@ -43,6 +43,14 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<dockerLocation>${basedir}/target/</dockerLocation>
+ <sonar.language>java</sonar.language>
+ <sonar.skip>false</sonar.skip>
+ <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+ <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+ <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+ <sonar.projectVersion>${project.version}</sonar.projectVersion>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
<releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
@@ -405,18 +413,93 @@
</formats>
</configuration>
</plugin>
+<plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.7</version>
+ <extensions>true</extensions>
+ <configuration>
+ <nexusUrl>${nexusproxy}</nexusUrl>
+ <stagingProfileId>176c31dfe190a</stagingProfileId>
+ <serverId>ecomp-staging</serverId>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ <configuration>
+ <excludes>
+ <exclude>**/gen/**</exclude>
+ <exclude>**/generated-sources/**</exclude>
+ <exclude>**/yang-gen/**</exclude>
+ <exclude>**/pax/**</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+
+ <execution>
+ <id>pre-unit-test</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
+ <propertyName>surefireArgLine</propertyName>
+ </configuration>
+ </execution>
+
+
+ <execution>
+ <id>post-unit-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>pre-integration-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
+
+ <propertyName>failsafeArgLine</propertyName>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>post-integration-test</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>ecomp-releases</id>
- <name>AAF Release Repository</name>
+ <name>DR Release Repository</name>
<url>${nexusproxy}${releaseNexusPath}</url>
</repository>
<snapshotRepository>
<id>ecomp-snapshots</id>
- <name>AAF Snapshot Repository</name>
+ <name>DR Snapshot Repository</name>
<url>${nexusproxy}${snapshotNexusPath}</url>
</snapshotRepository>
<site>
@@ -430,27 +513,6 @@
<url>https://nexus.onap.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
- <repositories>
- <repository>
- <id>central</id>
- <name>Maven 2 repository 2</name>
- <url>http://repo2.maven.org/maven2/</url>
- </repository>
- <repository>
- <id>onap-jar-snapshots</id>
- <url>https://nexus.onap.org/content/repositories/snapshots</url>
- </repository>
- <repository>
- <id>spring-repo</id>
- <name>Spring repo</name>
- <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
- </repository>
- <repository>
- <id>repository.jboss.org-public</id>
- <name>JBoss.org Maven repository</name>
- <url>https://repository.jboss.org/nexus/content/groups/public</url>
- </repository>
- </repositories>
diff --git a/datarouter-prov/pom.xml b/datarouter-prov/pom.xml
index cd846aaa..c1eae740 100644
--- a/datarouter-prov/pom.xml
+++ b/datarouter-prov/pom.xml
@@ -40,6 +40,14 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<dockerLocation>${basedir}/target/</dockerLocation>
+ <sonar.language>java</sonar.language>
+ <sonar.skip>false</sonar.skip>
+ <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+ <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+ <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+ <sonar.projectVersion>${project.version}</sonar.projectVersion>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
<releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
@@ -489,17 +497,95 @@
</formats>
</configuration>
</plugin>
+
+
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.7</version>
+ <extensions>true</extensions>
+ <configuration>
+ <nexusUrl>${nexusproxy}</nexusUrl>
+ <stagingProfileId>176c31dfe190a</stagingProfileId>
+ <serverId>ecomp-staging</serverId>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ <configuration>
+ <excludes>
+ <exclude>**/gen/**</exclude>
+ <exclude>**/generated-sources/**</exclude>
+ <exclude>**/yang-gen/**</exclude>
+ <exclude>**/pax/**</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+
+ <execution>
+ <id>pre-unit-test</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
+ <propertyName>surefireArgLine</propertyName>
+ </configuration>
+ </execution>
+
+
+ <execution>
+ <id>post-unit-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>pre-integration-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
+
+ <propertyName>failsafeArgLine</propertyName>
+ </configuration>
+ </execution>
+
+
+ <execution>
+ <id>post-integration-test</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>ecomp-releases</id>
- <name>AAF Release Repository</name>
+ <name>DR Release Repository</name>
<url>${nexusproxy}${releaseNexusPath}</url>
</repository>
<snapshotRepository>
<id>ecomp-snapshots</id>
- <name>AAF Snapshot Repository</name>
+ <name>DR Snapshot Repository</name>
<url>${nexusproxy}${snapshotNexusPath}</url>
</snapshotRepository>
<site>
@@ -514,26 +600,5 @@
</pluginRepository>
</pluginRepositories>
- <repositories>
- <repository>
- <id>central</id>
- <name>Maven 2 repository 2</name>
- <url>http://repo2.maven.org/maven2/</url>
- </repository>
- <repository>
- <id>onap-jar-snapshots</id>
- <url>https://nexus.onap.org/content/repositories/snapshots</url>
- </repository>
- <repository>
- <id>spring-repo</id>
- <name>Spring repo</name>
- <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
- </repository>
- <repository>
- <id>repository.jboss.org-public</id>
- <name>JBoss.org Maven repository</name>
- <url>https://repository.jboss.org/nexus/content/groups/public</url>
- </repository>
- </repositories>
</project>
diff --git a/docs/data-router/data-router.rst b/docs/data-router/data-router.rst
new file mode 100644
index 00000000..16f44ba3
--- /dev/null
+++ b/docs/data-router/data-router.rst
@@ -0,0 +1,73 @@
+============================================
+Data Router (DR) API Guide
+============================================
+Introduction
+------------------
+
+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.
+
+
+HTTP Service APIs
+------------------
+
+DMaaP Message Router utilizes an HTTP REST API to service all transactions. HTTP and REST standards are followed so
+clients as varied as CURL, Java applications and even Web Browsers will
+work to interact with the Data Router.
+
+General HTTP Requirements
+=========================
+
+A DMaaP Message Router transactions consists of 4 distinct segments,
+HTTP URL, HTTP Header, HTTP Body (POST/PUT) and HTTP Response. The general
+considerations for each segment are as follows and are required for each
+of the specific transactions described in this section.
+
+HTTP URL
+========
+
+http[s]://serverBaseURL/{resourcePath}
+
+
+HTTP Header
+===========
+
+Specifies HTTP Headers, such as Content-Type, that define the parameters
+of the HTTP Transaction
+
+HTTP Body
+=========
+
+The HTTP Body contains the topic content when Publishing or Consuming.
+The Body may contain topic messages in several formats (like below) but
+it must be noted, that, except in very specific circumstances, messages
+are not inspected for content.
+
+Create a Feed
+-----------
+
+**Description**:Creates the feed
+
+Sample Request
+==============
+
+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
+
+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://prov.datarouternew.com:8443/subscribe/1
+
+Sample Request
+==============
+
+POST http(s)://{HOST:PORT}/events/{topicname}
+
+Publish to feed
+-----------
+
+**Description**:publish the feed
+
+Sample Request
+==============
+
+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
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 00000000..f7dae490
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,28 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+
+============================================
+Data Router (DR) API Guide
+============================================
+Introduction
+------------------
+
+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.
+
+
+HTTP Service APIs
+------------------
+
+DMaaP Message Router utilizes an HTTP REST API to service all transactions. HTTP and REST standards are followed so
+clients as varied as CURL, Java applications and even Web Browsers will
+work to interact with the Data Router.
+
+
+
+.. toctree::
+ :maxdepth: 3
+
+ data-router/data-router
+
+
diff --git a/pom.xml b/pom.xml
index d655282a..edb9754f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,6 +41,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
+ <sonar.language>java</sonar.language>
+ <sonar.skip>false</sonar.skip>
+ <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+ <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+ <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+ <sonar.projectVersion>${project.version}</sonar.projectVersion>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
<releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
@@ -67,17 +75,94 @@
<serverId>ecomp-staging</serverId>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.7</version>
+ <extensions>true</extensions>
+ <configuration>
+ <nexusUrl>${nexusproxy}</nexusUrl>
+ <stagingProfileId>176c31dfe190a</stagingProfileId>
+ <serverId>ecomp-staging</serverId>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ <configuration>
+ <excludes>
+ <exclude>**/gen/**</exclude>
+ <exclude>**/generated-sources/**</exclude>
+ <exclude>**/yang-gen/**</exclude>
+ <exclude>**/pax/**</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+
+ <execution>
+ <id>pre-unit-test</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
+ <propertyName>surefireArgLine</propertyName>
+ </configuration>
+ </execution>
+
+
+ <execution>
+ <id>post-unit-test</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>pre-integration-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
+
+ <propertyName>failsafeArgLine</propertyName>
+ </configuration>
+ </execution>
+
+
+ <execution>
+ <id>post-integration-test</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>ecomp-releases</id>
- <name>AAF Release Repository</name>
+ <name>DR Release Repository</name>
<url>${nexusproxy}${releaseNexusPath}</url>
</repository>
<snapshotRepository>
<id>ecomp-snapshots</id>
- <name>AAF Snapshot Repository</name>
+ <name>DR Snapshot Repository</name>
<url>${nexusproxy}${snapshotNexusPath}</url>
</snapshotRepository>
<site>
@@ -91,26 +176,5 @@
<url>https://nexus.onap.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
-
-<repositories>
- <repository>
- <id>central</id>
- <name>Maven 2 repository 2</name>
- <url>http://repo2.maven.org/maven2/</url>
- </repository>
- <repository>
- <id>onap-jar-snapshots</id>
- <url>https://nexus.onap.org/content/repositories/snapshots</url>
- </repository>
- <repository>
- <id>spring-repo</id>
- <name>Spring repo</name>
- <url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
- </repository>
- <repository>
- <id>repository.jboss.org-public</id>
- <name>JBoss.org Maven repository</name>
- <url>https://repository.jboss.org/nexus/content/groups/public</url>
- </repository>
- </repositories>
+
</project>