summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-08-11 15:37:28 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-08-19 12:49:56 +0200
commitd022ca8d078e1731435bf3e69a9a1ff85e7e0c63 (patch)
tree18beba24af06d237521ea7f96e8b45fd102e5ed7
parent54a3992118f4455b99fee8f3a648145bcf2b8e65 (diff)
HONEYCOMB-21 Vpp-integration minimal distribution
Change-Id: I1a44028ae38c3ab70aa3a7b173cd0c81c820378a Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
-rw-r--r--common/impl-parent/pom.xml2
-rw-r--r--common/minimal-assembly-descriptor/src/main/resources/assemblies/honeycomb-minimal.xml4
-rw-r--r--common/minimal-distribution-parent/pom.xml (renamed from common/minimal-distro-parent/pom.xml)7
-rw-r--r--common/pom.xml2
-rw-r--r--infra/minimal-distribution/Readme.adoc16
-rw-r--r--infra/minimal-distribution/logs/honeycomb.log115
-rw-r--r--infra/minimal-distribution/pom.xml2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java12
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.groovy37
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.groovy14
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.groovy8
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.groovy3
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/NotificationModule.groovy45
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.groovy70
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/ContextPipelineModule.groovy27
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/RealtimeMappingContextProvider.groovy40
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.groovy13
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.groovy49
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/PersistedFileInitializerProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfBindingBrokerProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMdsalMapperProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.groovy26
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringServiceProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.groovy4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationsReaderFactoryProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.groovy2
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.groovy4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.groovy3
-rw-r--r--infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml (renamed from infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/WEB-INF/web.xml)20
-rw-r--r--infra/pom.xml5
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RealtimeMappingContext.java87
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModule.java63
-rw-r--r--samples/minimal-distribution/pom.xml2
-rw-r--r--v3po/pom.xml3
-rw-r--r--v3po/v3po2vpp/pom.xml17
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java153
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java178
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java (renamed from v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/SubinterfaceAugmentationWriterFactory.java)14
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceStateAugmentationReaderFactory.java (renamed from v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/SubinterfaceStateAugmentationReaderFactory.java)4
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java94
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java66
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java59
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppHoneycombWriterFactory.java81
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java94
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java28
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java5
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppClasifierInitializer.java7
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java5
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java7
-rw-r--r--v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java157
-rw-r--r--v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java135
-rw-r--r--v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java45
-rw-r--r--v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java37
-rw-r--r--v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java64
-rw-r--r--v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java68
-rw-r--r--v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json3
-rw-r--r--vpp-common/minimal-distribution/pom.xml107
-rw-r--r--vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy40
-rw-r--r--vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/JVppProvider.groovy55
-rw-r--r--vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/Main.java32
-rw-r--r--vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppCommonModule.groovy42
-rw-r--r--vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppConfigAttributes.groovy31
-rw-r--r--vpp-common/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/jvpp.json3
-rw-r--r--vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java6
-rw-r--r--vpp-common/pom.xml3
-rw-r--r--vpp-integration/minimal-distribution/pom.xml71
-rw-r--r--vpp-integration/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/integration/distro/Main.java36
-rw-r--r--vpp-integration/pom.xml5
72 files changed, 1720 insertions, 737 deletions
diff --git a/common/impl-parent/pom.xml b/common/impl-parent/pom.xml
index f09996564..4cce01f8b 100644
--- a/common/impl-parent/pom.xml
+++ b/common/impl-parent/pom.xml
@@ -32,6 +32,8 @@
<properties>
<checkstyle.header.file>APACHE_HEADER.txt</checkstyle.header.file>
<nexusproxy>http://nexus.fd.io/content</nexusproxy>
+ <guice.version>4.1.0</guice.version>
+ <guice.config.version>1.2.0</guice.config.version>
</properties>
<build>
diff --git a/common/minimal-assembly-descriptor/src/main/resources/assemblies/honeycomb-minimal.xml b/common/minimal-assembly-descriptor/src/main/resources/assemblies/honeycomb-minimal.xml
index 03f403b21..7f9111706 100644
--- a/common/minimal-assembly-descriptor/src/main/resources/assemblies/honeycomb-minimal.xml
+++ b/common/minimal-assembly-descriptor/src/main/resources/assemblies/honeycomb-minimal.xml
@@ -21,6 +21,7 @@
<formats>
<format>tar.gz</format>
<format>zip</format>
+ <format>dir</format>
</formats>
<fileSets>
<fileSet>
@@ -33,9 +34,6 @@
<fileSet>
<directory>${project.build.directory}/lib</directory>
<outputDirectory>lib</outputDirectory>
- <includes>
- <include>*.jar</include>
- </includes>
</fileSet>
<fileSet>
<directory>${project.build.outputDirectory}/honeycomb-minimal-resources</directory>
diff --git a/common/minimal-distro-parent/pom.xml b/common/minimal-distribution-parent/pom.xml
index 0994b667a..ac67b7921 100644
--- a/common/minimal-distro-parent/pom.xml
+++ b/common/minimal-distribution-parent/pom.xml
@@ -83,6 +83,8 @@
<mainClass>${main.class}</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
+ <useUniqueVersions>false</useUniqueVersions>
+ <classpathMavenRepositoryLayout>true</classpathMavenRepositoryLayout>
</manifest>
<manifestEntries>
<Class-Path>config/</Class-Path>
@@ -105,6 +107,8 @@
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
+ <useBaseVersion>true</useBaseVersion>
+ <useRepositoryLayout>true</useRepositoryLayout>
</configuration>
</execution>
<execution>
@@ -133,13 +137,14 @@
<goal>execute</goal>
</goals>
<configuration>
+ <!-- TODO add remote debug option -->
<source>
import java.nio.file.Paths
log.info "Generating shell exec script"
def args = properties.getOrDefault("exec.parameters", "")
log.debug "Additional shell exec script properties: ${args}"
- def scriptContent = "java ${args} -jar ${project.artifactId}-${project.version}.jar"
+ def scriptContent = "java ${args} -jar \$(dirname \$0)/${project.artifactId}-${project.version}.jar"
log.info "Generating shell exec script as ${scriptContent}"
def scriptParent = Paths.get(project.build.outputDirectory, "honeycomb-minimal-resources")
scriptParent.toFile().mkdirs()
diff --git a/common/pom.xml b/common/pom.xml
index 64f85af11..12f87b9ce 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -31,7 +31,7 @@
<module>impl-parent</module>
<module>karaf-parent</module>
<module>minimal-assembly-descriptor</module>
- <module>minimal-distro-parent</module>
+ <module>minimal-distribution-parent</module>
</modules>
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
diff --git a/infra/minimal-distribution/Readme.adoc b/infra/minimal-distribution/Readme.adoc
deleted file mode 100644
index 5606b2d2f..000000000
--- a/infra/minimal-distribution/Readme.adoc
+++ /dev/null
@@ -1,16 +0,0 @@
-= Honeycomb minimal distribution
-This is a minimal, statically wired distribution of Honeycomb. It wires all the dependencies from Opendaylight with
-Honeycomb infrastructure code in order to provide a lightweight runnable distribution utilizing Google's guice for DI.
-
-It is lightweight because:
-
-1. Not using ODL's config subsystem
-2. Not using ODL's global (clustered) MD-SAL
-3. Wiring only minimal necessary subset of ODL components together
-
-== How to build&use
-Regular maven build (install) creates an ${project.artifactId}-${project.version}-infra.zip (or tar.gz) that can be
-unpacked and HC can be started using honeycomb.sh script
-
-== How to run from IntelliJ
-Just mark the src/config folder as resources root and you should be able to run Main from Intellij \ No newline at end of file
diff --git a/infra/minimal-distribution/logs/honeycomb.log b/infra/minimal-distribution/logs/honeycomb.log
new file mode 100644
index 000000000..942161f55
--- /dev/null
+++ b/infra/minimal-distribution/logs/honeycomb.log
@@ -0,0 +1,115 @@
+2016-08-12 13:17:37.976 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting honeycomb
+2016-08-12 13:19:29.097 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting honeycomb
+2016-08-12 13:21:01.988 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting honeycomb
+2016-08-12 13:21:02.748 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: ModuleInfoBackedCtxProvider{writerFactories=[org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.general.entity.rev150820.$YangModelBindingProvider@4f2613d1, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.spi.entity.ownership.service.rev150810.$YangModelBindingProvider@773f7880, org.opendaylight.yang.gen.v1.instance.identifier.patch.module.rev151121.$YangModelBindingProvider@4c51bb7, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.rest.connector.rev140724.$YangModelBindingProvider@5b080f3a, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.sal.restconf.service.rev150708.$YangModelBindingProvider@665e9289, org.opendaylight.yang.gen.v1.urn.sal.restconf.event.subscription.rev140708.$YangModelBindingProvider@2756c0a7, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.impl.rev131028.$YangModelBindingProvider@71984c3, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.rev131028.$YangModelBindingProvider@277f7dd3, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.$YangModelBindingProvider@470a696f, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.rpc.context.rev130617.$YangModelBindingProvider@2b491fee, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.$YangModelBindingProvider@5ddabb18, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.inmemory.datastore.provider.rev140617.$YangModelBindingProvider@50eca7c6, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.remote.rev140114.$YangModelBindingProvider@376a312c, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.$YangModelBindingProvider@5ef0d29e, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.$YangModelBindingProvider@3ce3db41, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.$YangModelBindingProvider@e260766, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.netconf.northbound.impl.rev150112.$YangModelBindingProvider@4275c20c, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.$YangModelBindingProvider@40258c2f, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.extension.rev131210.$YangModelBindingProvider@16f7b4af, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.netconf.northbound.rev150114.$YangModelBindingProvider@58bf8650, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.north.mapper.rev150114.$YangModelBindingProvider@4ba534b0, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.notification.rev150806.$YangModelBindingProvider@2cb3d0f7, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.$YangModelBindingProvider@6a66a204, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.$YangModelBindingProvider@42f3156d, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.notifications.rev120206.$YangModelBindingProvider@24bdb479, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.notification.impl.rev150807.$YangModelBindingProvider@2c7d121c, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.protocol.framework.rev140313.$YangModelBindingProvider@419a20a6, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.ssh.rev150114.$YangModelBindingProvider@10fde30a, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.netconf.auth.rev150715.$YangModelBindingProvider@346939bf, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.threadpool.rev130409.$YangModelBindingProvider@74e47444, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netty.rev131119.$YangModelBindingProvider@39dcf4b0, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.mdsal.notification.rev150803.$YangModelBindingProvider@46f699d5, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.mdsal.monitoring.rev150218.$YangModelBindingProvider@768ccdc5, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.mdsal.mapper.rev150114.$YangModelBindingProvider@659eef7, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.tcp.rev150423.$YangModelBindingProvider@1c9f0a20, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.spi.config.dom.store.rev140617.$YangModelBindingProvider@7db82169, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.common.rev131028.$YangModelBindingProvider@3276732, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.spi.operational.dom.store.rev140617.$YangModelBindingProvider@19fe4644, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.dom.rev131028.$YangModelBindingProvider@7383eae2, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.$YangModelBindingProvider@24fb6a80, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.$YangModelBindingProvider@6722db6e, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.api.rev160411.$YangModelBindingProvider@7a48e6e2, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.api.rev160406.$YangModelBindingProvider@5049d8b2, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.core.general.entity.rev150930.$YangModelBindingProvider@2a3591c5, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.$YangModelBindingProvider@107ed6fc, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.$YangModelBindingProvider@2e029d61, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.api.rev160601.$YangModelBindingProvider@132ddbab, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407.$YangModelBindingProvider@5bf22f18, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev130712.$YangModelBindingProvider@28276e50, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.$YangModelBindingProvider@675d8c96, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.$YangModelBindingProvider@63648ee9]}
+2016-08-12 13:21:03.276 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.schema.SerializerProvider(org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext@1a78dacd)
+2016-08-12 13:21:04.048 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider(org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext@1a78dacd)
+2016-08-12 13:21:04.058 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataTreeProvider$ConfigDataTreeProvider()
+2016-08-12 13:21:04.088 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.PersistingDataTreeProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:21:04.116 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.config.WriterRegistryProvider([])
+2016-08-12 13:21:04.147 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataTreeProvider$ContextDataTreeProvider()
+2016-08-12 13:21:04.147 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.PersistingDataTreeProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:21:04.148 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.context.ModifiableDTMgrProvider(io.fd.honeycomb.data.impl.PersistingDataTreeAdapter@574b7f4a)
+2016-08-12 13:21:04.151 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.context.HoneycombContextDOMDataBrokerProvider(io.fd.honeycomb.data.impl.ModifiableDataTreeManager@57cb70be)
+2016-08-12 13:21:04.158 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.BindingDataBrokerProvider(io.fd.honeycomb.data.impl.DataBroker@5981f4a6, org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@63dfada0)
+2016-08-12 13:21:04.164 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.ModifiableDTDelegProvider(org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@63dfada0, io.fd.honeycomb.data.impl.PersistingDataTreeAdapter@427ae189, io.fd.honeycomb.translate.util.write.registry.FlatWriterRegistryBuilder@16a9eb2e, org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@76332405)
+2016-08-12 13:21:04.183 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataStoreProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, config, CONFIGURATION)
+2016-08-12 13:21:04.204 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataStoreProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, operational, OPERATIONAL)
+2016-08-12 13:21:04.204 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.InmemoryDOMDataBrokerProvider(org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore@4fa822ad, org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore@597f0937)
+2016-08-12 13:21:04.238 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.BindingDataBrokerProvider(org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker@4fd05028, org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@63dfada0)
+2016-08-12 13:21:04.240 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMonitoringReaderFactoryProvider(org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@7b81616b)
+2016-08-12 13:21:04.245 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfNotificationsReaderFactoryProvider(org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@7b81616b)
+2016-08-12 13:21:04.248 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.oper.ReaderRegistryProvider([org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfMonitoringReaderModule$NetconfMonitoringReaderFactory@4b5a078a, io.fd.honeycomb.infra.distro.netconf.NetconfNotificationsReaderFactoryProvider$1@39909d1a])
+2016-08-12 13:21:04.295 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.oper.ReadableDTDelegProvider(org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@63dfada0, io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.translate.util.read.registry.CompositeReaderRegistryBuilder@4a8e6e89, org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@76332405)
+2016-08-12 13:21:04.323 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Honeycomb configuration: io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin)
+2016-08-12 13:21:04.324 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting RESTCONF
+2016-08-12 13:21:04.336 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.HoneycombDOMDataBrokerProvider(io.fd.honeycomb.data.impl.ModifiableDataTreeDelegator@69f0b0f4, io.fd.honeycomb.data.impl.ReadableDataTreeDelegator@66933239)
+2016-08-12 13:21:04.341 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DOMNotificationServiceProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:21:04.365 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.HoneycombDOMBrokerProvider(io.fd.honeycomb.data.impl.DataBroker@60a19573, io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter@44a085e5)
+2016-08-12 13:21:04.373 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.restconf.RestconfProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker@64f981e2)
+2016-08-12 13:21:04.585 CEST [Web socket server on port PortNumber [_value=7779]] INFO o.o.n.s.s.w.WebSocketServer - Web socket server started at port 7779.
+2016-08-12 13:21:05.332 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting NETCONF
+2016-08-12 13:21:05.334 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMdsalMapperProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66, org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext@1a78dacd, io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker@64f981e2)
+2016-08-12 13:21:05.370 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfBindingBrokerProvider(org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@7b81616b)
+2016-08-12 13:21:05.375 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfNotificationMapperProvider(org.opendaylight.netconf.notifications.impl.NetconfNotificationManager@614df0a4, org.opendaylight.netconf.notifications.impl.NetconfNotificationManager@614df0a4, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfBindingBrokerModule$FakeBindingAwareBroker@3830f918, org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@7b81616b, org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66)
+2016-08-12 13:21:05.515 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMonitoringServiceProvider(org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66)
+2016-08-12 13:21:05.529 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMonitoringMapperProvider(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfBindingBrokerModule$FakeBindingAwareBroker@3830f918, org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66, org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl@496cc217)
+2016-08-12 13:21:05.666 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NettyTimerProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:21:05.683 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NettyThreadGroupProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:21:05.702 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfServerDispatcherProvider(org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66, org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl@496cc217, io.netty.util.HashedWheelTimer@36d582cb, io.netty.channel.nio.NioEventLoopGroup@6c2a95d5)
+2016-08-12 13:21:05.728 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfTcpServerProvider(org.opendaylight.netconf.impl.NetconfServerDispatcherImpl@14e750c5, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:21:05.785 CEST [nioEventLoopGroup-4-1] INFO i.f.h.i.d.n.NetconfTcpServerProvider - Netconf TCP endpoint started successfully at /127.0.0.1:7777
+2016-08-12 13:21:05.804 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfSshServerProvider(org.opendaylight.netconf.impl.NetconfServerDispatcherImpl@14e750c5, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.netty.channel.nio.NioEventLoopGroup@6c2a95d5)
+2016-08-12 13:21:06.447 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.HoneycombNotificationManagerProvider(org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter@44a085e5, [], org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@63dfada0)
+2016-08-12 13:21:06.466 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.HoneycombNotification2NetconfProvider(org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter@44a085e5, io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.notification.impl.HoneycombNotificationCollector@1c9975a8, org.opendaylight.netconf.notifications.impl.NetconfNotificationManager@614df0a4)
+2016-08-12 13:21:06.489 CEST [nioEventLoopGroup-4-2] INFO i.f.h.i.d.n.NetconfSshServerProvider - Netconf SSH endpoint started successfully at /0.0.0.0:2831
+2016-08-12 13:21:06.497 CEST [main] INFO i.f.h.i.d.n.HoneycombNotification2NetconfProvider - Exposing NETCONF notification stream: honeycomb
+2016-08-12 13:21:06.499 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Honeycomb started successfully!
+2016-08-12 13:21:06.499 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Initializing configuration
+2016-08-12 13:21:06.505 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.initializer.PersistedFileInitializerProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.data.impl.DataBroker@5981f4a6)
+2016-08-12 13:21:06.514 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.initializer.PersistedFileInitializerProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.data.impl.DataBroker@60a19573)
+2016-08-12 13:21:06.515 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.initializer.InitializerRegistryProvider(io.fd.honeycomb.data.init.RestoringInitializer@49665f92, io.fd.honeycomb.data.init.RestoringInitializer@b68932b, [])
+2016-08-12 13:21:06.519 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Config initialization started
+2016-08-12 13:21:06.543 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Persisted context restored successfully
+2016-08-12 13:21:06.544 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Configuration initialized successfully
+2016-08-12 13:21:06.555 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Persisted configuration restored successfully
+2016-08-12 13:21:06.556 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Honeycomb initialized
+2016-08-12 13:21:06.556 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Configuration initialized successfully
+2016-08-12 13:21:06.556 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Honeycomb started successfully!
+2016-08-12 13:27:32.452 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting honeycomb
+2016-08-12 13:29:00.304 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting honeycomb
+2016-08-12 13:29:01.098 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: ModuleInfoBackedCtxProvider{writerFactories=[org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.general.entity.rev150820.$YangModelBindingProvider@4f2613d1, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.spi.entity.ownership.service.rev150810.$YangModelBindingProvider@773f7880, org.opendaylight.yang.gen.v1.instance.identifier.patch.module.rev151121.$YangModelBindingProvider@4c51bb7, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.rest.connector.rev140724.$YangModelBindingProvider@5b080f3a, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.sal.restconf.service.rev150708.$YangModelBindingProvider@665e9289, org.opendaylight.yang.gen.v1.urn.sal.restconf.event.subscription.rev140708.$YangModelBindingProvider@2756c0a7, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.impl.rev131028.$YangModelBindingProvider@71984c3, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.rev131028.$YangModelBindingProvider@277f7dd3, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.$YangModelBindingProvider@470a696f, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.rpc.context.rev130617.$YangModelBindingProvider@2b491fee, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.rev130405.$YangModelBindingProvider@5ddabb18, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.inmemory.datastore.provider.rev140617.$YangModelBindingProvider@50eca7c6, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.remote.rev140114.$YangModelBindingProvider@376a312c, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.$YangModelBindingProvider@5ef0d29e, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.$YangModelBindingProvider@3ce3db41, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.$YangModelBindingProvider@e260766, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.netconf.northbound.impl.rev150112.$YangModelBindingProvider@4275c20c, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.$YangModelBindingProvider@40258c2f, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.extension.rev131210.$YangModelBindingProvider@16f7b4af, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.netconf.northbound.rev150114.$YangModelBindingProvider@58bf8650, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.north.mapper.rev150114.$YangModelBindingProvider@4ba534b0, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.notification.rev150806.$YangModelBindingProvider@2cb3d0f7, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.$YangModelBindingProvider@6a66a204, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.$YangModelBindingProvider@42f3156d, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.notifications.rev120206.$YangModelBindingProvider@24bdb479, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.notification.impl.rev150807.$YangModelBindingProvider@2c7d121c, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.protocol.framework.rev140313.$YangModelBindingProvider@419a20a6, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.ssh.rev150114.$YangModelBindingProvider@10fde30a, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.netconf.auth.rev150715.$YangModelBindingProvider@346939bf, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.threadpool.rev130409.$YangModelBindingProvider@74e47444, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netty.rev131119.$YangModelBindingProvider@39dcf4b0, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.mdsal.notification.rev150803.$YangModelBindingProvider@46f699d5, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.mdsal.monitoring.rev150218.$YangModelBindingProvider@768ccdc5, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.mdsal.mapper.rev150114.$YangModelBindingProvider@659eef7, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.netconf.northbound.tcp.rev150423.$YangModelBindingProvider@1c9f0a20, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.spi.config.dom.store.rev140617.$YangModelBindingProvider@7db82169, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.common.rev131028.$YangModelBindingProvider@3276732, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.core.spi.operational.dom.store.rev140617.$YangModelBindingProvider@19fe4644, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.dom.rev131028.$YangModelBindingProvider@7383eae2, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.$YangModelBindingProvider@24fb6a80, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.$YangModelBindingProvider@6722db6e, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.api.rev160411.$YangModelBindingProvider@7a48e6e2, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.api.rev160406.$YangModelBindingProvider@5049d8b2, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.core.general.entity.rev150930.$YangModelBindingProvider@2a3591c5, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.$YangModelBindingProvider@107ed6fc, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.$YangModelBindingProvider@2e029d61, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.api.rev160601.$YangModelBindingProvider@132ddbab, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407.$YangModelBindingProvider@5bf22f18, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev130712.$YangModelBindingProvider@28276e50, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.$YangModelBindingProvider@675d8c96, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.$YangModelBindingProvider@63648ee9]}
+2016-08-12 13:29:01.680 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.schema.SerializerProvider(org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext@1a78dacd)
+2016-08-12 13:29:02.472 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider(org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext@1a78dacd)
+2016-08-12 13:29:02.479 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataTreeProvider$ConfigDataTreeProvider()
+2016-08-12 13:29:02.513 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.PersistingDataTreeProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:29:02.539 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.config.WriterRegistryProvider([])
+2016-08-12 13:29:02.567 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataTreeProvider$ContextDataTreeProvider()
+2016-08-12 13:29:02.567 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.PersistingDataTreeProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:29:02.568 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.context.ModifiableDTMgrProvider(io.fd.honeycomb.data.impl.PersistingDataTreeAdapter@44065156)
+2016-08-12 13:29:02.571 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.context.HoneycombContextDOMDataBrokerProvider(io.fd.honeycomb.data.impl.ModifiableDataTreeManager@43f9dd56)
+2016-08-12 13:29:02.577 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.BindingDataBrokerProvider(io.fd.honeycomb.data.impl.DataBroker@54db056b, org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@d5af0a5)
+2016-08-12 13:29:02.583 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.ModifiableDTDelegProvider(org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@d5af0a5, io.fd.honeycomb.data.impl.PersistingDataTreeAdapter@4784efd9, io.fd.honeycomb.translate.util.write.registry.FlatWriterRegistryBuilder@3fba233d, org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@427ae189)
+2016-08-12 13:29:02.605 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataStoreProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, config, CONFIGURATION)
+2016-08-12 13:29:02.626 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DataStoreProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, operational, OPERATIONAL)
+2016-08-12 13:29:02.627 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.InmemoryDOMDataBrokerProvider(org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore@3662bdff, org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore@1bb15351)
+2016-08-12 13:29:02.665 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.BindingDataBrokerProvider(org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker@7c112f5f, org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@d5af0a5)
+2016-08-12 13:29:02.667 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMonitoringReaderFactoryProvider(org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@439e3cb4)
+2016-08-12 13:29:02.671 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfNotificationsReaderFactoryProvider(org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@439e3cb4)
+2016-08-12 13:29:02.674 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.oper.ReaderRegistryProvider([org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfMonitoringReaderModule$NetconfMonitoringReaderFactory@36c281ed, io.fd.honeycomb.infra.distro.netconf.NetconfNotificationsReaderFactoryProvider$1@4bd5849e])
+2016-08-12 13:29:02.725 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.oper.ReadableDTDelegProvider(org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@d5af0a5, io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.translate.util.read.registry.CompositeReaderRegistryBuilder@1e1b061, org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@427ae189)
+2016-08-12 13:29:02.741 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Honeycomb configuration: io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin)
+2016-08-12 13:29:02.742 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting RESTCONF
+2016-08-12 13:29:02.750 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.HoneycombDOMDataBrokerProvider(io.fd.honeycomb.data.impl.ModifiableDataTreeDelegator@2b5c4f17, io.fd.honeycomb.data.impl.ReadableDataTreeDelegator@6ca8fcf3)
+2016-08-12 13:29:02.757 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.DOMNotificationServiceProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:29:02.777 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.HoneycombDOMBrokerProvider(io.fd.honeycomb.data.impl.DataBroker@60d6fdd4, io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter@66f28a1f)
+2016-08-12 13:29:02.784 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.restconf.RestconfProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker@59c70ceb)
+2016-08-12 13:29:03.036 CEST [Web socket server on port PortNumber [_value=7779]] INFO o.o.n.s.s.w.WebSocketServer - Web socket server started at port 7779.
+2016-08-12 13:29:03.767 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Starting NETCONF
+2016-08-12 13:29:03.770 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMdsalMapperProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66, org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext@1a78dacd, io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker@59c70ceb)
+2016-08-12 13:29:03.803 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfBindingBrokerProvider(org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@439e3cb4)
+2016-08-12 13:29:03.806 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfNotificationMapperProvider(org.opendaylight.netconf.notifications.impl.NetconfNotificationManager@614df0a4, org.opendaylight.netconf.notifications.impl.NetconfNotificationManager@614df0a4, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfBindingBrokerModule$FakeBindingAwareBroker@58feb6b0, org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter@439e3cb4, org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66)
+2016-08-12 13:29:03.957 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMonitoringServiceProvider(org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66)
+2016-08-12 13:29:03.972 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfMonitoringMapperProvider(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfBindingBrokerModule$FakeBindingAwareBroker@58feb6b0, org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66, org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl@2ca54da9)
+2016-08-12 13:29:04.105 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NettyTimerProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:29:04.118 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NettyThreadGroupProvider(io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:29:04.151 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfServerDispatcherProvider(org.opendaylight.netconf.impl.osgi.AggregatedNetconfOperationServiceFactory@1199fe66, org.opendaylight.netconf.impl.osgi.NetconfMonitoringServiceImpl@2ca54da9, io.netty.util.HashedWheelTimer@226d5af0, io.netty.channel.nio.NioEventLoopGroup@527937d0)
+2016-08-12 13:29:04.193 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfTcpServerProvider(org.opendaylight.netconf.impl.NetconfServerDispatcherImpl@7911cc15, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin))
+2016-08-12 13:29:04.255 CEST [nioEventLoopGroup-4-1] INFO i.f.h.i.d.n.NetconfTcpServerProvider - Netconf TCP endpoint started successfully at /127.0.0.1:7777
+2016-08-12 13:29:04.255 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.NetconfSshServerProvider(org.opendaylight.netconf.impl.NetconfServerDispatcherImpl@7911cc15, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.netty.channel.nio.NioEventLoopGroup@527937d0)
+2016-08-12 13:29:04.922 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.data.HoneycombNotificationManagerProvider(org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter@66f28a1f, [], org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec@d5af0a5)
+2016-08-12 13:29:04.944 CEST [nioEventLoopGroup-4-2] INFO i.f.h.i.d.n.NetconfSshServerProvider - Netconf SSH endpoint started successfully at /0.0.0.0:2831
+2016-08-12 13:29:04.945 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.netconf.HoneycombNotification2NetconfProvider(org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter@66f28a1f, io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.notification.impl.HoneycombNotificationCollector@58a7a58d, org.opendaylight.netconf.notifications.impl.NetconfNotificationManager@614df0a4)
+2016-08-12 13:29:04.968 CEST [main] INFO i.f.h.i.d.n.HoneycombNotification2NetconfProvider - Exposing NETCONF notification stream: honeycomb
+2016-08-12 13:29:04.972 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Honeycomb started successfully!
+2016-08-12 13:29:04.973 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Initializing configuration
+2016-08-12 13:29:04.981 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.initializer.PersistedFileInitializerProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.data.impl.DataBroker@54db056b)
+2016-08-12 13:29:04.991 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.initializer.PersistedFileInitializerProvider(io.fd.honeycomb.infra.distro.schema.SchemaServiceProvider$StaticSchemaService@23f86d8a, io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration(peristContextPath:persist/context/data.json, persistedContextRestorationType:Merge, peristConfigPath:persist/config/data.json, persistedConfigRestorationType:Merge, notificationServiceQueueDepth:1, restconfWebsocketPort:7779, restconfPort:8181, restconfRootPath:/restconf, netconfNettyThreads:Optional[2], netconfTcpBindingAddress:Optional[127.0.0.1], netconfTcpBindingPort:Optional[7777], netconfSshBindingAddress:0.0.0.0, netconfSshBindingPort:2831, netconfNotificationStreamName:honeycomb, username:admin, password:admin), io.fd.honeycomb.data.impl.DataBroker@60d6fdd4)
+2016-08-12 13:29:04.993 CEST [main] INFO i.f.h.infra.distro.ProviderTrait - Providing: io.fd.honeycomb.infra.distro.initializer.InitializerRegistryProvider(io.fd.honeycomb.data.init.RestoringInitializer@195cbf5e, io.fd.honeycomb.data.init.RestoringInitializer@4cb82b09, [])
+2016-08-12 13:29:04.998 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Config initialization started
+2016-08-12 13:29:05.025 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Persisted context restored successfully
+2016-08-12 13:29:05.026 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Configuration initialized successfully
+2016-08-12 13:29:05.043 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Persisted configuration restored successfully
+2016-08-12 13:29:05.044 CEST [main] INFO i.f.h.i.d.i.InitializerRegistryProvider - Honeycomb initialized
+2016-08-12 13:29:05.044 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Configuration initialized successfully
+2016-08-12 13:29:05.045 CEST [main] INFO io.fd.honeycomb.infra.distro.Main - Honeycomb started successfully!
diff --git a/infra/minimal-distribution/pom.xml b/infra/minimal-distribution/pom.xml
index 8d284b340..43f7a1100 100644
--- a/infra/minimal-distribution/pom.xml
+++ b/infra/minimal-distribution/pom.xml
@@ -19,7 +19,7 @@
<groupId>io.fd.honeycomb.common</groupId>
<artifactId>minimal-distribution-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <relativePath>../../common/minimal-distro-parent</relativePath>
+ <relativePath>../../common/minimal-distribution-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
index d715c592d..ff85cd2a7 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/Main.java
@@ -38,7 +38,6 @@ import io.fd.honeycomb.infra.distro.netconf.NetconfTcpServerProvider;
import io.fd.honeycomb.infra.distro.restconf.RestconfModule;
import io.fd.honeycomb.infra.distro.schema.SchemaModule;
import io.fd.honeycomb.infra.distro.schema.YangBindingProviderModule;
-import io.fd.honeycomb.infra.distro.data.NotificationModule;
import java.util.List;
import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory;
import org.opendaylight.netconf.sal.rest.api.RestConnector;
@@ -54,7 +53,6 @@ public final class Main {
// Infra
new YangBindingProviderModule(),
new SchemaModule(),
- new NotificationModule(),
new ConfigAndOperationalPipelineModule(),
new ContextPipelineModule(),
new InitializerPipelineModule(),
@@ -69,7 +67,7 @@ public final class Main {
init(BASE_MODULES);
}
- public static void init(final List<? extends Module> modules) {
+ public static Injector init(final List<? extends Module> modules) {
LOG.info("Starting honeycomb");
Injector injector = Guice.createInjector(modules);
@@ -88,11 +86,11 @@ public final class Main {
LOG.info("Starting NETCONF");
injector.getInstance(
- Key.get(NetconfOperationServiceFactory.class, Names.named(NetconfModule.NETCONF_MAPPER_HONEYCOMB)));
+ Key.get(NetconfOperationServiceFactory.class, Names.named("netconf-mapper-honeycomb")));
injector.getInstance(
- Key.get(NetconfOperationServiceFactory.class, Names.named(NetconfModule.NETCONF_MAPPER_NOTIFICATION)));
+ Key.get(NetconfOperationServiceFactory.class, Names.named("netconf-mapper-notification")));
injector.getInstance(
- Key.get(NetconfOperationServiceFactory.class, Names.named(NetconfModule.NETCONF_MAPPER_MONITORING)));
+ Key.get(NetconfOperationServiceFactory.class, Names.named("netconf-mapper-monitoring")));
if (cfgAttributes.isNetconfTcpServerEnabled()) {
injector.getInstance(NetconfTcpServerProvider.NetconfTcpServer.class);
@@ -112,5 +110,7 @@ public final class Main {
}
LOG.info("Honeycomb started successfully!");
+
+ return injector;
}
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.groovy
index 01ec8c16a..ede905d06 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ConfigAndOperationalPipelineModule.groovy
@@ -31,34 +31,42 @@ import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder
import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder
import org.opendaylight.controller.md.sal.binding.api.DataBroker
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker
+import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter
+import org.opendaylight.controller.sal.core.api.Broker
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree
@Slf4j
class ConfigAndOperationalPipelineModule extends PrivateModule {
protected void configure() {
- // Expose registries
+ // Expose registries for plugin reader/writer factories
bind(ModifiableWriterRegistryBuilder).toProvider(WriterRegistryProvider).in(Singleton)
expose(ModifiableWriterRegistryBuilder)
bind(ModifiableReaderRegistryBuilder).toProvider(ReaderRegistryProvider).in(Singleton)
expose(ModifiableReaderRegistryBuilder)
- def dataTreeProvider = new DataTreeProvider.ConfigDataTreeProvider()
- bind(DataTree).annotatedWith(Names.named("honeycomb-config")).toProvider(dataTreeProvider).in(Singleton)
+ // Non persisting data tree
+ bind(DataTree)
+ .annotatedWith(Names.named("honeycomb-config-nopersist"))
+ .toProvider(DataTreeProvider.ConfigDataTreeProvider)
+ .in(Singleton)
+ expose(DataTree).annotatedWith(Names.named("honeycomb-config-nopersist"))
+ // Persisting data tree wrapper
+ bind(DataTree)
+ .annotatedWith(Names.named("honeycomb-config"))
+ .toProvider(PersistingDataTreeProvider.ConfigPersistingDataTreeProvider)
+ .in(Singleton)
expose(DataTree).annotatedWith(Names.named("honeycomb-config"))
bind(ModifiableDataManager).toProvider(ModifiableDTDelegProvider).in(Singleton)
- bind(ReadableDataManager)
- .annotatedWith(Names.named("honeycomb-operational"))
- .toProvider(ReadableDTDelegProvider).in(Singleton)
- // Expose reader for initializer
- expose(ReadableDataManager).annotatedWith(Names.named("honeycomb-operational"))
+ bind(ReadableDataManager).toProvider(ReadableDTDelegProvider).in(Singleton)
+ expose(ReadableDataManager)
def domBrokerProvider = new HoneycombDOMDataBrokerProvider()
- bind(DOMDataBroker).annotatedWith(Names.named("honeycomb-config")).toProvider(domBrokerProvider).in(Singleton)
+// bind(DOMDataBroker).annotatedWith(Names.named("honeycomb-config")).toProvider(domBrokerProvider).in(Singleton)
// Bind also without annotation for easy private injection
bind(DOMDataBroker).toProvider(domBrokerProvider).in(Singleton)
- expose(DOMDataBroker).annotatedWith(Names.named("honeycomb-config"))
+
bind(DataBroker).annotatedWith(Names.named("honeycomb-config")).toProvider(BindingDataBrokerProvider).in(Singleton)
expose(DataBroker).annotatedWith(Names.named("honeycomb-config"))
@@ -67,5 +75,14 @@ class ConfigAndOperationalPipelineModule extends PrivateModule {
.toProvider(PersistedFileInitializerProvider.PersistedConfigInitializerProvider)
.in(Singleton)
expose(DataTreeInitializer).annotatedWith(Names.named("honeycomb-config"))
+
+ configureNotifications()
+ }
+
+ protected void configureNotifications() {
+ bind(DOMNotificationRouter).toProvider(DOMNotificationServiceProvider).in(Singleton)
+ expose(DOMNotificationRouter)
+ bind(Broker).toProvider(HoneycombDOMBrokerProvider).in(Singleton)
+ expose(Broker)
}
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.groovy
index 6915a3cec..bf1f562ec 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/DataTreeProvider.groovy
@@ -19,16 +19,13 @@ package io.fd.honeycomb.infra.distro.data
import com.google.inject.Inject
import groovy.transform.ToString
import groovy.util.logging.Slf4j
-import io.fd.honeycomb.data.impl.PersistingDataTreeAdapter
-import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import org.opendaylight.controller.sal.core.api.model.SchemaService
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree
import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType
import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory
-import java.nio.file.Paths
-
@Slf4j
@ToString
abstract class DataTreeProvider extends ProviderTrait<DataTree> {
@@ -41,19 +38,20 @@ abstract class DataTreeProvider extends ProviderTrait<DataTree> {
def create() {
def delegate = InMemoryDataTreeFactory.getInstance().create(getType())
delegate.setSchemaContext(schemaService.getGlobalContext())
- new PersistingDataTreeAdapter(delegate, schemaService, Paths.get(getPath()))
+ delegate
}
- abstract String getPath()
abstract TreeType getType()
+ @Slf4j
+ @ToString
static class ConfigDataTreeProvider extends DataTreeProvider {
- String getPath() { config.peristConfigPath }
TreeType getType() { TreeType.CONFIGURATION }
}
+ @Slf4j
+ @ToString
static class ContextDataTreeProvider extends DataTreeProvider {
- String getPath() { config.peristContextPath }
TreeType getType() { TreeType.OPERATIONAL }
}
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.groovy
index 2b275f7ff..5dc98cded 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMBrokerProvider.groovy
@@ -17,13 +17,12 @@
package io.fd.honeycomb.infra.distro.data
import com.google.inject.Inject
-import com.google.inject.name.Named
import groovy.transform.ToString
import groovy.util.logging.Slf4j
import io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker
import io.fd.honeycomb.infra.distro.ProviderTrait
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker
-import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService
+import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter
import org.opendaylight.controller.sal.core.api.Broker
import org.opendaylight.controller.sal.core.api.model.SchemaService
@@ -32,13 +31,12 @@ import org.opendaylight.controller.sal.core.api.model.SchemaService
class HoneycombDOMBrokerProvider extends ProviderTrait<Broker> {
@Inject
- @Named("honeycomb-config")
+// @Named("honeycomb-config")
DOMDataBroker domDataBroker
@Inject
SchemaService schemaService
@Inject
- @Named("honeycomb")
- DOMNotificationService domNotificationService
+ DOMNotificationRouter domNotificationService
def create() { new NorthboundFacadeHoneycombDOMBroker(domDataBroker, schemaService, domNotificationService) }
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.groovy
index e91054b3b..a2fec2a60 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombDOMDataBrokerProvider.groovy
@@ -17,7 +17,6 @@
package io.fd.honeycomb.infra.distro.data
import com.google.inject.Inject
-import com.google.inject.name.Named
import groovy.transform.ToString
import groovy.util.logging.Slf4j
import io.fd.honeycomb.data.ModifiableDataManager
@@ -34,7 +33,6 @@ class HoneycombDOMDataBrokerProvider extends ProviderTrait<DOMDataBroker> {
ModifiableDataManager modDataManager
@Inject
- @Named("honeycomb-operational")
ReadableDataManager readDataManager
def create() {
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.groovy
index f150691a8..473112341 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/HoneycombNotificationManagerProvider.groovy
@@ -17,7 +17,6 @@
package io.fd.honeycomb.infra.distro.data
import com.google.inject.Inject
-import com.google.inject.name.Named
import groovy.transform.ToString
import groovy.util.logging.Slf4j
import io.fd.honeycomb.infra.distro.ProviderTrait
@@ -29,7 +28,6 @@ import io.fd.honeycomb.notification.impl.NotificationProducerTracker
import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter
import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec
import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter
-
/**
* Mirror of org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.HoneycombNotificationManagerModule
*/
@@ -38,7 +36,6 @@ import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter
class HoneycombNotificationManagerProvider extends ProviderTrait<NotificationCollector> {
@Inject
- @Named("honeycomb")
DOMNotificationRouter notificationRouter
@Inject(optional = true)
Set<ManagedNotificationProducer> notificationProducers = []
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/NotificationModule.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/NotificationModule.groovy
deleted file mode 100644
index 4836a0fbe..000000000
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/NotificationModule.groovy
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2016 Cisco and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package io.fd.honeycomb.infra.distro.data
-
-import com.google.inject.AbstractModule
-import com.google.inject.Singleton
-import com.google.inject.name.Names
-import groovy.util.logging.Slf4j
-import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService
-import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter
-import org.opendaylight.controller.sal.core.api.Broker
-
-@Slf4j
-class NotificationModule extends AbstractModule {
-
- protected void configure() {
- def provider = new DOMNotificationServiceProvider()
- bind(DOMNotificationService)
- .annotatedWith(Names.named("honeycomb"))
- .toProvider(provider)
- .in(Singleton)
- bind(DOMNotificationRouter)
- .annotatedWith(Names.named("honeycomb"))
- .toProvider(provider)
- .in(Singleton)
- bind(Broker)
- .annotatedWith(Names.named("honeycomb"))
- .toProvider(HoneycombDOMBrokerProvider)
- .in(Singleton)
- }
-}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.groovy
new file mode 100644
index 000000000..753963309
--- /dev/null
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/PersistingDataTreeProvider.groovy
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.infra.distro.data
+
+import com.google.inject.Inject
+import com.google.inject.name.Named
+import groovy.transform.ToString
+import groovy.util.logging.Slf4j
+import io.fd.honeycomb.data.impl.PersistingDataTreeAdapter
+import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
+import org.opendaylight.controller.sal.core.api.model.SchemaService
+import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree
+import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType
+
+import java.nio.file.Paths
+
+@Slf4j
+@ToString
+abstract class PersistingDataTreeProvider extends ProviderTrait<DataTree> {
+
+ @Inject
+ SchemaService schemaService
+ @Inject
+ HoneycombConfiguration config
+
+ def create() {
+ new PersistingDataTreeAdapter(delegate, schemaService, Paths.get(path))
+ }
+
+ abstract String getPath()
+ abstract TreeType getType()
+ abstract DataTree getDelegate()
+
+ static class ConfigPersistingDataTreeProvider extends PersistingDataTreeProvider {
+
+ @Inject
+ @Named("honeycomb-config-nopersist")
+ DataTree delegate
+
+ String getPath() { config.peristConfigPath }
+ TreeType getType() { TreeType.CONFIGURATION }
+ DataTree getDelegate() { return delegate }
+ }
+
+ static class ContextPersistingDataTreeProvider extends PersistingDataTreeProvider {
+
+ @Inject
+ @Named("honeycomb-context-nopersist")
+ DataTree delegate
+
+ String getPath() { config.peristContextPath }
+ TreeType getType() { TreeType.OPERATIONAL }
+ DataTree getDelegate() { return delegate }
+ }
+}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/ContextPipelineModule.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/ContextPipelineModule.groovy
index 01124131f..25244cb2f 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/ContextPipelineModule.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/ContextPipelineModule.groovy
@@ -23,7 +23,9 @@ import io.fd.honeycomb.data.ModifiableDataManager
import io.fd.honeycomb.data.init.DataTreeInitializer
import io.fd.honeycomb.infra.distro.data.BindingDataBrokerProvider
import io.fd.honeycomb.infra.distro.data.DataTreeProvider
+import io.fd.honeycomb.infra.distro.data.PersistingDataTreeProvider
import io.fd.honeycomb.infra.distro.initializer.PersistedFileInitializerProvider
+import io.fd.honeycomb.translate.MappingContext
import org.opendaylight.controller.md.sal.binding.api.DataBroker
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree
@@ -32,18 +34,27 @@ class ContextPipelineModule extends PrivateModule {
protected void configure() {
// Bind also without annotation for easy private injection
- def dataTreeProvider = new DataTreeProvider.ContextDataTreeProvider()
+
+ // Non persisting data tree
+ def noPersistDataTreeProvider = new DataTreeProvider.ContextDataTreeProvider()
+ bind(DataTree)
+ .annotatedWith(Names.named("honeycomb-context-nopersist"))
+ .toProvider(noPersistDataTreeProvider)
+ .in(Singleton)
+ expose(DataTree).annotatedWith(Names.named("honeycomb-context-nopersist"))
+ // Persisting data tree wrapper
+ def dataTreeProvider = new PersistingDataTreeProvider.ContextPersistingDataTreeProvider()
bind(DataTree).toProvider(dataTreeProvider).in(Singleton)
- bind(DataTree).annotatedWith(Names.named("honeycomb-context")).toProvider(dataTreeProvider).in(Singleton)
- expose(DataTree).annotatedWith(Names.named("honeycomb-context"))
+// bind(DataTree).annotatedWith(Names.named("honeycomb-context")).toProvider(dataTreeProvider).in(Singleton)
+// expose(DataTree).annotatedWith(Names.named("honeycomb-context"))
bind(ModifiableDataManager).toProvider(ModifiableDTMgrProvider).in(Singleton)
def domBrokerProvider = new HoneycombContextDOMDataBrokerProvider()
- bind(DOMDataBroker).annotatedWith(Names.named("honeycomb-context")).toProvider(domBrokerProvider).in(Singleton)
+// bind(DOMDataBroker).annotatedWith(Names.named("honeycomb-context")).toProvider(domBrokerProvider).in(Singleton)
// Bind also without annotation for easy private injection
bind(DOMDataBroker).toProvider(domBrokerProvider).in(Singleton)
- expose(DOMDataBroker).annotatedWith(Names.named("honeycomb-context"))
+// expose(DOMDataBroker).annotatedWith(Names.named("honeycomb-context"))
bind(DataBroker).annotatedWith(Names.named("honeycomb-context")).toProvider(BindingDataBrokerProvider).in(Singleton)
expose(DataBroker).annotatedWith(Names.named("honeycomb-context"))
@@ -53,6 +64,12 @@ class ContextPipelineModule extends PrivateModule {
.toProvider(PersistedFileInitializerProvider.PersistedContextInitializerProvider)
.in(Singleton)
expose(DataTreeInitializer).annotatedWith(Names.named("honeycomb-context"))
+
+ bind(MappingContext)
+ .annotatedWith(Names.named("honeycomb-context"))
+ .toProvider(RealtimeMappingContextProvider)
+ .in(Singleton.class)
+ expose(MappingContext).annotatedWith(Names.named("honeycomb-context"))
}
}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/RealtimeMappingContextProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/RealtimeMappingContextProvider.groovy
new file mode 100644
index 000000000..3c7eebb3d
--- /dev/null
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/context/RealtimeMappingContextProvider.groovy
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.infra.distro.data.context
+
+import com.google.inject.Inject
+import com.google.inject.name.Named
+import groovy.transform.ToString
+import groovy.util.logging.Slf4j
+import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.translate.MappingContext
+import io.fd.honeycomb.translate.util.RealtimeMappingContext
+import org.opendaylight.controller.md.sal.binding.api.DataBroker
+
+@Slf4j
+@ToString
+class RealtimeMappingContextProvider extends ProviderTrait<MappingContext> {
+
+ @Inject
+ @Named("honeycomb-context")
+ DataBroker contextDataBroker
+
+ @Override
+ def create() {
+ new RealtimeMappingContext(contextDataBroker)
+ }
+}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.groovy
index 80b52f2b8..10757c1a5 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/InitializerPipelineModule.groovy
@@ -24,9 +24,6 @@ import io.fd.honeycomb.data.ModifiableDataManager
import io.fd.honeycomb.data.init.InitializerRegistry
import io.fd.honeycomb.infra.distro.data.BindingDataBrokerProvider
import io.fd.honeycomb.infra.distro.data.HoneycombDOMDataBrokerProvider
-import io.fd.honeycomb.infra.distro.data.ModifiableDTDelegProvider
-import io.fd.honeycomb.translate.util.write.NoopWriterRegistry
-import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder
import org.opendaylight.controller.md.sal.binding.api.DataBroker
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker
@@ -34,19 +31,11 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker
class InitializerPipelineModule extends PrivateModule {
protected void configure() {
- // Initializer hierarchy uses fake writer registry to not send restored configuration from plugins back to plugins
- def registry = new NoopWriterRegistry()
- bind(ModifiableWriterRegistryBuilder)
- .annotatedWith(Names.named("honeycomb-initializer"))
- .toInstance([build: { registry }])
-
- // Then just build data tree delegator and DataBrokers on top of it
- bind(ModifiableDataManager).toProvider(ModifiableDTDelegProvider).in(Singleton)
+ bind(ModifiableDataManager).toProvider(ModifiableDTDelegInitProvider).in(Singleton)
bind(DOMDataBroker).toProvider(HoneycombDOMDataBrokerProvider).in(Singleton)
bind(DataBroker).annotatedWith(Names.named("honeycomb-initializer")).toProvider(BindingDataBrokerProvider).in(Singleton)
expose(DataBroker).annotatedWith(Names.named("honeycomb-initializer"))
- // NOW do initializer registry
bind(InitializerRegistry)
.annotatedWith(Names.named("honeycomb-initializer"))
.toProvider(InitializerRegistryProvider)
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.groovy
new file mode 100644
index 000000000..2a1422dae
--- /dev/null
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.groovy
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.infra.distro.initializer
+
+import com.google.inject.Inject
+import com.google.inject.name.Named
+import groovy.transform.ToString
+import groovy.util.logging.Slf4j
+import io.fd.honeycomb.data.ModifiableDataManager
+import io.fd.honeycomb.data.impl.ModifiableDataTreeDelegator
+import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.translate.util.write.NoopWriterRegistry
+import org.opendaylight.controller.md.sal.binding.api.DataBroker
+import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec
+import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree
+
+/**
+ * Similar to ModifiableDTDelegProvider, but uses noop writer registry
+ */
+@Slf4j
+@ToString
+class ModifiableDTDelegInitProvider extends ProviderTrait<ModifiableDataManager> {
+
+ @Inject
+ BindingToNormalizedNodeCodec serializer
+ @Inject
+ @Named("honeycomb-config-nopersist")
+ DataTree dataTree
+ @Inject
+ @Named("honeycomb-context")
+ DataBroker contextBroker
+
+ @Override
+ def create() { new ModifiableDataTreeDelegator(serializer, dataTree, new NoopWriterRegistry(), contextBroker) }
+}
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/PersistedFileInitializerProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/PersistedFileInitializerProvider.groovy
index c2448d234..9b7cfb4ae 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/PersistedFileInitializerProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/PersistedFileInitializerProvider.groovy
@@ -20,8 +20,8 @@ import com.google.inject.Inject
import groovy.transform.ToString
import groovy.util.logging.Slf4j
import io.fd.honeycomb.data.init.RestoringInitializer
-import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker
import org.opendaylight.controller.sal.core.api.model.SchemaService
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy
index a18d2c4f0..726dfb5af 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/HoneycombNotification2NetconfProvider.groovy
@@ -17,11 +17,10 @@
package io.fd.honeycomb.infra.distro.netconf
import com.google.inject.Inject
-import com.google.inject.name.Named
import groovy.transform.ToString
import groovy.util.logging.Slf4j
-import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import io.fd.honeycomb.notification.NotificationCollector
import io.fd.honeycomb.notification.impl.NotificationProducerRegistry
import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter
@@ -39,7 +38,6 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath
class HoneycombNotification2NetconfProvider extends ProviderTrait<HoneycombNotification2Netconf> {
@Inject
- @Named("honeycomb")
DOMNotificationRouter notificationRouter
@Inject
SchemaService schemaService
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfBindingBrokerProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfBindingBrokerProvider.groovy
index 8226c8d9e..8c5dcab01 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfBindingBrokerProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfBindingBrokerProvider.groovy
@@ -33,7 +33,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycom
class NetconfBindingBrokerProvider extends ProviderTrait<BindingAwareBroker> {
@Inject
- @Named(NetconfModule.NETCONF)
+ @Named("netconf")
DataBroker dataBroker
@Override
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMdsalMapperProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMdsalMapperProvider.groovy
index d84af61a8..491eedcef 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMdsalMapperProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMdsalMapperProvider.groovy
@@ -17,7 +17,6 @@
package io.fd.honeycomb.infra.distro.netconf
import com.google.inject.Inject
-import com.google.inject.name.Named
import groovy.transform.ToString
import groovy.util.logging.Slf4j
import io.fd.honeycomb.infra.distro.ProviderTrait
@@ -42,7 +41,6 @@ class NetconfMdsalMapperProvider extends ProviderTrait<NetconfOperationServiceFa
ModuleInfoBackedContext moduleInfoBackedContext
@Inject
- @Named("honeycomb")
Broker domBroker
def create() {
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.groovy
index effa50cfd..e1f8901c7 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfModule.groovy
@@ -46,12 +46,6 @@ import static InmemoryDOMDataBrokerProvider.OPERATIONAL
class NetconfModule extends PrivateModule {
- public static final String NETCONF = "netconf"
- public static final String NETCONF_MAPPER_AGGREGATOR = "netconf-mapper-aggregator"
- public static final String NETCONF_MAPPER_NOTIFICATION = "netconf-mapper-notification"
- public static final String NETCONF_MAPPER_MONITORING = "netconf-mapper-monitoring"
- public static final String NETCONF_MAPPER_HONEYCOMB = "netconf-mapper-honeycomb"
-
@Override
protected void configure() {
bind(InMemoryDOMDataStore)
@@ -65,19 +59,19 @@ class NetconfModule extends PrivateModule {
bind(DOMDataBroker).toProvider(InmemoryDOMDataBrokerProvider).in(Singleton)
bind(DataBroker)
- .annotatedWith(Names.named(NETCONF))
+ .annotatedWith(Names.named("netconf"))
.toProvider(BindingDataBrokerProvider)
.in(Singleton)
- expose(DataBroker).annotatedWith(Names.named(NETCONF))
+ expose(DataBroker).annotatedWith(Names.named("netconf"))
bind(BindingAwareBroker)
- .annotatedWith(Names.named(NETCONF))
+ .annotatedWith(Names.named("netconf"))
.toProvider(NetconfBindingBrokerProvider)
.in(Singleton)
// Mirror of org.opendaylight.controller.config.yang.config.netconf.northbound.impl.NetconfMapperAggregatorModule
def factory = new AggregatedNetconfOperationServiceFactory()
bind(NetconfOperationServiceFactory)
- .annotatedWith(Names.named(NETCONF_MAPPER_AGGREGATOR))
+ .annotatedWith(Names.named("netconf-mapper-aggregator"))
.toInstance(factory)
bind(NetconfOperationServiceFactoryListener).toInstance(factory)
@@ -89,25 +83,25 @@ class NetconfModule extends PrivateModule {
// Netconf notification part
bind(NetconfOperationServiceFactory)
- .annotatedWith(Names.named(NETCONF_MAPPER_NOTIFICATION))
+ .annotatedWith(Names.named("netconf-mapper-notification"))
.toProvider(NetconfNotificationMapperProvider)
.in(Singleton)
- expose(NetconfOperationServiceFactory).annotatedWith(Names.named(NETCONF_MAPPER_NOTIFICATION))
+ expose(NetconfOperationServiceFactory).annotatedWith(Names.named("netconf-mapper-notification"))
// Netconf core part - mapping between Honeycomb and Netconf
bind(NetconfOperationServiceFactory)
- .annotatedWith(Names.named(NETCONF_MAPPER_HONEYCOMB))
+ .annotatedWith(Names.named("netconf-mapper-honeycomb"))
.toProvider(NetconfMdsalMapperProvider)
.in(Singleton)
- expose(NetconfOperationServiceFactory).annotatedWith(Names.named(NETCONF_MAPPER_HONEYCOMB))
+ expose(NetconfOperationServiceFactory).annotatedWith(Names.named("netconf-mapper-honeycomb"))
// Netconf monitoring part
bind(NetconfMonitoringService).toProvider(NetconfMonitoringServiceProvider).in(Singleton)
bind(NetconfOperationServiceFactory)
- .annotatedWith(Names.named(NETCONF_MAPPER_MONITORING))
+ .annotatedWith(Names.named("netconf-mapper-monitoring"))
.toProvider(NetconfMonitoringMapperProvider)
.in(Singleton)
- expose(NetconfOperationServiceFactory).annotatedWith(Names.named(NETCONF_MAPPER_MONITORING))
+ expose(NetconfOperationServiceFactory).annotatedWith(Names.named("netconf-mapper-monitoring"))
bind(NotificationCollector).toProvider(HoneycombNotificationManagerProvider).in(Singleton)
bind(HoneycombNotification2NetconfProvider.HoneycombNotification2Netconf)
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.groovy
index 8f53c9d83..15daa6c81 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringMapperProvider.groovy
@@ -35,7 +35,7 @@ import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactoryListen
class NetconfMonitoringMapperProvider extends ProviderTrait<NetconfOperationServiceFactory> {
@Inject
- @Named(NetconfModule.NETCONF)
+ @Named("netconf")
BindingAwareBroker bindingAwareBroker
@Inject
NetconfOperationServiceFactoryListener aggregator
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.groovy
index 2945ae6d8..fee1944f4 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.groovy
@@ -30,7 +30,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycom
class NetconfMonitoringReaderFactoryProvider extends ProviderTrait<ReaderFactory> {
@Inject
- @Named(NetconfModule.NETCONF)
+ @Named("netconf")
DataBroker netconfDataBroker
def create() { new NetconfMonitoringReaderModule.NetconfMonitoringReaderFactory(netconfDataBroker) }
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringServiceProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringServiceProvider.groovy
index 5762a0a7f..4592cf4bd 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringServiceProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringServiceProvider.groovy
@@ -32,7 +32,7 @@ import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory
class NetconfMonitoringServiceProvider extends ProviderTrait<NetconfMonitoringService> {
@Inject
- @Named(NetconfModule.NETCONF_MAPPER_AGGREGATOR)
+ @Named("netconf-mapper-aggregator")
NetconfOperationServiceFactory aggregator
@Override
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.groovy
index 57f7038ab..02739290f 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationMapperProvider.groovy
@@ -50,10 +50,10 @@ class NetconfNotificationMapperProvider extends ProviderTrait<NetconfOperationSe
@Inject
NetconfNotificationRegistry notificationRegistry
@Inject
- @Named(NetconfModule.NETCONF)
+ @Named("netconf")
BindingAwareBroker bindingAwareBroker
@Inject
- @Named(NetconfModule.NETCONF)
+ @Named("netconf")
DataBroker dataBroker
@Inject
NetconfOperationServiceFactoryListener aggregator
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationsReaderFactoryProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationsReaderFactoryProvider.groovy
index 45b7a1c7e..2db186299 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationsReaderFactoryProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfNotificationsReaderFactoryProvider.groovy
@@ -38,7 +38,7 @@ import javax.annotation.Nonnull
class NetconfNotificationsReaderFactoryProvider extends ProviderTrait<ReaderFactory> {
@Inject
- @Named(NetconfModule.NETCONF)
+ @Named("netconf")
DataBroker netconfDataBroker
def create() {
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.groovy
index 072a7f6ae..18019db57 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfServerDispatcherProvider.groovy
@@ -43,7 +43,7 @@ class NetconfServerDispatcherProvider extends ProviderTrait<NetconfServerDispatc
private static final long CONNECTION_TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(20)
@Inject
- @Named(NetconfModule.NETCONF_MAPPER_AGGREGATOR)
+ @Named("netconf-mapper-aggregator")
NetconfOperationServiceFactory aggregator
@Inject
NetconfMonitoringService monitoringService
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.groovy
index f3b0852c1..ff96f4e86 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/restconf/RestconfProvider.groovy
@@ -17,11 +17,10 @@
package io.fd.honeycomb.infra.distro.restconf
import com.google.inject.Inject
-import com.google.inject.name.Named
import groovy.transform.ToString
import groovy.util.logging.Slf4j
-import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.infra.distro.cfgattrs.HoneycombConfiguration
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.webapp.WebAppContext
import org.opendaylight.controller.sal.core.api.Broker
@@ -37,7 +36,6 @@ class RestconfProvider extends ProviderTrait<RestConnector> {
HoneycombConfiguration cfg
@Inject
- @Named("honeycomb")
Broker domBroker
def create() {
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.groovy b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.groovy
index ebf473a3b..3ea4bcaa6 100644
--- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.groovy
+++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/schema/YangBindingProviderModule.groovy
@@ -18,6 +18,7 @@ package io.fd.honeycomb.infra.distro.schema
import com.google.common.base.Charsets
import com.google.inject.AbstractModule
+import com.google.inject.Singleton
import com.google.inject.multibindings.Multibinder
import groovy.util.logging.Slf4j
import org.opendaylight.yangtools.yang.binding.YangModelBindingProvider
@@ -41,7 +42,7 @@ class YangBindingProviderModule extends AbstractModule {
.collect { this.getClass().forName(it) }
.forEach {
log.debug "ModuleProvider found for {}", it
- addBinding().to(it)
+ addBinding().to(it).in(Singleton)
}
}
}
diff --git a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/WEB-INF/web.xml b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
index b75bdeaec..4a4adfbd8 100644
--- a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/WEB-INF/web.xml
+++ b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/WEB-INF/web.xml
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (c) 2016 Cisco and/or its affiliates.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at:
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
@@ -13,8 +29,8 @@
<load-on-startup>1</load-on-startup>
</servlet>
- <!-- FIXME configure SHIRO -->
- <!-- FIXME configure https -->
+ <!-- FIXME-minimal configure SHIRO -->
+ <!-- FIXME-minimal configure https -->
<!--<context-param>-->
<!--<param-name>shiroEnvironmentClass</param-name>-->
<!--<param-value>org.opendaylight.aaa.shiro.web.env.KarafIniWebEnvironment</param-value>-->
diff --git a/infra/pom.xml b/infra/pom.xml
index 152f668d5..9f9ea549f 100644
--- a/infra/pom.xml
+++ b/infra/pom.xml
@@ -42,8 +42,9 @@
<module>cfg-init</module>
<module>impl</module>
<module>minimal-distribution</module>
- <module>karaf</module>
- <module>features</module>
+ <!--Will be deleted-->
+ <!--<module>karaf</module>-->
+ <!--<module>features</module>-->
<module>artifacts</module>
<module>it</module>
</modules>
diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RealtimeMappingContext.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RealtimeMappingContext.java
new file mode 100644
index 000000000..3d1b5222f
--- /dev/null
+++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RealtimeMappingContext.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.util;
+
+import com.google.common.base.Optional;
+import io.fd.honeycomb.translate.MappingContext;
+import javax.annotation.Nonnull;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+public final class RealtimeMappingContext implements MappingContext {
+
+ private DataBroker contextBindingBrokerDependency;
+
+ public RealtimeMappingContext(final DataBroker contextBindingBrokerDependency) {
+ this.contextBindingBrokerDependency = contextBindingBrokerDependency;
+ }
+
+ @Override
+ public <T extends DataObject> Optional<T> read(@Nonnull final InstanceIdentifier<T> currentId) {
+ try(ReadOnlyTransaction tx = contextBindingBrokerDependency.newReadOnlyTransaction()) {
+ try {
+ return tx.read(LogicalDatastoreType.OPERATIONAL, currentId).checkedGet();
+ } catch (ReadFailedException e) {
+ throw new IllegalStateException("Unable to perform read of " + currentId, e);
+ }
+ }
+ }
+
+ @Override
+ public void delete(final InstanceIdentifier<?> path) {
+ final WriteTransaction writeTx = contextBindingBrokerDependency.newWriteOnlyTransaction();
+ writeTx.delete(LogicalDatastoreType.OPERATIONAL, path);
+ try {
+ writeTx.submit().checkedGet();
+ } catch (TransactionCommitFailedException e) {
+ throw new IllegalStateException("Unable to perform delete of " + path, e);
+ }
+ }
+
+ @Override
+ public <T extends DataObject> void merge(final InstanceIdentifier<T> path, final T data) {
+ final WriteTransaction writeTx = contextBindingBrokerDependency.newWriteOnlyTransaction();
+ writeTx.merge(LogicalDatastoreType.OPERATIONAL, path, data);
+ try {
+ writeTx.submit().checkedGet();
+ } catch (TransactionCommitFailedException e) {
+ throw new IllegalStateException("Unable to perform merge of " + path, e);
+ }
+ }
+
+ @Override
+ public <T extends DataObject> void put(final InstanceIdentifier<T> path, final T data) {
+ final WriteTransaction writeTx = contextBindingBrokerDependency.newWriteOnlyTransaction();
+ writeTx.put(LogicalDatastoreType.OPERATIONAL, path, data);
+ try {
+ writeTx.submit().checkedGet();
+ } catch (TransactionCommitFailedException e) {
+ throw new IllegalStateException("Unable to perform put of " + path, e);
+ }
+ }
+
+ @Override
+ public void close() {
+ // Noop
+ }
+}
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModule.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModule.java
index d245682d0..f882b9ba4 100644
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModule.java
+++ b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModule.java
@@ -1,16 +1,5 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-import com.google.common.base.Optional;
-import io.fd.honeycomb.translate.MappingContext;
-import javax.annotation.Nonnull;
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
public class RealtimeMappingContextModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractRealtimeMappingContextModule {
public RealtimeMappingContextModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
@@ -28,57 +17,7 @@ public class RealtimeMappingContextModule extends org.opendaylight.yang.gen.v1.u
@Override
public java.lang.AutoCloseable createInstance() {
// Provides real time CRUD on top of Context data broker
- return new MappingContext() {
-
- @Override
- public <T extends DataObject> Optional<T> read(@Nonnull final InstanceIdentifier<T> currentId) {
- try(ReadOnlyTransaction tx = getContextBindingBrokerDependency().newReadOnlyTransaction()) {
- try {
- return tx.read(LogicalDatastoreType.OPERATIONAL, currentId).checkedGet();
- } catch (ReadFailedException e) {
- throw new IllegalStateException("Unable to perform read of " + currentId, e);
- }
- }
- }
-
- @Override
- public void delete(final InstanceIdentifier<?> path) {
- final WriteTransaction writeTx = getContextBindingBrokerDependency().newWriteOnlyTransaction();
- writeTx.delete(LogicalDatastoreType.OPERATIONAL, path);
- try {
- writeTx.submit().checkedGet();
- } catch (TransactionCommitFailedException e) {
- throw new IllegalStateException("Unable to perform delete of " + path, e);
- }
- }
-
- @Override
- public <T extends DataObject> void merge(final InstanceIdentifier<T> path, final T data) {
- final WriteTransaction writeTx = getContextBindingBrokerDependency().newWriteOnlyTransaction();
- writeTx.merge(LogicalDatastoreType.OPERATIONAL, path, data);
- try {
- writeTx.submit().checkedGet();
- } catch (TransactionCommitFailedException e) {
- throw new IllegalStateException("Unable to perform merge of " + path, e);
- }
- }
-
- @Override
- public <T extends DataObject> void put(final InstanceIdentifier<T> path, final T data) {
- final WriteTransaction writeTx = getContextBindingBrokerDependency().newWriteOnlyTransaction();
- writeTx.put(LogicalDatastoreType.OPERATIONAL, path, data);
- try {
- writeTx.submit().checkedGet();
- } catch (TransactionCommitFailedException e) {
- throw new IllegalStateException("Unable to perform put of " + path, e);
- }
- }
-
- @Override
- public void close() {
- // Noop
- }
- };
+ return new io.fd.honeycomb.translate.util.RealtimeMappingContext(getContextBindingBrokerDependency());
}
}
diff --git a/samples/minimal-distribution/pom.xml b/samples/minimal-distribution/pom.xml
index c8311aead..900d66ae9 100644
--- a/samples/minimal-distribution/pom.xml
+++ b/samples/minimal-distribution/pom.xml
@@ -19,7 +19,7 @@
<groupId>io.fd.honeycomb.common</groupId>
<artifactId>minimal-distribution-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <relativePath>../../common/minimal-distro-parent</relativePath>
+ <relativePath>../../common/minimal-distribution-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/v3po/pom.xml b/v3po/pom.xml
index f7cb1c2ba..16bc3902a 100644
--- a/v3po/pom.xml
+++ b/v3po/pom.xml
@@ -34,7 +34,8 @@
<modules>
<module>api</module>
<module>v3po2vpp</module>
- <module>features</module>
+ <!--Will be deleted-->
+ <!--<module>features</module>-->
</modules>
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
<build>
diff --git a/v3po/v3po2vpp/pom.xml b/v3po/v3po2vpp/pom.xml
index 7bd412681..4848ae949 100644
--- a/v3po/v3po2vpp/pom.xml
+++ b/v3po/v3po2vpp/pom.xml
@@ -89,6 +89,23 @@
<version>16.09-SNAPSHOT</version>
</dependency>
+ <!-- DI -->
+ <dependency>
+ <groupId>com.google.inject</groupId>
+ <artifactId>guice</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.jmob</groupId>
+ <artifactId>guice.conf</artifactId>
+ <version>${guice.config.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-multibindings</artifactId>
+ <version>${guice.version}</version>
+ </dependency>
+
<!-- Testing Dependencies -->
<dependency>
<groupId>junit</groupId>
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
new file mode 100644
index 000000000..3aa68f6a9
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po;
+
+import com.google.common.collect.Sets;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import io.fd.honeycomb.translate.impl.read.GenericListReader;
+import io.fd.honeycomb.translate.impl.read.GenericReader;
+import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
+import io.fd.honeycomb.translate.v3po.interfacesstate.AclCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.EthernetCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.GreCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.InterfaceCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.L2Customizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.ProxyArpCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.TapCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.VhostUserCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.VxlanCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.VxlanGpeCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4AddressCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4Customizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4NeighbourCustomizer;
+import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv6Customizer;
+import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2Builder;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv6;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentationBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip4Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip6Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Ethernet;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Gre;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.ProxyArp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Tap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VhostUser;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Vxlan;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VxlanGpe;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.openvpp.jvpp.future.FutureJVpp;
+
+public final class InterfacesStateReaderFactory implements ReaderFactory, AutoCloseable {
+
+ private NamingContext ifcCtx;
+ private NamingContext bdCtx;
+ private NamingContext classifyCtx;
+ private FutureJVpp jvpp;
+
+ static final InstanceIdentifier<InterfacesState> IFC_STATE_ID =
+ InstanceIdentifier.create(InterfacesState.class);
+ static final InstanceIdentifier<Interface> IFC_ID = IFC_STATE_ID.child(Interface.class);
+
+ @Inject
+ public InterfacesStateReaderFactory(final FutureJVpp jvpp,
+ @Named("interface-context") final NamingContext ifcCtx,
+ @Named("bridge-domain-context") final NamingContext bdCtx,
+ @Named("classify-table-context") final NamingContext classifyCtx) {
+ this.jvpp = jvpp;
+ this.ifcCtx = ifcCtx;
+ this.bdCtx = bdCtx;
+ this.classifyCtx = classifyCtx;
+ }
+
+ @Override
+ public void init(final ModifiableReaderRegistryBuilder registry) {
+ // InterfacesState(Structural)
+ registry.addStructuralReader(IFC_STATE_ID, InterfacesStateBuilder.class);
+ // Interface
+ registry.add(new GenericListReader<>(IFC_ID, new InterfaceCustomizer(jvpp, ifcCtx)));
+
+ // v3po.yang
+ initVppIfcAugmentationReaders(registry, IFC_ID);
+ // ietf-ip.yang
+ initInterface2AugmentationReaders(registry, IFC_ID);
+ // vpp-vlan.yang
+ new SubinterfaceStateAugmentationReaderFactory(jvpp, ifcCtx, bdCtx, classifyCtx).init(registry);
+ }
+
+ private void initInterface2AugmentationReaders(final ModifiableReaderRegistryBuilder registry,
+ final InstanceIdentifier<Interface> ifcId) {
+ // Interface2Augmentation(Structural)
+ final InstanceIdentifier<Interface2> ifc2AugId = ifcId.augmentation(Interface2.class);
+ registry.addStructuralReader(ifc2AugId, Interface2Builder.class);
+ // Ipv4
+ // TODO unfinished customizer
+ final InstanceIdentifier<Ipv4> ipv4Id = ifc2AugId.child(Ipv4.class);
+ registry.add(new GenericReader<>(ipv4Id, new Ipv4Customizer(jvpp)));
+ // Address
+ final InstanceIdentifier<Address> ipv4AddrId = ipv4Id.child(Address.class);
+ registry.add(new GenericListReader<>(ipv4AddrId, new Ipv4AddressCustomizer(jvpp, ifcCtx)));
+ // Neighbor
+ final InstanceIdentifier<Neighbor> neighborId = ipv4Id.child(Neighbor.class);
+ registry.add(new GenericListReader<>(neighborId, new Ipv4NeighbourCustomizer(jvpp)));
+ // Ipv6
+ // TODO unfinished customizer
+ final InstanceIdentifier<Ipv6> ipv6Id = ifc2AugId.child(Ipv6.class);
+ registry.add(new GenericReader<>(ipv6Id, new Ipv6Customizer(jvpp, ifcCtx)));
+ }
+
+ private void initVppIfcAugmentationReaders(final ModifiableReaderRegistryBuilder registry,
+ final InstanceIdentifier<Interface> ifcId) {
+ // VppInterfaceStateAugmentation
+ final InstanceIdentifier<VppInterfaceStateAugmentation> vppIfcAugId = ifcId.augmentation(VppInterfaceStateAugmentation.class);
+ registry.addStructuralReader(vppIfcAugId, VppInterfaceStateAugmentationBuilder.class);
+ // Ethernet
+ registry.add(new GenericReader<>(vppIfcAugId.child(Ethernet.class), new EthernetCustomizer(jvpp, ifcCtx)));
+ // Tap
+ registry.add(new GenericReader<>(vppIfcAugId.child(Tap.class), new TapCustomizer(jvpp, ifcCtx)));
+ // VhostUser
+ registry.add(new GenericReader<>(vppIfcAugId.child(VhostUser.class), new VhostUserCustomizer(jvpp, ifcCtx)));
+ // Vxlan
+ registry.add(new GenericReader<>(vppIfcAugId.child(Vxlan.class), new VxlanCustomizer(jvpp, ifcCtx)));
+ // VxlanGpe
+ registry.add(new GenericReader<>(vppIfcAugId.child(VxlanGpe.class), new VxlanGpeCustomizer(jvpp, ifcCtx)));
+ // Gre
+ registry.add(new GenericReader<>(vppIfcAugId.child(Gre.class), new GreCustomizer(jvpp, ifcCtx)));
+ // L2
+ registry.add(new GenericReader<>(vppIfcAugId.child(L2.class), new L2Customizer(jvpp, ifcCtx, bdCtx)));
+ // Acl(Subtree)
+ final InstanceIdentifier<Acl> aclIdRelative = InstanceIdentifier.create(Acl.class);
+ registry.subtreeAdd(
+ Sets.newHashSet(aclIdRelative.child(L2Acl.class), aclIdRelative.child(Ip4Acl.class), aclIdRelative.child(Ip6Acl.class)),
+ new GenericReader<>(vppIfcAugId.child(Acl.class), new AclCustomizer(jvpp, ifcCtx, classifyCtx)));
+ // Proxy ARP
+ registry.add(new GenericReader<>(vppIfcAugId.child(ProxyArp.class), new ProxyArpCustomizer(jvpp,
+ ifcCtx)));
+ }
+}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
new file mode 100644
index 000000000..ce2f621a4
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po;
+
+import static io.fd.honeycomb.translate.v3po.VppClassifierHoneycombWriterFactory.CLASSIFY_SESSION_ID;
+import static io.fd.honeycomb.translate.v3po.VppClassifierHoneycombWriterFactory.CLASSIFY_TABLE_ID;
+
+import com.google.common.collect.Sets;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import io.fd.honeycomb.translate.impl.write.GenericListWriter;
+import io.fd.honeycomb.translate.impl.write.GenericWriter;
+import io.fd.honeycomb.translate.v3po.interfaces.AclCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.EthernetCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.GreCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.InterfaceCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.L2Customizer;
+import io.fd.honeycomb.translate.v3po.interfaces.ProxyArpCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.RoutingCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.TapCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.VhostUserCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.VxlanCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.VxlanGpeCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4AddressCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4Customizer;
+import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4NeighbourCustomizer;
+import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv6Customizer;
+import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.write.WriterFactory;
+import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
+import java.util.Set;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv6;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Address;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Neighbor;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceAugmentation;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip4Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip6Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Acl;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Ethernet;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Gre;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ProxyArp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Routing;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Tap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VhostUser;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Vxlan;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpe;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.openvpp.jvpp.future.FutureJVpp;
+
+public final class InterfacesWriterFactory implements WriterFactory, AutoCloseable {
+
+ public static final InstanceIdentifier<Interface> IFC_ID =
+ InstanceIdentifier.create(Interfaces.class).child(Interface.class);
+ public static final InstanceIdentifier<VppInterfaceAugmentation> VPP_IFC_AUG_ID =
+ IFC_ID.augmentation(VppInterfaceAugmentation.class);
+ public static final InstanceIdentifier<Acl> ACL_ID = VPP_IFC_AUG_ID.child(Acl.class);
+ public static final InstanceIdentifier<L2> L2_ID = VPP_IFC_AUG_ID.child(L2.class);
+
+ private final FutureJVpp jvpp;
+ private final NamingContext bdContext;
+ private final NamingContext ifcContext;
+ private final NamingContext classifyTableContext;
+
+ @Inject
+ public InterfacesWriterFactory(final FutureJVpp vppJvppIfcDependency,
+ @Named("bridge-domain-context") final NamingContext bridgeDomainContextDependency,
+ @Named("interface-context") final NamingContext interfaceContextDependency,
+ @Named("classify-table-context") final NamingContext classifyTableContextDependency) {
+ this.jvpp = vppJvppIfcDependency;
+ this.bdContext = bridgeDomainContextDependency;
+ this.ifcContext = interfaceContextDependency;
+ this.classifyTableContext = classifyTableContextDependency;
+ }
+
+ @Override
+ public void init(final ModifiableWriterRegistryBuilder registry) {
+ // Interfaces
+ // Interface =
+ registry.add(new GenericListWriter<>(IFC_ID, new InterfaceCustomizer(jvpp, ifcContext)));
+ // VppInterfaceAugmentation
+ addVppInterfaceAgmentationWriters(IFC_ID, registry);
+ // Interface1 (ietf-ip augmentation)
+ addInterface1AugmentationWriters(IFC_ID, registry);
+ // SubinterfaceAugmentation TODO make dedicated module for subIfc writer factory
+ new SubinterfaceAugmentationWriterFactory(jvpp, ifcContext, bdContext, classifyTableContext).init(registry);
+ }
+
+ private void addInterface1AugmentationWriters(final InstanceIdentifier<Interface> ifcId,
+ final ModifiableWriterRegistryBuilder registry) {
+ final InstanceIdentifier<Interface1> ifc1AugId = ifcId.augmentation(Interface1.class);
+ // Ipv6(after interface) TODO unfinished customizer =
+ registry.addAfter(new GenericWriter<>(ifc1AugId.child(Ipv6.class), new Ipv6Customizer(jvpp)),
+ ifcId);
+ // Ipv4(after interface)
+ final InstanceIdentifier<Ipv4> ipv4Id = ifc1AugId.child(Ipv4.class);
+ registry.addAfter(new GenericWriter<>(ipv4Id, new Ipv4Customizer(jvpp, ifcContext)),
+ ifcId);
+ // Address(after Ipv4) =
+ final InstanceIdentifier<Address> ipv4AddressId = ipv4Id.child(Address.class);
+ registry.addAfter(new GenericListWriter<>(ipv4AddressId, new Ipv4AddressCustomizer(jvpp, ifcContext)),
+ ipv4Id);
+ // Neighbor(after ipv4Address)
+ registry.addAfter(new GenericListWriter<>(ipv4Id.child(Neighbor.class), new Ipv4NeighbourCustomizer(jvpp, ifcContext)),
+ ipv4AddressId);
+ }
+
+ private void addVppInterfaceAgmentationWriters(final InstanceIdentifier<Interface> ifcId,
+ final ModifiableWriterRegistryBuilder registry) {
+ // VhostUser(Needs to be executed before Interface customizer) =
+ final InstanceIdentifier<VhostUser> vhostId = VPP_IFC_AUG_ID.child(VhostUser.class);
+ registry.addBefore(new GenericWriter<>(vhostId, new VhostUserCustomizer(jvpp, ifcContext)),
+ ifcId);
+ // Vxlan(Needs to be executed before Interface customizer) =
+ final InstanceIdentifier<Vxlan> vxlanId = VPP_IFC_AUG_ID.child(Vxlan.class);
+ registry.addBefore(new GenericWriter<>(vxlanId, new VxlanCustomizer(jvpp, ifcContext)),
+ ifcId);
+ // VxlanGpe(Needs to be executed before Interface customizer) =
+ final InstanceIdentifier<VxlanGpe> vxlanGpeId = VPP_IFC_AUG_ID.child(VxlanGpe.class);
+ registry.addBefore(new GenericWriter<>(vxlanGpeId, new VxlanGpeCustomizer(jvpp, ifcContext)),
+ ifcId);
+ // Tap(Needs to be executed before Interface customizer) =
+ final InstanceIdentifier<Tap> tapId = VPP_IFC_AUG_ID.child(Tap.class);
+ registry.addBefore(new GenericWriter<>(tapId, new TapCustomizer(jvpp, ifcContext)),
+ ifcId);
+
+ // Gre(Needs to be executed before Interface customizer) =
+ final InstanceIdentifier<Gre> greId = VPP_IFC_AUG_ID.child(Gre.class);
+ registry.addBefore(new GenericWriter<>(greId, new GreCustomizer(jvpp, ifcContext)),
+ ifcId);
+
+
+ final Set<InstanceIdentifier<?>> specificIfcTypes = Sets.newHashSet(vhostId, vxlanGpeId, vxlanGpeId, tapId);
+
+ // Ethernet(No dependency, customizer not finished TODO) =
+ registry.add(new GenericWriter<>(VPP_IFC_AUG_ID.child(Ethernet.class), new EthernetCustomizer(jvpp)));
+ // Routing(Execute only after specific interface customizers) =
+ registry.addAfter(
+ new GenericWriter<>(VPP_IFC_AUG_ID.child(Routing.class), new RoutingCustomizer(jvpp, ifcContext)),
+ specificIfcTypes);
+ // Routing(Execute only after specific interface customizers) =
+ registry.addAfter(new GenericWriter<>(L2_ID, new L2Customizer(jvpp, ifcContext, bdContext)),
+ specificIfcTypes);
+ // Proxy Arp (execute after specific interface customizers)
+ registry.addAfter(
+ new GenericWriter<>(VPP_IFC_AUG_ID.child(ProxyArp.class), new ProxyArpCustomizer(jvpp, ifcContext)),
+ specificIfcTypes);
+ // ACL (execute after classify table and session writers)
+ // also handles L2Acl, Ip4Acl and Ip6Acl:
+ final InstanceIdentifier<Acl> aclId = InstanceIdentifier.create(Acl.class);
+ registry
+ .subtreeAddAfter(
+ Sets.newHashSet(aclId.child(L2Acl.class), aclId.child(Ip4Acl.class), aclId.child(Ip6Acl.class)),
+ new GenericWriter<>(ACL_ID, new AclCustomizer(jvpp, ifcContext, classifyTableContext)),
+ Sets.newHashSet(CLASSIFY_TABLE_ID, CLASSIFY_SESSION_ID));
+ }
+
+
+}
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/SubinterfaceAugmentationWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java
index d0d8f1bdc..d5bf4f678 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/SubinterfaceAugmentationWriterFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceAugmentationWriterFactory.java
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
+package io.fd.honeycomb.translate.v3po;
-import static org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.VppClassifierHoneycombWriterModule.CLASSIFY_SESSION_ID;
-import static org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.VppClassifierHoneycombWriterModule.CLASSIFY_TABLE_ID;
+import static io.fd.honeycomb.translate.v3po.VppClassifierHoneycombWriterFactory.CLASSIFY_SESSION_ID;
+import static io.fd.honeycomb.translate.v3po.VppClassifierHoneycombWriterFactory.CLASSIFY_TABLE_ID;
import com.google.common.collect.Sets;
import io.fd.honeycomb.translate.impl.write.GenericListWriter;
@@ -28,8 +28,8 @@ import io.fd.honeycomb.translate.v3po.interfaces.SubInterfaceCustomizer;
import io.fd.honeycomb.translate.v3po.interfaces.SubInterfaceL2Customizer;
import io.fd.honeycomb.translate.v3po.interfaces.ip.SubInterfaceIpv4AddressCustomizer;
import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
import io.fd.honeycomb.translate.write.WriterFactory;
+import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any.Dot1qTag;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip4Acl;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip6Acl;
@@ -50,7 +50,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.openvpp.jvpp.future.FutureJVpp;
-final class SubinterfaceAugmentationWriterFactory implements WriterFactory {
+public final class SubinterfaceAugmentationWriterFactory implements WriterFactory {
private final FutureJVpp jvpp;
private final NamingContext ifcContext;
@@ -58,7 +58,7 @@ final class SubinterfaceAugmentationWriterFactory implements WriterFactory {
private final NamingContext classifyTableContext;
public static final InstanceIdentifier<SubinterfaceAugmentation> SUB_IFC_AUG_ID =
- InterfacesHoneycombWriterModule.IFC_ID.augmentation(SubinterfaceAugmentation.class);
+ InterfacesWriterFactory.IFC_ID.augmentation(SubinterfaceAugmentation.class);
public static final InstanceIdentifier<SubInterface> SUB_IFC_ID =
SUB_IFC_AUG_ID.child(SubInterfaces.class).child(SubInterface.class);
public static final InstanceIdentifier<L2> L2_ID = SUB_IFC_ID.child(
@@ -87,7 +87,7 @@ final class SubinterfaceAugmentationWriterFactory implements WriterFactory {
InstanceIdentifier.create(SubInterface.class).child(Match.class),
InstanceIdentifier.create(SubInterface.class).child(Match.class).child(VlanTagged.class)),
new GenericListWriter<>(SUB_IFC_ID, new SubInterfaceCustomizer(jvpp, ifcContext)),
- InterfacesHoneycombWriterModule.IFC_ID);
+ InterfacesWriterFactory.IFC_ID);
// L2 =
registry.addAfter(new GenericWriter<>(L2_ID, new SubInterfaceL2Customizer(jvpp, ifcContext, bdContext)),
SUB_IFC_ID);
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/SubinterfaceStateAugmentationReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceStateAugmentationReaderFactory.java
index 0718d69d9..eab61d627 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/SubinterfaceStateAugmentationReaderFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/SubinterfaceStateAugmentationReaderFactory.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
+package io.fd.honeycomb.translate.v3po;
import com.google.common.collect.Sets;
import io.fd.honeycomb.translate.impl.read.GenericListReader;
@@ -69,7 +69,7 @@ final class SubinterfaceStateAugmentationReaderFactory implements ReaderFactory
public void init(final ModifiableReaderRegistryBuilder registry) {
// SubinterfaceStateAugmentation(Structural)
final InstanceIdentifier<SubinterfaceStateAugmentation> subIfcAugId =
- InterfacesStateHoneycombReaderModule.IFC_ID.augmentation(SubinterfaceStateAugmentation.class);
+ InterfacesStateReaderFactory.IFC_ID.augmentation(SubinterfaceStateAugmentation.class);
registry.addStructuralReader(subIfcAugId, SubinterfaceStateAugmentationBuilder.class);
// SubInterfaces(Structural)
final InstanceIdentifier<SubInterfaces> subIfcsId = subIfcAugId.child(SubInterfaces.class);
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java
new file mode 100644
index 000000000..aafd0154a
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/V3poModule.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.multibindings.Multibinder;
+import com.google.inject.name.Names;
+import io.fd.honeycomb.data.init.DataTreeInitializer;
+import io.fd.honeycomb.notification.ManagedNotificationProducer;
+import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.v3po.cfgattrs.V3poConfiguration;
+import io.fd.honeycomb.translate.v3po.initializers.InterfacesInitializer;
+import io.fd.honeycomb.translate.v3po.initializers.VppClasifierInitializer;
+import io.fd.honeycomb.translate.v3po.initializers.VppInitializer;
+import io.fd.honeycomb.translate.v3po.notification.InterfaceChangeNotificationProducer;
+import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.write.WriterFactory;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import net.jmob.guice.conf.core.ConfigurationModule;
+import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
+
+public class V3poModule extends AbstractModule {
+
+ @Override
+ protected void configure() {
+ install(ConfigurationModule.create());
+ requestInjection(V3poConfiguration.class);
+
+ // Naming contexts
+ bind(NamingContext.class)
+ .annotatedWith(Names.named("interface-context"))
+ .toInstance(new NamingContext("interface-", "interface-context"));
+ bind(NamingContext.class)
+ .annotatedWith(Names.named("bridge-domain-context"))
+ .toInstance(new NamingContext("bridge-domain-", "bridge-domain-context"));
+ bind(NamingContext.class)
+ .annotatedWith(Names.named("classify-table-context"))
+ .toInstance(new NamingContext("classify-table-", "classify-table-context"));
+
+ // Executor needed for keepalives
+ // TODO-minimal remove the funny wrapper. it is only here because of config subsystem
+ final ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
+ bind(ScheduledThreadPool.class).toInstance(new ScheduledThreadPool() {
+ @Override
+ public ScheduledExecutorService getExecutor() {
+ return executor;
+ }
+
+ @Override
+ public int getMaxThreadCount() {
+ return 1;
+ }
+ });
+
+ // Readers
+ final Multibinder<ReaderFactory> readerFactoryBinder = Multibinder.newSetBinder(binder(), ReaderFactory.class);
+ readerFactoryBinder.addBinding().to(InterfacesStateReaderFactory.class);
+ readerFactoryBinder.addBinding().to(VppStateHoneycombReaderFactory.class);
+ readerFactoryBinder.addBinding().to(VppClassifierReaderFactory.class);
+
+ // Writers
+ final Multibinder<WriterFactory> writerFactoryBinder = Multibinder.newSetBinder(binder(), WriterFactory.class);
+ writerFactoryBinder.addBinding().to(InterfacesWriterFactory.class);
+ writerFactoryBinder.addBinding().to(VppHoneycombWriterFactory.class);
+ writerFactoryBinder.addBinding().to(VppClassifierHoneycombWriterFactory.class);
+
+ // Initializers
+ final Multibinder<DataTreeInitializer> initializerBinder =
+ Multibinder.newSetBinder(binder(), DataTreeInitializer.class);
+ initializerBinder.addBinding().to(InterfacesInitializer.class);
+ initializerBinder.addBinding().to(VppClasifierInitializer.class);
+ initializerBinder.addBinding().to(VppInitializer.class);
+
+ // Notifications
+ final Multibinder<ManagedNotificationProducer> notifiersBinder =
+ Multibinder.newSetBinder(binder(), ManagedNotificationProducer.class);
+ notifiersBinder.addBinding().to(InterfaceChangeNotificationProducer.class);
+ }
+}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java
new file mode 100644
index 000000000..7c63076d5
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po;
+
+import static io.fd.honeycomb.translate.v3po.InterfacesWriterFactory.ACL_ID;
+
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import io.fd.honeycomb.translate.impl.write.GenericListWriter;
+import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifySessionWriter;
+import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifyTableWriter;
+import io.fd.honeycomb.translate.write.WriterFactory;
+import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
+import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifier;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.classify.table.base.attributes.ClassifySession;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.vpp.classifier.ClassifyTable;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.openvpp.jvpp.future.FutureJVpp;
+
+public final class VppClassifierHoneycombWriterFactory implements WriterFactory, AutoCloseable {
+
+ public static final InstanceIdentifier<ClassifyTable> CLASSIFY_TABLE_ID =
+ InstanceIdentifier.create(VppClassifier.class).child(ClassifyTable.class);
+ public static final InstanceIdentifier<ClassifySession> CLASSIFY_SESSION_ID =
+ CLASSIFY_TABLE_ID.child(ClassifySession.class);
+
+ private final FutureJVpp jvpp;
+ private final NamingContext classifyTableContext;
+
+ @Inject
+ public VppClassifierHoneycombWriterFactory(@Nonnull final FutureJVpp jvpp,
+ @Named("classify-table-context") @Nonnull final NamingContext classifyTableContext) {
+ this.jvpp = jvpp;
+ this.classifyTableContext = classifyTableContext;
+ }
+
+ @Override
+ public void init(@Nonnull final ModifiableWriterRegistryBuilder registry) {
+ // Ordering here is: First create table, then create sessions and then assign as ACL
+ // ClassifyTable
+ registry.addBefore(
+ new GenericListWriter<>(CLASSIFY_TABLE_ID, new ClassifyTableWriter(jvpp, classifyTableContext)),
+ CLASSIFY_SESSION_ID);
+ // ClassifyTableSession
+ registry.addBefore(
+ new GenericListWriter<>(
+ CLASSIFY_SESSION_ID, new ClassifySessionWriter(jvpp, classifyTableContext)),
+ ACL_ID);
+ }
+}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java
new file mode 100644
index 000000000..4cb99c538
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po;
+
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import io.fd.honeycomb.translate.impl.read.GenericListReader;
+import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
+import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifySessionReader;
+import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifyTableReader;
+import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifierState;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifierStateBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.classify.table.base.attributes.ClassifySession;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.vpp.classifier.state.ClassifyTable;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.openvpp.jvpp.future.FutureJVpp;
+
+public final class VppClassifierReaderFactory implements ReaderFactory, AutoCloseable {
+
+ private final FutureJVpp jvpp;
+ private final NamingContext classifyCtx;
+
+ @Inject
+ public VppClassifierReaderFactory(final FutureJVpp jvpp,
+ @Named("classify-table-context") final NamingContext classifyCtx) {
+ this.jvpp = jvpp;
+ this.classifyCtx = classifyCtx;
+ }
+
+ @Override
+ public void init(@Nonnull final ModifiableReaderRegistryBuilder registry) {
+ // VppClassifierState
+ final InstanceIdentifier<VppClassifierState> vppStateId = InstanceIdentifier.create(VppClassifierState.class);
+ registry.addStructuralReader(vppStateId, VppClassifierStateBuilder.class);
+ // ClassifyTable
+ final InstanceIdentifier<ClassifyTable> classTblId = vppStateId.child(ClassifyTable.class);
+ registry.add(new GenericListReader<>(classTblId, new ClassifyTableReader(jvpp, classifyCtx)));
+ // ClassifySession
+ final InstanceIdentifier<ClassifySession> classSesId = classTblId.child(ClassifySession.class);
+ registry.add(new GenericListReader<>(classSesId, new ClassifySessionReader(jvpp, classifyCtx)));
+ }
+}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppHoneycombWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppHoneycombWriterFactory.java
new file mode 100644
index 000000000..204f9f8d8
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppHoneycombWriterFactory.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po;
+
+import static io.fd.honeycomb.translate.v3po.InterfacesWriterFactory.L2_ID;
+
+import com.google.common.collect.Sets;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import io.fd.honeycomb.translate.impl.write.GenericListWriter;
+import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.v3po.vpp.ArpTerminationTableEntryCustomizer;
+import io.fd.honeycomb.translate.v3po.vpp.BridgeDomainCustomizer;
+import io.fd.honeycomb.translate.v3po.vpp.L2FibEntryCustomizer;
+import io.fd.honeycomb.translate.write.WriterFactory;
+import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Vpp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.bridge.domain.attributes.ArpTerminationTable;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.L2FibTable;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.l2.fib.table.L2FibEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.BridgeDomains;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.openvpp.jvpp.future.FutureJVpp;
+
+public final class VppHoneycombWriterFactory implements WriterFactory, AutoCloseable {
+
+ private final FutureJVpp jvpp;
+ private final NamingContext bdContext;
+ private final NamingContext ifcContext;
+
+ @Inject
+ public VppHoneycombWriterFactory(final FutureJVpp vppJvppWriterDependency,
+ @Named("bridge-domain-context") final NamingContext bridgeDomainContextVppDependency,
+ @Named("interface-context") final NamingContext interfaceContextVppDependency) {
+ this.jvpp = vppJvppWriterDependency;
+ this.bdContext = bridgeDomainContextVppDependency;
+ this.ifcContext = interfaceContextVppDependency;
+ }
+
+ @Override
+ public void init(final ModifiableWriterRegistryBuilder registry) {
+ // Vpp has no handlers
+ // BridgeDomains has no handlers
+ // BridgeDomain =
+ final InstanceIdentifier<BridgeDomain> bdId =
+ InstanceIdentifier.create(Vpp.class).child(BridgeDomains.class).child(BridgeDomain.class);
+ registry.add(new GenericListWriter<>(bdId, new BridgeDomainCustomizer(jvpp, bdContext)));
+ // L2FibTable has no handlers
+ // L2FibEntry(handled after BridgeDomain and L2 of ifc and subifc) =
+ final InstanceIdentifier<L2FibEntry> l2FibEntryId = bdId.child(L2FibTable.class).child(L2FibEntry.class);
+ registry.addAfter(
+ new GenericListWriter<>(l2FibEntryId, new L2FibEntryCustomizer(jvpp, bdContext, ifcContext)),
+ Sets.newHashSet(
+ bdId,
+ L2_ID,
+ SubinterfaceAugmentationWriterFactory.L2_ID));
+ // ArpTerminationTable has no handlers
+ // ArpTerminationTableEntry(handled after BridgeDomain) =
+ final InstanceIdentifier<ArpTerminationTableEntry> arpEntryId =
+ bdId.child(ArpTerminationTable.class).child(ArpTerminationTableEntry.class);
+ registry.addAfter(
+ new GenericListWriter<>(arpEntryId, new ArpTerminationTableEntryCustomizer(jvpp, bdContext)),
+ bdId);
+ }
+}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java
new file mode 100644
index 000000000..f39502c09
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po;
+
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import io.fd.honeycomb.translate.impl.read.GenericListReader;
+import io.fd.honeycomb.translate.impl.read.GenericReader;
+import io.fd.honeycomb.translate.read.ReaderFactory;
+import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
+import io.fd.honeycomb.translate.util.read.KeepaliveReaderWrapper;
+import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.v3po.util.ReadTimeoutException;
+import io.fd.honeycomb.translate.v3po.vppstate.BridgeDomainCustomizer;
+import io.fd.honeycomb.translate.v3po.vppstate.L2FibEntryCustomizer;
+import io.fd.honeycomb.translate.v3po.vppstate.VersionCustomizer;
+import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppState;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppStateBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.L2FibTable;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.L2FibTableBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.l2.fib.table.L2FibEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.BridgeDomains;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.BridgeDomainsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.Version;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.bridge.domains.BridgeDomain;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.openvpp.jvpp.future.FutureJVpp;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class VppStateHoneycombReaderFactory implements ReaderFactory, AutoCloseable {
+
+ private static final Logger LOG = LoggerFactory.getLogger(VppStateHoneycombReaderFactory.class);
+
+ private final FutureJVpp jVpp;
+ private final NamingContext ifcCtx;
+ private final NamingContext bdCtx;
+ private final ScheduledThreadPool keepaliveExecutor;
+
+ @Inject
+ public VppStateHoneycombReaderFactory(final FutureJVpp jVpp,
+ @Named("interface-context") final NamingContext ifcCtx,
+ @Named("bridge-domain-context") final NamingContext bdCtx,
+ final ScheduledThreadPool keepaliveExecutorDependency) {
+ this.jVpp = jVpp;
+ this.ifcCtx = ifcCtx;
+ this.bdCtx = bdCtx;
+ this.keepaliveExecutor = keepaliveExecutorDependency;
+ }
+
+ @Override
+ public void init(final ModifiableReaderRegistryBuilder registry) {
+ // VppState(Structural)
+ final InstanceIdentifier<VppState> vppStateId = InstanceIdentifier.create(VppState.class);
+ registry.addStructuralReader(vppStateId, VppStateBuilder.class);
+ // Version
+ // Wrap with keepalive reader to detect connection issues
+ // TODO keepalive reader wrapper relies on VersionReaderCustomizer (to perform timeout on reads)
+ // Once readers+customizers are asynchronous, pull the timeout to keepalive executor so that keepalive wrapper
+ // is truly generic
+ registry.add(new KeepaliveReaderWrapper<>(
+ new GenericReader<>(vppStateId.child(Version.class), new VersionCustomizer(jVpp)),
+ keepaliveExecutor.getExecutor(), ReadTimeoutException.class, 30,
+ // FIXME-minimal trigger jvpp reinitialization here
+ () -> LOG.error("Keepalive failed. VPP is probably DOWN!")));
+ // BridgeDomains(Structural)
+ final InstanceIdentifier<BridgeDomains> bridgeDomainsId = vppStateId.child(BridgeDomains.class);
+ registry.addStructuralReader(bridgeDomainsId, BridgeDomainsBuilder.class);
+ // BridgeDomain
+ final InstanceIdentifier<BridgeDomain> bridgeDomainId = bridgeDomainsId.child(BridgeDomain.class);
+ registry.add(new GenericListReader<>(bridgeDomainId, new BridgeDomainCustomizer(jVpp, bdCtx)));
+ // L2FibTable(Structural)
+ final InstanceIdentifier<L2FibTable> l2FibTableId = bridgeDomainId.child(L2FibTable.class);
+ registry.addStructuralReader(l2FibTableId, L2FibTableBuilder.class);
+ // L2FibEntry
+ registry.add(new GenericListReader<>(l2FibTableId.child(L2FibEntry.class),
+ new L2FibEntryCustomizer(jVpp, bdCtx, ifcCtx)));
+ }
+}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java
new file mode 100644
index 000000000..afe486c46
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.translate.v3po.cfgattrs;
+
+import net.jmob.guice.conf.core.BindConfig;
+import net.jmob.guice.conf.core.InjectConfig;
+import net.jmob.guice.conf.core.Syntax;
+
+@BindConfig(value = "v3po", syntax = Syntax.JSON)
+public class V3poConfiguration {
+
+ @InjectConfig("some")
+ String some;
+}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
index c218e5456..e9beccfb7 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/InterfacesInitializer.java
@@ -18,6 +18,8 @@ package io.fd.honeycomb.translate.v3po.initializers;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
import io.fd.honeycomb.data.init.AbstractDataTreeConverter;
import java.util.List;
import java.util.stream.Collectors;
@@ -76,7 +78,8 @@ import org.slf4j.LoggerFactory;
public class InterfacesInitializer extends AbstractDataTreeConverter<InterfacesState, Interfaces> {
private static final Logger LOG = LoggerFactory.getLogger(InterfacesInitializer.class);
- public InterfacesInitializer(@Nonnull final DataBroker bindingDataBroker) {
+ @Inject
+ public InterfacesInitializer(@Named("honeycomb-initializer") @Nonnull final DataBroker bindingDataBroker) {
super(bindingDataBroker, InstanceIdentifier.create(InterfacesState.class),
InstanceIdentifier.create(Interfaces.class));
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppClasifierInitializer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppClasifierInitializer.java
index 42d1c59dc..b97586830 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppClasifierInitializer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppClasifierInitializer.java
@@ -16,6 +16,8 @@
package io.fd.honeycomb.translate.v3po.initializers;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
import io.fd.honeycomb.data.init.AbstractDataTreeConverter;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
@@ -29,12 +31,13 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
* Initializes vpp-classfier node in config data tree based on operational state.
*/
-public class VppClasifierInitializer extends AbstractDataTreeConverter<VppClassifierState, VppClassifier> {
+public final class VppClasifierInitializer extends AbstractDataTreeConverter<VppClassifierState, VppClassifier> {
private static final InstanceIdentifier<VppClassifierState> OPER_ID =
InstanceIdentifier.create(VppClassifierState.class);
private static final InstanceIdentifier<VppClassifier> CFG_ID = InstanceIdentifier.create(VppClassifier.class);
- public VppClasifierInitializer(@Nonnull final DataBroker bindingDataBroker) {
+ @Inject
+ public VppClasifierInitializer(@Named("honeycomb-initializer") @Nonnull final DataBroker bindingDataBroker) {
super(bindingDataBroker, OPER_ID, CFG_ID);
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java
index 370de347b..b2c2f7b1e 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/initializers/VppInitializer.java
@@ -18,6 +18,8 @@ package io.fd.honeycomb.translate.v3po.initializers;
import com.google.common.base.Function;
import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
import io.fd.honeycomb.data.init.AbstractDataTreeConverter;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
@@ -43,7 +45,8 @@ import org.slf4j.LoggerFactory;
public class VppInitializer extends AbstractDataTreeConverter<VppState, Vpp> {
private static final Logger LOG = LoggerFactory.getLogger(VppInitializer.class);
- public VppInitializer(@Nonnull final DataBroker bindingDataBroker) {
+ @Inject
+ public VppInitializer(@Named("honeycomb-initializer") @Nonnull final DataBroker bindingDataBroker) {
super(bindingDataBroker, InstanceIdentifier.create(VppState.class), InstanceIdentifier.create(Vpp.class));
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java
index 1c60ef609..39226c0fc 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/notification/InterfaceChangeNotificationProducer.java
@@ -17,6 +17,8 @@ package io.fd.honeycomb.translate.v3po.notification;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
import io.fd.honeycomb.notification.ManagedNotificationProducer;
import io.fd.honeycomb.notification.NotificationCollector;
import io.fd.honeycomb.translate.MappingContext;
@@ -59,9 +61,10 @@ public final class InterfaceChangeNotificationProducer implements ManagedNotific
@Nullable
private AutoCloseable notificationListenerReg;
+ @Inject
public InterfaceChangeNotificationProducer(@Nonnull final FutureJVpp jvpp,
- @Nonnull final NamingContext interfaceContext,
- @Nonnull final MappingContext mappingContext) {
+ @Named("interface-context") @Nonnull final NamingContext interfaceContext,
+ @Named("honeycomb-context") @Nonnull final MappingContext mappingContext) {
this.jvpp = jvpp;
this.interfaceContext = interfaceContext;
this.mappingContext = mappingContext;
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java
index d99fd2edb..e63392018 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java
+++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java
@@ -1,66 +1,12 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
-import static org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.VppClassifierHoneycombWriterModule.CLASSIFY_SESSION_ID;
-import static org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.VppClassifierHoneycombWriterModule.CLASSIFY_TABLE_ID;
-
-import com.google.common.collect.Sets;
-import io.fd.honeycomb.translate.impl.write.GenericListWriter;
-import io.fd.honeycomb.translate.impl.write.GenericWriter;
-import io.fd.honeycomb.translate.v3po.interfaces.AclCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.EthernetCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.GreCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.InterfaceCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.L2Customizer;
-import io.fd.honeycomb.translate.v3po.interfaces.ProxyArpCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.RoutingCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.TapCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.VhostUserCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.VxlanCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.VxlanGpeCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4AddressCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4Customizer;
-import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4NeighbourCustomizer;
-import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv6Customizer;
-import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
-import io.fd.honeycomb.translate.write.WriterFactory;
-import java.util.Set;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface1;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv6;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Neighbor;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceAugmentation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip4Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip6Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Ethernet;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.L2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.ProxyArp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Routing;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Tap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VhostUser;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Vxlan;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpe;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Gre;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.openvpp.jvpp.future.FutureJVpp;
+import io.fd.honeycomb.translate.v3po.InterfacesWriterFactory;
public class InterfacesHoneycombWriterModule extends
org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesHoneycombWriterModule {
// TODO split configuration and translation code into 2 or more bundles
- public static final InstanceIdentifier<Interface> IFC_ID =
- InstanceIdentifier.create(Interfaces.class).child(Interface.class);
- public static final InstanceIdentifier<VppInterfaceAugmentation> VPP_IFC_AUG_ID =
- IFC_ID.augmentation(VppInterfaceAugmentation.class);
- public static final InstanceIdentifier<L2> L2_ID = VPP_IFC_AUG_ID.child(L2.class);
- public static final InstanceIdentifier<Acl> ACL_ID = VPP_IFC_AUG_ID.child(Acl.class);
-
public InterfacesHoneycombWriterModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
@@ -87,105 +33,4 @@ public class InterfacesHoneycombWriterModule extends
}
- private static class InterfacesWriterFactory implements WriterFactory, AutoCloseable {
-
- private final FutureJVpp jvpp;
- private final NamingContext bdContext;
- private final NamingContext ifcContext;
- private final NamingContext classifyTableContext;
-
- InterfacesWriterFactory(final FutureJVpp vppJvppIfcDependency,
- final NamingContext bridgeDomainContextDependency,
- final NamingContext interfaceContextDependency,
- final NamingContext classifyTableContextDependency) {
- this.jvpp = vppJvppIfcDependency;
- this.bdContext = bridgeDomainContextDependency;
- this.ifcContext = interfaceContextDependency;
- this.classifyTableContext = classifyTableContextDependency;
- }
-
- @Override
- public void init(final ModifiableWriterRegistryBuilder registry) {
- // Interfaces
- // Interface =
- registry.add(new GenericListWriter<>(IFC_ID, new InterfaceCustomizer(jvpp, ifcContext)));
- // VppInterfaceAugmentation
- addVppInterfaceAgmentationWriters(IFC_ID, registry);
- // Interface1 (ietf-ip augmentation)
- addInterface1AugmentationWriters(IFC_ID, registry);
- // SubinterfaceAugmentation TODO make dedicated module for subIfc writer factory
- new SubinterfaceAugmentationWriterFactory(jvpp, ifcContext, bdContext, classifyTableContext).init(registry);
- }
-
- private void addInterface1AugmentationWriters(final InstanceIdentifier<Interface> ifcId,
- final ModifiableWriterRegistryBuilder registry) {
- final InstanceIdentifier<Interface1> ifc1AugId = ifcId.augmentation(Interface1.class);
- // Ipv6(after interface) TODO unfinished customizer =
- registry.addAfter(new GenericWriter<>(ifc1AugId.child(Ipv6.class), new Ipv6Customizer(jvpp)),
- ifcId);
- // Ipv4(after interface)
- final InstanceIdentifier<Ipv4> ipv4Id = ifc1AugId.child(Ipv4.class);
- registry.addAfter(new GenericWriter<>(ipv4Id, new Ipv4Customizer(jvpp, ifcContext)),
- ifcId);
- // Address(after Ipv4) =
- final InstanceIdentifier<Address> ipv4AddressId = ipv4Id.child(Address.class);
- registry.addAfter(new GenericListWriter<>(ipv4AddressId, new Ipv4AddressCustomizer(jvpp, ifcContext)),
- ipv4Id);
- // Neighbor(after ipv4Address)
- registry.addAfter(new GenericListWriter<>(ipv4Id.child(Neighbor.class), new Ipv4NeighbourCustomizer(jvpp, ifcContext)),
- ipv4AddressId);
- }
-
- private void addVppInterfaceAgmentationWriters(final InstanceIdentifier<Interface> ifcId,
- final ModifiableWriterRegistryBuilder registry) {
- // VhostUser(Needs to be executed before Interface customizer) =
- final InstanceIdentifier<VhostUser> vhostId = VPP_IFC_AUG_ID.child(VhostUser.class);
- registry.addBefore(new GenericWriter<>(vhostId, new VhostUserCustomizer(jvpp, ifcContext)),
- ifcId);
- // Vxlan(Needs to be executed before Interface customizer) =
- final InstanceIdentifier<Vxlan> vxlanId = VPP_IFC_AUG_ID.child(Vxlan.class);
- registry.addBefore(new GenericWriter<>(vxlanId, new VxlanCustomizer(jvpp, ifcContext)),
- ifcId);
- // VxlanGpe(Needs to be executed before Interface customizer) =
- final InstanceIdentifier<VxlanGpe> vxlanGpeId = VPP_IFC_AUG_ID.child(VxlanGpe.class);
- registry.addBefore(new GenericWriter<>(vxlanGpeId, new VxlanGpeCustomizer(jvpp, ifcContext)),
- ifcId);
- // Tap(Needs to be executed before Interface customizer) =
- final InstanceIdentifier<Tap> tapId = VPP_IFC_AUG_ID.child(Tap.class);
- registry.addBefore(new GenericWriter<>(tapId, new TapCustomizer(jvpp, ifcContext)),
- ifcId);
-
- // Gre(Needs to be executed before Interface customizer) =
- final InstanceIdentifier<Gre> greId = VPP_IFC_AUG_ID.child(Gre.class);
- registry.addBefore(new GenericWriter<>(greId, new GreCustomizer(jvpp, ifcContext)),
- ifcId);
-
-
- final Set<InstanceIdentifier<?>> specificIfcTypes = Sets.newHashSet(vhostId, vxlanGpeId, vxlanGpeId, tapId);
-
- // Ethernet(No dependency, customizer not finished TODO) =
- registry.add(new GenericWriter<>(VPP_IFC_AUG_ID.child(Ethernet.class), new EthernetCustomizer(jvpp)));
- // Routing(Execute only after specific interface customizers) =
- registry.addAfter(
- new GenericWriter<>(VPP_IFC_AUG_ID.child(Routing.class), new RoutingCustomizer(jvpp, ifcContext)),
- specificIfcTypes);
- // Routing(Execute only after specific interface customizers) =
- registry.addAfter(new GenericWriter<>(L2_ID, new L2Customizer(jvpp, ifcContext, bdContext)),
- specificIfcTypes);
- // Proxy Arp (execute after specific interface customizers)
- registry.addAfter(
- new GenericWriter<>(VPP_IFC_AUG_ID.child(ProxyArp.class), new ProxyArpCustomizer(jvpp, ifcContext)),
- specificIfcTypes);
- // ACL (execute after classify table and session writers)
- // also handles L2Acl, Ip4Acl and Ip6Acl:
- final InstanceIdentifier<Acl> aclId = InstanceIdentifier.create(Acl.class);
- registry
- .subtreeAddAfter(
- Sets.newHashSet(aclId.child(L2Acl.class), aclId.child(Ip4Acl.class), aclId.child(Ip6Acl.class)),
- new GenericWriter<>(ACL_ID, new AclCustomizer(jvpp, ifcContext, classifyTableContext)),
- Sets.newHashSet(CLASSIFY_TABLE_ID, CLASSIFY_SESSION_ID));
- }
-
- }
-
}
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java
index d914facbf..300f44159 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java
+++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java
@@ -1,59 +1,10 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
-import com.google.common.collect.Sets;
-import io.fd.honeycomb.translate.impl.read.GenericListReader;
-import io.fd.honeycomb.translate.impl.read.GenericReader;
-import io.fd.honeycomb.translate.read.ReaderFactory;
-import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
-import io.fd.honeycomb.translate.v3po.interfacesstate.AclCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.EthernetCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.GreCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.InterfaceCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.L2Customizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.ProxyArpCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.TapCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.VhostUserCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.VxlanCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.VxlanGpeCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4AddressCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4Customizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4NeighbourCustomizer;
-import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv6Customizer;
-import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.Interface2Builder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv4;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.Ipv6;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentation;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppInterfaceStateAugmentationBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip4Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.Ip6Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.acl.base.attributes.L2Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Acl;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Ethernet;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.L2;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.ProxyArp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Tap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VhostUser;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Vxlan;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VxlanGpe;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.openvpp.jvpp.future.FutureJVpp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Gre;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-import org.opendaylight.yangtools.yang.binding.ChildOf;
+import io.fd.honeycomb.translate.v3po.InterfacesStateReaderFactory;
public class InterfacesStateHoneycombReaderModule extends
org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesStateHoneycombReaderModule {
- public static final InstanceIdentifier<InterfacesState> IFC_STATE_ID = InstanceIdentifier.create(InterfacesState.class);
- static final InstanceIdentifier<Interface> IFC_ID = IFC_STATE_ID.child(Interface.class);
-
public InterfacesStateHoneycombReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
@@ -73,92 +24,10 @@ public class InterfacesStateHoneycombReaderModule extends
@Override
public java.lang.AutoCloseable createInstance() {
- return new VppStateReaderFactory(getVppJvppDependency(),
+ return new InterfacesStateReaderFactory(getVppJvppDependency(),
getInterfaceContextIfcStateDependency(),
getBridgeDomainContextIfcStateDependency(),
getClassifyTableContextDependency());
}
- private static final class VppStateReaderFactory implements ReaderFactory, AutoCloseable {
-
- private NamingContext ifcCtx;
- private NamingContext bdCtx;
- private NamingContext classifyCtx;
- private FutureJVpp jvpp;
-
- VppStateReaderFactory(final FutureJVpp jvpp,
- final NamingContext ifcCtx,
- final NamingContext bdCtx,
- final NamingContext classifyCtx) {
- this.jvpp = jvpp;
- this.ifcCtx = ifcCtx;
- this.bdCtx = bdCtx;
- this.classifyCtx = classifyCtx;
- }
-
- @Override
- public void init(final ModifiableReaderRegistryBuilder registry) {
- // InterfacesState(Structural)
- registry.addStructuralReader(IFC_STATE_ID, InterfacesStateBuilder.class);
- // Interface
- registry.add(new GenericListReader<>(IFC_ID, new InterfaceCustomizer(jvpp, ifcCtx)));
-
- // v3po.yang
- initVppIfcAugmentationReaders(registry, IFC_ID);
- // ietf-ip.yang
- initInterface2AugmentationReaders(registry, IFC_ID);
- // vpp-vlan.yang
- new SubinterfaceStateAugmentationReaderFactory(jvpp, ifcCtx, bdCtx, classifyCtx).init(registry);
- }
-
- private void initInterface2AugmentationReaders(final ModifiableReaderRegistryBuilder registry,
- final InstanceIdentifier<Interface> ifcId) {
- // Interface2Augmentation(Structural)
- final InstanceIdentifier<Interface2> ifc2AugId = ifcId.augmentation(Interface2.class);
- registry.addStructuralReader(ifc2AugId, Interface2Builder.class);
- // Ipv4
- // TODO unfinished customizer
- final InstanceIdentifier<Ipv4> ipv4Id = ifc2AugId.child(Ipv4.class);
- registry.add(new GenericReader<>(ipv4Id, new Ipv4Customizer(jvpp)));
- // Address
- final InstanceIdentifier<Address> ipv4AddrId = ipv4Id.child(Address.class);
- registry.add(new GenericListReader<>(ipv4AddrId, new Ipv4AddressCustomizer(jvpp, ifcCtx)));
- // Neighbor
- final InstanceIdentifier<Neighbor> neighborId = ipv4Id.child(Neighbor.class);
- registry.add(new GenericListReader<>(neighborId, new Ipv4NeighbourCustomizer(jvpp)));
- // Ipv6
- // TODO unfinished customizer
- final InstanceIdentifier<Ipv6> ipv6Id = ifc2AugId.child(Ipv6.class);
- registry.add(new GenericReader<>(ipv6Id, new Ipv6Customizer(jvpp, ifcCtx)));
- }
-
- private void initVppIfcAugmentationReaders(final ModifiableReaderRegistryBuilder registry,
- final InstanceIdentifier<Interface> ifcId) {
- // VppInterfaceStateAugmentation
- final InstanceIdentifier<VppInterfaceStateAugmentation> vppIfcAugId = ifcId.augmentation(VppInterfaceStateAugmentation.class);
- registry.addStructuralReader(vppIfcAugId, VppInterfaceStateAugmentationBuilder.class);
- // Ethernet
- registry.add(new GenericReader<>(vppIfcAugId.child(Ethernet.class), new EthernetCustomizer(jvpp, ifcCtx)));
- // Tap
- registry.add(new GenericReader<>(vppIfcAugId.child(Tap.class), new TapCustomizer(jvpp, ifcCtx)));
- // VhostUser
- registry.add(new GenericReader<>(vppIfcAugId.child(VhostUser.class), new VhostUserCustomizer(jvpp, ifcCtx)));
- // Vxlan
- registry.add(new GenericReader<>(vppIfcAugId.child(Vxlan.class), new VxlanCustomizer(jvpp, ifcCtx)));
- // VxlanGpe
- registry.add(new GenericReader<>(vppIfcAugId.child(VxlanGpe.class), new VxlanGpeCustomizer(jvpp, ifcCtx)));
- // Gre
- registry.add(new GenericReader<>(vppIfcAugId.child(Gre.class), new GreCustomizer(jvpp, ifcCtx)));
- // L2
- registry.add(new GenericReader<>(vppIfcAugId.child(L2.class), new L2Customizer(jvpp, ifcCtx, bdCtx)));
- // Acl(Subtree)
- final InstanceIdentifier<Acl> aclIdRelative = InstanceIdentifier.create(Acl.class);
- registry.subtreeAdd(
- Sets.newHashSet(aclIdRelative.child(L2Acl.class), aclIdRelative.child(Ip4Acl.class), aclIdRelative.child(Ip6Acl.class)),
- new GenericReader<>(vppIfcAugId.child(Acl.class), new AclCustomizer(jvpp, ifcCtx, classifyCtx)));
- // Proxy ARP
- registry.add(new GenericReader<>(vppIfcAugId.child(ProxyArp.class), new ProxyArpCustomizer(jvpp,
- ifcCtx)));
- }
- }
}
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java
index c321c2724..172646c06 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java
+++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java
@@ -1,31 +1,11 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
-import static org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.InterfacesHoneycombWriterModule.ACL_ID;
-
-import io.fd.honeycomb.translate.impl.write.GenericListWriter;
-import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifySessionWriter;
-import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifyTableWriter;
-import io.fd.honeycomb.translate.write.WriterFactory;
-import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
-import javax.annotation.Nonnull;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifier;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.classify.table.base.attributes.ClassifySession;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.vpp.classifier.ClassifyTable;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.openvpp.jvpp.future.FutureJVpp;
+import io.fd.honeycomb.translate.v3po.VppClassifierHoneycombWriterFactory;
public class VppClassifierHoneycombWriterModule extends
org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierHoneycombWriterModule {
- public static final InstanceIdentifier<ClassifyTable> CLASSIFY_TABLE_ID =
- InstanceIdentifier.create(VppClassifier.class).child(ClassifyTable.class);
-
- public static final InstanceIdentifier<ClassifySession> CLASSIFY_SESSION_ID =
- CLASSIFY_TABLE_ID.child(ClassifySession.class);
-
-
public VppClassifierHoneycombWriterModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
@@ -50,27 +30,4 @@ public class VppClassifierHoneycombWriterModule extends
getClassifyTableContextDependency());
}
- private static final class VppClassifierHoneycombWriterFactory implements WriterFactory, AutoCloseable {
- private final FutureJVpp jvpp;
- private final NamingContext classifyTableContext;
-
- public VppClassifierHoneycombWriterFactory(@Nonnull final FutureJVpp jvpp,
- @Nonnull final NamingContext classifyTableContext) {
- this.jvpp = jvpp;
- this.classifyTableContext = classifyTableContext;
- }
-
- @Override
- public void init(@Nonnull final ModifiableWriterRegistryBuilder registry) {
- // Ordering here is: First create table, then create sessions and then assign as ACL
- // ClassifyTable
- registry.addBefore(
- new GenericListWriter<>(CLASSIFY_TABLE_ID, new ClassifyTableWriter(jvpp, classifyTableContext)),
- CLASSIFY_SESSION_ID);
- // ClassifyTableSession
- registry.addBefore(
- new GenericListWriter<>(CLASSIFY_SESSION_ID, new ClassifySessionWriter(jvpp, classifyTableContext)),
- ACL_ID);
- }
- }
}
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java
index de12bbeea..4169b784a 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java
+++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java
@@ -1,17 +1,6 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
-import io.fd.honeycomb.translate.impl.read.GenericListReader;
-import io.fd.honeycomb.translate.read.ReaderFactory;
-import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
-import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifySessionReader;
-import io.fd.honeycomb.translate.v3po.vppclassifier.ClassifyTableReader;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifierState;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.VppClassifierStateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.classify.table.base.attributes.ClassifySession;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603.vpp.classifier.state.ClassifyTable;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.openvpp.jvpp.future.FutureJVpp;
+import io.fd.honeycomb.translate.v3po.VppClassifierReaderFactory;
public class VppClassifierStateHoneycombReaderModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierStateHoneycombReaderModule {
public VppClassifierStateHoneycombReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
@@ -32,28 +21,4 @@ public class VppClassifierStateHoneycombReaderModule extends org.opendaylight.ya
return new VppClassifierReaderFactory(getVppJvppDependency(), getClassifyTableContextDependency());
}
- private static final class VppClassifierReaderFactory implements ReaderFactory, AutoCloseable {
-
- private final FutureJVpp jvpp;
- private final NamingContext classifyCtx;
-
- VppClassifierReaderFactory(final FutureJVpp jvpp,
- final NamingContext classifyCtx) {
- this.jvpp = jvpp;
- this.classifyCtx = classifyCtx;
- }
-
- @Override
- public void init(final ModifiableReaderRegistryBuilder registry) {
- // VppClassifierState
- final InstanceIdentifier<VppClassifierState> vppStateId = InstanceIdentifier.create(VppClassifierState.class);
- registry.addStructuralReader(vppStateId, VppClassifierStateBuilder.class);
- // ClassifyTable
- final InstanceIdentifier<ClassifyTable> classTblId = vppStateId.child(ClassifyTable.class);
- registry.add(new GenericListReader<>(classTblId, new ClassifyTableReader(jvpp, classifyCtx)));
- // ClassifySession
- final InstanceIdentifier<ClassifySession> classSesId = classTblId.child(ClassifySession.class);
- registry.add(new GenericListReader<>(classSesId, new ClassifySessionReader(jvpp, classifyCtx)));
- }
- }
}
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java
index 2cdf24ce6..63a8a1b67 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java
+++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java
@@ -1,22 +1,6 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
-import com.google.common.collect.Sets;
-import io.fd.honeycomb.translate.impl.write.GenericListWriter;
-import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import io.fd.honeycomb.translate.v3po.vpp.ArpTerminationTableEntryCustomizer;
-import io.fd.honeycomb.translate.v3po.vpp.BridgeDomainCustomizer;
-import io.fd.honeycomb.translate.v3po.vpp.L2FibEntryCustomizer;
-import io.fd.honeycomb.translate.write.WriterFactory;
-import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Vpp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.bridge.domain.attributes.ArpTerminationTable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.bridge.domain.attributes.arp.termination.table.ArpTerminationTableEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.L2FibTable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.l2.fib.table.L2FibEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.BridgeDomains;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.openvpp.jvpp.future.FutureJVpp;
+import io.fd.honeycomb.translate.v3po.VppHoneycombWriterFactory;
public class VppHoneycombWriterModule extends
org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppHoneycombWriterModule {
@@ -40,49 +24,9 @@ public class VppHoneycombWriterModule extends
@Override
public java.lang.AutoCloseable createInstance() {
return new VppHoneycombWriterFactory(
- getVppJvppWriterDependency(),
- getBridgeDomainContextVppDependency(),
- getInterfaceContextVppDependency());
+ getVppJvppWriterDependency(),
+ getBridgeDomainContextVppDependency(),
+ getInterfaceContextVppDependency());
}
- private static final class VppHoneycombWriterFactory implements WriterFactory, AutoCloseable {
-
- private final FutureJVpp jvpp;
- private final NamingContext bdContext;
- private final NamingContext ifcContext;
-
- VppHoneycombWriterFactory(final FutureJVpp vppJvppWriterDependency,
- final NamingContext bridgeDomainContextVppDependency,
- final NamingContext interfaceContextVppDependency) {
- this.jvpp = vppJvppWriterDependency;
- this.bdContext = bridgeDomainContextVppDependency;
- this.ifcContext = interfaceContextVppDependency;
- }
-
- @Override
- public void init(final ModifiableWriterRegistryBuilder registry) {
- // Vpp has no handlers
- // BridgeDomains has no handlers
- // BridgeDomain =
- final InstanceIdentifier<BridgeDomain> bdId =
- InstanceIdentifier.create(Vpp.class).child(BridgeDomains.class).child(BridgeDomain.class);
- registry.add(new GenericListWriter<>(bdId, new BridgeDomainCustomizer(jvpp, bdContext)));
- // L2FibTable has no handlers
- // L2FibEntry(handled after BridgeDomain and L2 of ifc and subifc) =
- final InstanceIdentifier<L2FibEntry> l2FibEntryId = bdId.child(L2FibTable.class).child(L2FibEntry.class);
- registry.addAfter(
- new GenericListWriter<>(l2FibEntryId, new L2FibEntryCustomizer(jvpp, bdContext, ifcContext)),
- Sets.newHashSet(
- bdId,
- InterfacesHoneycombWriterModule.L2_ID,
- SubinterfaceAugmentationWriterFactory.L2_ID));
- // ArpTerminationTable has no handlers
- // ArpTerminationTableEntry(handled after BridgeDomain) =
- final InstanceIdentifier<ArpTerminationTableEntry> arpEntryId =
- bdId.child(ArpTerminationTable.class).child(ArpTerminationTableEntry.class);
- registry.addAfter(
- new GenericListWriter<>(arpEntryId, new ArpTerminationTableEntryCustomizer(jvpp, bdContext)),
- bdId);
- }
- }
}
diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java
index 5be949b13..df216c05a 100644
--- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java
+++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java
@@ -1,37 +1,16 @@
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406;
-import io.fd.honeycomb.translate.impl.read.GenericListReader;
-import io.fd.honeycomb.translate.impl.read.GenericReader;
-import io.fd.honeycomb.translate.read.ReaderFactory;
-import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
-import io.fd.honeycomb.translate.util.read.KeepaliveReaderWrapper;
-import io.fd.honeycomb.translate.v3po.util.NamingContext;
-import io.fd.honeycomb.translate.v3po.util.ReadTimeoutException;
-import io.fd.honeycomb.translate.v3po.vppstate.BridgeDomainCustomizer;
-import io.fd.honeycomb.translate.v3po.vppstate.L2FibEntryCustomizer;
-import io.fd.honeycomb.translate.v3po.vppstate.VersionCustomizer;
+import io.fd.honeycomb.translate.v3po.VppStateHoneycombReaderFactory;
import java.lang.management.ManagementFactory;
import javax.management.Attribute;
import javax.management.InstanceNotFoundException;
import javax.management.ObjectName;
import org.opendaylight.controller.config.api.ConflictingVersionException;
import org.opendaylight.controller.config.api.ValidationException;
-import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
import org.opendaylight.controller.config.util.ConfigRegistryJMXClient;
import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.VppJvppImplModule;
import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.VppJvppImplModuleFactory;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppState;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.VppStateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.L2FibTable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.L2FibTableBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.l2.fib.attributes.l2.fib.table.L2FibEntry;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.BridgeDomains;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.BridgeDomainsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.Version;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.bridge.domains.BridgeDomain;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.openvpp.jvpp.future.FutureJVpp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -117,49 +96,4 @@ public class VppStateHoneycombReaderModule extends
}
- private static final class VppStateHoneycombReaderFactory implements ReaderFactory, AutoCloseable {
-
- private final FutureJVpp jVpp;
- private final NamingContext ifcCtx;
- private final NamingContext bdCtx;
- private final ScheduledThreadPool keepaliveExecutor;
-
- public VppStateHoneycombReaderFactory(final FutureJVpp jVpp,
- final NamingContext ifcCtx,
- final NamingContext bdCtx,
- final ScheduledThreadPool keepaliveExecutorDependency) {
- this.jVpp = jVpp;
- this.ifcCtx = ifcCtx;
- this.bdCtx = bdCtx;
- this.keepaliveExecutor = keepaliveExecutorDependency;
- }
-
- @Override
- public void init(final ModifiableReaderRegistryBuilder registry) {
- // VppState(Structural)
- final InstanceIdentifier<VppState> vppStateId = InstanceIdentifier.create(VppState.class);
- registry.addStructuralReader(vppStateId, VppStateBuilder.class);
- // Version
- // Wrap with keepalive reader to detect connection issues
- // TODO keepalive reader wrapper relies on VersionReaderCustomizer (to perform timeout on reads)
- // Once readers+customizers are asynchronous, pull the timeout to keepalive executor so that keepalive wrapper
- // is truly generic
- registry.add(new KeepaliveReaderWrapper<>(
- new GenericReader<>(vppStateId.child(Version.class), new VersionCustomizer(jVpp)),
- keepaliveExecutor.getExecutor(), ReadTimeoutException.class, 30,
- () -> reinitializeJVpp(reinitializationCounter)));
- // BridgeDomains(Structural)
- final InstanceIdentifier<BridgeDomains> bridgeDomainsId = vppStateId.child(BridgeDomains.class);
- registry.addStructuralReader(bridgeDomainsId, BridgeDomainsBuilder.class);
- // BridgeDomain
- final InstanceIdentifier<BridgeDomain> bridgeDomainId = bridgeDomainsId.child(BridgeDomain.class);
- registry.add(new GenericListReader<>(bridgeDomainId, new BridgeDomainCustomizer(jVpp, bdCtx)));
- // L2FibTable(Structural)
- final InstanceIdentifier<L2FibTable> l2FibTableId = bridgeDomainId.child(L2FibTable.class);
- registry.addStructuralReader(l2FibTableId, L2FibTableBuilder.class);
- // L2FibEntry
- registry.add(new GenericListReader<>(l2FibTableId.child(L2FibEntry.class),
- new L2FibEntryCustomizer(jVpp, bdCtx, ifcCtx)));
- }
- }
}
diff --git a/v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json b/v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json
new file mode 100644
index 000000000..290d631f0
--- /dev/null
+++ b/v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json
@@ -0,0 +1,3 @@
+{
+ "some": "value"
+} \ No newline at end of file
diff --git a/vpp-common/minimal-distribution/pom.xml b/vpp-common/minimal-distribution/pom.xml
new file mode 100644
index 000000000..4500a633d
--- /dev/null
+++ b/vpp-common/minimal-distribution/pom.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<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">
+
+ <parent>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <artifactId>minimal-distribution-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../common/minimal-distribution-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>minimal-distribution</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <properties>
+ <main.class>io.fd.honeycomb.vpp.distro.Main</main.class>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <!-- 2.8.0-01 and later require maven-compiler-plugin 3.1 or higher -->
+ <configuration>
+ <compilerId>groovy-eclipse-compiler</compilerId>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-eclipse-compiler</artifactId>
+ <version>2.9.2-01</version>
+ </dependency>
+ <!-- for 2.8.0-01 and later you must have an explicit dependency on groovy-eclipse-batch -->
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-eclipse-batch</artifactId>
+ <version>2.4.3-01</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.honeycomb</groupId>
+ <artifactId>minimal-distribution</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>naming-context-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>naming-context-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vpp-jvpp-cfg</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.fd.vpp</groupId>
+ <artifactId>jvpp</artifactId>
+ <version>16.09-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vpp-translate-utils</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy
new file mode 100644
index 000000000..fe71caddb
--- /dev/null
+++ b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.vpp.distro
+
+import com.google.inject.Inject
+import com.google.inject.name.Named
+import groovy.transform.ToString
+import groovy.util.logging.Slf4j
+import io.fd.honeycomb.infra.distro.ProviderTrait
+import io.fd.honeycomb.translate.read.ReaderFactory
+import org.opendaylight.controller.md.sal.binding.api.DataBroker
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.impl.rev141210.ContextReaderModule
+
+/**
+ * Mirror of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.impl.rev141210.ContextReaderModule
+ */
+@Slf4j
+@ToString
+class ContextsReaderFactoryProvider extends ProviderTrait<ReaderFactory> {
+
+ @Inject
+ @Named("honeycomb-context")
+ DataBroker contextDataBroker
+
+ def create() { new ContextReaderModule.ContextsReaderFactory(contextDataBroker) }
+}
diff --git a/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/JVppProvider.groovy b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/JVppProvider.groovy
new file mode 100644
index 000000000..dfd0c44ae
--- /dev/null
+++ b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/JVppProvider.groovy
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.vpp.distro
+
+import com.google.inject.Inject
+import groovy.transform.ToString
+import groovy.util.logging.Slf4j
+import io.fd.honeycomb.infra.distro.ProviderTrait
+import org.openvpp.jvpp.JVppImpl
+import org.openvpp.jvpp.VppJNIConnection
+import org.openvpp.jvpp.future.FutureJVpp
+import org.openvpp.jvpp.future.FutureJVppFacade
+
+@Slf4j
+@ToString
+class JVppProvider extends ProviderTrait<FutureJVpp> {
+
+ @Inject
+ VppConfigAttributes config
+
+ def create() {
+ try {
+ def connection = new VppJNIConnection(config.jvppConnectionName)
+ def jVpp = new JVppImpl(connection)
+
+ // Closing JVpp connection with shutdown hook to erase the connection from VPP so HC will be able
+ // to connect next time
+ // TODO is there a safer way than a shutdown hook ?
+ Runtime.addShutdownHook {
+ log.info("Disconnecting from VPP")
+ jVpp.close()
+ connection.close()
+ log.info("Successfully disconnected from VPP as {}", config.jvppConnectionName)
+ }
+ log.info("JVpp connection opened successfully as: {}", config.jvppConnectionName)
+ new FutureJVppFacade(jVpp)
+ } catch (IOException e) {
+ throw new IllegalStateException("Unable to open VPP management connection", e)
+ }
+ }
+}
diff --git a/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/Main.java b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/Main.java
new file mode 100644
index 000000000..821bd1ef9
--- /dev/null
+++ b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/Main.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.vpp.distro;
+
+import com.google.common.collect.Lists;
+import com.google.inject.Module;
+import java.util.List;
+
+public class Main {
+
+ public static void main(String[] args) {
+ final List<Module> sampleModules = Lists.newArrayList(io.fd.honeycomb.infra.distro.Main.BASE_MODULES);
+
+ sampleModules.add(new VppCommonModule());
+
+ io.fd.honeycomb.infra.distro.Main.init(sampleModules);
+ }
+}
diff --git a/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppCommonModule.groovy b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppCommonModule.groovy
new file mode 100644
index 000000000..4c2573ca1
--- /dev/null
+++ b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppCommonModule.groovy
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.vpp.distro
+
+import com.google.inject.AbstractModule
+import com.google.inject.Singleton
+import com.google.inject.multibindings.Multibinder
+import groovy.util.logging.Slf4j
+import io.fd.honeycomb.translate.read.ReaderFactory
+import net.jmob.guice.conf.core.ConfigurationModule
+import org.openvpp.jvpp.future.FutureJVpp
+
+@Slf4j
+public final class VppCommonModule extends AbstractModule {
+
+ protected void configure() {
+ install(ConfigurationModule.create())
+ // Inject non-dependency configuration
+ requestInjection(VppConfigAttributes)
+
+ bind(FutureJVpp).toProvider(JVppProvider).in(Singleton)
+
+ // Naming contexts reader exposing context storage over REST/NETCONF
+ Multibinder.newSetBinder(binder(), ReaderFactory.class).with {
+ addBinding().toProvider(ContextsReaderFactoryProvider).in(Singleton)
+ }
+ }
+}
diff --git a/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppConfigAttributes.groovy b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppConfigAttributes.groovy
new file mode 100644
index 000000000..23ee95da3
--- /dev/null
+++ b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/VppConfigAttributes.groovy
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.vpp.distro
+
+import groovy.transform.ToString
+import net.jmob.guice.conf.core.BindConfig
+import net.jmob.guice.conf.core.InjectConfig
+import net.jmob.guice.conf.core.Syntax
+
+@ToString(includeNames = true)
+@BindConfig(value = "jvpp", syntax = Syntax.JSON)
+class VppConfigAttributes {
+
+ @InjectConfig("jvpp-connection-name")
+ String jvppConnectionName
+
+}
diff --git a/vpp-common/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/jvpp.json b/vpp-common/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/jvpp.json
new file mode 100644
index 000000000..1d411872e
--- /dev/null
+++ b/vpp-common/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/jvpp.json
@@ -0,0 +1,3 @@
+{
+ "jvpp-connection-name": "honeycomb"
+} \ No newline at end of file
diff --git a/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java b/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java
index da7ab832d..ccc01e0ad 100644
--- a/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java
+++ b/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java
@@ -27,14 +27,14 @@ public class ContextReaderModule extends org.opendaylight.yang.gen.v1.urn.openda
@Override
public java.lang.AutoCloseable createInstance() {
- return new ReaderFactory(getContextBindingBrokerDependency());
+ return new ContextsReaderFactory(getContextBindingBrokerDependency());
}
- private static final class ReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory {
+ public static final class ContextsReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory {
private final DataBroker contextBindingBrokerDependency;
- public ReaderFactory(final DataBroker contextBindingBrokerDependency) {
+ public ContextsReaderFactory(final DataBroker contextBindingBrokerDependency) {
this.contextBindingBrokerDependency = contextBindingBrokerDependency;
}
diff --git a/vpp-common/pom.xml b/vpp-common/pom.xml
index ca4029b81..42a5221e3 100644
--- a/vpp-common/pom.xml
+++ b/vpp-common/pom.xml
@@ -36,7 +36,8 @@
<module>vpp-jvpp-cfg</module>
<module>naming-context-api</module>
<module>naming-context-impl</module>
- <module>features</module>
+ <module>minimal-distribution</module>
+ <!--<module>features</module>-->
</modules>
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
<build>
diff --git a/vpp-integration/minimal-distribution/pom.xml b/vpp-integration/minimal-distribution/pom.xml
new file mode 100644
index 000000000..034c3ee75
--- /dev/null
+++ b/vpp-integration/minimal-distribution/pom.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<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">
+
+ <parent>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <artifactId>minimal-distribution-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../common/minimal-distribution-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.vpp.integration</groupId>
+ <artifactId>vpp-integration-distribution</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <properties>
+ <exec.parameters>-Xms128m -Xmx128m</exec.parameters>
+ <main.class>io.fd.honeycomb.vpp.integration.distro.Main</main.class>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.honeycomb.vpp</groupId>
+ <artifactId>minimal-distribution</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>v3po2vpp</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/vpp-integration/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/integration/distro/Main.java b/vpp-integration/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/integration/distro/Main.java
new file mode 100644
index 000000000..6485aedb1
--- /dev/null
+++ b/vpp-integration/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/integration/distro/Main.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.fd.honeycomb.vpp.integration.distro;
+
+import com.google.common.collect.Lists;
+import com.google.inject.Module;
+import io.fd.honeycomb.translate.v3po.V3poModule;
+import io.fd.honeycomb.vpp.distro.VppCommonModule;
+import java.util.List;
+
+public class Main {
+
+ public static void main(String[] args) {
+ final List<Module> sampleModules = Lists.newArrayList(io.fd.honeycomb.infra.distro.Main.BASE_MODULES);
+
+ // All the plugins should be listed here
+ sampleModules.add(new VppCommonModule());
+ sampleModules.add(new V3poModule());
+
+ io.fd.honeycomb.infra.distro.Main.init(sampleModules);
+ }
+}
diff --git a/vpp-integration/pom.xml b/vpp-integration/pom.xml
index 7b900e7ea..e087abd86 100644
--- a/vpp-integration/pom.xml
+++ b/vpp-integration/pom.xml
@@ -31,8 +31,9 @@
<maven>3.1.1</maven>
</prerequisites>
<modules>
- <module>features</module>
- <module>karaf</module>
+ <!--<module>features</module>-->
+ <!--<module>karaf</module>-->
+ <module>minimal-distribution</module>
</modules>
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
<build>