summaryrefslogtreecommitdiffstats
path: root/infra
diff options
context:
space:
mode:
Diffstat (limited to 'infra')
-rw-r--r--infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestorationType.java (renamed from infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java)20
-rw-r--r--infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java1
-rw-r--r--infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModule.java54
-rw-r--r--infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModuleFactory.java14
-rw-r--r--infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModule.java38
-rw-r--r--infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModuleFactory.java13
-rw-r--r--infra/cfg-init/src/main/yang/cfg-init.yang117
-rw-r--r--infra/data-api/src/main/yang/data-api.yang38
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java71
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModuleFactory.java13
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java79
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java13
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java65
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModuleFactory.java13
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModule.java38
-rw-r--r--infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModuleFactory.java13
-rw-r--r--infra/data-impl/src/main/yang/data-impl.yang179
-rw-r--r--infra/features/pom.xml217
-rw-r--r--infra/features/src/main/features/features.xml63
-rw-r--r--infra/impl/pom.xml48
-rw-r--r--infra/impl/src/main/config/context-datatree-config.xml144
-rw-r--r--infra/impl/src/main/config/default-config.xml253
-rw-r--r--infra/impl/src/main/config/initializer-config.xml188
-rw-r--r--infra/impl/src/main/config/netconf-north-config.xml494
-rw-r--r--infra/impl/src/main/config/restconf-north-config.xml37
-rw-r--r--infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java114
-rw-r--r--infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java44
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java26
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java13
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java34
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java13
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java59
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java117
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java13
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java45
-rw-r--r--infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java13
-rw-r--r--infra/impl/src/main/yang/honeycomb-impl.yang155
-rw-r--r--infra/karaf/pom.xml74
-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.groovy4
-rw-r--r--infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/netconf/NetconfMonitoringReaderFactoryProvider.groovy4
-rw-r--r--infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/honeycomb.json6
-rw-r--r--infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/logback.xml4
-rw-r--r--infra/notification/api/src/main/yang/notification-api.yang31
-rw-r--r--infra/notification/impl/pom.xml32
-rw-r--r--infra/notification/impl/src/main/config/default-config.xml71
-rw-r--r--infra/notification/impl/src/main/config/notification-to-netconf-config.xml58
-rw-r--r--infra/notification/impl/src/main/java/io/fd/honeycomb/notification/impl/TranslationUtil.java104
-rw-r--r--infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModule.java27
-rw-r--r--infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModuleFactory.java13
-rw-r--r--infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModule.java93
-rw-r--r--infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModuleFactory.java13
-rw-r--r--infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModule.java155
-rw-r--r--infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModuleFactory.java13
-rw-r--r--infra/notification/impl/src/main/yang/notification-impl.yang141
-rw-r--r--infra/notification/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/NoetificationToNetconfModuleTest.java3
-rw-r--r--infra/pom.xml3
-rw-r--r--infra/translate-api/src/main/yang/translate-api.yang52
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModule.java25
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModuleFactory.java20
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModule.java26
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModuleFactory.java13
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModule.java38
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModuleFactory.java13
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModule.java23
-rw-r--r--infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModuleFactory.java13
-rw-r--r--infra/translate-utils/src/main/yang/translate-utils.yang95
68 files changed, 284 insertions, 3758 deletions
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestorationType.java
index 2e7b0956f..51b1d8bbe 100644
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java
+++ b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestorationType.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Cisco and/or its affiliates.
+ * 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.
@@ -13,16 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/*
-* Generated file
-*
-* Generated from: yang module name: v3po yang module local name: v3po
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri Jan 02 13:49:24 CST 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-public class HoneycombModuleFactory extends AbstractHoneycombModuleFactory {
+package io.fd.honeycomb.data.init;
+
+/**
+ * Type of operation to use when writing restored data
+ */
+public enum RestorationType {
+ Put, Merge
}
diff --git a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java
index 54c3df787..2f3f7c99e 100644
--- a/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java
+++ b/infra/cfg-init/src/main/java/io/fd/honeycomb/data/init/RestoringInitializer.java
@@ -29,7 +29,6 @@ import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFaile
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
import org.opendaylight.controller.sal.core.api.model.SchemaService;
-import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407.RestorationType;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
diff --git a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModule.java b/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModule.java
deleted file mode 100644
index 3a90c5303..000000000
--- a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModule.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407;
-
-import io.fd.honeycomb.data.init.InitializerRegistry;
-import io.fd.honeycomb.data.init.InitializerRegistryImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
-* Initializer registry, delegating initialization to a list of initializers
-*/
-public class ConfigurationInitializerRegistryModule extends AbstractConfigurationInitializerRegistryModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(ConfigurationInitializerRegistryModule.class);
-
- public ConfigurationInitializerRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public ConfigurationInitializerRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, ConfigurationInitializerRegistryModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- LOG.info("Config initialization started");
-
- final InitializerRegistry initializer = new InitializerRegistryImpl(getInitializersDependency());
-
- try {
- // Initialize contexts first so that other initializers can find any relevant mapping before initializing
- // configuration to what is already in VPP
- getPersistedContextInitializerDependency().initialize();
- LOG.info("Persisted context restored successfully");
- // Initialize all registered initializers
- initializer.initialize();
- LOG.info("Configuration initialized successfully");
- // Initialize stored configuration on top
- getPersistedConfigInitializerDependency().initialize();
- LOG.info("Persisted configuration restored successfully");
- } catch (Exception e) {
- LOG.warn("Failed to initialize config", e);
- }
-
- LOG.info("Honeycomb initialized");
-
- return initializer;
- }
-
-}
diff --git a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModuleFactory.java b/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModuleFactory.java
deleted file mode 100644
index 461c1f01b..000000000
--- a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/ConfigurationInitializerRegistryModuleFactory.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: vpp-cfg-init yang module local name: cfg-initializer-registry
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed May 18 14:43:49 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407;
-public class ConfigurationInitializerRegistryModuleFactory extends
- AbstractConfigurationInitializerRegistryModuleFactory {
-
-}
diff --git a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModule.java b/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModule.java
deleted file mode 100644
index b57ded9fc..000000000
--- a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModule.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407;
-
-import io.fd.honeycomb.data.init.RestoringInitializer;
-import java.nio.file.InvalidPathException;
-import java.nio.file.Paths;
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.api.rev160411.DatatreeType;
-
-/**
-* Initializer restoring data from a persisted file
-*/
-public class PersistedFileInitializerModule extends AbstractPersistedFileInitializerModule {
- public PersistedFileInitializerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public PersistedFileInitializerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, PersistedFileInitializerModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- try {
- Paths.get(getPersistFilePath());
- } catch (InvalidPathException e) {
- throw new JmxAttributeValidationException("Invalid persist path", e, persistFilePathJmxAttribute);
- }
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- return new RestoringInitializer(getSchemaServiceDependency(), Paths.get(getPersistFilePath()),
- getDomDataBrokerDependency(), getRestorationType(),
- getDatastoreType() == DatatreeType.Config ? LogicalDatastoreType.CONFIGURATION : LogicalDatastoreType.OPERATIONAL);
- }
-
-}
diff --git a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModuleFactory.java b/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModuleFactory.java
deleted file mode 100644
index 7e703d558..000000000
--- a/infra/cfg-init/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/init/rev160407/PersistedFileInitializerModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: vpp-cfg-init yang module local name: persisted-file-initializer
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed May 18 13:48:52 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407;
-public class PersistedFileInitializerModuleFactory extends AbstractPersistedFileInitializerModuleFactory {
-
-}
diff --git a/infra/cfg-init/src/main/yang/cfg-init.yang b/infra/cfg-init/src/main/yang/cfg-init.yang
deleted file mode 100644
index 8b1a4d9d1..000000000
--- a/infra/cfg-init/src/main/yang/cfg-init.yang
+++ /dev/null
@@ -1,117 +0,0 @@
-module cfg-init {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:data:init";
- prefix "init";
-
- import config { prefix config; revision-date 2013-04-05; }
- import opendaylight-md-sal-dom {prefix dom;}
- import translate-api { prefix tapi; revision-date 2016-04-06; }
- import data-api { prefix dapi; revision-date 2016-04-11; }
-
- description
- "This module contains initializers for config data tree";
-
- revision "2016-04-07" {
- description
- "Initial revision";
- }
-
- identity cfg-initializer {
- base "config:service-type";
- config:java-class io.fd.honeycomb.data.init.DataTreeInitializer;
- }
-
- identity cfg-initializer-registry {
- base config:module-type;
- config:provided-service cfg-initializer;
- config:java-name-prefix ConfigurationInitializerRegistry;
- description "Initializer registry, delegating initialization to a list of initializers";
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case cfg-initializer-registry {
- when "/config:modules/config:module/config:type = 'cfg-initializer-registry'";
-
- list initializers {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity cfg-initializer;
- }
- }
- }
-
- container persisted-context-initializer {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity cfg-initializer;
- }
- }
- }
-
- container persisted-config-initializer {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity cfg-initializer;
- }
- }
- }
- }
- }
-
- identity persisted-file-initializer {
- base config:module-type;
- config:provided-service cfg-initializer;
- description "Initializer restoring data from a persisted file";
- }
-
- typedef restoration-type {
- type enumeration {
- enum merge;
- enum put;
- }
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case persisted-file-initializer {
- when "/config:modules/config:module/config:type = 'persisted-file-initializer'";
-
- container dom-data-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:dom-async-data-broker;
- }
- }
- }
-
- container schema-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:schema-service;
- }
- }
- }
-
- leaf persist-file-path {
- type string;
- mandatory true;
- }
-
- leaf restoration-type {
- type restoration-type;
- default merge;
- }
-
-
- leaf datastore-type {
- type dapi:datatree-type;
- mandatory true;
- }
- }
- }
-
-} \ No newline at end of file
diff --git a/infra/data-api/src/main/yang/data-api.yang b/infra/data-api/src/main/yang/data-api.yang
deleted file mode 100644
index d09d1d371..000000000
--- a/infra/data-api/src/main/yang/data-api.yang
+++ /dev/null
@@ -1,38 +0,0 @@
-module data-api {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:data:api";
- prefix "dapi";
-
- import config { prefix config; revision-date 2013-04-05; }
-
- description
- "This module contains the base YANG data tree definitions
- for data store modeling";
-
- revision "2016-04-11" {
- description
- "Initial revision.";
- }
-
- identity data-tree {
- base "config:service-type";
- config:java-class org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
- }
-
- identity honeycomb-readable-data-tree {
- base "config:service-type";
- config:java-class io.fd.honeycomb.data.ReadableDataManager;
- }
-
- identity honeycomb-modifiable-data-tree {
- base "config:service-type";
- config:java-class io.fd.honeycomb.data.ModifiableDataManager;
- }
-
- typedef datatree-type {
- type enumeration {
- enum config;
- enum oper;
- }
- }
-} \ No newline at end of file
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java
deleted file mode 100644
index 8db0d5404..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.data.DataModification;
-import io.fd.honeycomb.data.ModifiableDataManager;
-import io.fd.honeycomb.data.impl.ModifiableDataTreeDelegator;
-import javax.annotation.Nonnull;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConfigDataTreeModule extends
- org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(ConfigDataTreeModule.class);
-
- public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.ConfigDataTreeModule oldModule,
- java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- LOG.debug("ConfigDataTreeModule.createInstance()");
- return new CloseableConfigDataTree(
- new ModifiableDataTreeDelegator(getSerializerDependency(), getDataTreeDependency(),
- getWriterRegistryBuilderDependency().build(), getContextBindingBrokerDependency()));
- }
-
- private static final class CloseableConfigDataTree implements ModifiableDataManager, AutoCloseable {
-
- private final ModifiableDataTreeDelegator delegate;
-
- CloseableConfigDataTree(final ModifiableDataTreeDelegator delegate) {
- this.delegate = delegate;
- }
-
- @Override
- public void close() throws Exception {
- LOG.debug("CloseableConfigDataTree.close()");
- // NOP
- }
-
- @Override
- public DataModification newModification() {
- LOG.trace("CloseableConfigDataTree.newModification");
- return delegate.newModification();
- }
-
- @Override
- public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(
- @Nonnull final YangInstanceIdentifier path) {
- return delegate.read(path);
- }
- }
-}
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModuleFactory.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModuleFactory.java
deleted file mode 100644
index 19baab13a..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: data-impl yang module local name: config-data-tree
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Sun Apr 10 22:07:29 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-public class ConfigDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModuleFactory {
-
-}
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java
deleted file mode 100644
index 99e5b396c..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-
-import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.api.rev160411.DatatreeType;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.*;
-import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class InMemoryDataTreeModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryDataTreeModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(InMemoryDataTreeModule.class);
-
- public InMemoryDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public InMemoryDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.InMemoryDataTreeModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- LOG.debug("InMemoryConfigDataTreeModule.createInstance()");
- return new CloseableConfigDataTree(getSchemaServiceDependency().getGlobalContext(), getType());
- }
-
- private static class CloseableConfigDataTree implements AutoCloseable, DataTree {
- private final DataTree dataTree;
-
- CloseableConfigDataTree(final SchemaContext schemaContext, final DatatreeType type) {
- this.dataTree = InMemoryDataTreeFactory.getInstance().create(
- type == DatatreeType.Config ? TreeType.CONFIGURATION : TreeType.OPERATIONAL
- );
- dataTree.setSchemaContext(schemaContext);
- }
-
- @Override
- public void close() throws Exception {
- // NOP
- }
-
- @Override
- public DataTreeSnapshot takeSnapshot() {
- return dataTree.takeSnapshot();
- }
-
- @Override
- public void setSchemaContext(final SchemaContext newSchemaContext) {
- dataTree.setSchemaContext(newSchemaContext);
- }
-
- @Override
- public void commit(final DataTreeCandidate candidate) {
- dataTree.commit(candidate);
- }
-
- @Override
- public YangInstanceIdentifier getRootPath() {
- return dataTree.getRootPath();
- }
-
- @Override
- public void validate(final DataTreeModification modification) throws DataValidationFailedException {
- dataTree.validate(modification);
- }
-
- @Override
- public DataTreeCandidate prepare(final DataTreeModification modification) {
- return dataTree.prepare(modification);
- }
- }
-}
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java
deleted file mode 100644
index 34a543949..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: data-impl yang module local name: inmemory-data-tree
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri May 13 11:10:56 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-public class InMemoryDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryDataTreeModuleFactory {
-
-}
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java
deleted file mode 100644
index dcb0053ca..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModule.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.data.ReadableDataManager;
-import io.fd.honeycomb.data.impl.ReadableDataTreeDelegator;
-import javax.annotation.Nonnull;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OperationalDataTreeModule extends
- org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractOperationalDataTreeModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(OperationalDataTreeModule.class);
-
- public OperationalDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public OperationalDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.OperationalDataTreeModule oldModule,
- java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- LOG.debug("OperationalDataTreeModule.createInstance()");
- return new CloseableOperationalDataTree(
- new ReadableDataTreeDelegator(getSerializerDependency(), getSchemaServiceDependency().getGlobalContext(),
- getReaderRegistryBuilderDependency().build(), getContextBindingBrokerDependency()));
- }
-
- private static final class CloseableOperationalDataTree implements ReadableDataManager, AutoCloseable {
-
- private final ReadableDataTreeDelegator delegate;
-
- CloseableOperationalDataTree(final ReadableDataTreeDelegator delegate) {
- this.delegate = delegate;
- }
-
- @Override
- public void close() throws Exception {
- LOG.debug("CloseableOperationalDataTree.close()");
- // NOP
- }
-
- @Override
- public CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> read(
- @Nonnull final YangInstanceIdentifier path) {
- LOG.trace("CloseableOperationalDataTree.read path={}", path);
- return delegate.read(path);
- }
- }
-}
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModuleFactory.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModuleFactory.java
deleted file mode 100644
index 221eabe5c..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/OperationalDataTreeModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: data-impl yang module local name: honeycomb-operational-data-tree
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Sun Apr 10 23:52:21 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-public class OperationalDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractOperationalDataTreeModuleFactory {
-
-}
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModule.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModule.java
deleted file mode 100644
index c15feace9..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModule.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-
-import java.nio.file.InvalidPathException;
-import java.nio.file.Paths;
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-
-public class PersistingDataTreeAdapterModule extends
- org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractPersistingDataTreeAdapterModule {
- public PersistingDataTreeAdapterModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public PersistingDataTreeAdapterModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.PersistingDataTreeAdapterModule oldModule,
- java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- try {
- Paths.get(getPersistFilePath());
- } catch (InvalidPathException e) {
- throw new JmxAttributeValidationException("Invalid persist path", e, persistFilePathJmxAttribute);
- }
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- return new io.fd.honeycomb.data.impl.PersistingDataTreeAdapter(
- getDelegateDependency(),
- getSchemaServiceDependency(),
- Paths.get(getPersistFilePath()));
- }
-
-}
diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModuleFactory.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModuleFactory.java
deleted file mode 100644
index 0b7546c65..000000000
--- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/PersistingDataTreeAdapterModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: data-impl yang module local name: persisting-data-tree-adapter
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Thu May 12 14:07:24 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
-public class PersistingDataTreeAdapterModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractPersistingDataTreeAdapterModuleFactory {
-
-}
diff --git a/infra/data-impl/src/main/yang/data-impl.yang b/infra/data-impl/src/main/yang/data-impl.yang
deleted file mode 100644
index ee485538b..000000000
--- a/infra/data-impl/src/main/yang/data-impl.yang
+++ /dev/null
@@ -1,179 +0,0 @@
-module data-impl {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:data:impl";
- prefix "tutils";
-
- import config { prefix config; revision-date 2013-04-05; }
- import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
- import opendaylight-md-sal-dom { prefix dom; revision-date 2013-10-28;}
- import data-api { prefix dapi; revision-date 2016-04-11; }
- import translate-api { prefix tapi; revision-date 2016-04-06; }
-
- description
- "This module contains YANG module definitions
- for honeycomd data layer";
-
- revision "2016-04-11" {
- description
- "Initial revision.";
- }
-
- identity inmemory-data-tree {
- base config:module-type;
- config:provided-service dapi:data-tree;
- config:java-name-prefix InMemoryDataTree;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case inmemory-data-tree {
- when "/config:modules/config:module/config:type = 'inmemory-data-tree'";
-
- container schema-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:schema-service;
- }
- }
- }
-
- leaf type {
- type dapi:datatree-type;
- mandatory true;
- }
- }
- }
-
- identity persisting-data-tree-adapter {
- base config:module-type;
- config:provided-service dapi:data-tree;
- config:java-name-prefix PersistingDataTreeAdapter;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case persisting-data-tree-adapter {
- when "/config:modules/config:module/config:type = 'persisting-data-tree-adapter'";
-
- container delegate {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dapi:data-tree;
- }
- }
- }
-
- container schema-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:schema-service;
- }
- }
- }
-
- leaf persist-file-path {
- type string;
- mandatory true;
- description "Path to a file to be used as data storage";
- }
- }
- }
-
- identity honeycomb-config-data-tree {
- base config:module-type;
- config:provided-service dapi:honeycomb-modifiable-data-tree;
- config:java-name-prefix ConfigDataTree;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb-config-data-tree {
- when "/config:modules/config:module/config:type = 'honeycomb-config-data-tree'";
-
- container data-tree {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dapi:data-tree;
- }
- }
- }
-
- container serializer {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-normalized-node-serializer;
- }
- }
- }
-
- container writer-registry-builder {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity tapi:honeycomb-writer-registry-builder;
- }
- }
- }
-
- container context-binding-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-async-data-broker;
- }
- }
- }
- }
- }
-
- identity honeycomb-operational-data-tree {
- base config:module-type;
- config:provided-service dapi:honeycomb-readable-data-tree;
- config:java-name-prefix OperationalDataTree;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb-operational-data-tree {
- when "/config:modules/config:module/config:type = 'honeycomb-operational-data-tree'";
-
- container schema-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:schema-service;
- }
- }
- }
-
- container serializer {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-normalized-node-serializer;
- }
- }
- }
-
- container reader-registry-builder {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity tapi:honeycomb-reader-registry-builder;
- }
- }
- }
-
- container context-binding-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-async-data-broker;
- }
- }
- }
-
- }
- }
-} \ No newline at end of file
diff --git a/infra/features/pom.xml b/infra/features/pom.xml
deleted file mode 100644
index 732c6ca8f..000000000
--- a/infra/features/pom.xml
+++ /dev/null
@@ -1,217 +0,0 @@
-<?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>features-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../../common/features-parent</relativePath>
- </parent>
- <groupId>io.fd.honeycomb</groupId>
- <artifactId>honeycomb-features</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <name>${project.artifactId}</name>
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
- <properties>
- <mdsal.model.version>0.8.2-Beryllium-SR2</mdsal.model.version>
- <mdsal.version>1.3.2-Beryllium-SR2</mdsal.version>
- <restconf.version>1.3.2-Beryllium-SR2</restconf.version>
- <netconf.version>1.0.2-Beryllium-SR2</netconf.version>
- <yangtools.version>0.8.2-Beryllium-SR2</yangtools.version>
- <dlux.version>0.3.2-Beryllium-SR2</dlux.version>
- <configfile.directory>etc/opendaylight/karaf</configfile.directory>
- </properties>
- <dependencyManagement>
- <dependencies>
- <!-- project specific dependencies -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>${mdsal.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>restconf-artifacts</artifactId>
- <version>${restconf.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-artifacts</artifactId>
- <version>${netconf.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>features-yangtools</artifactId>
- <classifier>features</classifier>
- <version>${yangtools.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>features-mdsal-model</artifactId>
- <version>${mdsal.model.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-mdsal</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>features-restconf</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>features-netconf-connector</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.dlux</groupId>
- <artifactId>features-dlux</artifactId>
- <classifier>features</classifier>
- <version>${dlux.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>netconf</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>init</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>context</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>restconf</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>data-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>data-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>notification-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>notification-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>notification-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>notification-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>notification2netconf</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>cfg-init</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-spi</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>translate-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jgrapht</groupId>
- <artifactId>jgrapht-core</artifactId>
- <version>0.9.2</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/infra/features/src/main/features/features.xml b/infra/features/src/main/features/features.xml
deleted file mode 100644
index bfc5ad8f0..000000000
--- a/infra/features/src/main/features/features.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- 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.
--->
-<features name="honeycomb-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
- <repository>mvn:org.opendaylight.yangtools/features-yangtools/${yangtools.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.netconf/features-restconf/${restconf.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.netconf/features-netconf-connector/${netconf.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.dlux/features-dlux/${dlux.version}/xml/features</repository>
-
- <feature name='honeycomb-api' version='${project.version}' description='OpenDaylight :: honeycomb :: api'>
- <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
- </feature>
-
- <feature name='honeycomb' version='${project.version}' description='OpenDaylight :: honeycomb'>
- <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
- <feature version='${project.version}'>honeycomb-api</feature>
- <!-- FIXME remove netconf-connector-ssh from features, only netconf northbound is needed -->
- <feature version='${netconf.version}'>odl-netconf-connector-ssh</feature>
- <feature version='${mdsal.version}'>odl-netconf-mdsal</feature>
- <bundle>mvn:io.fd.honeycomb/honeycomb-impl/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/translate-api/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/translate-spi/{{VERSION}}</bundle>
- <bundle>mvn:org.jgrapht/jgrapht-core/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/translate-utils/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/data-api/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/data-impl/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/notification-api/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/notification-impl/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/translate-impl/{{VERSION}}</bundle>
- <bundle>mvn:io.fd.honeycomb/cfg-init/{{VERSION}}</bundle>
- <configfile finalname="${configfile.directory}/honeycomb-context.xml">mvn:io.fd.honeycomb/honeycomb-impl/{{VERSION}}/xml/context</configfile>
- <configfile finalname="${configfile.directory}/honeycomb-notification.xml">mvn:io.fd.honeycomb/notification-impl/{{VERSION}}/xml/config</configfile>
- <configfile finalname="${configfile.directory}/honeycomb.xml">mvn:io.fd.honeycomb/honeycomb-impl/{{VERSION}}/xml/config</configfile>
- <configfile finalname="${configfile.directory}/honeycomb-init.xml">mvn:io.fd.honeycomb/honeycomb-impl/{{VERSION}}/xml/init</configfile>
- </feature>
-
- <feature name='honeycomb-rest' version='${project.version}' description='OpenDaylight :: honeycomb :: REST'>
- <feature version="${project.version}">honeycomb</feature>
- <feature version="${restconf.version}">odl-restconf</feature>
- <!-- Northbound interfaces configuration -->
- <configfile finalname="${configfile.directory}/honeycomb-netconf.xml">mvn:io.fd.honeycomb/honeycomb-impl/{{VERSION}}/xml/netconf</configfile>
- <configfile finalname="${configfile.directory}/honeycomb-notification2netconf.xml">mvn:io.fd.honeycomb/notification-impl/{{VERSION}}/xml/notification2netconf</configfile>
- <configfile finalname="${configfile.directory}/honeycomb-restconf.xml">mvn:io.fd.honeycomb/honeycomb-impl/{{VERSION}}/xml/restconf</configfile>
- </feature>
-
-</features>
diff --git a/infra/impl/pom.xml b/infra/impl/pom.xml
index 4a316ceaf..34187bf5d 100644
--- a/infra/impl/pom.xml
+++ b/infra/impl/pom.xml
@@ -79,52 +79,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${config.file}</file>
- <type>xml</type>
- <classifier>config</classifier>
- </artifact>
- <artifact>
- <file>src/main/config/netconf-north-config.xml</file>
- <type>xml</type>
- <classifier>netconf</classifier>
- </artifact>
- <artifact>
- <file>src/main/config/initializer-config.xml</file>
- <type>xml</type>
- <classifier>init</classifier>
- </artifact>
- <artifact>
- <file>src/main/config/context-datatree-config.xml</file>
- <type>xml</type>
- <classifier>context</classifier>
- </artifact>
- <artifact>
- <file>src/main/config/restconf-north-config.xml</file>
- <type>xml</type>
- <classifier>restconf</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
diff --git a/infra/impl/src/main/config/context-datatree-config.xml b/infra/impl/src/main/config/context-datatree-config.xml
deleted file mode 100644
index d3d694dc2..000000000
--- a/infra/impl/src/main/config/context-datatree-config.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-
-<snapshot>
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&amp;revision=2014-12-10</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&amp;revision=2016-04-06</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:init?module=cfg-init&amp;revision=2016-04-07</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&amp;revision=2016-04-11</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&amp;revision=2016-04-11</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
- </required-capabilities>
- <configuration>
-
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-
- <!-- TODO provide information stored in context data-tree to users as part of operational data -->
- <!-- In-memory data tree for context(special data required for YANG <-> VPP mapping) data -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:inmemory-data-tree</type>
- <name>inmemory-context-data-tree</name>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <type xmlns="urn:honeycomb:params:xml:ns:yang:data:impl">oper</type>
- </module>
-
- <!-- DataTree adapter with persistence for context DT -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:persisting-data-tree-adapter</type>
- <name>inmemory-persisted-context-data-tree</name>
- <delegate>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
- <name>inmemory-context-data-tree</name>
- </delegate>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <persist-file-path>data/persistence/honeycomb/context.json</persist-file-path>
- </module>
-
- <!-- DOM Data Broker for context data -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:honeycomb:impl">prefix:honeycomb-context-dom-data-broker</type>
- <name>honeycomb-context-data-broker</name>
- <!-- With persistence -->
- <context-data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
- <name>inmemory-persisted-context-data-tree</name>
- </context-data-tree>
- </module>
-
- <!-- BA Data Broker for context data -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-forwarded-data-broker</type>
- <name>honeycomb-context-binding-data-broker</name>
- <binding-forwarded-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>honeycomb-context-data-broker</name>
- </dom-async-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </binding-forwarded-data-broker>
- </module>
-
- <!-- Mapping context on top of BA context broker. Utilized by eg notification producers -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:utils">prefix:realtime-mapping-context</type>
- <name>realtime-mapping-context</name>
- <context-binding-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>honeycomb-context-binding-data-broker</name>
- </context-binding-broker>
- </module>
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
- <instance>
- <name>inmemory-context-data-tree</name>
- <provider>/modules/module[type='inmemory-data-tree'][name='inmemory-context-data-tree']
- </provider>
- </instance>
- <instance>
- <name>inmemory-persisted-context-data-tree</name>
- <provider>/modules/module[type='persisting-data-tree-adapter'][name='inmemory-persisted-context-data-tree']
- </provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <instance>
- <name>honeycomb-context-data-broker</name>
- <provider>/modules/module[type='honeycomb-context-dom-data-broker'][name='honeycomb-context-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <instance>
- <name>honeycomb-context-binding-data-broker</name>
- <provider>/modules/module[type='binding-forwarded-data-broker'][name='honeycomb-context-binding-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-mapping-context</type>
- <instance>
- <name>realtime-mapping-context</name>
- <provider>/modules/module[type='realtime-mapping-context'][name='realtime-mapping-context']</provider>
- </instance>
- </service>
- </services>
- </data>
- </configuration>
-</snapshot>
diff --git a/infra/impl/src/main/config/default-config.xml b/infra/impl/src/main/config/default-config.xml
deleted file mode 100644
index 14ff4ae87..000000000
--- a/infra/impl/src/main/config/default-config.xml
+++ /dev/null
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- 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.
--->
-<snapshot>
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&amp;revision=2014-12-10</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&amp;revision=2016-04-06</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&amp;revision=2016-04-11</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&amp;revision=2016-04-11</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
- </required-capabilities>
- <configuration>
-
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:utils">prefix:delegating-reader-registry</type>
- <name>read-registry</name>
- </module>
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:utils">prefix:delegating-writer-registry</type>
- <name>write-registry</name>
- </module>
-
- <!-- In-memory data tree for HC config data tree -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:inmemory-data-tree</type>
- <name>inmemory-config-data-tree</name>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <type xmlns="urn:honeycomb:params:xml:ns:yang:data:impl">config</type>
- </module>
-
- <!-- DataTree adapter with persistence for config DT -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:persisting-data-tree-adapter</type>
- <name>inmemory-persisted-config-data-tree</name>
- <delegate>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
- <name>inmemory-config-data-tree</name>
- </delegate>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <persist-file-path>data/persistence/honeycomb/config.json</persist-file-path>
- </module>
-
-
- <!-- HC config data tree -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:honeycomb-config-data-tree</type>
- <name>config-data-tree</name>
- <!-- Without persistence -->
- <!--<data-tree>-->
- <!--<type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:data-tree</type>-->
- <!--<name>inmemory-config-data-tree</name>-->
- <!--</data-tree>-->
- <!-- With persistence -->
- <data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
- <name>inmemory-persisted-config-data-tree</name>
- </data-tree>
-
- <serializer>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </serializer>
- <writer-registry-builder>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-registry-builder</type>
- <name>write-registry-builder</name>
- </writer-registry-builder>
- <context-binding-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>honeycomb-context-binding-data-broker</name>
- </context-binding-broker>
- </module>
-
- <!-- HC operational data tree -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:honeycomb-operational-data-tree</type>
- <name>operational-data-tree</name>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <serializer>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </serializer>
- <reader-registry-builder>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-registry</type>
- <name>read-registry</name>
- </reader-registry-builder>
- <context-binding-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>honeycomb-context-binding-data-broker</name>
- </context-binding-broker>
- </module>
-
- <!-- DOM data broker which provides transaction functionality for HC using BI format-->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:honeycomb:impl">prefix:honeycomb-dom-data-broker</type>
- <name>honeycomb-dom-data-broker</name>
- <config-data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:honeycomb-modifiable-data-tree</type>
- <name>config-data-tree</name>
- </config-data-tree>
- <operational-data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:honeycomb-readable-data-tree</type>
- <name>operational-data-tree</name>
- </operational-data-tree>
- </module>
-
- <!-- Binding data broker which provides transaction functionality for HC using BA format -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-forwarded-data-broker</type>
- <name>honeycomb-binding-data-broker</name>
- <binding-forwarded-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
-
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>honeycomb-dom-data-broker</name>
- </dom-async-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </binding-forwarded-data-broker>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:honeycomb:impl">prefix:honeycomb</type>
- <name>honeycomb-default</name>
- <dom-broker>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-broker-osgi-registry</type>
- <name>dom-broker</name>
- </dom-broker>
- <honeycomb-dom-data-broker>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-async-data-broker</type>
- <name>honeycomb-dom-data-broker</name>
- </honeycomb-dom-data-broker>
- <honeycomb-dom-notification-service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:dom-notification-service</type>
- <name>honeycomb-dom-notification-service</name>
- </honeycomb-dom-notification-service>
- </module>
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <instance>
- <name>honeycomb-dom-data-broker</name>
- <provider>/modules/module[type='honeycomb-dom-data-broker'][name='honeycomb-dom-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <instance>
- <name>honeycomb-binding-data-broker</name>
- <provider>/modules/module[type='binding-forwarded-data-broker'][name='honeycomb-binding-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-registry</type>
- <instance>
- <name>read-registry</name>
- <provider>/modules/module[type='delegating-reader-registry'][name='read-registry']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-registry</type>
- <instance>
- <name>write-registry</name>
- <provider>/modules/module[type='delegating-writer-registry'][name='write-registry']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-registry-builder</type>
- <instance>
- <name>write-registry-builder</name>
- <provider>/modules/module[type='delegating-writer-registry'][name='write-registry']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
- <instance>
- <name>inmemory-config-data-tree</name>
- <provider>/modules/module[type='inmemory-data-tree'][name='inmemory-config-data-tree']
- </provider>
- </instance>
- <instance>
- <name>inmemory-persisted-config-data-tree</name>
- <provider>/modules/module[type='persisting-data-tree-adapter'][name='inmemory-persisted-config-data-tree']
- </provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:honeycomb-modifiable-data-tree</type>
- <instance>
- <name>config-data-tree</name>
- <provider>/modules/module[type='honeycomb-config-data-tree'][name='config-data-tree']
- </provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:honeycomb-readable-data-tree</type>
- <instance>
- <name>operational-data-tree</name>
- <provider>/modules/module[type='honeycomb-operational-data-tree'][name='operational-data-tree']
- </provider>
- </instance>
- </service>
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">
- dom:dom-broker-osgi-registry
- </type>
- <instance>
- <name>honeycomb-dom-broker</name>
- <provider>/modules/module[type='honeycomb'][name='honeycomb-default']</provider>
- </instance>
- </service>
-
- </services>
- </data>
- </configuration>
-</snapshot>
diff --git a/infra/impl/src/main/config/initializer-config.xml b/infra/impl/src/main/config/initializer-config.xml
deleted file mode 100644
index 5265ed0d2..000000000
--- a/infra/impl/src/main/config/initializer-config.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-
-<snapshot>
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&amp;revision=2014-12-10</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&amp;revision=2016-04-06</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:init?module=cfg-init&amp;revision=2016-04-07</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&amp;revision=2016-04-11</capability>
- <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&amp;revision=2016-04-11</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
- </required-capabilities>
- <configuration>
-
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <!-- Config initialization -->
- <!-- Empty registry which does not pass data to VPP -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:utils">prefix:noop-writer-registry-builder</type>
- <name>noop-writer-registry-builder</name>
- </module>
- <!-- Config data tree which does not pass data to translation layer (uses noop-write-registry) -->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:impl">prefix:honeycomb-config-data-tree</type>
- <name>cfg-init-config-data-tree</name>
- <!-- Without persistence -->
- <data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:data-tree</type>
- <name>inmemory-config-data-tree</name>
- </data-tree>
- <serializer>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </serializer>
- <writer-registry-builder>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-registry-builder</type>
- <name>noop-writer-registry-builder</name>
- </writer-registry-builder>
- <context-binding-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>honeycomb-context-binding-data-broker</name>
- </context-binding-broker>
- </module>
- <!-- DOM data broker for config initialization -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:honeycomb:impl">prefix:honeycomb-dom-data-broker</type>
- <name>cfg-init-dom-data-broker</name>
- <config-data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:honeycomb-modifiable-data-tree</type>
- <name>cfg-init-config-data-tree</name>
- </config-data-tree>
- <operational-data-tree>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:honeycomb-readable-data-tree</type>
- <name>operational-data-tree</name>
- </operational-data-tree>
- </module>
- <!-- Binding data broker for config initialization -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-forwarded-data-broker</type>
- <name>cfg-init-binding-data-broker</name>
- <binding-forwarded-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>cfg-init-dom-data-broker</name>
- </dom-async-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </binding-forwarded-data-broker>
- </module>
-
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:persisted-file-initializer</type>
- <name>persisted-context-initializer</name>
- <dom-data-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>honeycomb-context-data-broker</name>
- </dom-data-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <persist-file-path>data/persistence/honeycomb/context.json</persist-file-path>
- <restoration-type>merge</restoration-type>
- <datastore-type>oper</datastore-type>
- </module>
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:persisted-file-initializer</type>
- <name>persisted-config-initializer</name>
- <dom-data-broker>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">prefix:dom-async-data-broker</type>
- <name>honeycomb-dom-data-broker</name>
- </dom-data-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <persist-file-path>data/persistence/honeycomb/config.json</persist-file-path>
- <restoration-type>merge</restoration-type>
- <datastore-type>config</datastore-type>
- </module>
-
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer-registry</type>
- <name>initializer-registry</name>
- <persisted-context-initializer>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer</type>
- <name>persisted-context-initializer</name>
- </persisted-context-initializer>
- <persisted-config-initializer>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer</type>
- <name>persisted-config-initializer</name>
- </persisted-config-initializer>
- </module>
- <!-- END: Config initialization -->
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <!-- Config initialization -->
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-registry-builder</type>
- <instance>
- <name>noop-writer-registry-builder</name>
- <provider>/modules/module[type='noop-writer-registry-builder'][name='noop-writer-registry-builder']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:api">prefix:honeycomb-modifiable-data-tree</type>
- <instance>
- <name>cfg-init-config-data-tree</name>
- <provider>/modules/module[type='honeycomb-config-data-tree'][name='cfg-init-config-data-tree']
- </provider>
- </instance>
- </service>
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <instance>
- <name>cfg-init-dom-data-broker</name>
- <provider>/modules/module[type='honeycomb-dom-data-broker'][name='cfg-init-dom-data-broker']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <instance>
- <name>cfg-init-binding-data-broker</name>
- <provider>/modules/module[type='binding-forwarded-data-broker'][name='cfg-init-binding-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer</type>
- <instance>
- <name>persisted-context-initializer</name>
- <provider>/modules/module[type='persisted-file-initializer'][name='persisted-context-initializer']
- </provider>
- </instance>
- <instance>
- <name>persisted-config-initializer</name>
- <provider>/modules/module[type='persisted-file-initializer'][name='persisted-config-initializer']
- </provider>
- </instance>
- </service>
- </services>
- </data>
- </configuration>
-</snapshot>
diff --git a/infra/impl/src/main/config/netconf-north-config.xml b/infra/impl/src/main/config/netconf-north-config.xml
deleted file mode 100644
index 1a3e6a7ca..000000000
--- a/infra/impl/src/main/config/netconf-north-config.xml
+++ /dev/null
@@ -1,494 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-
-<snapshot>
- <configuration>
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-
- <!-- In memory DS dedicated to NETCONF monitoring, notifications etc. -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">prefix:inmemory-config-datastore-provider</type>
- <name>netconf-config-store-service</name>
- <inmemory-config-datastore-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- </inmemory-config-datastore-provider>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">prefix:inmemory-operational-datastore-provider</type>
- <name>netconf-operational-store-service</name>
- <inmemory-operational-datastore-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- </inmemory-operational-datastore-provider>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:dom-inmemory-data-broker</type>
- <name>netconf-inmemory-data-broker</name>
-
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
-
- <config-data-store>
- <type xmlns:config-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store">config-dom-store-spi:config-dom-datastore</type>
- <name>netconf-config-store-service</name>
- </config-data-store>
-
- <operational-data-store>
- <type xmlns:operational-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store">operational-dom-store-spi:operational-dom-datastore</type>
- <name>netconf-operational-store-service</name>
- </operational-data-store>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-forwarded-data-broker</type>
- <name>netconf-binding-data-broker</name>
- <binding-forwarded-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>netconf-inmemory-data-broker</name>
- </dom-async-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </binding-forwarded-data-broker>
- </module>
- <module>
- <!--binding-broker-osgi-registry-->
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:honeycomb:impl">prefix:binding-broker-netconf</type>
- <name>binding-broker-netconf</name>
- <netconf-binding-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>netconf-binding-data-broker</name>
- </netconf-binding-broker>
- </module>
- <!-- END:In memory DS dedicated to NETCONF monitoring, notifications etc. -->
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:mapper">
- prefix:netconf-mdsal-mapper
- </type>
- <name>netconf-honeycomb-mapper</name>
- <root-schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service
- </type>
- <name>yang-schema-service</name>
- </root-schema-service>
- <root-schema-source-provider>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">
- dom:yang-text-source-provider
- </type>
- <name>yang-text-source-provider</name>
- </root-schema-source-provider>
- <dom-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:mapper">
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">
- dom:dom-broker-osgi-registry
- </type>
- <name>honeycomb-dom-broker</name>
- </dom-broker>
- <mapper-aggregator xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:mapper">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- prefix:netconf-mapper-registry
- </type>
- <name>honeycomb-mapper-aggregator-registry</name>
- </mapper-aggregator>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- prefix:netconf-server-dispatcher-impl
- </type>
- <name>netconf-honeycomb-server-dispatcher</name>
- <mappers xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- dom:netconf-northbound-mapper
- </type>
- <name>honeycomb-mapper-aggregator</name>
- </mappers>
- <server-monitor
- xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound">
- prefix:netconf-server-monitoring
- </type>
- <name>honeycomb-server-monitor</name>
- </server-monitor>
- <boss-thread-group
- xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">
- prefix:netty-threadgroup
- </type>
- <name>global-boss-group</name>
- </boss-thread-group>
- <worker-thread-group
- xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">
- prefix:netty-threadgroup
- </type>
- <name>global-worker-group</name>
- </worker-thread-group>
- <timer xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-timer
- </type>
- <name>global-timer</name>
- </timer>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring">
- prefix:netconf-mdsal-monitoring-mapper
- </type>
- <name>netconf-honeycomb-monitoring-mapper</name>
- <server-monitoring xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound">
- prefix:netconf-server-monitoring
- </type>
- <name>honeycomb-server-monitor</name>
- </server-monitoring>
- <binding-aware-broker
- xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
- prefix:binding-broker-osgi-registry
- </type>
- <name>binding-broker-netconf</name>
- </binding-aware-broker>
- <aggregator xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- prefix:netconf-mapper-registry
- </type>
- <name>honeycomb-mapper-aggregator-registry</name>
- </aggregator>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- prefix:netconf-mapper-aggregator
- </type>
- <name>honeycomb-mapper-aggregator</name>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- prefix:netconf-server-monitoring-impl
- </type>
- <name>honeycomb-server-monitor</name>
- <aggregator xmlns="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl">
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- dom:netconf-northbound-mapper
- </type>
- <name>honeycomb-mapper-aggregator</name>
- </aggregator>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">prefix:netconf-northbound-ssh</type>
- <name>netconf-mdsal-ssh-server</name>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">
- prefix:netconf-northbound-ssh
- </type>
- <name>netconf-honeycomb-ssh-server</name>
-
- <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">2831</port>
- <event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">
- prefix:netty-event-executor
- </type>
- <name>global-event-executor</name>
- </event-executor>
- <worker-thread-group xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">
- prefix:netty-threadgroup
- </type>
- <name>global-worker-group</name>
- </worker-thread-group>
- <processing-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool">
- prefix:threadpool
- </type>
- <name>global-netconf-ssh-scheduled-executor</name>
- </processing-executor>
- <dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound">
- prefix:netconf-server-dispatcher
- </type>
- <name>netconf-honeycomb-server-dispatcher</name>
- </dispatcher>
- <auth-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:auth">
- prefix:netconf-auth-provider
- </type>
- <name>default-auth-provider</name>
- </auth-provider>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification:impl">
- prefix:netconf-notification-manager
- </type>
- <name>honeycomb-netconf-notification-manager</name>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification">
- prefix:netconf-mdsal-notification-mapper
- </type>
- <name>netconf-honeycomb-notification-mapper</name>
- <!--This is used to listen to netconf-state/capabilities changes to send out notifications-->
- <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification">
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
- binding:binding-async-data-broker
- </type>
- <name>netconf-binding-data-broker</name>
- </data-broker>
- <!--This writes stream list into DS-->
- <binding-aware-broker
- xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
- prefix:binding-broker-osgi-registry
- </type>
- <name>binding-broker-netconf</name>
- </binding-aware-broker>
- <aggregator xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- prefix:netconf-mapper-registry
- </type>
- <name>honeycomb-mapper-aggregator-registry</name>
- </aggregator>
- <notification-registry
- xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification">
- prefix:netconf-notification-registry
- </type>
- <name>honeycomb-netconf-notification-manager</name>
- </notification-registry>
- <notification-collector>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification">
- prefix:netconf-notification-collector
- </type>
- <name>honeycomb-netconf-notification-manager</name>
- </notification-collector>
- </module>
-
-
- <!--TCP endpoint for MD-SAL netconf server -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:tcp">
- prefix:netconf-northbound-tcp
- </type>
- <name>netconf-honeycomb-tcp-server</name>
- <dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:tcp">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound">
- prefix:netconf-server-dispatcher
- </type>
- <name>netconf-honeycomb-server-dispatcher</name>
- </dispatcher>
- <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:tcp">7777</port>
- </module>
-
- <!-- Special reader for Netconf monitoring. The problem is that we store netconf monitoring in a dedicated DS.
- However netconf is wired to our reader registry, so we need to delegate the reads of netconf-monitoring
- through our readers to the dedicated DS-->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:honeycomb:impl">prefix:netconf-monitoring-reader</type>
- <name>netconf-monitoring-reader</name>
- <netconf-monitoring-binding-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>netconf-binding-data-broker</name>
- </netconf-monitoring-binding-broker>
- </module>
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:utils">prefix:delegating-reader-registry</type>
- <name>read-registry</name>
- <reader-factory>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-factory</type>
- <name>netconf-monitoring-reader</name>
- </reader-factory>
- </module>
- <!-- END: Special reader for Netconf monitoring. -->
-
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:config-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store">config-dom-store-spi:config-dom-datastore</type>
- <instance>
- <name>netconf-config-store-service</name>
- <provider>/modules/module[type='inmemory-config-datastore-provider'][name='netconf-config-store-service']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:operational-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store">operational-dom-store-spi:operational-dom-datastore</type>
- <instance>
- <name>netconf-operational-store-service</name>
- <provider>/modules/module[type='inmemory-operational-datastore-provider'][name='netconf-operational-store-service']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <instance>
- <name>netconf-inmemory-data-broker</name>
- <provider>/modules/module[type='dom-inmemory-data-broker'][name='netconf-inmemory-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-factory</type>
- <instance>
- <name>netconf-monitoring-reader</name>
- <provider>/modules/module[type='netconf-monitoring-reader'][name='netconf-monitoring-reader']</provider>
- </instance>
- </service>
-
- <!-- In memory DS dedicated to NETCONF monitoring, notifications etc. -->
-
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <instance>
- <name>netconf-binding-data-broker</name>
- <provider>/modules/module[type='binding-forwarded-data-broker'][name='netconf-binding-data-broker']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
- <instance>
- <name>binding-broker-netconf</name>
- <provider>/modules/module[type='binding-broker-netconf'][name='binding-broker-netconf']</provider>
- </instance>
- </service>
- <!-- END:In memory DS dedicated to NETCONF monitoring, notifications etc. -->
-
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound">
- prefix:netconf-server-monitoring
- </type>
- <instance>
- <name>honeycomb-server-monitor</name>
- <provider>/modules/module[type='netconf-server-monitoring-impl'][name='honeycomb-server-monitor']
- </provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- prefix:netconf-northbound-mapper
- </type>
- <instance>
- <name>netconf-honeycomb-mapper</name>
- <provider>/modules/module[type='netconf-mdsal-mapper'][name='netconf-honeycomb-mapper']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- prefix:netconf-northbound-mapper
- </type>
- <instance>
- <name>honeycomb-mapper-aggregator</name>
- <provider>/modules/module[type='netconf-mapper-aggregator'][name='honeycomb-mapper-aggregator']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- prefix:netconf-mapper-registry
- </type>
- <instance>
- <name>honeycomb-mapper-aggregator-registry</name>
- <provider>/modules/module[type='netconf-mapper-aggregator'][name='honeycomb-mapper-aggregator']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound">
- prefix:netconf-server-dispatcher
- </type>
- <instance>
- <name>netconf-honeycomb-server-dispatcher</name>
- <provider>
- /modules/module[type='netconf-server-dispatcher-impl'][name='netconf-honeycomb-server-dispatcher']
- </provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:north:mapper">
- prefix:netconf-northbound-mapper
- </type>
- <instance>
- <name>netconf-honeycomb-notification-mapper</name>
- <provider>
- /modules/module[type='netconf-mdsal-notification-mapper'][name='netconf-honeycomb-notification-mapper']
- </provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification">
- prefix:netconf-notification-collector
- </type>
- <instance>
- <name>honeycomb-netconf-notification-manager</name>
- <provider>
- /modules/module[type='netconf-notification-manager'][name='honeycomb-netconf-notification-manager']
- </provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification">
- prefix:netconf-notification-registry
- </type>
- <instance>
- <name>honeycomb-netconf-notification-manager</name>
- <provider>
- /modules/module[type='netconf-notification-manager'][name='honeycomb-netconf-notification-manager']
- </provider>
- </instance>
- </service>
- </services>
-
- </data>
- </configuration>
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:honeycomb:impl?module=honeycomb-impl&amp;revision=2014-12-10</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:mapper?module=netconf-mdsal-mapper&amp;revision=2015-01-14</capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring?module=netconf-mdsal-monitoring&amp;revision=2015-02-18
- </capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh?module=netconf-northbound-ssh&amp;revision=2015-01-14</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:tcp?module=netconf-northbound-tcp&amp;revision=2015-04-23</capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl?module=netconf-northbound-impl&amp;revision=2015-01-12
- </capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:scheduled?module=threadpool-impl-scheduled&amp;revision=2013-12-01
- </capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification?module=netconf-mdsal-notification&amp;revision=2015-08-03
- </capability>
- </required-capabilities>
-</snapshot>
diff --git a/infra/impl/src/main/config/restconf-north-config.xml b/infra/impl/src/main/config/restconf-north-config.xml
deleted file mode 100644
index 00599b62c..000000000
--- a/infra/impl/src/main/config/restconf-north-config.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ 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.
- -->
-<snapshot>
- <configuration>
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <module>
- <type xmlns:rest="urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector">rest:rest-connector-impl</type>
- <name>rest-connector-default-impl</name>
- <!-- Reconfiguring the default restconf northbound instance, to wire it just to honeycomb broker facade -->
- <dom-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
- <name>honeycomb-dom-broker</name>
- </dom-broker>
- </module>
- </modules>
- </data>
- </configuration>
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:sal:restconf:service?module=sal-restconf-service&amp;revision=2015-07-08</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector?module=opendaylight-rest-connector&amp;revision=2014-07-24</capability>
- </required-capabilities>
-</snapshot>
diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java
new file mode 100644
index 000000000..f11848ac7
--- /dev/null
+++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java
@@ -0,0 +1,114 @@
+/*
+ * 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.impl;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer;
+import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
+import org.opendaylight.controller.sal.binding.api.BindingAwareService;
+import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.binding.RpcService;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Binding aware broker wrapping just a DataBroker
+ */
+public final class FakeBindingAwareBroker implements BindingAwareBroker, AutoCloseable {
+
+ private DataBroker netconfBindingBrokerDependency;
+
+ public FakeBindingAwareBroker(final DataBroker netconfBindingBrokerDependency) {
+
+ this.netconfBindingBrokerDependency = netconfBindingBrokerDependency;
+ }
+
+ @Deprecated
+ @Override
+ public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer,
+ final BundleContext bundleContext) {
+ throw new UnsupportedOperationException("Unsupported");
+ }
+
+ @Override
+ public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer) {
+ final ConsumerContext consumerContext = new ConsumerContext() {
+ @Override
+ public <T extends BindingAwareService> T getSALService(final Class<T> aClass) {
+ return aClass.equals(DataBroker.class)
+ ? (T) netconfBindingBrokerDependency
+ : null;
+ }
+
+ @Override
+ public <T extends RpcService> T getRpcService(final Class<T> aClass) {
+ return null;
+ }
+ };
+ bindingAwareConsumer.onSessionInitialized(consumerContext);
+ return consumerContext;
+ }
+
+ @Override
+ public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider,
+ final BundleContext bundleContext) {
+ throw new UnsupportedOperationException("Unsupported");
+ }
+
+ @Override
+ public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider) {
+ final ProviderContext context = new ProviderContext() {
+ @Override
+ public <L extends RouteChangeListener<RpcContextIdentifier, InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(
+ final L l) {
+ throw new UnsupportedOperationException("Unsupported");
+ }
+
+ @Override
+ public <T extends RpcService> T getRpcService(final Class<T> aClass) {
+ throw new UnsupportedOperationException("Unsupported");
+ }
+
+ @Override
+ public <T extends RpcService> RpcRegistration<T> addRpcImplementation(final Class<T> aClass, final T t)
+ throws IllegalStateException {
+ throw new UnsupportedOperationException("Unsupported");
+ }
+
+ @Override
+ public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(
+ final Class<T> aClass, final T t) throws IllegalStateException {
+ throw new UnsupportedOperationException("Unsupported");
+ }
+
+ @Override
+ public <T extends BindingAwareService> T getSALService(final Class<T> aClass) {
+ return aClass.equals(DataBroker.class)
+ ? (T) netconfBindingBrokerDependency
+ : null; }
+ };
+ bindingAwareProvider.onSessionInitiated(context);
+ return context;
+ }
+
+ @Override
+ public void close() throws Exception {
+ netconfBindingBrokerDependency = null;
+ }
+}
diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java
new file mode 100644
index 000000000..a299dbe3f
--- /dev/null
+++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java
@@ -0,0 +1,44 @@
+/*
+ * 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.impl;
+
+import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
+import io.fd.honeycomb.translate.util.read.BindingBrokerReader;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfStateBuilder;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+
+/**
+ * {@link io.fd.honeycomb.translate.read.ReaderFactory} initiating reader into NETCONF's dedicated data store.
+ * Making NETCONF operational data available over NETCONF/RESTCONF
+ */
+public final class NetconfMonitoringReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory {
+
+ private final DataBroker netconfMonitoringBindingBrokerDependency;
+
+ public NetconfMonitoringReaderFactory(final DataBroker netconfMonitoringBindingBrokerDependency) {
+ this.netconfMonitoringBindingBrokerDependency = netconfMonitoringBindingBrokerDependency;
+ }
+
+ @Override
+ public void init(final ModifiableReaderRegistryBuilder registry) {
+ registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(NetconfState.class),
+ netconfMonitoringBindingBrokerDependency,
+ LogicalDatastoreType.OPERATIONAL, NetconfStateBuilder.class));
+ }
+}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java
deleted file mode 100644
index c2f7d688a..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-
-import io.fd.honeycomb.data.impl.DataBroker;
-import io.fd.honeycomb.data.impl.ModifiableDataTreeManager;
-
-public class ContextDataBrokerModule extends AbstractContextDataBrokerModule {
-
- public ContextDataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public ContextDataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, ContextDataBrokerModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- return DataBroker.create(new ModifiableDataTreeManager(getContextDataTreeDependency()));
- }
-
-}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java
deleted file mode 100644
index e07214b2e..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: v3po-impl yang module local name: honeycomb-context-dom-data-broker
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Mon May 16 15:27:12 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-public class ContextDataBrokerModuleFactory extends AbstractContextDataBrokerModuleFactory {
-
-}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java
deleted file mode 100644
index d97573e12..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-
-import io.fd.honeycomb.data.impl.DataBroker;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DataBrokerModule extends
- AbstractDataBrokerModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(DataBrokerModule.class);
-
- public DataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public DataBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- DataBrokerModule oldModule,
- java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- LOG.debug("DataBrokerModule.createInstance()");
- return DataBroker.create(getConfigDataTreeDependency(), getOperationalDataTreeDependency());
- }
-}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java
deleted file mode 100644
index 388f26c67..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: v3po-impl yang module local name: honeycomb-dom-data-broker
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Mon Apr 11 07:53:38 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-public class DataBrokerModuleFactory extends AbstractDataBrokerModuleFactory {
-
-}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java
deleted file mode 100644
index 333219518..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.
- */
-
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-
-import io.fd.honeycomb.impl.NorthboundFacadeHoneycombDOMBroker;
-import org.opendaylight.controller.sal.core.api.AbstractProvider;
-import org.opendaylight.controller.sal.core.api.Broker;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
-
-public class HoneycombModule extends AbstractHoneycombModule {
-
- public HoneycombModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public HoneycombModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- HoneycombModule oldModule,
- java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
-
- final Broker.ProviderSession providerSession =
- getDomBrokerDependency().registerProvider(new AbstractProvider() {
- @Override
- public void onSessionInitiated(final Broker.ProviderSession providerSession) {
- // NOOP
- }
- });
- final SchemaService schemaBiService = providerSession.getService(SchemaService.class);
-
- return new NorthboundFacadeHoneycombDOMBroker(getHoneycombDomDataBrokerDependency(), schemaBiService,
- getHoneycombDomNotificationServiceDependency());
- }
-
-}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java
deleted file mode 100644
index 4666e1166..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.common.api.routing.RouteChangeListener;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.binding.api.BindingAwareConsumer;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.opendaylight.controller.sal.binding.api.BindingAwareService;
-import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.binding.RpcService;
-import org.osgi.framework.BundleContext;
-
-public class NetconfBindingBrokerModule extends AbstractNetconfBindingBrokerModule {
- public NetconfBindingBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public NetconfBindingBrokerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, NetconfBindingBrokerModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- return new FakeBindingAwareBroker(getNetconfBindingBrokerDependency());
- }
-
- public static final class FakeBindingAwareBroker implements BindingAwareBroker, AutoCloseable {
-
- private DataBroker netconfBindingBrokerDependency;
-
- public FakeBindingAwareBroker(final DataBroker netconfBindingBrokerDependency) {
-
- this.netconfBindingBrokerDependency = netconfBindingBrokerDependency;
- }
-
- @Deprecated
- @Override
- public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer,
- final BundleContext bundleContext) {
- throw new UnsupportedOperationException("Unsupported");
- }
-
- @Override
- public ConsumerContext registerConsumer(final BindingAwareConsumer bindingAwareConsumer) {
- final ConsumerContext consumerContext = new ConsumerContext() {
- @Override
- public <T extends BindingAwareService> T getSALService(final Class<T> aClass) {
- return aClass.equals(DataBroker.class)
- ? (T) netconfBindingBrokerDependency
- : null;
- }
-
- @Override
- public <T extends RpcService> T getRpcService(final Class<T> aClass) {
- return null;
- }
- };
- bindingAwareConsumer.onSessionInitialized(consumerContext);
- return consumerContext;
- }
-
- @Override
- public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider,
- final BundleContext bundleContext) {
- throw new UnsupportedOperationException("Unsupported");
- }
-
- @Override
- public ProviderContext registerProvider(final BindingAwareProvider bindingAwareProvider) {
- final ProviderContext context = new ProviderContext() {
- @Override
- public <L extends RouteChangeListener<RpcContextIdentifier, InstanceIdentifier<?>>> ListenerRegistration<L> registerRouteChangeListener(
- final L l) {
- throw new UnsupportedOperationException("Unsupported");
- }
-
- @Override
- public <T extends RpcService> T getRpcService(final Class<T> aClass) {
- throw new UnsupportedOperationException("Unsupported");
- }
-
- @Override
- public <T extends RpcService> RpcRegistration<T> addRpcImplementation(final Class<T> aClass, final T t)
- throws IllegalStateException {
- throw new UnsupportedOperationException("Unsupported");
- }
-
- @Override
- public <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(
- final Class<T> aClass, final T t) throws IllegalStateException {
- throw new UnsupportedOperationException("Unsupported");
- }
-
- @Override
- public <T extends BindingAwareService> T getSALService(final Class<T> aClass) {
- return aClass.equals(DataBroker.class)
- ? (T) netconfBindingBrokerDependency
- : null; }
- };
- bindingAwareProvider.onSessionInitiated(context);
- return context;
- }
-
- @Override
- public void close() throws Exception {
- netconfBindingBrokerDependency = null;
- }
- }
-}
-
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java
deleted file mode 100644
index fe9bdcf48..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: v3po-impl yang module local name: binding-broker-netconf
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Mar 23 10:45:48 CET 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-public class NetconfBindingBrokerModuleFactory extends AbstractNetconfBindingBrokerModuleFactory {
-
-}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java
deleted file mode 100644
index 2ea59de65..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-
-import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
-import io.fd.honeycomb.translate.util.read.BindingBrokerReader;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfState;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.monitoring.rev101004.NetconfStateBuilder;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-public class NetconfMonitoringReaderModule extends AbstractNetconfMonitoringReaderModule {
- public NetconfMonitoringReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public NetconfMonitoringReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, NetconfMonitoringReaderModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- return new NetconfMonitoringReaderFactory(getNetconfMonitoringBindingBrokerDependency());
- }
-
- public static final class NetconfMonitoringReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory {
-
- private final DataBroker netconfMonitoringBindingBrokerDependency;
-
- public NetconfMonitoringReaderFactory(final DataBroker netconfMonitoringBindingBrokerDependency) {
- this.netconfMonitoringBindingBrokerDependency = netconfMonitoringBindingBrokerDependency;
- }
-
- @Override
- public void init(final ModifiableReaderRegistryBuilder registry) {
- registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(NetconfState.class),
- netconfMonitoringBindingBrokerDependency,
- LogicalDatastoreType.OPERATIONAL, NetconfStateBuilder.class));
- }
- }
-}
diff --git a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java
deleted file mode 100644
index d5130fd53..000000000
--- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: v3po-impl yang module local name: netconf-monitoring-reader
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Tue Apr 12 13:03:40 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210;
-public class NetconfMonitoringReaderModuleFactory extends AbstractNetconfMonitoringReaderModuleFactory {
-
-}
diff --git a/infra/impl/src/main/yang/honeycomb-impl.yang b/infra/impl/src/main/yang/honeycomb-impl.yang
deleted file mode 100644
index 46f1af862..000000000
--- a/infra/impl/src/main/yang/honeycomb-impl.yang
+++ /dev/null
@@ -1,155 +0,0 @@
-module honeycomb-impl {
- yang-version 1;
- namespace "urn:opendaylight:params:xml:ns:yang:honeycomb:impl";
- prefix "hc-impl";
-
- import config { prefix config; revision-date 2013-04-05; }
- import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
- import opendaylight-md-sal-dom {prefix dom;}
- import translate-api { prefix tapi; revision-date 2016-04-06; }
- import data-api { prefix dapi; revision-date 2016-04-11; }
- import notification-api { prefix hc-notif-a; revision-date 2016-06-01; }
-
- description
- "Service definition for honeycomb project";
-
- revision "2014-12-10" {
- description
- "Initial revision";
- }
-
- identity honeycomb {
- base config:module-type;
- config:provided-service dom:dom-broker-osgi-registry;
- config:java-name-prefix Honeycomb;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb {
- when "/config:modules/config:module/config:type = 'honeycomb'";
- container dom-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:dom-broker-osgi-registry;
- }
- }
- }
-
- container honeycomb-dom-data-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:dom-async-data-broker;
- }
- }
- }
-
- container honeycomb-dom-notification-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity hc-notif-a:dom-notification-service;
- }
- }
- }
-
- }
- }
-
- identity binding-broker-netconf {
- base config:module-type;
- config:provided-service md-sal-binding:binding-broker-osgi-registry;
- config:java-name-prefix NetconfBindingBroker;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case binding-broker-netconf {
- when "/config:modules/config:module/config:type = 'binding-broker-netconf'";
-
- container netconf-binding-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-async-data-broker;
- }
- }
- }
-
- }
- }
-
- identity honeycomb-dom-data-broker {
- base config:module-type;
- config:provided-service dom:dom-async-data-broker;
- config:java-name-prefix DataBroker;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb-dom-data-broker {
- when "/config:modules/config:module/config:type = 'honeycomb-dom-data-broker'";
-
- container config-data-tree {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dapi:honeycomb-modifiable-data-tree;
- }
- }
- }
-
- container operational-data-tree {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dapi:honeycomb-readable-data-tree;
- }
- }
- }
-
- }
- }
-
- identity honeycomb-context-dom-data-broker {
- base config:module-type;
- config:provided-service dom:dom-async-data-broker;
- config:java-name-prefix ContextDataBroker;
- description "DomBroker on top of context data-tree";
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb-context-dom-data-broker {
- when "/config:modules/config:module/config:type = 'honeycomb-context-dom-data-broker'";
-
- container context-data-tree {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dapi:data-tree;
- }
- }
- }
- }
- }
-
- identity netconf-monitoring-reader {
- base config:module-type;
- config:provided-service tapi:honeycomb-reader-factory;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case netconf-monitoring-reader {
- when "/config:modules/config:module/config:type = 'netconf-monitoring-reader'";
-
- container netconf-monitoring-binding-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-async-data-broker;
- }
- }
- }
-
- }
- }
-}
diff --git a/infra/karaf/pom.xml b/infra/karaf/pom.xml
deleted file mode 100644
index ea42624a9..000000000
--- a/infra/karaf/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?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>karaf-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../../common/karaf-parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>io.fd.honeycomb</groupId>
- <artifactId>honeycomb-karaf</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <name>${project.artifactId}</name>
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
- <properties>
- <karaf.localFeature>honeycomb-rest</karaf.localFeature>
- </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-artifacts</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <!-- scope is compile so all features (there is only one) are installed
- into startup.properties and the feature repo itself is not installed -->
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>framework</artifactId>
- <type>kar</type>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>honeycomb-features</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- <!-- DO NOT install or deploy the karaf artifact -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
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 9b7cfb4ae..8979272be 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
@@ -19,13 +19,13 @@ package io.fd.honeycomb.infra.distro.initializer
import com.google.inject.Inject
import groovy.transform.ToString
import groovy.util.logging.Slf4j
+import io.fd.honeycomb.data.init.RestorationType
import io.fd.honeycomb.data.init.RestoringInitializer
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
-import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.init.rev160407.RestorationType
import java.nio.file.Paths
/**
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 726dfb5af..7e4453ef1 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
@@ -26,7 +26,7 @@ import io.fd.honeycomb.notification.impl.NotificationProducerRegistry
import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter
import org.opendaylight.controller.sal.core.api.model.SchemaService
import org.opendaylight.netconf.notifications.NetconfNotificationCollector
-import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.HoneycombNotificationToNetconfTranslatorModule as Mirror
+import io.fd.honeycomb.notification.impl.TranslationUtil
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.StreamBuilder
import org.opendaylight.yangtools.yang.model.api.SchemaPath
@@ -63,7 +63,7 @@ class HoneycombNotification2NetconfProvider extends ProviderTrait<HoneycombNotif
// Notification Translator, get notification from HC producers and put into NETCONF notification collector
def domNotificationListener = { notif ->
log.debug "Propagating notification: {} into NETCONF", notif.type
- netconfNotifReg.onNotification(streamType, Mirror.notificationToXml(notif, schemaService.globalContext))
+ netconfNotifReg.onNotification(streamType, TranslationUtil.notificationToXml(notif, schemaService.globalContext))
}
// NotificationManager is used to provide list of available notifications (which are all of the notifications registered)
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 8c5dcab01..ebf6782c1 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
@@ -23,7 +23,7 @@ import groovy.util.logging.Slf4j
import io.fd.honeycomb.infra.distro.ProviderTrait
import org.opendaylight.controller.md.sal.binding.api.DataBroker
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfBindingBrokerModule
+import io.fd.honeycomb.impl.FakeBindingAwareBroker
/**
* Mirror of {@link org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.honeycomb.impl.rev141210.NetconfBindingBrokerModule}
@@ -37,5 +37,5 @@ class NetconfBindingBrokerProvider extends ProviderTrait<BindingAwareBroker> {
DataBroker dataBroker
@Override
- def create() { new NetconfBindingBrokerModule.FakeBindingAwareBroker(dataBroker) }
+ def create() { new FakeBindingAwareBroker(dataBroker) }
}
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 fee1944f4..6c58f8b89 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
@@ -23,7 +23,7 @@ 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.honeycomb.impl.rev141210.NetconfMonitoringReaderModule
+import io.fd.honeycomb.impl.NetconfMonitoringReaderFactory
@Slf4j
@ToString
@@ -33,5 +33,5 @@ class NetconfMonitoringReaderFactoryProvider extends ProviderTrait<ReaderFactory
@Named("netconf")
DataBroker netconfDataBroker
- def create() { new NetconfMonitoringReaderModule.NetconfMonitoringReaderFactory(netconfDataBroker) }
+ def create() { new NetconfMonitoringReaderFactory(netconfDataBroker) }
}
diff --git a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/honeycomb.json b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/honeycomb.json
index d14feced0..606f44d8a 100644
--- a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/honeycomb.json
+++ b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/honeycomb.json
@@ -1,7 +1,7 @@
-{
- "persisted-context-path": "~/honeycomb/persist/context/data.json",
+ {
+ "persisted-context-path": "/var/lib/honeycomb/persist/context/data.json",
"persisted-context-restoration-type": "Merge",
- "persisted-config-path": "~/honeycomb/persist/config/data.json",
+ "persisted-config-path": "/var/lib/honeycomb/persist/config/data.json",
"persisted-config-restoration-type": "Merge",
"notification-service-queue-depth": 1,
diff --git a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/logback.xml b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/logback.xml
index ec7da7e13..d3cdd6f1e 100644
--- a/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/logback.xml
+++ b/infra/minimal-distribution/src/main/resources/honeycomb-minimal-resources/config/logback.xml
@@ -6,10 +6,10 @@
</encoder>
</appender>
<appender name="honeycomb.log" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>~/honeycomb/logs/honeycomb.log</file>
+ <file>/var/log/honeycomb/honeycomb.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>~/honeycomb/logs/honeycomb.%d.log.zip</fileNamePattern>
+ <fileNamePattern>/var/log/honeycomb/logs/honeycomb.%d.log.zip</fileNamePattern>
<maxHistory>1</maxHistory>
</rollingPolicy>
diff --git a/infra/notification/api/src/main/yang/notification-api.yang b/infra/notification/api/src/main/yang/notification-api.yang
deleted file mode 100644
index f0331bc07..000000000
--- a/infra/notification/api/src/main/yang/notification-api.yang
+++ /dev/null
@@ -1,31 +0,0 @@
-module notification-api {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:notification:api";
- prefix "hc-notif-a";
-
- import config { prefix config; revision-date 2013-04-05; }
-
- description
- "Module definition for honeycomb notification service APIs";
-
- revision "2016-06-01" {
- description
- "Initial revision";
- }
-
- identity honeycomb-notification-collector {
- base "config:service-type";
- config:java-class io.fd.honeycomb.notification.NotificationCollector;
- }
-
- identity dom-notification-service {
- base "config:service-type";
- config:java-class org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
- }
-
- identity honeycomb-notification-producer {
- base "config:service-type";
- config:java-class io.fd.honeycomb.notification.ManagedNotificationProducer;
- }
-
-}
diff --git a/infra/notification/impl/pom.xml b/infra/notification/impl/pom.xml
index 9fa542422..bc0a78e6e 100644
--- a/infra/notification/impl/pom.xml
+++ b/infra/notification/impl/pom.xml
@@ -57,36 +57,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${config.file}</file>
- <type>xml</type>
- <classifier>config</classifier>
- </artifact>
- <artifact>
- <file>src/main/config/notification-to-netconf-config.xml</file>
- <type>xml</type>
- <classifier>notification2netconf</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
diff --git a/infra/notification/impl/src/main/config/default-config.xml b/infra/notification/impl/src/main/config/default-config.xml
deleted file mode 100644
index 2b91de47f..000000000
--- a/infra/notification/impl/src/main/config/default-config.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- 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.
--->
-<snapshot>
- <required-capabilities>
- <capability>urn:honeycomb:params:xml:ns:yang:notification:impl?module=notification-impl&amp;revision=2016-06-01</capability>
- </required-capabilities>
- <configuration>
-
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <!-- Underlying dom notification service(router)-->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:impl">prefix:honeycomb-dom-notification-service</type>
- <name>honeycomb-dom-notification-service</name>
- <queue-depth>1024</queue-depth>
- </module>
-
- <!-- Honeycomb notification collector built on top of dom notification service-->
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:impl">prefix:honeycomb-notification-manager</type>
- <name>honeycomb-notification-manager</name>
- <runtime-mapping-codec>
- <type xmlns:binding-impl="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding-impl:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </runtime-mapping-codec>
- <dom-notification-service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:dom-notification-service</type>
- <name>honeycomb-dom-notification-service</name>
- </dom-notification-service>
- <!-- Here goes list of producers. They will register themselves from plugins -->
- <!--<notification-producers>-->
- <!--</notification-producers>-->
- </module>
-
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:dom-notification-service</type>
- <instance>
- <name>honeycomb-dom-notification-service</name>
- <provider>/modules/module[type='honeycomb-dom-notification-service'][name='honeycomb-dom-notification-service']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:honeycomb-notification-collector</type>
- <instance>
- <name>honeycomb-notification-manager</name>
- <provider>/modules/module[type='honeycomb-notification-manager'][name='honeycomb-notification-manager']</provider>
- </instance>
- </service>
-
- </services>
- </data>
- </configuration>
-</snapshot>
-
diff --git a/infra/notification/impl/src/main/config/notification-to-netconf-config.xml b/infra/notification/impl/src/main/config/notification-to-netconf-config.xml
deleted file mode 100644
index d64de6413..000000000
--- a/infra/notification/impl/src/main/config/notification-to-netconf-config.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- 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.
--->
-<snapshot>
-<required-capabilities>
- <capability>urn:honeycomb:params:xml:ns:yang:notification:impl?module=notification-impl&amp;revision=2016-06-01</capability>
-</required-capabilities>
-<configuration>
-
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <module>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:impl">prefix:honeycomb-notification-to-netconf-translator</type>
- <name>honeycomb-notification-to-netconf-translator</name>
- <netconf-notification-registry>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification">
- prefix:netconf-notification-registry
- </type>
- <name>honeycomb-netconf-notification-manager</name>
- </netconf-notification-registry>
- <netconf-notification-collector>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:notification">
- prefix:netconf-notification-collector
- </type>
- <name>honeycomb-netconf-notification-manager</name>
- </netconf-notification-collector>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <honeycomb-notification-collector>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:honeycomb-notification-collector</type>
- <name>honeycomb-notification-manager</name>
- </honeycomb-notification-collector>
- <dom-notification-service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:dom-notification-service</type>
- <name>honeycomb-dom-notification-service</name>
- </dom-notification-service>
- <netconf-stream-name>honeycomb</netconf-stream-name>
- <netconf-stream-description>All notifications received by honeycomb's plugins</netconf-stream-description>
- </module>
- </modules>
- </data>
-</configuration>
-</snapshot>
diff --git a/infra/notification/impl/src/main/java/io/fd/honeycomb/notification/impl/TranslationUtil.java b/infra/notification/impl/src/main/java/io/fd/honeycomb/notification/impl/TranslationUtil.java
new file mode 100644
index 000000000..e53d59196
--- /dev/null
+++ b/infra/notification/impl/src/main/java/io/fd/honeycomb/notification/impl/TranslationUtil.java
@@ -0,0 +1,104 @@
+/*
+ * 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.notification.impl;
+
+import java.io.IOException;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.dom.DOMResult;
+import org.opendaylight.controller.config.util.xml.XmlUtil;
+import org.opendaylight.controller.md.sal.dom.api.DOMNotification;
+import org.opendaylight.netconf.notifications.NetconfNotification;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
+import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
+import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter;
+import org.opendaylight.yangtools.yang.data.impl.codec.xml.XMLStreamNormalizedNodeStreamWriter;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.SchemaPath;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public final class TranslationUtil {
+
+ public TranslationUtil() {}
+
+ private static final Logger LOG = LoggerFactory.getLogger(TranslationUtil.class);
+ private static final XMLOutputFactory XML_FACTORY;
+
+ static {
+ XML_FACTORY = XMLOutputFactory.newFactory();
+ XML_FACTORY.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, false);
+ }
+
+ /**
+ * Transform {@link org.opendaylight.mdsal.dom.api.DOMNotification} into an XML based {@link NetconfNotification}.
+ */
+ public static NetconfNotification notificationToXml(final DOMNotification domNotification, final SchemaContext ctx) {
+
+ LOG.trace("Transforming notification: {} into XML", domNotification.getType());
+
+ final SchemaPath type = domNotification.getType();
+ final QName notificationQName = type.getLastComponent();
+ final DOMResult result = prepareDomResultForRpcRequest(notificationQName);
+
+ try {
+ writeNormalizedRpc(domNotification, result, type, ctx);
+ } catch (final XMLStreamException | IOException | IllegalStateException e) {
+ LOG.warn("Unable to transform notification: {} into XML", domNotification.getType(), e);
+ throw new IllegalArgumentException("Unable to serialize " + type, e);
+ }
+
+ final Document node = result.getNode().getOwnerDocument();
+ return new NetconfNotification(node);
+ }
+
+ private static DOMResult prepareDomResultForRpcRequest(final QName notificationQName) {
+ final Document document = XmlUtil.newDocument();
+ final Element notificationElement =
+ document.createElementNS(notificationQName.getNamespace().toString(), notificationQName.getLocalName());
+ document.appendChild(notificationElement);
+ return new DOMResult(notificationElement);
+ }
+
+ private static void writeNormalizedRpc(final DOMNotification normalized, final DOMResult result,
+ final SchemaPath schemaPath, final SchemaContext baseNetconfCtx)
+ throws IOException, XMLStreamException {
+ final XMLStreamWriter writer = XML_FACTORY.createXMLStreamWriter(result);
+ try {
+ try (final NormalizedNodeStreamWriter normalizedNodeStreamWriter =
+ XMLStreamNormalizedNodeStreamWriter.create(writer, baseNetconfCtx, schemaPath)) {
+ try (final NormalizedNodeWriter normalizedNodeWriter =
+ NormalizedNodeWriter.forStreamWriter(normalizedNodeStreamWriter)) {
+ for (DataContainerChild<?, ?> dataContainerChild : normalized.getBody().getValue()) {
+ normalizedNodeWriter.write(dataContainerChild);
+ }
+ normalizedNodeWriter.flush();
+ }
+ }
+ } finally {
+ try {
+ writer.close();
+ } catch (final Exception e) {
+ LOG.warn("Unable to close resource properly. Ignoring", e);
+ }
+ }
+ }
+}
diff --git a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModule.java b/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModule.java
deleted file mode 100644
index 9a9c7def0..000000000
--- a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModule.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601;
-
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
-
-public class HoneycombDomNotificationServiceModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.AbstractHoneycombDomNotificationServiceModule {
- public HoneycombDomNotificationServiceModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public HoneycombDomNotificationServiceModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.HoneycombDomNotificationServiceModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- JmxAttributeValidationException.checkCondition(getQueueDepth() > 0, "Queue depth must be > 0", queueDepthJmxAttribute);
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- // Create DOMNotificationRouter to do the heavy lifting for HoneycombNotificationCollector
- // It creates executor internally
- return DOMNotificationRouter.create(getQueueDepth());
- }
-
-}
diff --git a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModuleFactory.java b/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModuleFactory.java
deleted file mode 100644
index d3603acb3..000000000
--- a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombDomNotificationServiceModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: notification-impl yang module local name: honeycomb-dom-notification-service
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Jun 08 09:49:08 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601;
-public class HoneycombDomNotificationServiceModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.AbstractHoneycombDomNotificationServiceModuleFactory {
-
-}
diff --git a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModule.java b/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModule.java
deleted file mode 100644
index 056b38798..000000000
--- a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModule.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601;
-
-import io.fd.honeycomb.notification.NotificationCollector;
-import io.fd.honeycomb.notification.NotificationProducer;
-import io.fd.honeycomb.notification.impl.HoneycombNotificationCollector;
-import io.fd.honeycomb.notification.impl.NotificationProducerRegistry;
-import io.fd.honeycomb.notification.impl.NotificationProducerTracker;
-import java.util.Collection;
-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;
-import org.opendaylight.yangtools.yang.binding.Notification;
-
-public class HoneycombNotificationManagerModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.AbstractHoneycombNotificationManagerModule {
-
- public HoneycombNotificationManagerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public HoneycombNotificationManagerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.HoneycombNotificationManagerModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final DOMNotificationRouter notificationRouter = getDomNotificationServiceDependency();
-
- // Create the registry to keep track of what's registered
- final NotificationProducerRegistry notificationProducerRegistry =
- new NotificationProducerRegistry(getNotificationProducersDependency());
-
- // Create BA version of notification service (implementation is free from ODL)
- final BindingToNormalizedNodeCodec codec = getRuntimeMappingCodecDependency();
- final BindingDOMNotificationPublishServiceAdapter bindingDOMNotificationPublishServiceAdapter =
- new BindingDOMNotificationPublishServiceAdapter(codec, notificationRouter);
-
- // Create Collector on top of BA notification service and registry
- final HoneycombNotificationCollector honeycombNotificationCollector =
- new HoneycombNotificationCollector(bindingDOMNotificationPublishServiceAdapter, notificationProducerRegistry);
-
- // Create tracker, responsible for starting and stopping registered notification producers whenever necessary
- final NotificationProducerTracker notificationProducerTracker =
- new NotificationProducerTracker(notificationProducerRegistry, honeycombNotificationCollector,
- notificationRouter);
-
- // TODO wire with restconf
- // DOMNotificationService is already provided by DOMBroker injected into RESTCONF, however RESTCONF
- // only supports data-change notification, nothing else. So currently its impossible.
-
- return new CloseableCollector(honeycombNotificationCollector, () -> {
- // Close all resources in order opposite to instantiation
- notificationProducerTracker.close();
- honeycombNotificationCollector.close();
- bindingDOMNotificationPublishServiceAdapter.close();
- // notificationProducerRegistry; no close, it's just a collection
- });
- }
-
- /**
- * NotificationCollector wrapper in which close method execution can be injected
- */
- private class CloseableCollector implements AutoCloseable, NotificationCollector, NotificationProducer {
-
- private final HoneycombNotificationCollector honeycombNotificationCollector;
- private final AutoCloseable resources;
-
- CloseableCollector(final HoneycombNotificationCollector honeycombNotificationCollector,
- final AutoCloseable resources) {
- this.honeycombNotificationCollector = honeycombNotificationCollector;
- this.resources = resources;
- }
-
- @Override
- public void close() throws Exception {
- resources.close();
- }
-
- @Override
- public void onNotification(final Notification notification) {
- honeycombNotificationCollector.onNotification(notification);
- }
-
- @Override
- public Collection<Class<? extends Notification>> getNotificationTypes() {
- return honeycombNotificationCollector.getNotificationTypes();
- }
- }
-}
diff --git a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModuleFactory.java b/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModuleFactory.java
deleted file mode 100644
index b12b70017..000000000
--- a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationManagerModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: notification-impl yang module local name: honeycomb-notification-manager
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Jun 01 16:08:01 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601;
-public class HoneycombNotificationManagerModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.AbstractHoneycombNotificationManagerModuleFactory {
-
-}
diff --git a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModule.java b/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModule.java
deleted file mode 100644
index a6f625589..000000000
--- a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModule.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601;
-
-import io.fd.honeycomb.notification.NotificationCollector;
-import io.fd.honeycomb.notification.impl.NotificationProducerRegistry;
-import java.io.IOException;
-import java.util.Set;
-import java.util.stream.Collectors;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.dom.DOMResult;
-import org.opendaylight.controller.config.api.JmxAttributeValidationException;
-import org.opendaylight.controller.config.util.xml.XmlUtil;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotification;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener;
-import org.opendaylight.controller.sal.core.api.model.SchemaService;
-import org.opendaylight.netconf.notifications.NetconfNotification;
-import org.opendaylight.netconf.notifications.NotificationPublisherRegistration;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.StreamBuilder;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
-import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
-import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter;
-import org.opendaylight.yangtools.yang.data.impl.codec.xml.XMLStreamNormalizedNodeStreamWriter;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaPath;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-public class HoneycombNotificationToNetconfTranslatorModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.AbstractHoneycombNotificationToNetconfTranslatorModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(HoneycombNotificationToNetconfTranslatorModule.class);
-
- public HoneycombNotificationToNetconfTranslatorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public HoneycombNotificationToNetconfTranslatorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.HoneycombNotificationToNetconfTranslatorModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- JmxAttributeValidationException.checkCondition(!getNetconfStreamName().isEmpty(),
- "Stream name cannot be empty", netconfStreamNameJmxAttribute);
- JmxAttributeValidationException.checkCondition(!getNetconfStreamDescription().isEmpty(),
- "Stream description cannot be empty", netconfStreamDescriptionJmxAttribute);
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final SchemaService schemaService = getSchemaServiceDependency();
- final StreamNameType streamType = new StreamNameType(getNetconfStreamName());
- final NotificationCollector hcNotificationCollector = getHoneycombNotificationCollectorDependency();
-
- // Register as NETCONF notification publisher under configured name
- final NotificationPublisherRegistration netconfNotificationProducerReg =
- getNetconfNotificationCollectorDependency().registerNotificationPublisher(new StreamBuilder()
- .setName(streamType)
- .setReplaySupport(false)
- .setDescription(getNetconfStreamDescription()).build());
-
- // Notification Translator, get notification from HC producers and put into NETCONF notification collector
- final DOMNotificationListener domNotificationListener =
- notification -> {
- LOG.debug("Propagating notification: {} into NETCONF", notification.getType());
- netconfNotificationProducerReg.onNotification(streamType, notificationToXml(notification, schemaService.getGlobalContext()));
- };
-
- // NotificationManager is used to provide list of available notifications (which are all of the notifications registered)
- // TODO make available notifications configurable here so that any number of notification streams for NETCONF
- // can be configured on top of a single notification manager
- LOG.debug("Current notifications to be exposed over NETCONF: {}", hcNotificationCollector.getNotificationTypes());
- final Set<SchemaPath> currentNotificationSchemaPaths = hcNotificationCollector.getNotificationTypes()
- .stream()
- .map(NotificationProducerRegistry::getQName)
- .map(qName -> SchemaPath.create(true, qName))
- .collect(Collectors.toSet());
-
- // Register as listener to HC's DOM notification service
- // TODO This should only be triggered when NETCONF notifications are activated
- // Because this way we actually start all notification producers
- // final Collection<QName> notificationQNames =
- final ListenerRegistration<DOMNotificationListener> domNotificationListenerReg = getDomNotificationServiceDependency()
- .registerNotificationListener(domNotificationListener, currentNotificationSchemaPaths);
-
- LOG.info("Exposing NETCONF notification stream: {}", streamType.getValue());
- return () -> {
- domNotificationListenerReg.close();
- netconfNotificationProducerReg.close();
- };
- }
-
- public static NetconfNotification notificationToXml(final DOMNotification domNotification, final SchemaContext ctx) {
- LOG.trace("Transforming notification: {} into XML", domNotification.getType());
-
- final SchemaPath type = domNotification.getType();
- final QName notificationQName = type.getLastComponent();
- final DOMResult result = prepareDomResultForRpcRequest(notificationQName);
-
- try {
- writeNormalizedRpc(domNotification, result, type, ctx);
- } catch (final XMLStreamException | IOException | IllegalStateException e) {
- LOG.warn("Unable to transform notification: {} into XML", domNotification.getType(), e);
- throw new IllegalArgumentException("Unable to serialize " + type, e);
- }
-
- final Document node = result.getNode().getOwnerDocument();
- return new NetconfNotification(node);
- }
-
- private static DOMResult prepareDomResultForRpcRequest(final QName notificationQName) {
- final Document document = XmlUtil.newDocument();
- final Element notificationElement =
- document.createElementNS(notificationQName.getNamespace().toString(), notificationQName.getLocalName());
- document.appendChild(notificationElement);
- return new DOMResult(notificationElement);
- }
-
- private static final XMLOutputFactory XML_FACTORY;
-
- static {
- XML_FACTORY = XMLOutputFactory.newFactory();
- XML_FACTORY.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, false);
- }
-
- private static void writeNormalizedRpc(final DOMNotification normalized, final DOMResult result,
- final SchemaPath schemaPath, final SchemaContext baseNetconfCtx)
- throws IOException, XMLStreamException {
- final XMLStreamWriter writer = XML_FACTORY.createXMLStreamWriter(result);
- try {
- try (final NormalizedNodeStreamWriter normalizedNodeStreamWriter =
- XMLStreamNormalizedNodeStreamWriter.create(writer, baseNetconfCtx, schemaPath)) {
- try (final NormalizedNodeWriter normalizedNodeWriter =
- NormalizedNodeWriter.forStreamWriter(normalizedNodeStreamWriter)) {
- for (DataContainerChild<?, ?> dataContainerChild : normalized.getBody().getValue()) {
- normalizedNodeWriter.write(dataContainerChild);
- }
- normalizedNodeWriter.flush();
- }
- }
- } finally {
- try {
- writer.close();
- } catch (final Exception e) {
- LOG.warn("Unable to close resource properly. Ignoring", e);
- }
- }
- }
-
-}
diff --git a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModuleFactory.java b/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModuleFactory.java
deleted file mode 100644
index 336223040..000000000
--- a/infra/notification/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/HoneycombNotificationToNetconfTranslatorModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: notification-impl yang module local name: honeycomb-notification-to-netconf-translator
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Thu Jun 02 14:39:23 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601;
-public class HoneycombNotificationToNetconfTranslatorModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601.AbstractHoneycombNotificationToNetconfTranslatorModuleFactory {
-
-}
diff --git a/infra/notification/impl/src/main/yang/notification-impl.yang b/infra/notification/impl/src/main/yang/notification-impl.yang
deleted file mode 100644
index 84899751c..000000000
--- a/infra/notification/impl/src/main/yang/notification-impl.yang
+++ /dev/null
@@ -1,141 +0,0 @@
-module notification-impl {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:notification:impl";
- prefix "hc-notif-i";
-
- import config { prefix config; revision-date 2013-04-05; }
- import netconf-northbound-notification { prefix notify-api; revision-date 2015-08-06; }
- import notification-api { prefix hc-notif-a; revision-date 2016-06-01; }
- import opendaylight-md-sal-dom { prefix dom; revision-date 2013-10-28;}
- import opendaylight-sal-binding-broker-impl { prefix binding-impl; revision-date 2013-10-28;}
-
- description
- "Module definition for honeycomb notification implementations";
-
- revision "2016-06-01" {
- description
- "Initial revision";
- }
-
- identity honeycomb-notification-manager {
- base config:module-type;
- config:java-name-prefix HoneycombNotificationManager;
- config:provided-service hc-notif-a:honeycomb-notification-collector;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb-notification-manager {
- when "/config:modules/config:module/config:type = 'honeycomb-notification-manager'";
-
- container runtime-mapping-codec {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity binding-impl:binding-dom-mapping-service;
- }
- }
- }
-
- container dom-notification-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity hc-notif-a:dom-notification-service;
- }
- }
- }
-
- list notification-producers {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity hc-notif-a:honeycomb-notification-producer;
- }
- }
- }
-
- }
- }
-
- identity honeycomb-dom-notification-service {
- base config:module-type;
- config:provided-service hc-notif-a:dom-notification-service;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb-dom-notification-service {
- when "/config:modules/config:module/config:type = 'honeycomb-dom-notification-service'";
-
- leaf queue-depth {
- type uint16;
- description "Size of the queue for outgoing notifications";
- }
- }
- }
-
- identity honeycomb-notification-to-netconf-translator {
- base config:module-type;
- config:java-name-prefix HoneycombNotificationToNetconfTranslator;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case honeycomb-notification-to-netconf-translator {
- when "/config:modules/config:module/config:type = 'honeycomb-notification-to-netconf-translator'";
-
- container netconf-notification-collector {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity notify-api:netconf-notification-collector;
- }
- }
- }
- container honeycomb-notification-collector {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity hc-notif-a:honeycomb-notification-collector;
- }
- }
- }
- container netconf-notification-registry {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity notify-api:netconf-notification-registry;
- }
- }
- }
- container schema-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:schema-service;
- }
- }
- }
- container dom-notification-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity hc-notif-a:dom-notification-service;
- }
- }
- }
-
- leaf netconf-stream-name {
- type string;
- mandatory true;
- description "Name of the stream under which all the registered notifications should be emitted";
- }
-
- leaf netconf-stream-description {
- type string;
- mandatory true;
- description "Description for the stream under which all the registered notifications should be emitted";
- }
-
- }
- }
-
-}
diff --git a/infra/notification/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/NoetificationToNetconfModuleTest.java b/infra/notification/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/NoetificationToNetconfModuleTest.java
index ccfb4bb9d..d9b487be7 100644
--- a/infra/notification/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/NoetificationToNetconfModuleTest.java
+++ b/infra/notification/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/notification/impl/rev160601/NoetificationToNetconfModuleTest.java
@@ -15,6 +15,7 @@
*/
package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.notification.impl.rev160601;
+import io.fd.honeycomb.notification.impl.TranslationUtil;
import javax.annotation.Nonnull;
import org.hamcrest.CoreMatchers;
import org.junit.Assert;
@@ -61,7 +62,7 @@ public class NoetificationToNetconfModuleTest {
public void notificationToXml() throws Exception {
final ModuleInfoBackedContext moduleInfoBackedContext = getModuleInfoBackedCOntext();
- final NetconfNotification netconfNotification = HoneycombNotificationToNetconfTranslatorModule
+ final NetconfNotification netconfNotification = TranslationUtil
.notificationToXml(notification, moduleInfoBackedContext.getSchemaContext());
final String notificationString = netconfNotification.toString();
diff --git a/infra/pom.xml b/infra/pom.xml
index 9f9ea549f..0f0662590 100644
--- a/infra/pom.xml
+++ b/infra/pom.xml
@@ -42,9 +42,6 @@
<module>cfg-init</module>
<module>impl</module>
<module>minimal-distribution</module>
- <!--Will be deleted-->
- <!--<module>karaf</module>-->
- <!--<module>features</module>-->
<module>artifacts</module>
<module>it</module>
</modules>
diff --git a/infra/translate-api/src/main/yang/translate-api.yang b/infra/translate-api/src/main/yang/translate-api.yang
deleted file mode 100644
index 133662289..000000000
--- a/infra/translate-api/src/main/yang/translate-api.yang
+++ /dev/null
@@ -1,52 +0,0 @@
-module translate-api {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:translate:api";
- prefix "tapi";
-
- import config { prefix config; revision-date 2013-04-05; }
-
- description
- "This module contains the base YANG definitions for
- readers/writers plugged into a honeycomb";
-
- revision "2016-04-06" {
- description
- "Initial revision.";
- }
-
- identity honeycomb-reader-factory {
- base "config:service-type";
- config:java-class io.fd.honeycomb.translate.read.ReaderFactory;
- }
-
- identity honeycomb-reader-registry {
- base "config:service-type";
- config:java-class io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder;
- }
-
- identity honeycomb-reader-registry-builder {
- base "config:service-type";
- config:java-class io.fd.honeycomb.translate.read.registry.ReaderRegistryBuilder;
- }
-
- identity honeycomb-writer-factory {
- base "config:service-type";
- config:java-class io.fd.honeycomb.translate.write.WriterFactory;
- }
-
- identity honeycomb-writer-registry {
- base "config:service-type";
- config:java-class io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder;
- }
-
- identity honeycomb-writer-registry-builder {
- base "config:service-type";
- config:java-class io.fd.honeycomb.translate.write.registry.WriterRegistryBuilder;
- }
-
- identity honeycomb-mapping-context {
- base "config:service-type";
- config:java-class io.fd.honeycomb.translate.MappingContext;
- }
-
-} \ No newline at end of file
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModule.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModule.java
deleted file mode 100644
index 99feb57f9..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModule.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-
-import io.fd.honeycomb.translate.util.read.registry.CompositeReaderRegistryBuilder;
-
-public class DelegatingReaderRegistryModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractDelegatingReaderRegistryModule {
- public DelegatingReaderRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public DelegatingReaderRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.DelegatingReaderRegistryModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final CompositeReaderRegistryBuilder flatReaderRegistryBuilder = new CompositeReaderRegistryBuilder();
- getReaderFactoryDependency().forEach(readerFactory -> readerFactory.init(flatReaderRegistryBuilder));
- return flatReaderRegistryBuilder;
- }
-}
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModuleFactory.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModuleFactory.java
deleted file mode 100644
index 24d6c50b8..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingReaderRegistryModuleFactory.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: translate-utils yang module local name: delegating-reader-registry
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Apr 06 12:32:43 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-
-import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
-
-public class DelegatingReaderRegistryModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractDelegatingReaderRegistryModuleFactory {
-
- @Override
- public DelegatingReaderRegistryModule handleChangedClass(final DynamicMBeanWithInstance old) throws Exception {
- return super.handleChangedClass(old);
- }
-}
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModule.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModule.java
deleted file mode 100644
index 5ce89b355..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModule.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-
-import io.fd.honeycomb.translate.util.write.registry.FlatWriterRegistryBuilder;
-
-public class DelegatingWriterRegistryModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractDelegatingWriterRegistryModule {
- public DelegatingWriterRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public DelegatingWriterRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.DelegatingWriterRegistryModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final FlatWriterRegistryBuilder flatWriterRegistryBuilder = new FlatWriterRegistryBuilder();
- getWriterFactoryDependency().forEach(writerFactory -> writerFactory.init(flatWriterRegistryBuilder));
- return flatWriterRegistryBuilder;
- }
-
-}
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModuleFactory.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModuleFactory.java
deleted file mode 100644
index ab3b820d3..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/DelegatingWriterRegistryModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: translate-utils yang module local name: delegating-writer-registry
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Apr 06 16:32:08 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-public class DelegatingWriterRegistryModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractDelegatingWriterRegistryModuleFactory {
-
-}
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModule.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModule.java
deleted file mode 100644
index be6bb9270..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModule.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-
-import io.fd.honeycomb.translate.util.write.NoopWriterRegistry;
-import io.fd.honeycomb.translate.write.registry.WriterRegistry;
-import io.fd.honeycomb.translate.write.registry.WriterRegistryBuilder;
-
-public class NoopWriterRegistryModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractNoopWriterRegistryModule {
- public NoopWriterRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public NoopWriterRegistryModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.NoopWriterRegistryModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- return new NoopWriterRegistryBuilder();
- }
-
- private static final class NoopWriterRegistryBuilder implements AutoCloseable, WriterRegistryBuilder {
-
- @Override
- public WriterRegistry build() {
- return new NoopWriterRegistry();
- }
-
- @Override
- public void close() throws Exception {
- // Noop
- }
- }
-}
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModuleFactory.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModuleFactory.java
deleted file mode 100644
index 57b6859f3..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/NoopWriterRegistryModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: translate-utils yang module local name: noop-writer-registry
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Tue Apr 12 08:41:08 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-public class NoopWriterRegistryModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractNoopWriterRegistryModuleFactory {
-
-}
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
deleted file mode 100644
index f882b9ba4..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModule.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-
-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);
- }
-
- public RealtimeMappingContextModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.RealtimeMappingContextModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- // Provides real time CRUD on top of Context data broker
- return new io.fd.honeycomb.translate.util.RealtimeMappingContext(getContextBindingBrokerDependency());
- }
-
-}
diff --git a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModuleFactory.java b/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModuleFactory.java
deleted file mode 100644
index 76647eace..000000000
--- a/infra/translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/translate/utils/rev160406/RealtimeMappingContextModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: translate-utils yang module local name: realtime-mapping-context
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri Jun 03 16:04:29 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406;
-public class RealtimeMappingContextModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.translate.utils.rev160406.AbstractRealtimeMappingContextModuleFactory {
-
-}
diff --git a/infra/translate-utils/src/main/yang/translate-utils.yang b/infra/translate-utils/src/main/yang/translate-utils.yang
deleted file mode 100644
index b543bba0d..000000000
--- a/infra/translate-utils/src/main/yang/translate-utils.yang
+++ /dev/null
@@ -1,95 +0,0 @@
-module translate-utils {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:translate:utils";
- prefix "tutils";
-
- import config { prefix config; revision-date 2013-04-05; }
- import translate-api { prefix tapi; revision-date 2016-04-06; }
- import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
-
- description
- "This module contains translation layer utilities";
-
- revision "2016-04-06" {
- description
- "Initial revision.";
- }
-
- identity delegating-reader-registry {
- base config:module-type;
- config:provided-service tapi:honeycomb-reader-registry;
- config:provided-service tapi:honeycomb-reader-registry-builder;
- config:java-name-prefix DelegatingReaderRegistry;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case delegating-reader-registry {
- when "/config:modules/config:module/config:type = 'delegating-reader-registry'";
-
- list reader-factory {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity tapi:honeycomb-reader-factory;
- }
- }
- }
-
- }
- }
-
- identity delegating-writer-registry {
- base config:module-type;
- config:provided-service tapi:honeycomb-writer-registry;
- config:provided-service tapi:honeycomb-writer-registry-builder;
- config:java-name-prefix DelegatingWriterRegistry;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case delegating-writer-registry {
- when "/config:modules/config:module/config:type = 'delegating-writer-registry'";
-
- list writer-factory {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity tapi:honeycomb-writer-factory;
- }
- }
- }
-
- }
- }
-
- identity noop-writer-registry-builder {
- base config:module-type;
- config:provided-service tapi:honeycomb-writer-registry-builder;
- config:java-name-prefix NoopWriterRegistry;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case noop-writer-registry-builder {
- when "/config:modules/config:module/config:type = 'noop-writer-registry-builder'";
- }
- }
-
- identity realtime-mapping-context {
- base config:module-type;
- config:provided-service tapi:honeycomb-mapping-context;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case realtime-mapping-context {
- when "/config:modules/config:module/config:type = 'realtime-mapping-context'";
-
- container context-binding-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-async-data-broker;
- }
- }
- }
- }
- }
-} \ No newline at end of file