diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-08-16 11:04:00 +0200 |
---|---|---|
committer | Maros Marsalek <mmarsale@cisco.com> | 2016-08-19 12:49:56 +0200 |
commit | 77fa76b4b15ec6d74920349f9a066ec4597b2585 (patch) | |
tree | 1347757ad900f096dbfaee9949a552615d4a04f4 | |
parent | dcd507eff53e7c0abd659da416aac91a7d29e3d3 (diff) |
HONEYCOMB-22: Remove karaf based distribution and wiring
Change-Id: I48aafb726de53b6ad3fb9b97c202f712dfa4a540
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
125 files changed, 335 insertions, 6017 deletions
diff --git a/.gitignore b/.gitignore index f7e7ccac7..06b920b8a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ target .DS_Store META-INF maven-metadata-local.xml +*.log diff --git a/common/features-parent/pom.xml b/common/features-parent/pom.xml deleted file mode 100644 index b28661d8c..000000000 --- a/common/features-parent/pom.xml +++ /dev/null @@ -1,81 +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>org.opendaylight.odlparent</groupId> - <artifactId>features-parent</artifactId> - <version>1.6.2-Beryllium-SR2</version> - <relativePath/> - </parent> - - <properties> - <nexusproxy>http://nexus.fd.io/content</nexusproxy> - </properties> - - <groupId>io.fd.honeycomb.common</groupId> - <artifactId>features-parent</artifactId> - <version>1.0.0-SNAPSHOT</version> - <modelVersion>4.0.0</modelVersion> - <packaging>pom</packaging> - <build> - <plugins> - <plugin> - <artifactId>maven-checkstyle-plugin</artifactId> - <version>${checkstyle.version}</version> - <executions> - <execution> - <id>check-license</id> - <goals> - <goal>check</goal> - </goals> - <phase>none</phase> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.10</version> - <executions> - <execution> - <id>unpack-license</id> - <phase>none</phase> - <goals><goal>unpack</goal></goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - </plugins> - </build> - - <distributionManagement> - <repository> - <id>fdio-release</id> - <url>${nexusproxy}/repositories/fd.io.release/</url> - </repository> - <snapshotRepository> - <id>fdio-snapshot</id> - <url>${nexusproxy}/repositories/fd.io.snapshot/</url> - </snapshotRepository> - </distributionManagement> -</project> diff --git a/common/features-parent/src/main/features/features.xml b/common/features-parent/src/main/features/features.xml deleted file mode 100644 index 7d78e78a0..000000000 --- a/common/features-parent/src/main/features/features.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- vi: set et smarttab sw=4 tabstop=4: --> -<!-- - Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v1.0 which accompanies this distribution, - and is available at http://www.eclipse.org/legal/epl-v10.html ---> -<!-- - This is a dummy feature file. It is just a placeholder to keep the - artifact working. - --> -<features name="fdio-dummy-feature" 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"/> diff --git a/common/karaf-parent/pom.xml b/common/karaf-parent/pom.xml deleted file mode 100644 index d8091f1ff..000000000 --- a/common/karaf-parent/pom.xml +++ /dev/null @@ -1,81 +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>org.opendaylight.controller</groupId> - <artifactId>karaf-parent</artifactId> - <version>1.6.2-Beryllium-SR2</version> - <relativePath/> - </parent> - - <properties> - <nexusproxy>http://nexus.fd.io/content</nexusproxy> - </properties> - - <modelVersion>4.0.0</modelVersion> - <groupId>io.fd.honeycomb.common</groupId> - <artifactId>karaf-parent</artifactId> - <version>1.0.0-SNAPSHOT</version> - <packaging>pom</packaging> - <build> - <plugins> - <plugin> - <artifactId>maven-checkstyle-plugin</artifactId> - <version>${checkstyle.version}</version> - <executions> - <execution> - <id>check-license</id> - <goals> - <goal>check</goal> - </goals> - <phase>none</phase> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.10</version> - <executions> - <execution> - <id>unpack-license</id> - <phase>none</phase> - <goals><goal>unpack</goal></goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - </plugins> - </build> - - <distributionManagement> - <repository> - <id>fdio-release</id> - <url>${nexusproxy}/repositories/fd.io.release/</url> - </repository> - <snapshotRepository> - <id>fdio-snapshot</id> - <url>${nexusproxy}/repositories/fd.io.snapshot/</url> - </snapshotRepository> - </distributionManagement> -</project> diff --git a/common/pom.xml b/common/pom.xml index 12f87b9ce..3a53456f2 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -27,9 +27,7 @@ <modules> <module>checkstyle</module> <module>api-parent</module> - <module>features-parent</module> <module>impl-parent</module> - <module>karaf-parent</module> <module>minimal-assembly-descriptor</module> <module>minimal-distribution-parent</module> 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&revision=2014-12-10</capability> - <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&revision=2016-04-06</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:init?module=cfg-init&revision=2016-04-07</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&revision=2016-04-11</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&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&revision=2014-12-10</capability> - <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&revision=2016-04-06</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&revision=2016-04-11</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&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&revision=2014-12-10</capability> - <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&revision=2016-04-06</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:init?module=cfg-init&revision=2016-04-07</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&revision=2016-04-11</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&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&revision=2014-12-10</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:mapper?module=netconf-mdsal-mapper&revision=2015-01-14</capability> - <capability> - urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:monitoring?module=netconf-mdsal-monitoring&revision=2015-02-18 - </capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:ssh?module=netconf-northbound-ssh&revision=2015-01-14</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:netconf:northbound:tcp?module=netconf-northbound-tcp&revision=2015-04-23</capability> - <capability> - urn:opendaylight:params:xml:ns:yang:controller:config:netconf:northbound:impl?module=netconf-northbound-impl&revision=2015-01-12 - </capability> - <capability> - urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:scheduled?module=threadpool-impl-scheduled&revision=2013-12-01 - </capability> - <capability> - urn:opendaylight:params:xml:ns:yang:controller:netconf:mdsal:notification?module=netconf-mdsal-notification&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&revision=2015-07-08</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector?module=opendaylight-rest-connector&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&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&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 diff --git a/packaging/rpm/persist/config/data.json b/packaging/rpm/persist/config/data.json deleted file mode 100644 index e69de29bb..000000000 --- a/packaging/rpm/persist/config/data.json +++ /dev/null diff --git a/packaging/rpm/persist/context/data.json b/packaging/rpm/persist/context/data.json deleted file mode 100644 index e69de29bb..000000000 --- a/packaging/rpm/persist/context/data.json +++ /dev/null diff --git a/v3po/features/pom.xml b/v3po/features/pom.xml deleted file mode 100644 index 8ffdb10e4..000000000 --- a/v3po/features/pom.xml +++ /dev/null @@ -1,75 +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.v3po</groupId> - <artifactId>v3po-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> - <dependencies> - <dependency> - <groupId>io.fd.honeycomb</groupId> - <artifactId>honeycomb-features</artifactId> - <classifier>features</classifier> - <version>${project.version}</version> - <type>xml</type> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>io.fd.honeycomb.vpp</groupId> - <artifactId>vpp-common-features</artifactId> - <classifier>features</classifier> - <version>${project.version}</version> - <type>xml</type> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>v3po-api</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>v3po2vpp</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>v3po2vpp</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>config</classifier> - </dependency> - </dependencies> -</project> diff --git a/v3po/features/src/main/features/features.xml b/v3po/features/src/main/features/features.xml deleted file mode 100644 index 9ef25aac9..000000000 --- a/v3po/features/src/main/features/features.xml +++ /dev/null @@ -1,43 +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="odl-v3po-${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:io.fd.honeycomb/honeycomb-features/${project.version}/xml/features</repository> - <repository>mvn:io.fd.honeycomb.vpp/vpp-common-features/${project.version}/xml/features</repository> - <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository> - - <feature name='honeycomb-v3po-api' version='${project.version}' description='OpenDaylight :: v3po :: api'> - <feature version='${mdsal.model.version}'>odl-mdsal-models</feature> - <bundle>mvn:io.fd.honeycomb.v3po/v3po-api/{{VERSION}}</bundle> - </feature> - - <feature name='honeycomb-v3po' version='${project.version}' description='OpenDaylight :: v3po'> - <feature version='${project.version}'>honeycomb</feature> - <feature version='${project.version}'>honeycomb-vpp-common</feature> - <feature version='${project.version}'>honeycomb-v3po-api</feature> - <bundle>mvn:io.fd.honeycomb.v3po/v3po2vpp/{{VERSION}}</bundle> - <configfile finalname="${configfile.directory}/honeycomb-v3po.xml">mvn:io.fd.honeycomb.v3po/v3po2vpp/{{VERSION}}/xml/config</configfile> - </feature> - - <feature name='honeycomb-v3po-rest' version='${project.version}' description='OpenDaylight :: v3po :: rest'> - <feature version='${project.version}'>honeycomb-rest</feature> - <feature version='${project.version}'>honeycomb-v3po</feature> - </feature> - -</features> diff --git a/v3po/pom.xml b/v3po/pom.xml index 16bc3902a..edfae2490 100644 --- a/v3po/pom.xml +++ b/v3po/pom.xml @@ -34,8 +34,6 @@ <modules> <module>api</module> <module>v3po2vpp</module> - <!--Will be deleted--> - <!--<module>features</module>--> </modules> <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build --> <build> diff --git a/v3po/v3po2vpp/src/main/config/default-config.xml b/v3po/v3po2vpp/src/main/config/default-config.xml deleted file mode 100644 index e17d7295c..000000000 --- a/v3po/v3po2vpp/src/main/config/default-config.xml +++ /dev/null @@ -1,346 +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:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg?module=vpp-jvpp-cfg&revision=2016-04-06</capability> - <capability>urn:honeycomb:params:xml:ns:yang:v3po2vpp?module=v3po2vpp&revision=2016-04-06</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11</capability> - <capability>urn:honeycomb:params:xml:ns:yang:vpp:util?module=vpp-util&revision=2016-04-06</capability> - <capability> - urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl:scheduled?module=threadpool-impl-scheduled&revision=2013-12-01 - </capability> - <capability>urn:honeycomb:params:xml:ns:yang:notification:impl?module=notification-impl&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:vpp:util">prefix:naming-context-impl</type> - <name>interface-context</name> - <artificial-name-prefix>interface-</artificial-name-prefix> - </module> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context-impl</type> - <name>bridge-domain-context</name> - <artificial-name-prefix>bridge-domain-</artificial-name-prefix> - </module> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context-impl</type> - <name>classify-table-context</name> - <artificial-name-prefix>classify-table-</artificial-name-prefix> - </module> - - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:vpp-state-honeycomb-reader</type> - <name>vpp-state-honeycomb-reader</name> - <vpp-jvpp> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <name>vpp-jvpp</name> - </vpp-jvpp> - <interface-context-vpp-state> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>interface-context</name> - </interface-context-vpp-state> - <bridge-domain-context-vpp-state> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>bridge-domain-context</name> - </bridge-domain-context-vpp-state> - <!-- Reuse netconf's scheduled executor for keepalives --> - <keepalive-executor> - <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:threadpool"> - prefix:threadpool - </type> - <name>global-netconf-ssh-scheduled-executor</name> - </keepalive-executor> - </module> - - <!-- Interface notification producer--> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:vpp-interface-notification-producer</type> - <name>vpp-interface-notification-producer</name> - <vpp-jvpp> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <name>vpp-jvpp</name> - </vpp-jvpp> - <interface-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>interface-context</name> - </interface-context> - <realtime-mapping-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-mapping-context</type> - <name>realtime-mapping-context</name> - </realtime-mapping-context> - </module> - <!-- Register to HC notification collector--> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:impl">prefix:honeycomb-notification-manager</type> - <name>honeycomb-notification-manager</name> - <notification-producers> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:honeycomb-notification-producer</type> - <name>vpp-interface-notification-producer</name> - </notification-producers> - </module> - <!-- /Interface notification producer --> - - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:interfaces-state-honeycomb-reader</type> - <name>interfaces-state-honeycomb-reader</name> - <vpp-jvpp> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <name>vpp-jvpp</name> - </vpp-jvpp> - <interface-context-ifc-state> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>interface-context</name> - </interface-context-ifc-state> - <bridge-domain-context-ifc-state> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>bridge-domain-context</name> - </bridge-domain-context-ifc-state> - <classify-table-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>classify-table-context</name> - </classify-table-context> - </module> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:vpp-classifier-state-honeycomb-reader</type> - <name>vpp-classifier-state-honeycomb-reader</name> - <vpp-jvpp> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <name>vpp-jvpp</name> - </vpp-jvpp> - <classify-table-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>classify-table-context</name> - </classify-table-context> - </module> - - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:vpp-honeycomb-writer</type> - <name>vpp-honeycomb-writer</name> - <vpp-jvpp-writer> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <name>vpp-jvpp</name> - </vpp-jvpp-writer> - <interface-context-vpp> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>interface-context</name> - </interface-context-vpp> - <bridge-domain-context-vpp> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>bridge-domain-context</name> - </bridge-domain-context-vpp> - </module> - - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:interfaces-honeycomb-writer</type> - <name>interfaces-honeycomb-writer</name> - <vpp-jvpp-ifc> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <name>vpp-jvpp</name> - </vpp-jvpp-ifc> - <interface-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>interface-context</name> - </interface-context> - <bridge-domain-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>bridge-domain-context</name> - </bridge-domain-context> - <classify-table-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>classify-table-context</name> - </classify-table-context> - </module> - - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:vpp-classifier-honeycomb-writer</type> - <name>vpp-classifier-honeycomb-writer</name> - <vpp-jvpp> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <name>vpp-jvpp</name> - </vpp-jvpp> - <classify-table-context> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <name>classify-table-context</name> - </classify-table-context> - </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>vpp-state-honeycomb-reader</name> - </reader-factory> - <reader-factory> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-factory</type> - <name>interfaces-state-honeycomb-reader</name> - </reader-factory> - <reader-factory> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-factory</type> - <name>vpp-classifier-state-honeycomb-reader</name> - </reader-factory> - </module> - - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:utils">prefix:delegating-writer-registry</type> - <name>write-registry</name> - <writer-factory> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-factory</type> - <name>vpp-honeycomb-writer</name> - </writer-factory> - <writer-factory> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-factory</type> - <name>interfaces-honeycomb-writer</name> - </writer-factory> - <writer-factory> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-factory</type> - <name>vpp-classifier-honeycomb-writer</name> - </writer-factory> - </module> - - <!-- Config initializer for VPP subtree--> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:vpp-cfg-initializer</type> - <name>vpp-cfg-initializer</name> - <binding-data-broker> - <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-async-data-broker</type> - <name>cfg-init-binding-data-broker</name> - </binding-data-broker> - </module> - <!-- Config initializer for Interfaces subtree--> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:interfaces-cfg-initializer</type> - <name>interfaces-cfg-initializer</name> - <binding-data-broker> - <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-async-data-broker</type> - <name>cfg-init-binding-data-broker</name> - </binding-data-broker> - </module> - <!-- Config initializer for vpp-classifier subtree--> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:v3po2vpp">prefix:vpp-classifier-cfg-initializer</type> - <name>vpp-classifier-cfg-initializer</name> - <binding-data-broker> - <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">prefix:binding-async-data-broker</type> - <name>cfg-init-binding-data-broker</name> - </binding-data-broker> - </module> - <!-- Add vpp initializer to initializer registry --> - <module> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer-registry</type> - <name>initializer-registry</name> - <initializers> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer</type> - <name>vpp-cfg-initializer</name> - </initializers> - <initializers> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer</type> - <name>interfaces-cfg-initializer</name> - </initializers> - <initializers> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer</type> - <name>vpp-classifier-cfg-initializer</name> - </initializers> - </module> - </modules> - - <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config"> - <service> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-factory</type> - <instance> - <name>vpp-state-honeycomb-reader</name> - <provider>/modules/module[type='vpp-state-honeycomb-reader'][name='vpp-state-honeycomb-reader'] - </provider> - </instance> - <instance> - <name>interfaces-state-honeycomb-reader</name> - <provider>/modules/module[type='interfaces-state-honeycomb-reader'][name='interfaces-state-honeycomb-reader']</provider> - </instance> - <instance> - <name>vpp-classifier-state-honeycomb-reader</name> - <provider>/modules/module[type='vpp-classifier-state-honeycomb-reader'][name='vpp-classifier-state-honeycomb-reader']</provider> - </instance> - </service> - <service> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:notification:api">prefix:honeycomb-notification-producer</type> - <instance> - <name>vpp-interface-notification-producer</name> - <provider>/modules/module[type='vpp-interface-notification-producer'][name='vpp-interface-notification-producer']</provider> - </instance> - </service> - <service> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:util">prefix:naming-context</type> - <instance> - <name>interface-context</name> - <provider>/modules/module[type='naming-context-impl'][name='interface-context']</provider> - </instance> - <instance> - <name>bridge-domain-context</name> - <provider>/modules/module[type='naming-context-impl'][name='bridge-domain-context']</provider> - </instance> - <instance> - <name>classify-table-context</name> - <provider>/modules/module[type='naming-context-impl'][name='classify-table-context']</provider> - </instance> - </service> - <service> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-writer-factory</type> - <instance> - <name>vpp-honeycomb-writer</name> - <provider>/modules/module[type='vpp-honeycomb-writer'][name='vpp-honeycomb-writer'] - </provider> - </instance> - <instance> - <name>interfaces-honeycomb-writer</name> - <provider>/modules/module[type='interfaces-honeycomb-writer'][name='interfaces-honeycomb-writer'] - </provider> - </instance> - <instance> - <name>vpp-classifier-honeycomb-writer</name> - <provider>/modules/module[type='vpp-classifier-honeycomb-writer'][name='vpp-classifier-honeycomb-writer'] - </provider> - </instance> - </service> - - <service> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:data:init">prefix:cfg-initializer</type> - <instance> - <name>vpp-cfg-initializer</name> - <provider>/modules/module[type='vpp-cfg-initializer'][name='vpp-cfg-initializer'] - </provider> - </instance> - <instance> - <name>interfaces-cfg-initializer</name> - <provider>/modules/module[type='interfaces-cfg-initializer'][name='interfaces-cfg-initializer'] - </provider> - </instance> - <instance> - <name>vpp-classifier-cfg-initializer</name> - <provider>/modules/module[type='vpp-classifier-cfg-initializer'][name='vpp-classifier-cfg-initializer'] - </provider> - </instance> - </service> - </services> - </data> - </configuration> -</snapshot> diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/Readme.adoc b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/Readme.adoc index 57800d22c..57800d22c 100644 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/Readme.adoc +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/Readme.adoc diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java index 7c63076d5..98cb32ee8 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierHoneycombWriterFactory.java @@ -36,9 +36,10 @@ import org.openvpp.jvpp.future.FutureJVpp; public final class VppClassifierHoneycombWriterFactory implements WriterFactory, AutoCloseable { public static final InstanceIdentifier<ClassifyTable> CLASSIFY_TABLE_ID = - InstanceIdentifier.create(VppClassifier.class).child(ClassifyTable.class); + InstanceIdentifier.create(VppClassifier.class).child(ClassifyTable.class); + public static final InstanceIdentifier<ClassifySession> CLASSIFY_SESSION_ID = - CLASSIFY_TABLE_ID.child(ClassifySession.class); + CLASSIFY_TABLE_ID.child(ClassifySession.class); private final FutureJVpp jvpp; private final NamingContext classifyTableContext; @@ -59,8 +60,7 @@ public final class VppClassifierHoneycombWriterFactory implements WriterFactory, CLASSIFY_SESSION_ID); // ClassifyTableSession registry.addBefore( - new GenericListWriter<>( - CLASSIFY_SESSION_ID, new ClassifySessionWriter(jvpp, classifyTableContext)), + new GenericListWriter<>(CLASSIFY_SESSION_ID, new ClassifySessionWriter(jvpp, classifyTableContext)), ACL_ID); } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java index afe486c46..9cf5b4d5d 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/cfgattrs/V3poConfiguration.java @@ -17,12 +17,8 @@ package io.fd.honeycomb.translate.v3po.cfgattrs; import net.jmob.guice.conf.core.BindConfig; -import net.jmob.guice.conf.core.InjectConfig; import net.jmob.guice.conf.core.Syntax; @BindConfig(value = "v3po", syntax = Syntax.JSON) public class V3poConfiguration { - - @InjectConfig("some") - String some; } diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesConfigurationInitializerModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesConfigurationInitializerModule.java deleted file mode 100644 index 606e27832..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesConfigurationInitializerModule.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.initializers.InterfacesInitializer; - -public class InterfacesConfigurationInitializerModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesConfigurationInitializerModule { - public InterfacesConfigurationInitializerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public InterfacesConfigurationInitializerModule(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.v3po2vpp.rev160406.InterfacesConfigurationInitializerModule 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 InterfacesInitializer(getBindingDataBrokerDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesConfigurationInitializerModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesConfigurationInitializerModuleFactory.java deleted file mode 100644 index 726ab0689..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesConfigurationInitializerModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: interfaces-cfg-initializer -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Thu May 19 14:51:38 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.v3po2vpp.rev160406; -public class InterfacesConfigurationInitializerModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesConfigurationInitializerModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java deleted file mode 100644 index e63392018..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.InterfacesWriterFactory; - -public class InterfacesHoneycombWriterModule extends - org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesHoneycombWriterModule { - - // TODO split configuration and translation code into 2 or more bundles - - public InterfacesHoneycombWriterModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public InterfacesHoneycombWriterModule(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.v3po2vpp.rev160406.InterfacesHoneycombWriterModule 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 InterfacesWriterFactory(getVppJvppIfcDependency(), - getBridgeDomainContextDependency(), - getInterfaceContextDependency(), - getClassifyTableContextDependency()); - } - - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModuleFactory.java deleted file mode 100644 index 9332d3017..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: interfaces-honeycomb-writer -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Fri Apr 08 13:28:05 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.v3po2vpp.rev160406; -public class InterfacesHoneycombWriterModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesHoneycombWriterModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java deleted file mode 100644 index 300f44159..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.InterfacesStateReaderFactory; - -public class InterfacesStateHoneycombReaderModule extends - org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesStateHoneycombReaderModule { - - public InterfacesStateHoneycombReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public InterfacesStateHoneycombReaderModule(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.v3po2vpp.rev160406.InterfacesStateHoneycombReaderModule 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 InterfacesStateReaderFactory(getVppJvppDependency(), - getInterfaceContextIfcStateDependency(), - getBridgeDomainContextIfcStateDependency(), - getClassifyTableContextDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModuleFactory.java deleted file mode 100644 index f1c89f6ef..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: interfaces-state-honeycomb-reader -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Fri Apr 08 10:39:04 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.v3po2vpp.rev160406; -public class InterfacesStateHoneycombReaderModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesStateHoneycombReaderModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierConfigurationInitializerModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierConfigurationInitializerModule.java deleted file mode 100644 index f83e54644..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierConfigurationInitializerModule.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.initializers.VppClasifierInitializer; - -public class VppClassifierConfigurationInitializerModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierConfigurationInitializerModule { - public VppClassifierConfigurationInitializerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppClassifierConfigurationInitializerModule(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.v3po2vpp.rev160406.VppClassifierConfigurationInitializerModule 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 VppClasifierInitializer(getBindingDataBrokerDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierConfigurationInitializerModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierConfigurationInitializerModuleFactory.java deleted file mode 100644 index 4e0e7c79e..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierConfigurationInitializerModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: vpp-classifier-cfg-initializer -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Thu Jul 14 16:02: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.v3po2vpp.rev160406; -public class VppClassifierConfigurationInitializerModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierConfigurationInitializerModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java deleted file mode 100644 index 172646c06..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModule.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.VppClassifierHoneycombWriterFactory; - -public class VppClassifierHoneycombWriterModule extends - org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierHoneycombWriterModule { - - - public VppClassifierHoneycombWriterModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppClassifierHoneycombWriterModule(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.v3po2vpp.rev160406.VppClassifierHoneycombWriterModule 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 VppClassifierHoneycombWriterFactory( - getVppJvppDependency(), - getClassifyTableContextDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModuleFactory.java deleted file mode 100644 index c4ff69061..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierHoneycombWriterModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: vpp-classifier-honeycomb-writer -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Fri Jun 03 14:05:48 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.v3po2vpp.rev160406; -public class VppClassifierHoneycombWriterModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierHoneycombWriterModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java deleted file mode 100644 index 4169b784a..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModule.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.VppClassifierReaderFactory; - -public class VppClassifierStateHoneycombReaderModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierStateHoneycombReaderModule { - public VppClassifierStateHoneycombReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppClassifierStateHoneycombReaderModule(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.v3po2vpp.rev160406.VppClassifierStateHoneycombReaderModule 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 VppClassifierReaderFactory(getVppJvppDependency(), getClassifyTableContextDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModuleFactory.java deleted file mode 100644 index 2c1696214..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppClassifierStateHoneycombReaderModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: vpp-classifier-state-honeycomb-reader -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Tue Jul 19 13:04:20 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.v3po2vpp.rev160406; -public class VppClassifierStateHoneycombReaderModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppClassifierStateHoneycombReaderModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppConfigurationInitializerModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppConfigurationInitializerModule.java deleted file mode 100644 index 266fc408c..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppConfigurationInitializerModule.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.initializers.VppInitializer; - -public class VppConfigurationInitializerModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppConfigurationInitializerModule { - public VppConfigurationInitializerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppConfigurationInitializerModule(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.v3po2vpp.rev160406.VppConfigurationInitializerModule 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 VppInitializer(getBindingDataBrokerDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppConfigurationInitializerModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppConfigurationInitializerModuleFactory.java deleted file mode 100644 index 9ef01e843..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppConfigurationInitializerModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: vpp-cfg-initializer -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Thu May 19 14:51:38 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.v3po2vpp.rev160406; -public class VppConfigurationInitializerModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppConfigurationInitializerModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java deleted file mode 100644 index 63a8a1b67..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModule.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.VppHoneycombWriterFactory; - -public class VppHoneycombWriterModule extends - org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppHoneycombWriterModule { - public VppHoneycombWriterModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppHoneycombWriterModule(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.v3po2vpp.rev160406.VppHoneycombWriterModule 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 VppHoneycombWriterFactory( - getVppJvppWriterDependency(), - getBridgeDomainContextVppDependency(), - getInterfaceContextVppDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModuleFactory.java deleted file mode 100644 index c350286b8..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppHoneycombWriterModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: vpp-honeycomb-writer -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Apr 06 11:40:09 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.v3po2vpp.rev160406; -public class VppHoneycombWriterModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppHoneycombWriterModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppInterfaceNotificationProducerModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppInterfaceNotificationProducerModule.java deleted file mode 100644 index bb31760ad..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppInterfaceNotificationProducerModule.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.notification.InterfaceChangeNotificationProducer; - -public class VppInterfaceNotificationProducerModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppInterfaceNotificationProducerModule { - - public VppInterfaceNotificationProducerModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppInterfaceNotificationProducerModule(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.v3po2vpp.rev160406.VppInterfaceNotificationProducerModule 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 InterfaceChangeNotificationProducer( - getVppJvppDependency(), - getInterfaceContextDependency(), - getRealtimeMappingContextDependency()); - } - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppInterfaceNotificationProducerModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppInterfaceNotificationProducerModuleFactory.java deleted file mode 100644 index c80a0d364..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppInterfaceNotificationProducerModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: vpp-interface-notification-producer -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Jun 01 17:12:36 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.v3po2vpp.rev160406; -public class VppInterfaceNotificationProducerModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppInterfaceNotificationProducerModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java deleted file mode 100644 index df216c05a..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModule.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406; - -import io.fd.honeycomb.translate.v3po.VppStateHoneycombReaderFactory; -import java.lang.management.ManagementFactory; -import javax.management.Attribute; -import javax.management.InstanceNotFoundException; -import javax.management.ObjectName; -import org.opendaylight.controller.config.api.ConflictingVersionException; -import org.opendaylight.controller.config.api.ValidationException; -import org.opendaylight.controller.config.util.ConfigRegistryJMXClient; -import org.opendaylight.controller.config.util.ConfigTransactionJMXClient; -import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.VppJvppImplModule; -import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.VppJvppImplModuleFactory; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class VppStateHoneycombReaderModule extends - org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppStateHoneycombReaderModule { - - private static final Logger LOG = LoggerFactory.getLogger(VppStateHoneycombReaderModule.class); - - public VppStateHoneycombReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, - org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppStateHoneycombReaderModule(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.v3po2vpp.rev160406.VppStateHoneycombReaderModule 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 VppStateHoneycombReaderFactory(getVppJvppDependency(), - getInterfaceContextVppStateDependency(), - getBridgeDomainContextVppStateDependency(), - getKeepaliveExecutorDependency()); - } - - private static long reinitializationCounter; - private static final long reinitializationLimit = 10; - - /** - * In case we detect connection issues with VPP, reinitialize JVpp. - */ - private static void reinitializeJVpp(final long currentAttempt) { - // FIXME https://jira.fd.io/browse/HONEYCOMB-78 This code correctly re-initializes all the components - // starting with jvpp, but jvpp reconnect fails. Test in a JVpp test and then from C - LOG.info("Reinitializing JVpp, attempt: {}", currentAttempt); - - final long nextAttempt = currentAttempt + 1; - if (nextAttempt - reinitializationCounter > reinitializationLimit) { - LOG.error("Too many JVpp reinitialization attempts. Unable to reinitialize JVpp in {} attempts. Giving up", - reinitializationLimit); - throw new IllegalStateException("Too many JVpp reinitialization attempts. Unable to reinitialize JVpp in " - + reinitializationLimit + " attempts. Giving up"); - } - - final ConfigRegistryJMXClient cfgRegistryClient = - ConfigRegistryJMXClient.createWithoutNotifications(ManagementFactory.getPlatformMBeanServer()); - - final ObjectName objectName = cfgRegistryClient.beginConfig(); - final ConfigTransactionJMXClient txClient = cfgRegistryClient.getConfigTransactionClient(objectName); - - final ObjectName jvppOn; - try { - final String attributeName = VppJvppImplModule.descriptionJmxAttribute.getAttributeName(); - final String factoryName = VppJvppImplModuleFactory.NAME; - jvppOn = txClient.lookupConfigBean(factoryName, "vpp-jvpp"); - - // Change configuration attribute of JVpp to trigger full reinitialization here using config subsystem - // TODO improve this when switching from karaf in planned minimal distribution - txClient.setAttribute(jvppOn, attributeName, new Attribute(attributeName, - Long.toString(nextAttempt))); - - txClient.validateConfig(); - cfgRegistryClient.commitConfig(txClient.getObjectName()); - LOG.info("JVpp reinitialized successfully"); - } catch (InstanceNotFoundException | ValidationException e) { - LOG.error("Unable to reinitialize JVpp. Honeycomb will not work properly from now on.", e); - throw new IllegalStateException("Unable to find jvpp instance in config subsystem. Unable to reinitialize JVpp", e); - } catch (ConflictingVersionException e) { - LOG.debug("Conflict changes occurred, retrying", e); - // Just retry until there's no conflicting change in progress - reinitializeJVpp(nextAttempt); - } - - reinitializationCounter = nextAttempt; - } - - -} diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModuleFactory.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModuleFactory.java deleted file mode 100644 index e9e1c948b..000000000 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/VppStateHoneycombReaderModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: v3po2vpp yang module local name: vpp-state-honeycomb-reader -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Apr 06 11:40:09 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.v3po2vpp.rev160406; -public class VppStateHoneycombReaderModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractVppStateHoneycombReaderModuleFactory { - -} diff --git a/v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json b/v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json index 290d631f0..7a73a41bf 100644 --- a/v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json +++ b/v3po/v3po2vpp/src/main/resources/honeycomb-minimal-resources/config/v3po.json @@ -1,3 +1,2 @@ { - "some": "value" }
\ No newline at end of file diff --git a/v3po/v3po2vpp/src/main/yang/v3po2vpp.yang b/v3po/v3po2vpp/src/main/yang/v3po2vpp.yang deleted file mode 100644 index 1e821f5c1..000000000 --- a/v3po/v3po2vpp/src/main/yang/v3po2vpp.yang +++ /dev/null @@ -1,367 +0,0 @@ -module v3po2vpp { - yang-version 1; - namespace "urn:honeycomb:params:xml:ns:yang:v3po2vpp"; - prefix "v3po2vpp"; - - import config { prefix config; revision-date 2013-04-05; } - import translate-api { prefix tapi; revision-date 2016-04-06; } - import vpp-jvpp-cfg { prefix vjvppc; revision-date 2016-04-06; } - import cfg-init { prefix init; revision-date "2016-04-07"; } - import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;} - import vpp-util { prefix vpp-u; revision-date 2016-04-06; } - import threadpool {prefix th;} - import notification-api { prefix hc-notif-a; revision-date 2016-06-01; } - - description - "This module contains reads and writers for v3po yang model"; - - revision "2016-04-06" { - description - "Initial revision."; - } - - identity vpp-state-honeycomb-reader { - base config:module-type; - config:provided-service tapi:honeycomb-reader-factory; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-state-honeycomb-reader { - when "/config:modules/config:module/config:type = 'vpp-state-honeycomb-reader'"; - - container vpp-jvpp { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vjvppc:vpp-jvpp; - } - } - } - - container interface-context-vpp-state { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container bridge-domain-context-vpp-state { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container keepalive-executor { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity th:scheduled-threadpool; - } - } - - description "Used to schedule keepalives"; - } - } - } - - identity vpp-interface-notification-producer { - base config:module-type; - config:provided-service hc-notif-a:honeycomb-notification-producer; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-interface-notification-producer { - when "/config:modules/config:module/config:type = 'vpp-interface-notification-producer'"; - - container vpp-jvpp { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vjvppc:vpp-jvpp; - } - } - } - - container interface-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container realtime-mapping-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity tapi:honeycomb-mapping-context; - } - } - } - } - } - - identity interfaces-state-honeycomb-reader { - base config:module-type; - config:provided-service tapi:honeycomb-reader-factory; - } - - augment "/config:modules/config:module/config:configuration" { - case interfaces-state-honeycomb-reader { - when "/config:modules/config:module/config:type = 'interfaces-state-honeycomb-reader'"; - - container vpp-jvpp { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vjvppc:vpp-jvpp; - } - } - } - - container interface-context-ifc-state { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container bridge-domain-context-ifc-state { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container classify-table-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - } - } - - identity vpp-classifier-state-honeycomb-reader { - base config:module-type; - config:provided-service tapi:honeycomb-reader-factory; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-classifier-state-honeycomb-reader { - when "/config:modules/config:module/config:type = 'vpp-classifier-state-honeycomb-reader'"; - - container vpp-jvpp { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vjvppc:vpp-jvpp; - } - } - } - - container classify-table-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - } - } - - - identity vpp-honeycomb-writer { - base config:module-type; - config:provided-service tapi:honeycomb-writer-factory; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-honeycomb-writer { - when "/config:modules/config:module/config:type = 'vpp-honeycomb-writer'"; - - container vpp-jvpp-writer { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vjvppc:vpp-jvpp; - } - } - } - - container interface-context-vpp { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container bridge-domain-context-vpp { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - } - } - - identity interfaces-honeycomb-writer { - base config:module-type; - config:provided-service tapi:honeycomb-writer-factory; - } - - augment "/config:modules/config:module/config:configuration" { - case interfaces-honeycomb-writer { - when "/config:modules/config:module/config:type = 'interfaces-honeycomb-writer'"; - - container vpp-jvpp-ifc { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vjvppc:vpp-jvpp; - } - } - } - - container interface-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container bridge-domain-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - container classify-table-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - - } - } - - identity vpp-classifier-honeycomb-writer { - base config:module-type; - config:provided-service tapi:honeycomb-writer-factory; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-classifier-honeycomb-writer { - when "/config:modules/config:module/config:type = 'vpp-classifier-honeycomb-writer'"; - - container vpp-jvpp { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vjvppc:vpp-jvpp; - } - } - } - - container classify-table-context { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity vpp-u:naming-context; - } - } - } - } - } - - identity vpp-cfg-initializer { - base config:module-type; - config:provided-service init:cfg-initializer; - config:java-name-prefix VppConfigurationInitializer; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-cfg-initializer { - when "/config:modules/config:module/config:type = 'vpp-cfg-initializer'"; - - container binding-data-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity md-sal-binding:binding-async-data-broker; - } - } - } - } - } - - identity interfaces-cfg-initializer { - base config:module-type; - config:provided-service init:cfg-initializer; - config:java-name-prefix InterfacesConfigurationInitializer; - } - - augment "/config:modules/config:module/config:configuration" { - case interfaces-cfg-initializer { - when "/config:modules/config:module/config:type = 'interfaces-cfg-initializer'"; - - container binding-data-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity md-sal-binding:binding-async-data-broker; - } - } - } - } - } - - identity vpp-classifier-cfg-initializer { - base config:module-type; - config:provided-service init:cfg-initializer; - config:java-name-prefix VppClassifierConfigurationInitializer; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-classifier-cfg-initializer { - when "/config:modules/config:module/config:type = 'vpp-classifier-cfg-initializer'"; - - container binding-data-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/vpp-common/features/pom.xml b/vpp-common/features/pom.xml deleted file mode 100644 index e0ad56d56..000000000 --- a/vpp-common/features/pom.xml +++ /dev/null @@ -1,89 +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.vpp</groupId> - <artifactId>vpp-common-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> - <dependencies> - <dependency> - <groupId>io.fd.honeycomb</groupId> - <artifactId>honeycomb-features</artifactId> - <classifier>features</classifier> - <version>${project.version}</version> - <type>xml</type> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>naming-context-api</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>naming-context-impl</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>naming-context-impl</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>config</classifier> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>vpp-jvpp-cfg</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>vpp-translate-utils</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>vpp-jvpp-cfg</artifactId> - <version>${project.version}</version> - <type>xml</type> - <classifier>config</classifier> - </dependency> - <dependency> - <groupId>io.fd.vpp</groupId> - <artifactId>jvpp</artifactId> - <version>16.09-SNAPSHOT</version> - </dependency> - </dependencies> -</project> diff --git a/vpp-common/features/src/main/features/features.xml b/vpp-common/features/src/main/features/features.xml deleted file mode 100644 index 321f96e1c..000000000 --- a/vpp-common/features/src/main/features/features.xml +++ /dev/null @@ -1,33 +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-vpp-common-${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:io.fd.honeycomb/honeycomb-features/${project.version}/xml/features</repository> - - <feature name='honeycomb-vpp-common' version='${project.version}' description='OpenDaylight :: honeycomb :: vpp-common'> - <feature version='${project.version}'>honeycomb</feature> - <bundle>mvn:io.fd.honeycomb.vpp/naming-context-api/{{VERSION}}</bundle> - <bundle>mvn:io.fd.honeycomb.vpp/naming-context-impl/{{VERSION}}</bundle> - <bundle>wrap:mvn:io.fd.vpp/jvpp/{{VERSION}}</bundle> - <bundle>mvn:io.fd.honeycomb.vpp/vpp-jvpp-cfg/{{VERSION}}</bundle> - <bundle>mvn:io.fd.honeycomb.vpp/vpp-translate-utils/{{VERSION}}</bundle> - <configfile finalname="${configfile.directory}/honeycomb-jvpp.xml">mvn:io.fd.honeycomb.vpp/vpp-jvpp-cfg/{{VERSION}}/xml/config</configfile> - <configfile finalname="${configfile.directory}/honeycomb-naming-context-reader.xml">mvn:io.fd.honeycomb.vpp/naming-context-impl/{{VERSION}}/xml/config</configfile> - </feature> - -</features> diff --git a/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy index fe71caddb..5016d4e19 100644 --- a/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy +++ b/vpp-common/minimal-distribution/src/main/java/io/fd/honeycomb/vpp/distro/ContextsReaderFactoryProvider.groovy @@ -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.context.impl.rev141210.ContextReaderModule +import io.fd.honeycomb.vpp.context.ContextsReaderFactory /** * Mirror of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.impl.rev141210.ContextReaderModule @@ -36,5 +36,5 @@ class ContextsReaderFactoryProvider extends ProviderTrait<ReaderFactory> { @Named("honeycomb-context") DataBroker contextDataBroker - def create() { new ContextReaderModule.ContextsReaderFactory(contextDataBroker) } + def create() { new ContextsReaderFactory(contextDataBroker) } } diff --git a/vpp-common/naming-context-impl/src/main/config/default-config.xml b/vpp-common/naming-context-impl/src/main/config/default-config.xml deleted file mode 100644 index 585375844..000000000 --- a/vpp-common/naming-context-impl/src/main/config/default-config.xml +++ /dev/null @@ -1,62 +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:context:impl?module=context-impl&revision=2014-12-10</capability> - <capability>urn:honeycomb:params:xml:ns:yang:translate:utils?module=translate-utils&revision=2016-04-06</capability> - <capability>urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg?module=vpp-jvpp-cfg&revision=2016-04-06</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:api?module=data-api&revision=2016-04-11</capability> - <capability>urn:honeycomb:params:xml:ns:yang:data:impl?module=data-impl&revision=2016-04-11</capability> - <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&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"> - <!-- Special reader for Context data. Providing context data to outside users over NETCONF/RESTCONF --> - <module> - <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:context:impl">prefix:context-reader</type> - <name>context-reader</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> - <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>context-reader</name> - </reader-factory> - </module> - </modules> - - <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config"> - - <service> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:translate:api">prefix:honeycomb-reader-factory</type> - <instance> - <name>context-reader</name> - <provider>/modules/module[type='context-reader'][name='context-reader']</provider> - </instance> - </service> - - </services> - </data> - </configuration> -</snapshot> diff --git a/vpp-common/naming-context-impl/src/main/java/io/fd/honeycomb/vpp/context/ContextsReaderFactory.java b/vpp-common/naming-context-impl/src/main/java/io/fd/honeycomb/vpp/context/ContextsReaderFactory.java new file mode 100644 index 000000000..6d3a3f13b --- /dev/null +++ b/vpp-common/naming-context-impl/src/main/java/io/fd/honeycomb/vpp/context/ContextsReaderFactory.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.vpp.context; + +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.honeycomb.params.xml.ns.yang.naming.context.rev160513.Contexts; +import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.naming.context.rev160513.ContextsBuilder; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; + +/** + * {@link io.fd.honeycomb.translate.read.ReaderFactory} initiating reader providing data from context data store. + * Making them available over RESTCONF/NETCONF. + */ +public final class ContextsReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory { + + private final DataBroker contextBindingBrokerDependency; + + public ContextsReaderFactory(final DataBroker contextBindingBrokerDependency) { + this.contextBindingBrokerDependency = contextBindingBrokerDependency; + } + + @Override + public void init(final ModifiableReaderRegistryBuilder registry) { + registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(Contexts.class), + contextBindingBrokerDependency, + LogicalDatastoreType.OPERATIONAL, ContextsBuilder.class)); + } +} diff --git a/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java b/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java deleted file mode 100644 index ccc01e0ad..000000000 --- a/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModule.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.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.honeycomb.params.xml.ns.yang.naming.context.rev160513.Contexts; -import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.naming.context.rev160513.ContextsBuilder; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -/** -* A reader to provide naming context related data -*/ -public class ContextReaderModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.impl.rev141210.AbstractContextReaderModule { - public ContextReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public ContextReaderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.impl.rev141210.ContextReaderModule 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 ContextsReaderFactory(getContextBindingBrokerDependency()); - } - - public static final class ContextsReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory { - - private final DataBroker contextBindingBrokerDependency; - - public ContextsReaderFactory(final DataBroker contextBindingBrokerDependency) { - this.contextBindingBrokerDependency = contextBindingBrokerDependency; - } - - @Override - public void init(final ModifiableReaderRegistryBuilder registry) { - registry.add(new BindingBrokerReader<>(InstanceIdentifier.create(Contexts.class), - contextBindingBrokerDependency, - LogicalDatastoreType.OPERATIONAL, ContextsBuilder.class)); - } - } - -} diff --git a/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModuleFactory.java b/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModuleFactory.java deleted file mode 100644 index aaafbc3e3..000000000 --- a/vpp-common/naming-context-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/context/impl/rev141210/ContextReaderModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: context-impl yang module local name: context-reader -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Fri Jul 29 11:05:42 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.context.impl.rev141210; -public class ContextReaderModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.context.impl.rev141210.AbstractContextReaderModuleFactory { - -} diff --git a/vpp-common/naming-context-impl/src/main/yang/context-impl.yang b/vpp-common/naming-context-impl/src/main/yang/context-impl.yang deleted file mode 100644 index 12861be68..000000000 --- a/vpp-common/naming-context-impl/src/main/yang/context-impl.yang +++ /dev/null @@ -1,39 +0,0 @@ -module context-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:context:impl"; - prefix "v3po-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 translate-api { prefix tapi; revision-date 2016-04-06; } - - description - "Service definition for v3po project"; - - revision "2014-12-10" { - description - "Initial revision"; - } - - identity context-reader { - base config:module-type; - config:provided-service tapi:honeycomb-reader-factory; - description "A reader to provide naming context related data"; - } - - augment "/config:modules/config:module/config:configuration" { - case context-reader { - when "/config:modules/config:module/config:type = 'context-reader'"; - - container context-binding-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity md-sal-binding:binding-async-data-broker; - } - } - } - - } - } -} diff --git a/vpp-common/pom.xml b/vpp-common/pom.xml index 42a5221e3..4bcdd6c25 100644 --- a/vpp-common/pom.xml +++ b/vpp-common/pom.xml @@ -33,11 +33,9 @@ </prerequisites> <modules> <module>vpp-translate-utils</module> - <module>vpp-jvpp-cfg</module> <module>naming-context-api</module> <module>naming-context-impl</module> <module>minimal-distribution</module> - <!--<module>features</module>--> </modules> <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build --> <build> diff --git a/vpp-common/vpp-jvpp-cfg/pom.xml b/vpp-common/vpp-jvpp-cfg/pom.xml deleted file mode 100644 index 79956ef62..000000000 --- a/vpp-common/vpp-jvpp-cfg/pom.xml +++ /dev/null @@ -1,39 +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>impl-parent</artifactId> - <version>1.0.0-SNAPSHOT</version> - <relativePath>../../common/impl-parent</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <groupId>io.fd.honeycomb.vpp</groupId> - <artifactId>vpp-jvpp-cfg</artifactId> - <version>1.0.0-SNAPSHOT</version> - <packaging>bundle</packaging> - - <dependencies> - <dependency> - <groupId>io.fd.vpp</groupId> - <artifactId>jvpp</artifactId> - <version>16.09-SNAPSHOT</version> - </dependency> - </dependencies> - -</project> diff --git a/vpp-common/vpp-jvpp-cfg/src/main/config/default-config.xml b/vpp-common/vpp-jvpp-cfg/src/main/config/default-config.xml deleted file mode 100644 index cbb614e69..000000000 --- a/vpp-common/vpp-jvpp-cfg/src/main/config/default-config.xml +++ /dev/null @@ -1,46 +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:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg?module=vpp-jvpp-cfg&revision=2016-04-06</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:vpp:jvpp:cfg">prefix:vpp-jvpp-impl</type> - <name>vpp-jvpp</name> - </module> - </modules> - - <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config"> - <service> - <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg">prefix:vpp-jvpp</type> - <instance> - <name>vpp-jvpp</name> - <provider>/modules/module[type='vpp-jvpp-impl'][name='vpp-jvpp'] - </provider> - </instance> - </service> - </services> - </data> - </configuration> -</snapshot> diff --git a/vpp-common/vpp-jvpp-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/jvpp/cfg/rev160406/VppJvppImplModule.java b/vpp-common/vpp-jvpp-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/jvpp/cfg/rev160406/VppJvppImplModule.java deleted file mode 100644 index 8eb504a03..000000000 --- a/vpp-common/vpp-jvpp-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/jvpp/cfg/rev160406/VppJvppImplModule.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406; - -import java.io.IOException; -import org.openvpp.jvpp.JVppImpl; -import org.openvpp.jvpp.VppJNIConnection; -import org.openvpp.jvpp.future.FutureJVppFacade; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class VppJvppImplModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.AbstractVppJvppImplModule { - - private static final Logger LOG = LoggerFactory.getLogger(VppJvppImplModule.class); - - public VppJvppImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public VppJvppImplModule(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.vpp.jvpp.cfg.rev160406.VppJvppImplModule 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() { - try { - final JVppImpl jVpp = new JVppImpl(new VppJNIConnection(getName())); - LOG.info("JVpp connection opened successfully as: {}", getName()); - return new FutureJVppFacade(jVpp) { - @Override - public void close() throws Exception { - super.close(); - LOG.info("Closing JVpp connection: {}", getName()); - jVpp.close(); - } - }; - } catch (IOException e) { - throw new IllegalStateException("Unable to open VPP management connection", e); - } - } - -} diff --git a/vpp-common/vpp-jvpp-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/jvpp/cfg/rev160406/VppJvppImplModuleFactory.java b/vpp-common/vpp-jvpp-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/jvpp/cfg/rev160406/VppJvppImplModuleFactory.java deleted file mode 100644 index 71151092d..000000000 --- a/vpp-common/vpp-jvpp-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/jvpp/cfg/rev160406/VppJvppImplModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: vpp-jvpp-cfg yang module local name: vpp-jvpp-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Fri Apr 29 11:20: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.vpp.jvpp.cfg.rev160406; -public class VppJvppImplModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.jvpp.cfg.rev160406.AbstractVppJvppImplModuleFactory { - -} diff --git a/vpp-common/vpp-jvpp-cfg/src/main/yang/vpp-jvpp-cfg.yang b/vpp-common/vpp-jvpp-cfg/src/main/yang/vpp-jvpp-cfg.yang deleted file mode 100644 index 01a0bf339..000000000 --- a/vpp-common/vpp-jvpp-cfg/src/main/yang/vpp-jvpp-cfg.yang +++ /dev/null @@ -1,43 +0,0 @@ -module vpp-jvpp-cfg { - yang-version 1; - namespace "urn:honeycomb:params:xml:ns:yang:vpp:jvpp:cfg"; - prefix "vjvppc"; - - 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 vpp-jvpp { - base "config:service-type"; - config:java-class org.openvpp.jvpp.future.FutureJVpp; - } - - identity vpp-jvpp-impl { - base config:module-type; - config:provided-service vpp-jvpp; - } - - augment "/config:modules/config:module/config:configuration" { - case vpp-jvpp-impl { - when "/config:modules/config:module/config:type = 'vpp-jvpp-impl'"; - - leaf name { - type string; - default "v3poODL"; - } - - leaf description { - type string; - description "Artificial leaf just to trigger reinitialization of JVpp from HC"; - } - } - } - -}
\ No newline at end of file diff --git a/vpp-common/vpp-translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/util/rev160406/NamingContextImplModule.java b/vpp-common/vpp-translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/util/rev160406/NamingContextImplModule.java deleted file mode 100644 index bff1a3a49..000000000 --- a/vpp-common/vpp-translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/util/rev160406/NamingContextImplModule.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.util.rev160406; - -import io.fd.honeycomb.translate.v3po.util.NamingContext; - -public class NamingContextImplModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.util.rev160406.AbstractNamingContextImplModule { - public NamingContextImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public NamingContextImplModule(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.vpp.util.rev160406.NamingContextImplModule 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 NamingContext( - getArtificialNamePrefix(), - getIdentifier().getInstanceName()); - } - -} diff --git a/vpp-common/vpp-translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/util/rev160406/NamingContextImplModuleFactory.java b/vpp-common/vpp-translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/util/rev160406/NamingContextImplModuleFactory.java deleted file mode 100644 index c777dafa1..000000000 --- a/vpp-common/vpp-translate-utils/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/util/rev160406/NamingContextImplModuleFactory.java +++ /dev/null @@ -1,13 +0,0 @@ -/* -* Generated file -* -* Generated from: yang module name: vpp-util yang module local name: naming-context-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Mon May 02 10:57:32 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.vpp.util.rev160406; -public class NamingContextImplModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.util.rev160406.AbstractNamingContextImplModuleFactory { - -} diff --git a/vpp-common/vpp-translate-utils/src/main/yang/vpp-util.yang b/vpp-common/vpp-translate-utils/src/main/yang/vpp-util.yang deleted file mode 100644 index f9d090c03..000000000 --- a/vpp-common/vpp-translate-utils/src/main/yang/vpp-util.yang +++ /dev/null @@ -1,37 +0,0 @@ -module vpp-util { - yang-version 1; - namespace "urn:honeycomb:params:xml:ns:yang:vpp:util"; - prefix "vpp-u"; - - import config { prefix config; revision-date 2013-04-05; } - import data-api { prefix dapi; revision-date 2016-04-11; } - - description - "This module contains utilities for vpp readers/writers"; - - revision "2016-04-06" { - description - "Initial revision."; - } - - identity naming-context { - base "config:service-type"; - config:java-class io.fd.honeycomb.translate.v3po.util.NamingContext; - } - - identity naming-context-impl { - base config:module-type; - config:provided-service naming-context; - } - - augment "/config:modules/config:module/config:configuration" { - case naming-context-impl { - when "/config:modules/config:module/config:type = 'naming-context-impl'"; - - leaf artificial-name-prefix { - type string; - } - } - } - -}
\ No newline at end of file diff --git a/vpp-integration/features/pom.xml b/vpp-integration/features/pom.xml deleted file mode 100644 index 9e8930dec..000000000 --- a/vpp-integration/features/pom.xml +++ /dev/null @@ -1,59 +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.vpp.integration</groupId> - <artifactId>vpp-integration-features</artifactId> - <version>1.0.0-SNAPSHOT</version> - <name>${project.artifactId}</name> - <modelVersion>4.0.0</modelVersion> - <prerequisites> - <maven>3.1.1</maven> - </prerequisites> - <dependencies> - <dependency> - <groupId>io.fd.honeycomb</groupId> - <artifactId>honeycomb-features</artifactId> - <version>${project.version}</version> - <classifier>features</classifier> - <type>xml</type> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>io.fd.honeycomb.vpp</groupId> - <artifactId>vpp-common-features</artifactId> - <version>${project.version}</version> - <classifier>features</classifier> - <type>xml</type> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>io.fd.honeycomb.v3po</groupId> - <artifactId>v3po-features</artifactId> - <version>${project.version}</version> - <classifier>features</classifier> - <type>xml</type> - <scope>runtime</scope> - </dependency> - </dependencies> -</project> diff --git a/vpp-integration/features/src/main/features/features.xml b/vpp-integration/features/src/main/features/features.xml deleted file mode 100644 index 3dcc7c67a..000000000 --- a/vpp-integration/features/src/main/features/features.xml +++ /dev/null @@ -1,46 +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-integration-${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"> - - <!-- infra --> - <repository>mvn:io.fd.honeycomb/honeycomb-features/${project.version}/xml/features</repository> - <!-- VPP HC plugin common code --> - <repository>mvn:io.fd.honeycomb.vpp/vpp-common-features/${project.version}/xml/features</repository> - <!-- V3PO plugin --> - <repository>mvn:io.fd.honeycomb.v3po/v3po-features/${project.version}/xml/features</repository> - - <feature name='honeycomb-vpp-integration-api' version='${project.version}' description='OpenDaylight :: v3po :: api'> - <feature version='${project.version}'>honeycomb-api</feature> - <feature version='${project.version}'>honeycomb-v3po-api</feature> - </feature> - - <feature name='honeycomb-vpp-integration' version='${project.version}' description='OpenDaylight :: v3po'> - <feature version='${project.version}'>honeycomb-vpp-integration-api</feature> - <feature version='${project.version}'>honeycomb</feature> - <feature version='${project.version}'>honeycomb-vpp-common</feature> - <feature version='${project.version}'>honeycomb-v3po</feature> - </feature> - - <feature name='honeycomb-vpp-integration-rest' version='${project.version}' description='OpenDaylight :: v3po :: rest'> - <feature version='${project.version}'>honeycomb-vpp-integration</feature> - <feature version='${project.version}'>honeycomb-rest</feature> - <feature version='${project.version}'>honeycomb-v3po</feature> - </feature> - -</features> diff --git a/vpp-integration/karaf/pom.xml b/vpp-integration/karaf/pom.xml deleted file mode 100644 index 1232e7375..000000000 --- a/vpp-integration/karaf/pom.xml +++ /dev/null @@ -1,92 +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.vpp.integration</groupId> - <artifactId>vpp-integration-karaf</artifactId> - <version>1.0.0-SNAPSHOT</version> - <name>${project.artifactId}</name> - <prerequisites> - <maven>3.1.1</maven> - </prerequisites> - <properties> - <karaf.localFeature>honeycomb-vpp-integration-rest</karaf.localFeature> - </properties> - - <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>io.fd.honeycomb</groupId> - <artifactId>honeycomb-features</artifactId> - <version>${project.version}</version> - <classifier>features</classifier> - <type>xml</type> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>io.fd.honeycomb.vpp</groupId> - <artifactId>vpp-common-features</artifactId> - <version>${project.version}</version> - <classifier>features</classifier> - <type>xml</type> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>io.fd.honeycomb.v3po</groupId> - <artifactId>v3po-features</artifactId> - <version>${project.version}</version> - <classifier>features</classifier> - <type>xml</type> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>io.fd.honeycomb.vpp.integration</groupId> - <artifactId>vpp-integration-features</artifactId> - <version>${project.version}</version> - <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/vpp-integration/pom.xml b/vpp-integration/pom.xml index e087abd86..741951b38 100644 --- a/vpp-integration/pom.xml +++ b/vpp-integration/pom.xml @@ -31,8 +31,6 @@ <maven>3.1.1</maven> </prerequisites> <modules> - <!--<module>features</module>--> - <!--<module>karaf</module>--> <module>minimal-distribution</module> </modules> <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build --> |