Create multiple sub-projects for the different modules 84/91584/1
authorTejas Nevrekar <tnevrekar@luminanetworks.com>
Wed, 9 Oct 2019 19:58:56 +0000 (01:28 +0530)
committerTejas Nevrekar <tejas.nevrekar@gmail.com>
Thu, 23 Jul 2020 10:33:59 +0000 (16:03 +0530)
Modules are core - mdsal, controller, infrautils,
serviceutils, restconf, netconf, openflowplugin, ovsdb,
genius (*) netvirt (*) neutron (*)

* were failing compile

JIRA: ODLMICRO-27

Signed-off-by: Tejas Nevrekar <tejas.nevrekar@gmail.com>
Change-Id: Ifefb88ca6cf70ccbec91cd084d8e2bfc92200a04

116 files changed:
pom.xml
simple-core/pom.xml [new file with mode: 0644]
simple-core/src/assembly/simple.xml [moved from src/assembly/simple.xml with 100% similarity]
simple-core/src/main/java/org/opendaylight/aaa/simple/AAAModule.java [moved from src/main/java/org/opendaylight/aaa/simple/AAAModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/aaa/simple/CertModule.java [moved from src/main/java/org/opendaylight/aaa/simple/CertModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/aaa/simple/EncryptModule.java [moved from src/main/java/org/opendaylight/aaa/simple/EncryptModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/aaa/simple/ShiroModule.java [moved from src/main/java/org/opendaylight/aaa/simple/ShiroModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/controller/simple/ConfigReader.java [moved from src/main/java/org/opendaylight/controller/simple/ConfigReader.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/controller/simple/GlobalBossGroup.java [moved from src/main/java/org/opendaylight/controller/simple/GlobalBossGroup.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/controller/simple/GlobalEventExecutor.java [moved from src/main/java/org/opendaylight/controller/simple/GlobalEventExecutor.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/controller/simple/GlobalTimer.java [moved from src/main/java/org/opendaylight/controller/simple/GlobalTimer.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/controller/simple/GlobalWorkerGroup.java [moved from src/main/java/org/opendaylight/controller/simple/GlobalWorkerGroup.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/controller/simple/InMemoryControllerModule.java [moved from src/main/java/org/opendaylight/controller/simple/InMemoryControllerModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/diagstatus/web/WebInitializer.java [moved from src/main/java/org/opendaylight/infrautils/diagstatus/web/WebInitializer.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/inject/guice/AbstractCloseableModule.java [moved from src/main/java/org/opendaylight/infrautils/inject/guice/AbstractCloseableModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/karaf/shell/DelegatingRegistry.java [moved from src/main/java/org/opendaylight/infrautils/karaf/shell/DelegatingRegistry.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/karaf/shell/GuiceManagerImpl.java [moved from src/main/java/org/opendaylight/infrautils/karaf/shell/GuiceManagerImpl.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/karaf/shell/KarafStandaloneShell.java [moved from src/main/java/org/opendaylight/infrautils/karaf/shell/KarafStandaloneShell.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/CachesModule.java [moved from src/main/java/org/opendaylight/infrautils/simple/CachesModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/ConfigImmutableStyle.java [moved from src/main/java/org/opendaylight/infrautils/simple/ConfigImmutableStyle.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/DiagStatusModule.java [moved from src/main/java/org/opendaylight/infrautils/simple/DiagStatusModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/InfraUtilsModule.java [moved from src/main/java/org/opendaylight/infrautils/simple/InfraUtilsModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/JobCoordinatorModule.java [moved from src/main/java/org/opendaylight/infrautils/simple/JobCoordinatorModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/Main.java [moved from src/main/java/org/opendaylight/infrautils/simple/Main.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/MetricsModule.java [moved from src/main/java/org/opendaylight/infrautils/simple/MetricsModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/ShellMain.java [moved from src/main/java/org/opendaylight/infrautils/simple/ShellMain.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/simple/ShellTestModule.java [moved from src/main/java/org/opendaylight/infrautils/simple/ShellTestModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/infrautils/web/WebModule.java [moved from src/main/java/org/opendaylight/infrautils/web/WebModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/mdsal/simple/MdsalModule.java [moved from src/main/java/org/opendaylight/mdsal/simple/MdsalModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/mdsal/simple/PingPong.java [moved from src/main/java/org/opendaylight/mdsal/simple/PingPong.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/restconf/simple/RestConfConfig.java [moved from src/main/java/org/opendaylight/restconf/simple/RestConfConfig.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/restconf/simple/RestConfModule.java [moved from src/main/java/org/opendaylight/restconf/simple/RestConfModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/restconf/simple/RestConfWiring.java [moved from src/main/java/org/opendaylight/restconf/simple/RestConfWiring.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/serviceutils/simple/ServiceRecoveryModule.java [moved from src/main/java/org/opendaylight/serviceutils/simple/ServiceRecoveryModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/serviceutils/simple/ServiceUtilsModule.java [moved from src/main/java/org/opendaylight/serviceutils/simple/ServiceUtilsModule.java with 100% similarity]
simple-core/src/main/java/org/opendaylight/serviceutils/simple/UpgradeModule.java [moved from src/main/java/org/opendaylight/serviceutils/simple/UpgradeModule.java with 100% similarity]
simple-core/src/main/resources/log4j2.properties [moved from src/main/resources/log4j2.properties with 100% similarity]
simple-core/src/test/java/org/opendaylight/aaa/simple/test/AAAModuleTest.java [moved from src/test/java/org/opendaylight/aaa/simple/test/AAAModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/aaa/simple/test/CertModuleTest.java [moved from src/test/java/org/opendaylight/aaa/simple/test/CertModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/aaa/simple/test/EncryptModuleTest.java [moved from src/test/java/org/opendaylight/aaa/simple/test/EncryptModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/controller/simple/test/InMemoryControllerModuleTest.java [moved from src/test/java/org/opendaylight/controller/simple/test/InMemoryControllerModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/infrautils/inject/guice/tests/AbstractCloseableModuleTest.java [moved from src/test/java/org/opendaylight/infrautils/inject/guice/tests/AbstractCloseableModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/infrautils/inject/guice/testutils/tests/GuiceRuleLambdaTest.java [moved from src/test/java/org/opendaylight/infrautils/inject/guice/testutils/tests/GuiceRuleLambdaTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/infrautils/simple/test/DiagStatusModuleTest.java [moved from src/test/java/org/opendaylight/infrautils/simple/test/DiagStatusModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/infrautils/simple/test/MainTest.java [moved from src/test/java/org/opendaylight/infrautils/simple/test/MainTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java [moved from src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/mdsal/simple/test/InMemoryMdsalModuleTest.java [moved from src/test/java/org/opendaylight/mdsal/simple/test/InMemoryMdsalModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/restconf/simple/test/RestConfModuleTest.java [moved from src/test/java/org/opendaylight/restconf/simple/test/RestConfModuleTest.java with 100% similarity]
simple-core/src/test/java/org/opendaylight/serviceutils/simple/test/ServiceUtilsModuleTest.java [moved from src/test/java/org/opendaylight/serviceutils/simple/test/ServiceUtilsModuleTest.java with 100% similarity]
simple-genius/pom.xml [new file with mode: 0644]
simple-genius/src/assembly/simple.xml [new file with mode: 0644]
simple-genius/src/main/java/org/opendaylight/genius/simple/GeniusMain.java [moved from src/main/java/org/opendaylight/genius/simple/GeniusMain.java with 100% similarity]
simple-genius/src/main/java/org/opendaylight/genius/simple/GeniusModule.java [moved from src/main/java/org/opendaylight/genius/simple/GeniusModule.java with 100% similarity]
simple-genius/src/main/java/org/opendaylight/genius/simple/InterfaceManagerModule.java [moved from src/main/java/org/opendaylight/genius/simple/InterfaceManagerModule.java with 100% similarity]
simple-genius/src/main/java/org/opendaylight/genius/simple/ItmModule.java [moved from src/main/java/org/opendaylight/genius/simple/ItmModule.java with 100% similarity]
simple-genius/src/main/resources/initial/openflow-frm-config.xml [moved from src/main/resources/initial/openflow-frm-config.xml with 100% similarity]
simple-genius/src/main/resources/initial/openflow-provider-config.xml [moved from src/main/resources/initial/openflow-provider-config.xml with 100% similarity]
simple-genius/src/main/resources/log4j2.properties [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/aaa/simple/test/AAAModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/aaa/simple/test/CertModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/aaa/simple/test/EncryptModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/controller/simple/test/InMemoryControllerModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/genius/simple/test/GeniusSimpleDistributionTest.java [moved from src/test/java/org/opendaylight/genius/simple/test/GeniusSimpleDistributionTest.java with 100% similarity]
simple-genius/src/test/java/org/opendaylight/infrautils/inject/guice/tests/AbstractCloseableModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/infrautils/inject/guice/testutils/tests/GuiceRuleLambdaTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/infrautils/simple/test/DiagStatusModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/infrautils/simple/test/MainTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/mdsal/simple/test/InMemoryMdsalModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/netvirt/simple/test/NetvirtSimpleDistributionTest.java [moved from src/test/java/org/opendaylight/netvirt/simple/test/NetvirtSimpleDistributionTest.java with 100% similarity]
simple-genius/src/test/java/org/opendaylight/neutron/simple/test/NeutronModuleTest.java [moved from src/test/java/org/opendaylight/neutron/simple/test/NeutronModuleTest.java with 100% similarity]
simple-genius/src/test/java/org/opendaylight/openflowplugin/simple/test/OpenFlowPluginModuleTest.java [moved from src/test/java/org/opendaylight/openflowplugin/simple/test/OpenFlowPluginModuleTest.java with 100% similarity]
simple-genius/src/test/java/org/opendaylight/ovsdb/simple/test/OvsdbModuleTest.java [moved from src/test/java/org/opendaylight/ovsdb/simple/test/OvsdbModuleTest.java with 100% similarity]
simple-genius/src/test/java/org/opendaylight/restconf/simple/test/RestConfModuleTest.java [new file with mode: 0644]
simple-genius/src/test/java/org/opendaylight/serviceutils/simple/test/ServiceUtilsModuleTest.java [new file with mode: 0644]
simple-netconf/pom.xml [new file with mode: 0644]
simple-netconf/src/assembly/simple.xml [new file with mode: 0644]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/NetconfMain.java [moved from src/main/java/org/opendaylight/netconf/simple/NetconfMain.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/NetconfModule.java [moved from src/main/java/org/opendaylight/netconf/simple/NetconfModule.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/AggregatedNetconfOperationServiceFactory.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/AggregatedNetconfOperationServiceFactory.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/AggregatedNetconfOperationServiceFactoryMappers.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/AggregatedNetconfOperationServiceFactoryMappers.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/GlobalNetconfProcessingExecutor.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/GlobalNetconfProcessingExecutor.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/GlobalNetconfSshScheduledExecutor.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/GlobalNetconfSshScheduledExecutor.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/MapperAggregatorRegistry.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/MapperAggregatorRegistry.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/MdsalNetconfConnector.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/MdsalNetconfConnector.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/NetconfAuthProvider.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/NetconfAuthProvider.java with 100% similarity]
simple-netconf/src/main/java/org/opendaylight/netconf/simple/annotations/NetconfClientDispatcher.java [moved from src/main/java/org/opendaylight/netconf/simple/annotations/NetconfClientDispatcher.java with 100% similarity]
simple-netconf/src/main/resources/log4j2.properties [new file with mode: 0644]
simple-netvirt/pom.xml [new file with mode: 0644]
simple-netvirt/src/assembly/simple.xml [new file with mode: 0644]
simple-netvirt/src/main/java/org/opendaylight/netvirt/simple/AclServiceModule.java [moved from src/main/java/org/opendaylight/netvirt/simple/AclServiceModule.java with 100% similarity]
simple-netvirt/src/main/java/org/opendaylight/netvirt/simple/NetvirtMain.java [moved from src/main/java/org/opendaylight/netvirt/simple/NetvirtMain.java with 100% similarity]
simple-netvirt/src/main/java/org/opendaylight/netvirt/simple/NetvirtModule.java [moved from src/main/java/org/opendaylight/netvirt/simple/NetvirtModule.java with 100% similarity]
simple-netvirt/src/main/resources/log4j2.properties [new file with mode: 0644]
simple-netvirt/src/test/java/org/opendaylight/netvirt/simple/test/NetvirtSimpleDistributionTest.java [new file with mode: 0644]
simple-neutron/pom.xml [new file with mode: 0644]
simple-neutron/src/assembly/simple.xml [new file with mode: 0644]
simple-neutron/src/main/java/org/opendaylight/neutron/simple/NeutronModule.java [moved from src/main/java/org/opendaylight/neutron/simple/NeutronModule.java with 100% similarity]
simple-neutron/src/main/resources/log4j2.properties [new file with mode: 0644]
simple-neutron/src/test/java/org/opendaylight/neutron/simple/test/NeutronModuleTest.java [new file with mode: 0644]
simple-openflowplugin/pom.xml [new file with mode: 0644]
simple-openflowplugin/src/assembly/simple.xml [new file with mode: 0644]
simple-openflowplugin/src/main/java/org/opendaylight/openflowplugin/simple/OpenFlowJavaWiring.java [moved from src/main/java/org/opendaylight/openflowplugin/simple/OpenFlowJavaWiring.java with 100% similarity]
simple-openflowplugin/src/main/java/org/opendaylight/openflowplugin/simple/OpenFlowPluginModule.java [moved from src/main/java/org/opendaylight/openflowplugin/simple/OpenFlowPluginModule.java with 100% similarity]
simple-openflowplugin/src/main/java/org/opendaylight/openflowplugin/simple/OpenflowPluginMain.java [moved from src/main/java/org/opendaylight/openflowplugin/simple/OpenflowPluginMain.java with 100% similarity]
simple-openflowplugin/src/main/resources/initial/openflow-frm-config.xml [new file with mode: 0644]
simple-openflowplugin/src/main/resources/initial/openflow-provider-config.xml [new file with mode: 0644]
simple-openflowplugin/src/main/resources/log4j2.properties [new file with mode: 0644]
simple-openflowplugin/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java [new file with mode: 0644]
simple-openflowplugin/src/test/java/org/opendaylight/openflowplugin/simple/test/OpenFlowPluginModuleTest.java [new file with mode: 0644]
simple-ovsdb/pom.xml [new file with mode: 0644]
simple-ovsdb/src/assembly/simple.xml [new file with mode: 0644]
simple-ovsdb/src/main/java/org/opendaylight/ovsdb/simple/OvsdbModule.java [moved from src/main/java/org/opendaylight/ovsdb/simple/OvsdbModule.java with 100% similarity]
simple-ovsdb/src/main/resources/log4j2.properties [new file with mode: 0644]
simple-ovsdb/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java [new file with mode: 0644]
simple-ovsdb/src/test/java/org/opendaylight/ovsdb/simple/test/OvsdbModuleTest.java [new file with mode: 0644]

diff --git a/pom.xml b/pom.xml
index 19c10104cd88ced928f4cb358e71088d22b9e3b7..a3b973bd4ff02520a9d1ff32a70b9ba11ec9a35f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -18,8 +18,9 @@
   </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>
diff --git a/simple-core/pom.xml b/simple-core/pom.xml
new file mode 100644 (file)
index 0000000..5c22441
--- /dev/null
@@ -0,0 +1,397 @@
+<?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>
diff --git a/simple-genius/pom.xml b/simple-genius/pom.xml
new file mode 100644 (file)
index 0000000..f5318ef
--- /dev/null
@@ -0,0 +1,80 @@
+<?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>
diff --git a/simple-genius/src/assembly/simple.xml b/simple-genius/src/assembly/simple.xml
new file mode 100644 (file)
index 0000000..56ff2a7
--- /dev/null
@@ -0,0 +1,31 @@
+<?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>
diff --git a/simple-genius/src/main/resources/log4j2.properties b/simple-genius/src/main/resources/log4j2.properties
new file mode 100644 (file)
index 0000000..770c644
--- /dev/null
@@ -0,0 +1,35 @@
+# 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
diff --git a/simple-genius/src/test/java/org/opendaylight/aaa/simple/test/AAAModuleTest.java b/simple-genius/src/test/java/org/opendaylight/aaa/simple/test/AAAModuleTest.java
new file mode 100644 (file)
index 0000000..24dd103
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * 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());
+
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/aaa/simple/test/CertModuleTest.java b/simple-genius/src/test/java/org/opendaylight/aaa/simple/test/CertModuleTest.java
new file mode 100644 (file)
index 0000000..6085fe9
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/aaa/simple/test/EncryptModuleTest.java b/simple-genius/src/test/java/org/opendaylight/aaa/simple/test/EncryptModuleTest.java
new file mode 100644 (file)
index 0000000..559b776
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/controller/simple/test/InMemoryControllerModuleTest.java b/simple-genius/src/test/java/org/opendaylight/controller/simple/test/InMemoryControllerModuleTest.java
new file mode 100644 (file)
index 0000000..d96e469
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * 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();
+    }
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/infrautils/inject/guice/tests/AbstractCloseableModuleTest.java b/simple-genius/src/test/java/org/opendaylight/infrautils/inject/guice/tests/AbstractCloseableModuleTest.java
new file mode 100644 (file)
index 0000000..5c6f01f
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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 {
+        }
+    };
+
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/infrautils/inject/guice/testutils/tests/GuiceRuleLambdaTest.java b/simple-genius/src/test/java/org/opendaylight/infrautils/inject/guice/testutils/tests/GuiceRuleLambdaTest.java
new file mode 100644 (file)
index 0000000..57ef7b4
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * 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");
+    }
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/infrautils/simple/test/DiagStatusModuleTest.java b/simple-genius/src/test/java/org/opendaylight/infrautils/simple/test/DiagStatusModuleTest.java
new file mode 100644 (file)
index 0000000..9d27653
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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
+
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/infrautils/simple/test/MainTest.java b/simple-genius/src/test/java/org/opendaylight/infrautils/simple/test/MainTest.java
new file mode 100644 (file)
index 0000000..1e5cab8
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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);
+        }
+    }
+
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java b/simple-genius/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java
new file mode 100644 (file)
index 0000000..38b4af6
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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();
+    }
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/mdsal/simple/test/InMemoryMdsalModuleTest.java b/simple-genius/src/test/java/org/opendaylight/mdsal/simple/test/InMemoryMdsalModuleTest.java
new file mode 100644 (file)
index 0000000..891715d
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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();
+    }
+
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/restconf/simple/test/RestConfModuleTest.java b/simple-genius/src/test/java/org/opendaylight/restconf/simple/test/RestConfModuleTest.java
new file mode 100644 (file)
index 0000000..b03a38a
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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
+    }
+}
diff --git a/simple-genius/src/test/java/org/opendaylight/serviceutils/simple/test/ServiceUtilsModuleTest.java b/simple-genius/src/test/java/org/opendaylight/serviceutils/simple/test/ServiceUtilsModuleTest.java
new file mode 100644 (file)
index 0000000..027c915
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * 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;
+
+}
diff --git a/simple-netconf/pom.xml b/simple-netconf/pom.xml
new file mode 100644 (file)
index 0000000..3a10c4a
--- /dev/null
@@ -0,0 +1,155 @@
+<?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>
diff --git a/simple-netconf/src/assembly/simple.xml b/simple-netconf/src/assembly/simple.xml
new file mode 100644 (file)
index 0000000..56ff2a7
--- /dev/null
@@ -0,0 +1,31 @@
+<?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>
diff --git a/simple-netconf/src/main/resources/log4j2.properties b/simple-netconf/src/main/resources/log4j2.properties
new file mode 100644 (file)
index 0000000..770c644
--- /dev/null
@@ -0,0 +1,35 @@
+# 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
diff --git a/simple-netvirt/pom.xml b/simple-netvirt/pom.xml
new file mode 100644 (file)
index 0000000..af02df0
--- /dev/null
@@ -0,0 +1,142 @@
+<?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>
diff --git a/simple-netvirt/src/assembly/simple.xml b/simple-netvirt/src/assembly/simple.xml
new file mode 100644 (file)
index 0000000..56ff2a7
--- /dev/null
@@ -0,0 +1,31 @@
+<?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>
diff --git a/simple-netvirt/src/main/resources/log4j2.properties b/simple-netvirt/src/main/resources/log4j2.properties
new file mode 100644 (file)
index 0000000..770c644
--- /dev/null
@@ -0,0 +1,35 @@
+# 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
diff --git a/simple-netvirt/src/test/java/org/opendaylight/netvirt/simple/test/NetvirtSimpleDistributionTest.java b/simple-netvirt/src/test/java/org/opendaylight/netvirt/simple/test/NetvirtSimpleDistributionTest.java
new file mode 100644 (file)
index 0000000..c060dce
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * 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());
+
+}
diff --git a/simple-neutron/pom.xml b/simple-neutron/pom.xml
new file mode 100644 (file)
index 0000000..c23a8bb
--- /dev/null
@@ -0,0 +1,63 @@
+<?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>
diff --git a/simple-neutron/src/assembly/simple.xml b/simple-neutron/src/assembly/simple.xml
new file mode 100644 (file)
index 0000000..56ff2a7
--- /dev/null
@@ -0,0 +1,31 @@
+<?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>
diff --git a/simple-neutron/src/main/resources/log4j2.properties b/simple-neutron/src/main/resources/log4j2.properties
new file mode 100644 (file)
index 0000000..770c644
--- /dev/null
@@ -0,0 +1,35 @@
+# 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
diff --git a/simple-neutron/src/test/java/org/opendaylight/neutron/simple/test/NeutronModuleTest.java b/simple-neutron/src/test/java/org/opendaylight/neutron/simple/test/NeutronModuleTest.java
new file mode 100644 (file)
index 0000000..74f4ab9
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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);
+    }
+}
diff --git a/simple-openflowplugin/pom.xml b/simple-openflowplugin/pom.xml
new file mode 100644 (file)
index 0000000..ed9e2bc
--- /dev/null
@@ -0,0 +1,136 @@
+<?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>
diff --git a/simple-openflowplugin/src/assembly/simple.xml b/simple-openflowplugin/src/assembly/simple.xml
new file mode 100644 (file)
index 0000000..56ff2a7
--- /dev/null
@@ -0,0 +1,31 @@
+<?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>
diff --git a/simple-openflowplugin/src/main/resources/initial/openflow-frm-config.xml b/simple-openflowplugin/src/main/resources/initial/openflow-frm-config.xml
new file mode 100644 (file)
index 0000000..89d47b4
--- /dev/null
@@ -0,0 +1,2 @@
+<forwarding-rules-manager-config xmlns="urn:opendaylight:params:xml:ns:yang:openflowplugin:app:forwardingrules-manager:config">
+</forwarding-rules-manager-config>
diff --git a/simple-openflowplugin/src/main/resources/initial/openflow-provider-config.xml b/simple-openflowplugin/src/main/resources/initial/openflow-provider-config.xml
new file mode 100644 (file)
index 0000000..3ab3acf
--- /dev/null
@@ -0,0 +1,2 @@
+<openflow-provider-config xmlns="urn:opendaylight:params:xml:ns:yang:openflow:provider:config">
+</openflow-provider-config>
diff --git a/simple-openflowplugin/src/main/resources/log4j2.properties b/simple-openflowplugin/src/main/resources/log4j2.properties
new file mode 100644 (file)
index 0000000..770c644
--- /dev/null
@@ -0,0 +1,35 @@
+# 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
diff --git a/simple-openflowplugin/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java b/simple-openflowplugin/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java
new file mode 100644 (file)
index 0000000..38b4af6
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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();
+    }
+}
diff --git a/simple-openflowplugin/src/test/java/org/opendaylight/openflowplugin/simple/test/OpenFlowPluginModuleTest.java b/simple-openflowplugin/src/test/java/org/opendaylight/openflowplugin/simple/test/OpenFlowPluginModuleTest.java
new file mode 100644 (file)
index 0000000..9e1a817
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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);
+        }
+    }
+
+}
diff --git a/simple-ovsdb/pom.xml b/simple-ovsdb/pom.xml
new file mode 100644 (file)
index 0000000..43b5758
--- /dev/null
@@ -0,0 +1,142 @@
+<?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>
diff --git a/simple-ovsdb/src/assembly/simple.xml b/simple-ovsdb/src/assembly/simple.xml
new file mode 100644 (file)
index 0000000..56ff2a7
--- /dev/null
@@ -0,0 +1,31 @@
+<?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>
diff --git a/simple-ovsdb/src/main/resources/log4j2.properties b/simple-ovsdb/src/main/resources/log4j2.properties
new file mode 100644 (file)
index 0000000..770c644
--- /dev/null
@@ -0,0 +1,35 @@
+# 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
diff --git a/simple-ovsdb/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java b/simple-ovsdb/src/test/java/org/opendaylight/infrautils/simple/testutils/AbstractSimpleDistributionTest.java
new file mode 100644 (file)
index 0000000..38b4af6
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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();
+    }
+}
diff --git a/simple-ovsdb/src/test/java/org/opendaylight/ovsdb/simple/test/OvsdbModuleTest.java b/simple-ovsdb/src/test/java/org/opendaylight/ovsdb/simple/test/OvsdbModuleTest.java
new file mode 100644 (file)
index 0000000..f4229da
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+}