From 77fa76b4b15ec6d74920349f9a066ec4597b2585 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Tue, 16 Aug 2016 11:04:00 +0200 Subject: HONEYCOMB-22: Remove karaf based distribution and wiring Change-Id: I48aafb726de53b6ad3fb9b97c202f712dfa4a540 Signed-off-by: Maros Marsalek --- .../fd/honeycomb/impl/FakeBindingAwareBroker.java | 114 ++++++++++++++++++++ .../impl/NetconfMonitoringReaderFactory.java | 44 ++++++++ .../impl/rev141210/ContextDataBrokerModule.java | 26 ----- .../rev141210/ContextDataBrokerModuleFactory.java | 13 --- .../honeycomb/impl/rev141210/DataBrokerModule.java | 34 ------ .../impl/rev141210/DataBrokerModuleFactory.java | 13 --- .../honeycomb/impl/rev141210/HoneycombModule.java | 59 ----------- .../impl/rev141210/HoneycombModuleFactory.java | 28 ----- .../impl/rev141210/NetconfBindingBrokerModule.java | 117 --------------------- .../NetconfBindingBrokerModuleFactory.java | 13 --- .../rev141210/NetconfMonitoringReaderModule.java | 45 -------- .../NetconfMonitoringReaderModuleFactory.java | 13 --- 12 files changed, 158 insertions(+), 361 deletions(-) create mode 100644 infra/impl/src/main/java/io/fd/honeycomb/impl/FakeBindingAwareBroker.java create mode 100644 infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/ContextDataBrokerModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/DataBrokerModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfBindingBrokerModuleFactory.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModule.java delete mode 100644 infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/NetconfMonitoringReaderModuleFactory.java (limited to 'infra/impl/src/main/java') 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 getSALService(final Class aClass) { + return aClass.equals(DataBroker.class) + ? (T) netconfBindingBrokerDependency + : null; + } + + @Override + public T getRpcService(final Class 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 >> ListenerRegistration registerRouteChangeListener( + final L l) { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public T getRpcService(final Class aClass) { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public RpcRegistration addRpcImplementation(final Class aClass, final T t) + throws IllegalStateException { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public RoutedRpcRegistration addRoutedRpcImplementation( + final Class aClass, final T t) throws IllegalStateException { + throw new UnsupportedOperationException("Unsupported"); + } + + @Override + public T getSALService(final Class 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/HoneycombModuleFactory.java b/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java deleted file mode 100644 index 2e7b0956f..000000000 --- a/infra/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/honeycomb/impl/rev141210/HoneycombModuleFactory.java +++ /dev/null @@ -1,28 +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. - */ -/* -* 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 { - -} 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 getSALService(final Class aClass) { - return aClass.equals(DataBroker.class) - ? (T) netconfBindingBrokerDependency - : null; - } - - @Override - public T getRpcService(final Class 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 >> ListenerRegistration registerRouteChangeListener( - final L l) { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public T getRpcService(final Class aClass) { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public RpcRegistration addRpcImplementation(final Class aClass, final T t) - throws IllegalStateException { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public RoutedRpcRegistration addRoutedRpcImplementation( - final Class aClass, final T t) throws IllegalStateException { - throw new UnsupportedOperationException("Unsupported"); - } - - @Override - public T getSALService(final Class 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 { - -} -- cgit 1.2.3-korg