</parent>
<groupId>ch.vorburger.opendaylight.simple</groupId>
- <artifactId>poc</artifactId>
+ <artifactId>simple-aggregator</artifactId>
<version>1.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
<properties>
<!-- TODO remove this (to inherit the skip>false from infrautils' parent),
</dependencyManagement>
<dependencies>
- <dependency>
- <groupId>org.immutables</groupId>
- <artifactId>value</artifactId>
- </dependency>
-<!-- TODO integrate neutron (after genius is working)
- <dependency>
- <groupId>org.opendaylight.neutron</groupId>
- <artifactId>integration-test-standalone</artifactId>
- <version>0.12.0</version>
- <scope>test</scope>
- </dependency>
--->
+
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<scope>compile</scope>
</dependency>
-
+ <!-- Logging related -->
<dependency>
- <groupId>org.apache.aries.blueprint</groupId>
- <artifactId>blueprint-maven-plugin-annotation</artifactId>
- <optional>true</optional>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <!-- Must override odlparent's <scope>provided so that it gets bundled -->
+ <scope>compile</scope>
</dependency>
- <!-- TODO Remove pax-web-api dependency eventually -->
<dependency>
- <groupId>org.ops4j.pax.web</groupId>
- <artifactId>pax-web-api</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <scope>compile</scope>
</dependency>
+ <!--controller-->
<dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>mdsal-eos-dom-simple</artifactId>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>blueprint</artifactId>
+ <version>0.10.0</version>
+ <scope>compile</scope>
</dependency>
+
+ <!--mdsal-->
<dependency>
<!-- TODO remove this temporary v0.1 hack; see org.opendaylight.controller.simple.ControllerModule -->
<groupId>org.opendaylight.controller</groupId>
</exclusions>
-->
</dependency>
-
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro</artifactId>
- <version>0.9.0</version>
- </dependency>
-
- <!--dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-api</artifactId>
- <version>0.9.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-act</artifactId>
- <version>0.9.0</version>
- </dependency-->
-
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-api</artifactId>
- <version>0.9.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>aaa-authn-odl-plugin</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-config</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-mapping-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-impl</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-topology</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-topology-singleton</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-client</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>sal-netconf-connector</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>mdsal-netconf-connector</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>restconf-nb-rfc8040</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.karaf.shell</groupId>
- <artifactId>org.apache.karaf.shell.core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.netvirt</groupId>
- <artifactId>odl-netvirt-openstack</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <exclusions>
- <!-- TODO Figure out why M2E breaks down over (just) neutronvpn-impl's <classifier>config <type>xml ... -->
- <exclusion>
- <groupId>org.opendaylight.netvirt</groupId>
- <artifactId>neutronvpn-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opendaylight.netvirt</groupId>
- <!-- bgpmanager needs Thrift, which for some reason is not transitively pulled (TODO find out why);
- But we, currently at least, have no interest in bgpmanager anyway, so exclude it here, for now. -->
- <artifactId>bgpmanager-impl</artifactId>
- </exclusion>
- <!-- karaf.shell.console leads to various duplicate classpath entries; we only support shell.core -->
- <exclusion>
- <groupId>org.apache.karaf.shell</groupId>
- <artifactId>org.apache.karaf.shell.console</artifactId>
- </exclusion>
- <!-- osgi.core overlaps (x5) with felix.configadmin, and we don't need it here anyway
- TODO EXCLUDE IT AGAIN LATER; FOR NOW, SOME CLASSES UNFORTUNATELY STILL REFERENCE IT
- <exclusion>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </exclusion>
- -->
- <!-- osgi.compendium (big) overlaps (x12) with (small) felix.configadmin, and with org.osgi.service.event (x9)
- <exclusion>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </exclusion>
- TODO but shiro.web.env.EnvironmentLoader currently requires org.osgi.service.http.NamespaceException,
- which is available in osgi.compendium, thus commented; so sort out duplicate classpath entries with exclusion of felix.configadmin instead, and remove this
- -->
- <exclusion>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>odl-restconf-noauth</artifactId>
- </exclusion>
- <!-- TODO Remove when this is merged and we bumped to an odlparent with it: https://git.opendaylight.org/gerrit/#/c/67184/ -->
- <exclusion>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- </exclusion>
- <!-- TODO Remove when this is merged and we bumped to an odlparent with it: https://git.opendaylight.org/gerrit/#/c/67185/ -->
- <exclusion>
- <groupId>org.iq80.leveldb</groupId>
- <artifactId>leveldb-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>odl-karaf-feat-jdbc</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>odl-aaa-shiro</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-act</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.aaa.web</groupId>
- <artifactId>web-jetty-impl</artifactId>
- <version>0.9.0</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa.web</groupId>
- <artifactId>servlet-jersey2</artifactId>
- <version>0.9.0</version>
- </dependency>
-
- <!-- TODO Align dropwizard.metrics in odlparent, controller and infrautils and ditch this -->
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-core</artifactId>
- <!-- This version must be kept in line with the one used in metrics-impl -->
- <version>4.0.3</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard.metrics</groupId>
- <artifactId>metrics-jvm</artifactId>
- <!-- This version must be kept in line with the one used in metrics-impl -->
- <version>4.0.3</version>
- </dependency>
-
- <!-- Implementation specials, these are not transitively inherited via the Karaf feature dependency -->
- <dependency>
- <groupId>org.opendaylight.infrautils</groupId>
- <artifactId>caches-standard-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>util</artifactId>
- </dependency>
-
- <!-- Logging related -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <!-- Must override odlparent's <scope>provided so that it gets bundled -->
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.infrautils</groupId>
- <artifactId>inject.guice</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.inject.extensions</groupId>
- <artifactId>guice-multibindings</artifactId>
- <!-- TODO remove when we bumped to Guice 4.2.0,
- because there this is already included according to https://github.com/google/guice/wiki/Guice42;
- and if we never bump, then move this dependency into the (TBD) infrautils:inject.guice instead -->
- <version>4.1.0</version>
- </dependency>
-
- <!-- Now <scope>test... -->
- <dependency>
- <groupId>org.opendaylight.aaa.web</groupId>
- <artifactId>testutils</artifactId>
- <version>0.9.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.infrautils</groupId>
- <artifactId>infrautils-testutils</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.infrautils</groupId>
- <artifactId>inject.guice.testutils</artifactId>
- <scope>compile</scope>
- <!-- TODO <scope>test</scope> instead of compile here once I'll create
- a new infrautils:inject.guice.testutils (non-testutils) for the run-time part.. -->
- </dependency>
- <!-- TODO remove, this is just a temporary hack, see above -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>compile</scope>
- </dependency>
- <!-- TODO remove when https://git.opendaylight.org/gerrit/#/c/67763/ is merged and odlparent bumped -->
- <dependency>
- <groupId>com.mycila.guice.extensions</groupId>
- <artifactId>mycila-guice-jsr250</artifactId>
- <scope>compile</scope>
- </dependency>
+
</dependencies>
+ <modules>
+ <module>simple-core</module>
+ <module>simple-netconf</module>
+ <module>simple-openflowplugin</module>
+ <module>simple-ovsdb</module>
+ <!--module>simple-genius</module>
+ <module>simple-netvirt</module>
+ <module>simple-neutron</module>
+ <module>simple-ovsdb</module-->
+ </modules>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <!-- TODO upstream version into odlparent pluginManagement -->
- <version>3.1.1</version>
- <configuration>
- <descriptors>
- <descriptor>src/assembly/simple.xml</descriptor>
- </descriptors>
- <tarLongFileMode>gnu</tarLongFileMode>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib/</classpathPrefix>
- <!-- <classpathLayoutType>repository</classpathLayoutType> -->
- <classpathLayoutType>custom</classpathLayoutType>
- <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
- <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
- <mainClass>org.opendaylight.genius.simple.GeniusMain</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-aggregator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-core</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.immutables</groupId>
+ <artifactId>value</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>blueprint-maven-plugin-annotation</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <!-- TODO Remove pax-web-api dependency eventually -->
+ <dependency>
+ <groupId>org.ops4j.pax.web</groupId>
+ <artifactId>pax-web-api</artifactId>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-common</artifactId>
+ <version>4.1.31.Final</version>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>diagstatus-api</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>diagstatus-impl</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>diagstatus-web</artifactId>
+ </dependency>
+
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>metrics-impl</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>jobcoordinator-api</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>jobcoordinator-impl</artifactId>
+ </dependency>
+
+ <!--controller-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>netty-event-executor-config</artifactId>
+ <version>0.10.0</version>
+ </dependency>
+
+ <!--controller-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>netty-threadgroup-config</artifactId>
+ <version>0.10.0</version>
+ </dependency>
+
+ <!--controller-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>netty-timer-config</artifactId>
+ <version>0.10.0</version>
+ </dependency>
+
+ <!--controller-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>threadpool-config-impl</artifactId>
+ <version>0.10.0</version>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-eos-dom-simple</artifactId>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-eos-binding-api</artifactId>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-singleton-common-api</artifactId>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-singleton-dom-impl</artifactId>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-eos-binding-adapter</artifactId>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-binding-dom-adapter</artifactId>
+ </dependency>
+
+ <!--mdsal-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-broker-impl</artifactId>
+ </dependency>
+
+ <!--restconf-->
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>restconf-nb-rfc8040</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>restconf-nb-bierman02</artifactId>
+ </dependency>
+
+ <!--aaa-->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cert</artifactId>
+ <version>0.9.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!--aaa-->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-encrypt-service-impl</artifactId>
+ <version>0.9.0</version>
+ </dependency>
+
+ <!--aaa-->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ <version>0.9.0</version>
+ </dependency>
+
+ <!--aaa -->
+ <!--dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-api</artifactId>
+ <version>0.9.0</version>
+ </dependency-->
+
+ <!--aaa-->
+ <!--dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-act</artifactId>
+ <version>0.9.0</version>
+ </dependency-->
+
+ <!--aaa-->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-api</artifactId>
+ <version>0.9.0</version>
+ </dependency>
+
+ <!--aaa-->
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>aaa-authn-odl-plugin</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>web-jetty-impl</artifactId>
+ <version>0.9.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>servlet-jersey2</artifactId>
+ <version>0.9.0</version>
+ </dependency>
+
+ <!--serviceutils-->
+ <dependency>
+ <groupId>org.opendaylight.serviceutils</groupId>
+ <artifactId>srm-api</artifactId>
+ <version>0.3.0</version>
+ </dependency>
+
+ <!--serviceutils-->
+ <dependency>
+ <groupId>org.opendaylight.serviceutils</groupId>
+ <artifactId>srm-impl</artifactId>
+ <version>0.3.0</version>
+ </dependency>
+
+ <!--serviceutils-->
+ <dependency>
+ <groupId>org.opendaylight.serviceutils</groupId>
+ <artifactId>upgrade</artifactId>
+ <version>0.3.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- TODO Align dropwizard.metrics in odlparent, controller and infrautils and ditch this -->
+ <dependency>
+ <groupId>io.dropwizard.metrics</groupId>
+ <artifactId>metrics-core</artifactId>
+ <!-- This version must be kept in line with the one used in metrics-impl -->
+ <version>4.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>io.dropwizard.metrics</groupId>
+ <artifactId>metrics-jvm</artifactId>
+ <!-- This version must be kept in line with the one used in metrics-impl -->
+ <version>4.0.3</version>
+ </dependency>
+
+ <!-- Implementation specials, these are not transitively inherited via the Karaf feature dependency -->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>caches-standard-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>util</artifactId>
+ </dependency>
+
+ <!-- Logging related -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <!-- Must override odlparent's <scope>provided so that it gets bundled -->
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>inject.guice</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>inject.guice.testutils</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-multibindings</artifactId>
+ <!-- TODO remove when we bumped to Guice 4.2.0,
+ because there this is already included according to https://github.com/google/guice/wiki/Guice42;
+ and if we never bump, then move this dependency into the (TBD) infrautils:inject.guice instead -->
+ <version>4.1.0</version>
+ </dependency>
+
+ <!-- Now <scope>test... -->
+ <dependency>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>testutils</artifactId>
+ <version>0.9.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>infrautils-testutils</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>inject.guice.testutils</artifactId>
+ <scope>compile</scope>
+ <!-- TODO <scope>test</scope> instead of compile here once I'll create
+ a new infrautils:inject.guice.testutils (non-testutils) for the run-time part.. -->
+ </dependency>
+ <!-- TODO remove, this is just a temporary hack, see above -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!-- TODO remove when https://git.opendaylight.org/gerrit/#/c/67763/ is merged and odlparent bumped -->
+ <dependency>
+ <groupId>com.mycila.guice.extensions</groupId>
+ <artifactId>mycila-guice-jsr250</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <!--controller-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>blueprint</artifactId>
+ <version>0.10.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- TODO upstream version into odlparent pluginManagement -->
+ <version>3.1.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/simple.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <!-- <classpathLayoutType>repository</classpathLayoutType> -->
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
+ <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-aggregator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-genius</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-openflowplugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- TODO upstream version into odlparent pluginManagement -->
+ <version>3.1.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/simple.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <!-- <classpathLayoutType>repository</classpathLayoutType> -->
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
+ <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+ <mainClass>org.opendaylight.genius.simple.GeniusMain</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>simple</id>
+ <formats>
+ <format>dir</format>
+ <format>tar</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <!-- This must match the customClasspathLayout of the maven-jar-plugin -->
+ <outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+<!--
+ <repositories>
+ <repository>
+ <outputDirectory>system</outputDirectory>
+ </repository>
+ </repositories>
+-->
+</assembly>
--- /dev/null
+# This file has the same format as etc/org.ops4j.pax.logging.cfg
+# but ${karaf.data} has been replaced by "data/", all Karaf/OSGi appenders etc. have been removed,
+# the file name changed from karaf.log to opendaylight.log, and the "log4j2." prefix needed to be removed.
+
+rootLogger.level = DEBUG
+# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
+#rootLogger.type = asyncRoot
+#rootLogger.includeLocation = false
+rootLogger.appenderRef.RollingFile.ref = RollingFile
+rootLogger.appenderRef.Console.ref = Console
+rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
+rootLogger.appenderRef.Console.filter.threshold.level = WARN
+
+appender.console.type = Console
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+
+appender.rolling.type = RollingRandomAccessFile
+appender.rolling.name = RollingFile
+appender.rolling.fileName = data/log/opendaylight.log
+appender.rolling.filePattern = data/log/opendaylight.log.%i
+# uncomment to not force a disk flush
+#appender.rolling.immediateFlush = false
+appender.rolling.append = true
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+appender.rolling.policies.type = Policies
+appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling.policies.size.size = 16MB
+
+logger.netconfsal.name = org.opendaylight.controller.sal.connect.netconf
+logger.netconfsal.level = TRACE
+logger.netconf.name = org.opendaylight.netconf
+logger.netconf.level = TRACE
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.aaa.simple.test;
+
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.opendaylight.aaa.simple.AAAModule;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+
+@Ignore // TODO fix NullPointerException at org.opendaylight.aaa.cert.impl.DefaultMdsalSslData.createKeyStores :155
+public class AAAModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(new AAAModule(), new InMemoryControllerModule(),
+ // TODO new WebWiring(true), new ReferencesWiring(),
+ new AnnotationsModule());
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.aaa.simple.test;
+
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.opendaylight.aaa.cert.api.ICertificateManager;
+import org.opendaylight.aaa.simple.CertModule;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+
+public class CertModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(
+ new CertModule(), new InMemoryControllerModule(), new AnnotationsModule());
+
+ @Inject ICertificateManager certificateManager;
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.aaa.simple.test;
+
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.opendaylight.aaa.encrypt.AAAEncryptionService;
+import org.opendaylight.aaa.simple.EncryptModule;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+
+public class EncryptModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(
+ new EncryptModule(), new InMemoryControllerModule(), new AnnotationsModule());
+
+ @Inject AAAEncryptionService encryptionService;
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.simple.test;
+
+import java.util.concurrent.ExecutionException;
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.NotificationService;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.mdsal.simple.PingPong;
+
+public class InMemoryControllerModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(InMemoryControllerModule.class, AnnotationsModule.class);
+
+ @Inject DataBroker dataBroker;
+ @Inject @PingPong DataBroker pingPongDataBroker;
+ @Inject NotificationService notificationService;
+
+ @Test public void testDataBroker() throws InterruptedException, ExecutionException {
+ dataBroker.newReadWriteTransaction().commit().get();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.inject.guice.tests;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.junit.Test;
+import org.junit.runners.model.Statement;
+import org.opendaylight.infrautils.inject.guice.AbstractCloseableModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+
+/**
+ * Test PreDestroy in Module.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class AbstractCloseableModuleTest {
+
+ public static class TestModule extends AbstractCloseableModule {
+ boolean isClosed = false;
+
+ @Override
+ public void close() {
+ isClosed = true;
+ }
+
+ @Override protected void configureCloseables() {
+ // IRL: bind(...)
+ }
+ }
+
+ @SuppressWarnings("checkstyle:IllegalThrows")
+ @Test public void testModuleWithPreDestroy() throws Throwable {
+ @SuppressWarnings("resource")
+ TestModule testModule = new TestModule();
+ new GuiceRule(testModule, new AnnotationsModule()).apply(EMPTY_STATEMENT, null, new Object()).evaluate();
+ assertThat(testModule.isClosed).isTrue();
+ }
+
+ private static final Statement EMPTY_STATEMENT = new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ }
+ };
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.inject.guice.testutils.tests;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+
+/**
+ * Test illustrating how to use the GuiceRule with an inline lamda binding.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class GuiceRuleLambdaTest {
+
+ @SuppressWarnings("BindingToUnqualifiedCommonType")
+ public @Rule GuiceRule guice = new GuiceRule(
+ binder -> binder.bind(String.class).toInstance("hello, world"),
+ new AnnotationsModule());
+
+ @Inject String string;
+
+ @Test public void testLambdaBinding() {
+ assertThat(string).isEqualTo("hello, world");
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.simple.test;
+
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.infrautils.diagstatus.DiagStatusService;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
+import org.opendaylight.infrautils.simple.DiagStatusModule;
+import org.opendaylight.infrautils.web.WebModule;
+
+/**
+ * Unit test for {@link DiagStatusModule}.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class DiagStatusModuleTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(WebModule.class, DiagStatusModule.class, ReadyModule.class,
+ AnnotationsModule.class);
+
+ @Inject DiagStatusService diagStatusService;
+
+ @Test public void testDiagStatusService() { }
+
+ // TODO separate DiagStatusWiring0Test VS DiagStatusWiring1Test where *1* registers a
+ // Module that actually does bind a ServiceStatusProvider ...
+ // not here, but in infrautils.diagstatus
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.simple.test;
+
+import org.junit.Test;
+import org.opendaylight.infrautils.inject.guice.testutils.AbstractGuiceJsr250Module;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
+import org.opendaylight.infrautils.simple.Main;
+
+/**
+ * Unit test for Main.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class MainTest {
+
+ @Test
+ public void testMain() {
+ new Main(new TestModule()).closeInjector();
+ }
+
+ public static class TestModule extends AbstractGuiceJsr250Module {
+ @Override
+ protected void configureBindings() {
+ install(new ReadyModule());
+
+ // bind(SomeInterfaceWithPostConstruct.class).to(SomeClassWithPostConstruct.class);
+ }
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.simple.testutils;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.mycila.guice.ext.closeable.CloseableInjector;
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.infrautils.testutils.LogRule;
+
+/**
+ * Abstract base class for simple distribution component tests.
+ *
+ * @author Michael Vorburger.ch
+ */
+public abstract class AbstractSimpleDistributionTest {
+
+ // TODO public static @ClassRule ClasspathHellDuplicatesCheckRule jHades = new ClasspathHellDuplicatesCheckRule();
+
+ public @Rule LogRule logRule = new LogRule();
+ // TODO NOK together with Log4j on CP, re-enable when split into separate modules:
+ // public @Rule LogCaptureRule logCaptureRule = new LogCaptureRule();
+
+ // The point of this is really just to make sure that subclasses have a @Rule GuiceRule
+ private @Inject CloseableInjector closeableInjector;
+
+ @Test public void testDistribution() {
+ assertThat(closeableInjector).isNotNull();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.simple.test;
+
+import java.util.concurrent.ExecutionException;
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.mdsal.binding.api.DataBroker;
+import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry;
+import org.opendaylight.mdsal.binding.api.RpcProviderService;
+import org.opendaylight.mdsal.simple.PingPong;
+
+public class InMemoryMdsalModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(InMemoryControllerModule.class, AnnotationsModule.class);
+
+ @Inject @PingPong DataBroker pingPongDataBroker;
+ @Inject DataBroker dataBroker;
+
+ @Inject RpcProviderService rpcProviderService;
+ @Inject RpcConsumerRegistry rpcConsumerRegistry;
+
+ @Test public void testDataBroker() throws InterruptedException, ExecutionException {
+ dataBroker.newReadWriteTransaction().commit().get();
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.restconf.simple.test;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.opendaylight.infrautils.testutils.web.TestWebClient.Method.GET;
+
+import java.io.IOException;
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.aaa.web.WebServer;
+import org.opendaylight.aaa.web.testutils.TestWebClient;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.infrautils.web.WebModule;
+import org.opendaylight.restconf.simple.RestConfModule;
+
+/**
+ * Tests if the {@link RestConfModule} works.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class RestConfModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(
+ RestConfModule.class, InMemoryControllerModule.class, WebModule.class, AnnotationsModule.class);
+
+ @Inject WebServer webServer;
+ @Inject TestWebClient http;
+
+ @Test public void testRestConf() throws IOException {
+ assertThat(http.request(GET, "/restconf/modules/").getStatus()).isEqualTo(200);
+
+ // TODO test security; add auth support to TestHttpClient, check that w.o. auth it's 401
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.serviceutils.simple.test;
+
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.serviceutils.simple.ServiceUtilsModule;
+import org.opendaylight.serviceutils.upgrade.UpgradeState;
+
+/**
+ * Test the serviceutils wiring.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class ServiceUtilsModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(ServiceUtilsModule.class, InMemoryControllerModule.class,
+ AnnotationsModule.class);
+
+ @Inject UpgradeState upgradeState;
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-aggregator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-netconf</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-config</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-mapping-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-impl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-topology</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-topology-singleton</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>netconf-client</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>sal-netconf-connector</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>mdsal-netconf-connector</artifactId>
+ </dependency>
+
+ <!--controller-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>threadpool-config-impl</artifactId>
+ <version>0.10.0</version>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>inject.guice</artifactId>
+ </dependency>
+
+ <!--infrautils-->
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>inject.guice.testutils</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <!--aaa-->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cert</artifactId>
+ <version>0.9.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!--controller-->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>blueprint</artifactId>
+ <version>0.10.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- TODO upstream version into odlparent pluginManagement -->
+ <version>3.1.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/simple.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <!-- <classpathLayoutType>repository</classpathLayoutType> -->
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
+ <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+ <mainClass>org.opendaylight.netconf.simple.NetconfMain</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>simple</id>
+ <formats>
+ <format>dir</format>
+ <format>tar</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <!-- This must match the customClasspathLayout of the maven-jar-plugin -->
+ <outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+<!--
+ <repositories>
+ <repository>
+ <outputDirectory>system</outputDirectory>
+ </repository>
+ </repositories>
+-->
+</assembly>
--- /dev/null
+# This file has the same format as etc/org.ops4j.pax.logging.cfg
+# but ${karaf.data} has been replaced by "data/", all Karaf/OSGi appenders etc. have been removed,
+# the file name changed from karaf.log to opendaylight.log, and the "log4j2." prefix needed to be removed.
+
+rootLogger.level = DEBUG
+# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
+#rootLogger.type = asyncRoot
+#rootLogger.includeLocation = false
+rootLogger.appenderRef.RollingFile.ref = RollingFile
+rootLogger.appenderRef.Console.ref = Console
+rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
+rootLogger.appenderRef.Console.filter.threshold.level = WARN
+
+appender.console.type = Console
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+
+appender.rolling.type = RollingRandomAccessFile
+appender.rolling.name = RollingFile
+appender.rolling.fileName = data/log/opendaylight.log
+appender.rolling.filePattern = data/log/opendaylight.log.%i
+# uncomment to not force a disk flush
+#appender.rolling.immediateFlush = false
+appender.rolling.append = true
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+appender.rolling.policies.type = Policies
+appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling.policies.size.size = 16MB
+
+logger.netconfsal.name = org.opendaylight.controller.sal.connect.netconf
+logger.netconfsal.level = TRACE
+logger.netconf.name = org.opendaylight.netconf
+logger.netconf.level = TRACE
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-aggregator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-netvirt</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-genius</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.netvirt</groupId>
+ <artifactId>odl-netvirt-openstack</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <exclusions>
+ <!-- TODO Figure out why M2E breaks down over (just) neutronvpn-impl's <classifier>config <type>xml ... -->
+ <exclusion>
+ <groupId>org.opendaylight.netvirt</groupId>
+ <artifactId>neutronvpn-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.opendaylight.netvirt</groupId>
+ <!-- bgpmanager needs Thrift, which for some reason is not transitively pulled (TODO find out why);
+ But we, currently at least, have no interest in bgpmanager anyway, so exclude it here, for now. -->
+ <artifactId>bgpmanager-impl</artifactId>
+ </exclusion>
+ <!-- karaf.shell.console leads to various duplicate classpath entries; we only support shell.core -->
+ <exclusion>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.console</artifactId>
+ </exclusion>
+ <!-- osgi.core overlaps (x5) with felix.configadmin, and we don't need it here anyway
+ TODO EXCLUDE IT AGAIN LATER; FOR NOW, SOME CLASSES UNFORTUNATELY STILL REFERENCE IT
+ <exclusion>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </exclusion>
+ -->
+ <!-- osgi.compendium (big) overlaps (x12) with (small) felix.configadmin, and with org.osgi.service.event (x9)
+ <exclusion>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ </exclusion>
+ TODO but shiro.web.env.EnvironmentLoader currently requires org.osgi.service.http.NamespaceException,
+ which is available in osgi.compendium, thus commented; so sort out duplicate classpath entries with exclusion of felix.configadmin instead, and remove this
+ -->
+ <exclusion>
+ <groupId>org.opendaylight.netconf</groupId>
+ <artifactId>odl-restconf-noauth</artifactId>
+ </exclusion>
+ <!-- TODO Remove when this is merged and we bumped to an odlparent with it: https://git.opendaylight.org/gerrit/#/c/67184/ -->
+ <exclusion>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ </exclusion>
+ <!-- TODO Remove when this is merged and we bumped to an odlparent with it: https://git.opendaylight.org/gerrit/#/c/67185/ -->
+ <exclusion>
+ <groupId>org.iq80.leveldb</groupId>
+ <artifactId>leveldb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>odl-karaf-feat-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-shiro</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-act</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- TODO upstream version into odlparent pluginManagement -->
+ <version>3.1.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/simple.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <!-- <classpathLayoutType>repository</classpathLayoutType> -->
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
+ <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+ <mainClass>org.opendaylight.netvirt.simple.NetvirtMain</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>simple</id>
+ <formats>
+ <format>dir</format>
+ <format>tar</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <!-- This must match the customClasspathLayout of the maven-jar-plugin -->
+ <outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+<!--
+ <repositories>
+ <repository>
+ <outputDirectory>system</outputDirectory>
+ </repository>
+ </repositories>
+-->
+</assembly>
--- /dev/null
+# This file has the same format as etc/org.ops4j.pax.logging.cfg
+# but ${karaf.data} has been replaced by "data/", all Karaf/OSGi appenders etc. have been removed,
+# the file name changed from karaf.log to opendaylight.log, and the "log4j2." prefix needed to be removed.
+
+rootLogger.level = DEBUG
+# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
+#rootLogger.type = asyncRoot
+#rootLogger.includeLocation = false
+rootLogger.appenderRef.RollingFile.ref = RollingFile
+rootLogger.appenderRef.Console.ref = Console
+rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
+rootLogger.appenderRef.Console.filter.threshold.level = WARN
+
+appender.console.type = Console
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+
+appender.rolling.type = RollingRandomAccessFile
+appender.rolling.name = RollingFile
+appender.rolling.fileName = data/log/opendaylight.log
+appender.rolling.filePattern = data/log/opendaylight.log.%i
+# uncomment to not force a disk flush
+#appender.rolling.immediateFlush = false
+appender.rolling.append = true
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+appender.rolling.policies.type = Policies
+appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling.policies.size.size = 16MB
+
+logger.netconfsal.name = org.opendaylight.controller.sal.connect.netconf
+logger.netconfsal.level = TRACE
+logger.netconf.name = org.opendaylight.netconf
+logger.netconf.level = TRACE
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.netvirt.simple.test;
+
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.ShellTestModule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.netvirt.simple.NetvirtModule;
+
+/**
+ * Netvirt full distribution component test.
+ *
+ * @author Michael Vorburger.ch
+ */
+@Ignore // TODO un-ignore netvirt, once genius works...
+public class NetvirtSimpleDistributionTest extends AbstractSimpleDistributionTest {
+
+ private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");
+
+ public @Rule GuiceRule guice = new GuiceRule(new NetvirtModule(CLASS_PATH_BINDER), new ShellTestModule());
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-aggregator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-neutron</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- TODO upstream version into odlparent pluginManagement -->
+ <version>3.1.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/simple.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <!-- <classpathLayoutType>repository</classpathLayoutType> -->
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
+ <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>simple</id>
+ <formats>
+ <format>dir</format>
+ <format>tar</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <!-- This must match the customClasspathLayout of the maven-jar-plugin -->
+ <outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+<!--
+ <repositories>
+ <repository>
+ <outputDirectory>system</outputDirectory>
+ </repository>
+ </repositories>
+-->
+</assembly>
--- /dev/null
+# This file has the same format as etc/org.ops4j.pax.logging.cfg
+# but ${karaf.data} has been replaced by "data/", all Karaf/OSGi appenders etc. have been removed,
+# the file name changed from karaf.log to opendaylight.log, and the "log4j2." prefix needed to be removed.
+
+rootLogger.level = DEBUG
+# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
+#rootLogger.type = asyncRoot
+#rootLogger.includeLocation = false
+rootLogger.appenderRef.RollingFile.ref = RollingFile
+rootLogger.appenderRef.Console.ref = Console
+rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
+rootLogger.appenderRef.Console.filter.threshold.level = WARN
+
+appender.console.type = Console
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+
+appender.rolling.type = RollingRandomAccessFile
+appender.rolling.name = RollingFile
+appender.rolling.fileName = data/log/opendaylight.log
+appender.rolling.filePattern = data/log/opendaylight.log.%i
+# uncomment to not force a disk flush
+#appender.rolling.immediateFlush = false
+appender.rolling.append = true
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+appender.rolling.policies.type = Policies
+appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling.policies.size.size = 16MB
+
+logger.netconfsal.name = org.opendaylight.controller.sal.connect.netconf
+logger.netconfsal.level = TRACE
+logger.netconf.name = org.opendaylight.netconf
+logger.netconf.level = TRACE
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.neutron.simple.test;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.opendaylight.infrautils.testutils.web.TestWebClient.Method.GET;
+
+import java.io.IOException;
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.aaa.web.WebServer;
+import org.opendaylight.aaa.web.testutils.TestWebClient;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.infrautils.web.WebModule;
+import org.opendaylight.neutron.simple.NeutronModule;
+
+/**
+ * Neutron component test.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class NeutronModuleTest extends AbstractSimpleDistributionTest {
+
+ public @Rule GuiceRule guice = new GuiceRule(
+ NeutronModule.class, InMemoryControllerModule.class, WebModule.class, AnnotationsModule.class);
+
+ @Inject WebServer webServer;
+ @Inject TestWebClient http;
+
+ @Test public void testNeutron() throws IOException {
+ assertThat(http.request(GET, "/controller/nb/v2/neutron/networks").getStatus()).isEqualTo(200);
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-aggregator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-openflowplugin</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.openflowplugin</groupId>
+ <artifactId>openflowplugin-artifacts</artifactId>
+ <version>0.8.0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.openflowplugin.openflowjava</groupId>
+ <artifactId>openflow-protocol-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.openflowplugin.openflowjava</groupId>
+ <artifactId>openflow-protocol-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.openflowplugin</groupId>
+ <artifactId>openflowplugin-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.openflowplugin</groupId>
+ <artifactId>openflowplugin-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.openflowplugin.applications</groupId>
+ <artifactId>forwardingrules-manager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>testutils</artifactId>
+ <version>0.9.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>infrautils-testutils</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>inject.guice.testutils</artifactId>
+ <scope>compile</scope>
+ <!-- TODO <scope>test</scope> instead of compile here once I'll create
+ a new infrautils:inject.guice.testutils (non-testutils) for the run-time part.. -->
+ </dependency>
+ <!-- TODO remove, this is just a temporary hack, see above -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!-- TODO remove when https://git.opendaylight.org/gerrit/#/c/67763/ is merged and odlparent bumped -->
+ <dependency>
+ <groupId>com.mycila.guice.extensions</groupId>
+ <artifactId>mycila-guice-jsr250</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- TODO upstream version into odlparent pluginManagement -->
+ <version>3.1.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/simple.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <!-- <classpathLayoutType>repository</classpathLayoutType> -->
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
+ <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+ <mainClass>org.opendaylight.openflowplugin.simple.OpenFlowPluginMain</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>simple</id>
+ <formats>
+ <format>dir</format>
+ <format>tar</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <!-- This must match the customClasspathLayout of the maven-jar-plugin -->
+ <outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+<!--
+ <repositories>
+ <repository>
+ <outputDirectory>system</outputDirectory>
+ </repository>
+ </repositories>
+-->
+</assembly>
--- /dev/null
+<forwarding-rules-manager-config xmlns="urn:opendaylight:params:xml:ns:yang:openflowplugin:app:forwardingrules-manager:config">
+</forwarding-rules-manager-config>
--- /dev/null
+<openflow-provider-config xmlns="urn:opendaylight:params:xml:ns:yang:openflow:provider:config">
+</openflow-provider-config>
--- /dev/null
+# This file has the same format as etc/org.ops4j.pax.logging.cfg
+# but ${karaf.data} has been replaced by "data/", all Karaf/OSGi appenders etc. have been removed,
+# the file name changed from karaf.log to opendaylight.log, and the "log4j2." prefix needed to be removed.
+
+rootLogger.level = DEBUG
+# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
+#rootLogger.type = asyncRoot
+#rootLogger.includeLocation = false
+rootLogger.appenderRef.RollingFile.ref = RollingFile
+rootLogger.appenderRef.Console.ref = Console
+rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
+rootLogger.appenderRef.Console.filter.threshold.level = WARN
+
+appender.console.type = Console
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+
+appender.rolling.type = RollingRandomAccessFile
+appender.rolling.name = RollingFile
+appender.rolling.fileName = data/log/opendaylight.log
+appender.rolling.filePattern = data/log/opendaylight.log.%i
+# uncomment to not force a disk flush
+#appender.rolling.immediateFlush = false
+appender.rolling.append = true
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+appender.rolling.policies.type = Policies
+appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling.policies.size.size = 16MB
+
+logger.netconfsal.name = org.opendaylight.controller.sal.connect.netconf
+logger.netconfsal.level = TRACE
+logger.netconf.name = org.opendaylight.netconf
+logger.netconf.level = TRACE
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.simple.testutils;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.mycila.guice.ext.closeable.CloseableInjector;
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.infrautils.testutils.LogRule;
+
+/**
+ * Abstract base class for simple distribution component tests.
+ *
+ * @author Michael Vorburger.ch
+ */
+public abstract class AbstractSimpleDistributionTest {
+
+ // TODO public static @ClassRule ClasspathHellDuplicatesCheckRule jHades = new ClasspathHellDuplicatesCheckRule();
+
+ public @Rule LogRule logRule = new LogRule();
+ // TODO NOK together with Log4j on CP, re-enable when split into separate modules:
+ // public @Rule LogCaptureRule logCaptureRule = new LogCaptureRule();
+
+ // The point of this is really just to make sure that subclasses have a @Rule GuiceRule
+ private @Inject CloseableInjector closeableInjector;
+
+ @Test public void testDistribution() {
+ assertThat(closeableInjector).isNotNull();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowplugin.simple.test;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import javax.inject.Inject;
+import junit.framework.AssertionFailedError;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.aaa.web.testutils.WebTestModule;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.diagstatus.DiagStatusService;
+import org.opendaylight.infrautils.diagstatus.ServiceStatusSummary;
+import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
+import org.opendaylight.infrautils.simple.DiagStatusModule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProvider;
+import org.opendaylight.openflowplugin.impl.OpenFlowPluginProviderImpl;
+import org.opendaylight.openflowplugin.simple.OpenFlowPluginModule;
+import org.opendaylight.serviceutils.simple.ServiceUtilsModule;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow.provider.config.rev160510.OpenflowProviderConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfig;
+
+public class OpenFlowPluginModuleTest extends AbstractSimpleDistributionTest {
+
+ private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");
+
+ public @Rule GuiceRule guice = new GuiceRule(new OpenFlowPluginModule(CLASS_PATH_BINDER),
+ new ServiceUtilsModule(), new InMemoryControllerModule(), new DiagStatusModule(), new WebTestModule(),
+ new ReadyModule(), new AnnotationsModule());
+
+ @Inject PacketProcessingService packetProcessingService; // OPNFLWPLUG-1059
+ @Inject OpenFlowPluginProvider ofpProvider;
+ @Inject OpenflowProviderConfig ofpConfig;
+ @Inject ForwardingRulesManagerConfig frmConfig;
+
+ @Inject OpenFlowPluginProviderImpl openFlowPluginProviderImpl;
+ @Inject DiagStatusService diagStatus;
+
+ @Test public void testConfig() throws InterruptedException {
+ assertThat(ofpConfig.getGlobalNotificationQuota()).named("globalNotificationQuota").isEqualTo(64000L);
+ assertThat(frmConfig.getReconciliationRetryCount()).named("reconciliationRetryCount").isEqualTo(5);
+ }
+
+ @Test public void testDiagStatus() throws InterruptedException, ExecutionException, TimeoutException {
+ openFlowPluginProviderImpl.getFullyStarted().get(60, TimeUnit.SECONDS);
+ ServiceStatusSummary status = diagStatus.getServiceStatusSummary();
+ if (!status.isOperational()) {
+ throw new AssertionFailedError(
+ "diagStatus reports non operational, details: " + status);
+ }
+ }
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-aggregator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-ovsdb</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>hwvtepsouthbound-artifacts</artifactId>
+ <version>1.8.0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>library-artifacts</artifactId>
+ <version>1.8.0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>southbound-artifacts</artifactId>
+ <version>1.8.0</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+
+ <dependencies>
+
+ <dependency>
+ <groupId>ch.vorburger.opendaylight.simple</groupId>
+ <artifactId>simple-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>hwvtepsouthbound-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>library</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>southbound-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa.web</groupId>
+ <artifactId>testutils</artifactId>
+ <version>0.9.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>infrautils-testutils</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.infrautils</groupId>
+ <artifactId>inject.guice.testutils</artifactId>
+ <scope>compile</scope>
+ <!-- TODO <scope>test</scope> instead of compile here once I'll create
+ a new infrautils:inject.guice.testutils (non-testutils) for the run-time part.. -->
+ </dependency>
+ <!-- TODO remove, this is just a temporary hack, see above -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!-- TODO remove when https://git.opendaylight.org/gerrit/#/c/67763/ is merged and odlparent bumped -->
+ <dependency>
+ <groupId>com.mycila.guice.extensions</groupId>
+ <artifactId>mycila-guice-jsr250</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <!-- TODO upstream version into odlparent pluginManagement -->
+ <version>3.1.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/simple.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>lib/</classpathPrefix>
+ <!-- <classpathLayoutType>repository</classpathLayoutType> -->
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!-- This must match the outputFileNameMapping in the simple.xml assembly descriptor -->
+ <customClasspathLayout>$${artifact.groupId}.$${artifact.artifactId}-$${artifact.version}$${dashClassifier?}.$${artifact.extension}</customClasspathLayout>
+ <mainClass>org.opendaylight.ovsdb.simple.OvsdbMain</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2018 Red Hat, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>simple</id>
+ <formats>
+ <format>dir</format>
+ <format>tar</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <!-- This must match the customClasspathLayout of the maven-jar-plugin -->
+ <outputFileNameMapping>${artifact.groupId}.${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+<!--
+ <repositories>
+ <repository>
+ <outputDirectory>system</outputDirectory>
+ </repository>
+ </repositories>
+-->
+</assembly>
--- /dev/null
+# This file has the same format as etc/org.ops4j.pax.logging.cfg
+# but ${karaf.data} has been replaced by "data/", all Karaf/OSGi appenders etc. have been removed,
+# the file name changed from karaf.log to opendaylight.log, and the "log4j2." prefix needed to be removed.
+
+rootLogger.level = DEBUG
+# uncomment to use asynchronous loggers, which require mvn:com.lmax/disruptor/3.3.2 library
+#rootLogger.type = asyncRoot
+#rootLogger.includeLocation = false
+rootLogger.appenderRef.RollingFile.ref = RollingFile
+rootLogger.appenderRef.Console.ref = Console
+rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
+rootLogger.appenderRef.Console.filter.threshold.level = WARN
+
+appender.console.type = Console
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+
+appender.rolling.type = RollingRandomAccessFile
+appender.rolling.name = RollingFile
+appender.rolling.fileName = data/log/opendaylight.log
+appender.rolling.filePattern = data/log/opendaylight.log.%i
+# uncomment to not force a disk flush
+#appender.rolling.immediateFlush = false
+appender.rolling.append = true
+appender.rolling.layout.type = PatternLayout
+appender.rolling.layout.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %m%n
+appender.rolling.policies.type = Policies
+appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+appender.rolling.policies.size.size = 16MB
+
+logger.netconfsal.name = org.opendaylight.controller.sal.connect.netconf
+logger.netconfsal.level = TRACE
+logger.netconf.name = org.opendaylight.netconf
+logger.netconf.level = TRACE
--- /dev/null
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.simple.testutils;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.mycila.guice.ext.closeable.CloseableInjector;
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.junit.Test;
+import org.opendaylight.infrautils.testutils.LogRule;
+
+/**
+ * Abstract base class for simple distribution component tests.
+ *
+ * @author Michael Vorburger.ch
+ */
+public abstract class AbstractSimpleDistributionTest {
+
+ // TODO public static @ClassRule ClasspathHellDuplicatesCheckRule jHades = new ClasspathHellDuplicatesCheckRule();
+
+ public @Rule LogRule logRule = new LogRule();
+ // TODO NOK together with Log4j on CP, re-enable when split into separate modules:
+ // public @Rule LogCaptureRule logCaptureRule = new LogCaptureRule();
+
+ // The point of this is really just to make sure that subclasses have a @Rule GuiceRule
+ private @Inject CloseableInjector closeableInjector;
+
+ @Test public void testDistribution() {
+ assertThat(closeableInjector).isNotNull();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.ovsdb.simple.test;
+
+import javax.inject.Inject;
+import org.junit.Rule;
+import org.opendaylight.aaa.simple.CertModule;
+import org.opendaylight.controller.simple.InMemoryControllerModule;
+import org.opendaylight.infrautils.inject.guice.GuiceClassPathBinder;
+import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
+import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
+import org.opendaylight.infrautils.ready.guice.ReadyModule;
+import org.opendaylight.infrautils.simple.DiagStatusModule;
+import org.opendaylight.infrautils.simple.testutils.AbstractSimpleDistributionTest;
+import org.opendaylight.infrautils.web.WebModule;
+import org.opendaylight.ovsdb.hwvtepsouthbound.HwvtepSouthboundProvider;
+import org.opendaylight.ovsdb.lib.OvsdbConnection;
+import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
+import org.opendaylight.ovsdb.simple.OvsdbModule;
+import org.opendaylight.ovsdb.southbound.SouthboundProvider;
+
+public class OvsdbModuleTest extends AbstractSimpleDistributionTest {
+
+ private static final GuiceClassPathBinder CLASS_PATH_BINDER = new GuiceClassPathBinder("org.opendaylight");
+
+ public @Rule GuiceRule guice = new GuiceRule(new OvsdbModule(CLASS_PATH_BINDER), new CertModule(),
+ new InMemoryControllerModule(), new DiagStatusModule(), new WebModule(), new ReadyModule(),
+ new AnnotationsModule());
+
+ @Inject OvsdbConnection ovsdbConnection;
+ @Inject SouthboundProvider southboundProvider;
+ @Inject OvsdbConnectionService ovsdbConnectionService;
+ @Inject HwvtepSouthboundProvider hwvtepSouthboundProvider;
+
+}