Northbound IntegrationTest 77/377/3
authorKalvin Hom <kahom@cisco.com>
Tue, 21 May 2013 01:48:28 +0000 (18:48 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 22 May 2013 12:56:11 +0000 (12:56 +0000)
Initial base for writing integration
tests for northbound bundles.

All northbound integration tests can be
done within this bundle.  A full controller
using the stub protocol plugin will be started.

A test for getting all flow statistics is also
done.

Change-Id: Ife16e2fb81a2fe223813473fdd83402385fc59ba
Signed-off-by: Kalvin Hom <kahom@cisco.com>
opendaylight/distribution/opendaylight/pom.xml
opendaylight/northbound/integrationtest/pom.xml
opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIntegrationTest.java [new file with mode: 0644]
opendaylight/northbound/integrationtest/src/test/resources/tomcat-server.xml [new file with mode: 0644]
opendaylight/protocol_plugins/stub/src/main/java/org/opendaylight/controller/protocol_plugins/stub/internal/ReadService.java

index f9cddd45f9c605128f8b26a66f4e016ba087a7ef..ddc24b3965f86da8ba65ac8d0f32a45eb12f472e 100644 (file)
@@ -84,6 +84,8 @@
     <module>../../northbound/subnets</module>
     <module>../../northbound/switchmanager</module>
 
     <module>../../northbound/subnets</module>
     <module>../../northbound/switchmanager</module>
 
+    <!-- Northbound integration tests -->
+    <module>../../northbound/integrationtest</module>
     <!-- Debug and logging -->
     <module>../../logging/bridge</module>
 
     <!-- Debug and logging -->
     <module>../../logging/bridge</module>
 
index 67d6b379506248fe44bf9debcc208afdc5a87ad4..aa4469e452f32ac793a1027724a4df98a289c97e 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.controller</groupId>
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.controller</groupId>
   <groupId>org.opendaylight.controller</groupId>
   <artifactId>northbound.integrationtest</artifactId>
   <version>0.4.0-SNAPSHOT</version>
   <groupId>org.opendaylight.controller</groupId>
   <artifactId>northbound.integrationtest</artifactId>
   <version>0.4.0-SNAPSHOT</version>
-  
+  <pluginRepositories>
+    <pluginRepository>
+      <id>central2</id>
+      <name>central2</name>
+      <url>${nexusproxy}/repositories/central2/</url>
+    </pluginRepository>
+  </pluginRepositories>
   <dependencies>
   <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal</artifactId>
+      <version>0.5.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal.implementation</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>forwarding.staticrouting</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>clustering.services</artifactId>
       <version>0.4.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>clustering.services</artifactId>
       <version>0.4.0-SNAPSHOT</version>
     </dependency>
-       <dependency>
+    <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <groupId>org.opendaylight.controller</groupId>
-      <artifactId>sal</artifactId>
+      <artifactId>clustering.services-implementation</artifactId>
       <version>0.4.0-SNAPSHOT</version>
       <version>0.4.0-SNAPSHOT</version>
-       </dependency> 
-       <dependency>
+    </dependency>
+    <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <groupId>org.opendaylight.controller</groupId>
-      <artifactId>sal.implementation</artifactId>
+      <artifactId>configuration</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>configuration.implementation</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>routing.dijkstra_implementation</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>arphandler</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>forwardingrulesmanager</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>forwardingrulesmanager.implementation</artifactId>
       <version>0.4.0-SNAPSHOT</version>
       <version>0.4.0-SNAPSHOT</version>
-       </dependency> 
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>hosttracker</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>hosttracker.implementation</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>containermanager</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>containermanager.implementation</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>switchmanager</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>switchmanager.implementation</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>statisticsmanager</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>statisticsmanager.implementation</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>topologymanager</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>usermanager</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>security</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.controller.thirdparty</groupId>
+      <artifactId>net.sf.jung2</artifactId>
+      <version>2.0.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller.thirdparty</groupId>
+      <artifactId>com.sun.jersey.jersey-servlet</artifactId>
+      <version>1.17-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>commons.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>topology.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>forwarding.staticrouting.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>statistics.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>flowprogrammer.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>hosttracker.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>subnets.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>switchmanager.northbound</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>logging.bridge</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>protocol_plugins.stub</artifactId>
+      <version>0.4.0-SNAPSHOT</version>
+    </dependency>
+
+
+    <dependency>
+      <groupId>org.codehaus.enunciate</groupId>
+      <artifactId>enunciate-core-annotations</artifactId>
+      <version>${enunciate.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <version>${slf4j.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>${slf4j.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>log4j-over-slf4j</artifactId>
+      <version>${slf4j.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>ch.qos.logback</groupId>
+      <artifactId>logback-core</artifactId>
+      <version>${logback.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>ch.qos.logback</groupId>
+      <artifactId>logback-classic</artifactId>
+      <version>${logback.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-mapper-asl</artifactId>
+      <version>${jackson.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-core-asl</artifactId>
+      <version>${jackson.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-jaxrs</artifactId>
+      <version>${jackson.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.jettison</groupId>
+      <artifactId>jettison</artifactId>
+      <version>1.3.3</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.3</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-fileupload</groupId>
+      <artifactId>commons-fileupload</artifactId>
+      <version>1.2.2</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>javax.servlet</artifactId>
+      <version>3.0.0.v201112011016</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>javax.servlet.jsp</artifactId>
+      <version>2.2.0.v201112011158</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.eclipse.equinox.ds</artifactId>
+      <version>1.4.0.v20120522-1841</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.eclipse.equinox.util</artifactId>
+      <version>1.0.400.v20120522-2049</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.eclipse.osgi.services</artifactId>
+      <version>3.3.100.v20120522-1822</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.eclipse.osgi</artifactId>
+      <version>3.8.1.v20120830-144521</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.apache.felix.gogo.command</artifactId>
+      <version>0.8.0.v201108120515</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.apache.felix.gogo.runtime</artifactId>
+      <version>0.8.0.v201108120515</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.apache.felix.gogo.shell</artifactId>
+      <version>0.8.0.v201110170705</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.eclipse.equinox.cm</artifactId>
+      <version>1.0.400.v20120522-1841</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.eclipse.equinox.console</artifactId>
+      <version>1.0.0.v20120522-1841</version>
+    </dependency>
+    <dependency>
+      <groupId>equinoxSDK381</groupId>
+      <artifactId>org.eclipse.equinox.launcher</artifactId>
+      <version>1.3.0.v20120522-1813</version>
+    </dependency>
+    <!-- Gemini Web -->
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.gemini.web.core</artifactId>
+      <version>${geminiweb.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.gemini.web.extender</artifactId>
+      <version>${geminiweb.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.gemini.web.tomcat</artifactId>
+      <version>${geminiweb.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.virgo.kernel.equinox.extensions</artifactId>
+      <version>${virgo.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.virgo.util.common</artifactId>
+      <version>${virgo.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.virgo.util.io</artifactId>
+      <version>${virgo.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.virgo.util.math</artifactId>
+      <version>${virgo.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.virgo.util.osgi</artifactId>
+      <version>${virgo.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.virgo.util.osgi.manifest</artifactId>
+      <version>${virgo.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>geminiweb</groupId>
+      <artifactId>org.eclipse.virgo.util.parser.manifest</artifactId>
+      <version>${virgo.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.dependencymanager</artifactId>
+      <version>3.1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.dependencymanager.shell</artifactId>
+      <version>3.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <version>2.1</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.spec.javax.transaction</groupId>
+      <artifactId>jboss-transaction-api_1.1_spec</artifactId>
+      <version>1.0.1.Final</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.fileinstall</artifactId>
+      <version>3.1.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>virgomirror</groupId>
+      <artifactId>org.eclipse.jdt.core.compiler.batch</artifactId>
+      <version>3.8.0.I20120518-2145</version>
+    </dependency>
+    <dependency>
+      <groupId>eclipselink</groupId>
+      <artifactId>javax.persistence</artifactId>
+      <version>2.0.4.v201112161009</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.activation</artifactId>
+      <version>1.1.0.v201211130549</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.annotation</artifactId>
+      <version>1.1.0.v201209060031</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.ejb</artifactId>
+      <version>3.1.1.v201204261316</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.el</artifactId>
+      <version>2.2.0.v201108011116</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.mail.glassfish</artifactId>
+      <version>1.4.1.v201108011116</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.xml.rpc</artifactId>
+      <version>1.1.0.v201005080400</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.catalina</artifactId>
+      <version>7.0.32.v201211201336</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.catalina.ha</artifactId>
+      <version>7.0.32.v201211201952</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.catalina.tribes</artifactId>
+      <version>7.0.32.v201211201952</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.coyote</artifactId>
+      <version>7.0.32.v201211201952</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.el</artifactId>
+      <version>7.0.32.v201211081135</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.jasper</artifactId>
+      <version>7.0.32.v201211201952</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.juli.extras</artifactId>
+      <version>7.0.32.v201211081135</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.tomcat.api</artifactId>
+      <version>7.0.32.v201211081135</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>org.apache.tomcat.util</artifactId>
+      <version>7.0.32.v201211201952</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.servlet.jsp.jstl</artifactId>
+      <version>1.2.0.v201105211821</version>
+    </dependency>
+    <dependency>
+      <groupId>orbit</groupId>
+      <artifactId>javax.servlet.jsp.jstl.impl</artifactId>
+      <version>1.2.0.v201210211230</version>
+    </dependency>
+    <!-- Add Pax Exam -->
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-container-native</artifactId>
+      <version>${exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-junit4</artifactId>
+      <version>${exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-link-mvn</artifactId>
+      <version>${exam.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.url</groupId>
+      <artifactId>pax-url-aether</artifactId>
+      <version>${url.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.asm</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.aop</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.context</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.context.support</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.core</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.beans</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.expression</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.web</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.aopalliance</groupId>
+      <artifactId>com.springsource.org.aopalliance</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.web.servlet</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <!-- Spring security -->
+    <dependency>
+      <groupId>org.springframework.security</groupId>
+      <artifactId>spring-security-config</artifactId>
+      <version>${spring-security.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.security</groupId>
+      <artifactId>spring-security-core</artifactId>
+      <version>${spring-security.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.security</groupId>
+      <artifactId>spring-security-web</artifactId>
+      <version>${spring-security.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.security</groupId>
+      <artifactId>spring-security-taglibs</artifactId>
+      <version>${spring-security.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>org.springframework.transaction</artifactId>
+      <version>${spring-security.version}</version>
+    </dependency>
+    <!-- Visual VM hook -->
+    <dependency>
+      <groupId>org.ow2.chameleon.management</groupId>
+      <artifactId>chameleon-mbeans</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    <!-- Jersey for JAXRS -->
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-core</artifactId>
+      <version>${jersey.version}</version>
+    </dependency>
+    <!-- <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-servlet</artifactId> 
+      <version>${jersey.version}</version> </dependency> -->
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-server</artifactId>
+      <version>${jersey.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-client</artifactId>
+      <version>${jersey.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.sun.jersey</groupId>
+      <artifactId>jersey-json</artifactId>
+      <version>${jersey.version}</version>
+    </dependency>
+
   </dependencies>
 </project>
   </dependencies>
 </project>
+
diff --git a/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIntegrationTest.java b/opendaylight/northbound/integrationtest/src/test/java/org/opendaylight/controller/northbound/integrationtest/NorthboundIntegrationTest.java
new file mode 100644 (file)
index 0000000..47dfa76
--- /dev/null
@@ -0,0 +1,425 @@
+package org.opendaylight.controller.northbound.integrationtest;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.Bundle;
+import javax.inject.Inject;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.osgi.framework.BundleContext;
+import static org.junit.Assert.*;
+import org.ops4j.pax.exam.junit.Configuration;
+import static org.ops4j.pax.exam.CoreOptions.*;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.util.PathUtils;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.charset.Charset;
+import org.apache.commons.codec.binary.Base64;
+
+import org.codehaus.jettison.json.JSONObject;
+import org.codehaus.jettison.json.JSONTokener;
+
+import org.opendaylight.controller.usermanager.IUserManager;
+
+@RunWith(PaxExam.class)
+public class NorthboundIntegrationTest {
+    private Logger log = LoggerFactory
+            .getLogger(NorthboundIntegrationTest.class);
+    // get the OSGI bundle context
+    @Inject
+    private BundleContext bc;
+    private IUserManager users = null;
+
+    private String stateToString(int state) {
+        switch (state) {
+        case Bundle.ACTIVE:
+            return "ACTIVE";
+        case Bundle.INSTALLED:
+            return "INSTALLED";
+        case Bundle.RESOLVED:
+            return "RESOLVED";
+        case Bundle.UNINSTALLED:
+            return "UNINSTALLED";
+        default:
+            return "Not CONVERTED";
+        }
+    }
+
+    @Before
+    public void areWeReady() {
+        assertNotNull(bc);
+        boolean debugit = false;
+        Bundle b[] = bc.getBundles();
+        for (int i = 0; i < b.length; i++) {
+            int state = b[i].getState();
+            if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
+                log.debug("Bundle:" + b[i].getSymbolicName() + " state:"
+                        + stateToString(state));
+                debugit = true;
+            }
+        }
+        if (debugit) {
+            log.debug("Do some debugging because some bundle is "
+                    + "unresolved");
+        }
+        // Assert if true, if false we are good to go!
+        assertFalse(debugit);
+
+        ServiceReference r = bc.getServiceReference(IUserManager.class
+                .getName());
+        if (r != null) {
+            this.users = (IUserManager) bc.getService(r);
+        }
+        // If UserManager is null, cannot login to run tests.
+        assertNotNull(this.users);
+
+    }
+
+    @Test
+    public void testStatistics() {
+
+        System.out.println("Starting Statistics JAXB client.");
+
+        String baseURL = "http://127.0.0.1:8080/controller/nb/v2/statistics/default/flowstats";
+        try {
+            URL url = new URL(baseURL);
+
+            this.users.getAuthorizationList();
+            this.users.authenticate("admin", "admin");
+            String authString = "admin:admin";
+            byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
+            String authStringEnc = new String(authEncBytes);
+            URLConnection connection = url.openConnection();
+            connection.setRequestProperty("Authorization", "Basic "
+                    + authStringEnc);
+
+            connection.setRequestProperty("Content-Type", "application/json");
+            connection.setRequestProperty("Accept", "application/json");
+
+            connection.connect();
+            connection.getContentType();
+            InputStream is = connection.getInputStream();
+            // InputStream is = connection.getInputStream();
+            BufferedReader rd = new BufferedReader(new InputStreamReader(is,
+                    Charset.forName("UTF-8")));
+            StringBuilder sb = new StringBuilder();
+            int cp;
+            while ((cp = rd.read()) != -1) {
+                sb.append((char) cp);
+            }
+            is.close();
+            JSONTokener jt = new JSONTokener(sb.toString());
+            JSONObject json = new JSONObject(jt);
+            JSONObject flowStatistics = json.getJSONObject("flowStatistics");
+            JSONObject node = flowStatistics.getJSONObject("node");
+            // test that node was returned properly
+            Assert.assertTrue(node.getInt("@id") == 0xCAFE);
+            Assert.assertTrue(node.getString("@type").equals("STUB"));
+
+            // test that flow statistics results are correct
+            JSONObject flowStat = flowStatistics.getJSONObject("flowStat");
+            Assert.assertTrue(flowStat.getInt("tableId") == 1);
+            Assert.assertTrue(flowStat.getInt("durationSeconds") == 40);
+            Assert.assertTrue(flowStat.getInt("durationNanoseconds") == 400);
+            Assert.assertTrue(flowStat.getInt("packetCount") == 200);
+            Assert.assertTrue(flowStat.getInt("byteCount") == 100);
+
+            // test that flow information is correct
+            JSONObject flow = flowStat.getJSONObject("flow");
+            Assert.assertTrue(flow.getInt("priority") == 3500);
+            Assert.assertTrue(flow.getInt("idleTimeout") == 1000);
+            Assert.assertTrue(flow.getInt("hardTimeout") == 2000);
+            Assert.assertTrue(flow.getInt("id") == 12345);
+
+            JSONObject match = (flow.getJSONObject("match")
+                    .getJSONObject("matchField"));
+            Assert.assertTrue(match.getString("type").equals("NW_DST"));
+            Assert.assertTrue(match.getString("value").equals("1.1.1.1"));
+
+            Assert.assertTrue(flow.getJSONObject("actions").getString("@type")
+                    .equals("drop"));
+
+        } catch (Exception e) {
+            // Got an unexpected exception
+            Assert.assertTrue(false);
+
+        }
+    }
+
+    // Configure the OSGi container
+    @Configuration
+    public Option[] config() {
+        return options(
+                //
+                systemProperty("logback.configurationFile").value(
+                        "file:" + PathUtils.getBaseDir()
+                                + "/src/test/resources/logback.xml"),
+                // To start OSGi console for inspection remotely
+                systemProperty("osgi.console").value("2401"),
+                systemProperty("org.eclipse.gemini.web.tomcat.config.path")
+                        .value(PathUtils.getBaseDir()
+                                + "/src/test/resources/tomcat-server.xml"),
+
+                // setting default level. Jersey bundles will need to be started
+                // earlier.
+                systemProperty("osgi.bundles.defaultStartLevel").value("4"),
+
+                // Set the systemPackages (used by clustering)
+                systemPackages("sun.reflect", "sun.reflect.misc", "sun.misc"),
+                mavenBundle("javax.servlet", "servlet-api", "2.5"),
+
+                mavenBundle("org.slf4j", "jcl-over-slf4j", "1.7.2"),
+                mavenBundle("org.slf4j", "slf4j-api", "1.7.2"),
+                mavenBundle("org.slf4j", "log4j-over-slf4j", "1.7.2"),
+                mavenBundle("ch.qos.logback", "logback-core", "1.0.9"),
+                mavenBundle("ch.qos.logback", "logback-classic", "1.0.9"),
+                mavenBundle("org.apache.commons", "commons-lang3", "3.1"),
+                mavenBundle("org.apache.felix",
+                        "org.apache.felix.dependencymanager", "3.1.0"),
+
+                // the plugin stub to get data for the tests
+                mavenBundle("org.opendaylight.controller",
+                        "protocol_plugins.stub", "0.4.0-SNAPSHOT"),
+
+                // List all the opendaylight modules
+                mavenBundle("org.opendaylight.controller", "security",
+                        "0.4.0-SNAPSHOT").noStart(),
+                mavenBundle("org.opendaylight.controller", "sal",
+                        "0.5.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "sal.implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "statisticsmanager",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "statisticsmanager.implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "containermanager",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "containermanager.implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "forwardingrulesmanager", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "forwardingrulesmanager.implementation",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "arphandler",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "clustering.services", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "clustering.services-implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "switchmanager",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "switchmanager.implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "configuration",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "configuration.implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "hosttracker",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "hosttracker.implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "arphandler",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "routing.dijkstra_implementation", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "topologymanager",
+                        "0.4.0-SNAPSHOT"),
+
+                mavenBundle("org.opendaylight.controller", "usermanager",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "logging.bridge",
+                        "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller", "clustering.test",
+                        "0.4.0-SNAPSHOT"),
+
+                mavenBundle("org.opendaylight.controller",
+                        "forwarding.staticrouting", "0.4.0-SNAPSHOT"),
+
+                // Northbound bundles
+                mavenBundle("org.opendaylight.controller",
+                        "commons.northbound", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "forwarding.staticrouting.northbound", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "statistics.northbound", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "topology.northbound", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "hosttracker.northbound", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "switchmanager.northbound", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "flowprogrammer.northbound", "0.4.0-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller",
+                        "subnets.northbound", "0.4.0-SNAPSHOT"),
+
+                mavenBundle("org.codehaus.jackson", "jackson-mapper-asl",
+                        "1.9.8"),
+                mavenBundle("org.codehaus.jackson", "jackson-core-asl", "1.9.8"),
+                mavenBundle("org.codehaus.jackson", "jackson-jaxrs", "1.9.8"),
+                mavenBundle("org.codehaus.jettison", "jettison", "1.3.3"),
+
+                mavenBundle("commons-io", "commons-io", "2.3"),
+
+                mavenBundle("commons-fileupload", "commons-fileupload", "1.2.2"),
+
+                mavenBundle("equinoxSDK381", "javax.servlet",
+                        "3.0.0.v201112011016"),
+                mavenBundle("equinoxSDK381", "javax.servlet.jsp",
+                        "2.2.0.v201112011158"),
+                mavenBundle("equinoxSDK381", "org.eclipse.equinox.ds",
+                        "1.4.0.v20120522-1841"),
+                mavenBundle("orbit", "javax.xml.rpc", "1.1.0.v201005080400"),
+                mavenBundle("equinoxSDK381", "org.eclipse.equinox.util",
+                        "1.0.400.v20120522-2049"),
+                mavenBundle("equinoxSDK381", "org.eclipse.osgi.services",
+                        "3.3.100.v20120522-1822"),
+                mavenBundle("equinoxSDK381", "org.apache.felix.gogo.command",
+                        "0.8.0.v201108120515"),
+                mavenBundle("equinoxSDK381", "org.apache.felix.gogo.runtime",
+                        "0.8.0.v201108120515"),
+                mavenBundle("equinoxSDK381", "org.apache.felix.gogo.shell",
+                        "0.8.0.v201110170705"),
+                mavenBundle("equinoxSDK381", "org.eclipse.equinox.cm",
+                        "1.0.400.v20120522-1841"),
+                mavenBundle("equinoxSDK381", "org.eclipse.equinox.console",
+                        "1.0.0.v20120522-1841"),
+                mavenBundle("equinoxSDK381", "org.eclipse.equinox.launcher",
+                        "1.3.0.v20120522-1813"),
+
+                mavenBundle("geminiweb", "org.eclipse.gemini.web.core",
+                        "2.2.0.RELEASE"),
+                mavenBundle("geminiweb", "org.eclipse.gemini.web.extender",
+                        "2.2.0.RELEASE"),
+                mavenBundle("geminiweb", "org.eclipse.gemini.web.tomcat",
+                        "2.2.0.RELEASE"),
+                mavenBundle("geminiweb",
+                        "org.eclipse.virgo.kernel.equinox.extensions",
+                        "3.6.0.RELEASE").noStart(),
+                mavenBundle("geminiweb", "org.eclipse.virgo.util.common",
+                        "3.6.0.RELEASE"),
+                mavenBundle("geminiweb", "org.eclipse.virgo.util.io",
+                        "3.6.0.RELEASE"),
+                mavenBundle("geminiweb", "org.eclipse.virgo.util.math",
+                        "3.6.0.RELEASE"),
+                mavenBundle("geminiweb", "org.eclipse.virgo.util.osgi",
+                        "3.6.0.RELEASE"),
+                mavenBundle("geminiweb",
+                        "org.eclipse.virgo.util.osgi.manifest", "3.6.0.RELEASE"),
+                mavenBundle("geminiweb",
+                        "org.eclipse.virgo.util.parser.manifest",
+                        "3.6.0.RELEASE"),
+
+                mavenBundle("org.apache.felix",
+                        "org.apache.felix.dependencymanager", "3.1.0"),
+                mavenBundle("org.apache.felix",
+                        "org.apache.felix.dependencymanager.shell", "3.0.1"),
+
+                mavenBundle("com.google.code.gson", "gson", "2.1"),
+                mavenBundle("org.jboss.spec.javax.transaction",
+                        "jboss-transaction-api_1.1_spec", "1.0.1.Final"),
+                mavenBundle("org.apache.felix", "org.apache.felix.fileinstall",
+                        "3.1.6"),
+                mavenBundle("org.apache.commons", "commons-lang3", "3.1"),
+                mavenBundle("commons-codec", "commons-codec"),
+                mavenBundle("virgomirror",
+                        "org.eclipse.jdt.core.compiler.batch",
+                        "3.8.0.I20120518-2145"),
+                mavenBundle("eclipselink", "javax.persistence",
+                        "2.0.4.v201112161009"),
+
+                mavenBundle("orbit", "javax.activation", "1.1.0.v201211130549"),
+                mavenBundle("orbit", "javax.annotation", "1.1.0.v201209060031"),
+                mavenBundle("orbit", "javax.ejb", "3.1.1.v201204261316"),
+                mavenBundle("orbit", "javax.el", "2.2.0.v201108011116"),
+                mavenBundle("orbit", "javax.mail.glassfish",
+                        "1.4.1.v201108011116"),
+                mavenBundle("orbit", "javax.xml.rpc", "1.1.0.v201005080400"),
+                mavenBundle("orbit", "org.apache.catalina",
+                        "7.0.32.v201211201336"),
+                // these are bundle fragments that can't be started on its own
+                mavenBundle("orbit", "org.apache.catalina.ha",
+                        "7.0.32.v201211201952").noStart(),
+                mavenBundle("orbit", "org.apache.catalina.tribes",
+                        "7.0.32.v201211201952").noStart(),
+                mavenBundle("orbit", "org.apache.coyote",
+                        "7.0.32.v201211201952").noStart(),
+                mavenBundle("orbit", "org.apache.jasper",
+                        "7.0.32.v201211201952").noStart(),
+
+                mavenBundle("orbit", "org.apache.el", "7.0.32.v201211081135"),
+                mavenBundle("orbit", "org.apache.juli.extras",
+                        "7.0.32.v201211081135"),
+                mavenBundle("orbit", "org.apache.tomcat.api",
+                        "7.0.32.v201211081135"),
+                mavenBundle("orbit", "org.apache.tomcat.util",
+                        "7.0.32.v201211201952").noStart(),
+                mavenBundle("orbit", "javax.servlet.jsp.jstl",
+                        "1.2.0.v201105211821"),
+                mavenBundle("orbit", "javax.servlet.jsp.jstl.impl",
+                        "1.2.0.v201210211230"),
+
+                mavenBundle("org.ops4j.pax.exam", "pax-exam-container-native"),
+                mavenBundle("org.ops4j.pax.exam", "pax-exam-junit4"),
+                mavenBundle("org.ops4j.pax.exam", "pax-exam-link-mvn"),
+                mavenBundle("org.ops4j.pax.url", "pax-url-aether"),
+
+                mavenBundle("org.springframework", "org.springframework.asm",
+                        "3.1.3.RELEASE"),
+                mavenBundle("org.springframework", "org.springframework.aop",
+                        "3.1.3.RELEASE"),
+                mavenBundle("org.springframework",
+                        "org.springframework.context", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework",
+                        "org.springframework.context.support", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework", "org.springframework.core",
+                        "3.1.3.RELEASE"),
+                mavenBundle("org.springframework", "org.springframework.beans",
+                        "3.1.3.RELEASE"),
+                mavenBundle("org.springframework",
+                        "org.springframework.expression", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework", "org.springframework.web",
+                        "3.1.3.RELEASE"),
+
+                mavenBundle("org.aopalliance",
+                        "com.springsource.org.aopalliance", "1.0.0"),
+                mavenBundle("org.springframework",
+                        "org.springframework.web.servlet", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework.security",
+                        "spring-security-config", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework.security",
+                        "spring-security-core", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework.security",
+                        "spring-security-web", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework.security",
+                        "spring-security-taglibs", "3.1.3.RELEASE"),
+                mavenBundle("org.springframework",
+                        "org.springframework.transaction", "3.1.3.RELEASE"),
+
+                mavenBundle("org.ow2.chameleon.management", "chameleon-mbeans",
+                        "1.0.0"),
+                mavenBundle("org.opendaylight.controller.thirdparty",
+                        "net.sf.jung2", "2.0.1-SNAPSHOT"),
+                mavenBundle("org.opendaylight.controller.thirdparty",
+                        "com.sun.jersey.jersey-servlet", "1.17-SNAPSHOT"),
+
+                // Jersey needs to be started before the northbound application
+                // bundles, using a lower start level
+                mavenBundle("com.sun.jersey", "jersey-client", "1.17"),
+                mavenBundle("com.sun.jersey", "jersey-server", "1.17")
+                        .startLevel(2),
+                mavenBundle("com.sun.jersey", "jersey-core", "1.17")
+                        .startLevel(2),
+                mavenBundle("com.sun.jersey", "jersey-json", "1.17")
+                        .startLevel(2), junitBundles());
+    }
+}
\ No newline at end of file
diff --git a/opendaylight/northbound/integrationtest/src/test/resources/tomcat-server.xml b/opendaylight/northbound/integrationtest/src/test/resources/tomcat-server.xml
new file mode 100644 (file)
index 0000000..4be0754
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<Server>
+  <!--APR library loader. Documentation at /docs/apr.html -->
+  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
+  <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
+  <Listener className="org.apache.catalina.core.JasperListener" />
+  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
+  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
+  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
+  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
+
+  <Service name="Catalina">
+    <Connector port="8080" protocol="HTTP/1.1"
+               connectionTimeout="20000"
+               redirectPort="8443" />
+
+<!-- 
+       Please remove the comments around the following Connector tag to enable HTTPS Authentication support.
+       Remember to add a valid keystore in the configuration folder.
+       More info : http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration 
+-->
+ <!-- 
+    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
+               maxThreads="150" scheme="https" secure="true"
+               clientAuth="false" sslProtocol="TLS"
+               keystoreFile="configuration/keystore"
+               keystorePass="changeit"/>
+ -->
+
+    <Engine name="Catalina" defaultHost="localhost">
+      <Host name="localhost" appBase=""
+            unpackWARs="false" autoDeploy="false"
+            deployOnStartup="false" createDirs="false">
+        <Realm className="org.opendaylight.controller.security.ControllerCustomRealm" />
+           <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
+     
+        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+                       prefix="web_access_log_" suffix=".txt" resolveHosts="false"
+                       rotatable="true" fileDateFormat="yyyy-MM"
+                       pattern="%{yyyy-MM-dd HH:mm:ss.SSS z}t - [%a] - %r"/>
+               
+      </Host>
+    </Engine>
+  </Service>
+</Server>
index 0224e3ade6ea16d319b2b18572b7eaf89f5d3f1c..d331ff0602acff92da8d92fdebfc7a6f15cae190 100644 (file)
@@ -94,7 +94,11 @@ public class ReadService implements IPluginInReadService {
         List<Action> actions = new ArrayList<Action>();
         actions.add(action);
         flow.setActions(actions);
         List<Action> actions = new ArrayList<Action>();
         actions.add(action);
         flow.setActions(actions);
-
+        flow.setPriority((short)3500);
+        flow.setIdleTimeout((short)1000);
+        flow.setHardTimeout((short)2000);
+        flow.setId(12345);
+        
         FlowOnNode fn1 = new FlowOnNode(flow);
         fn1.setByteCount(100);
         fn1.setDurationNanoseconds(400);
         FlowOnNode fn1 = new FlowOnNode(flow);
         fn1.setByteCount(100);
         fn1.setDurationNanoseconds(400);