From bffaf3906c383141fe72cede16e9ea7d3306ea63 Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Mon, 4 Jun 2018 17:46:56 -0400 Subject: [PATCH] Remove CSS modules The CSS features are still installed until we can work out the ModuleInfoBackedContext/ClassLoaderStrategy situation that is currently provided by the ConfigManagerActivator. Change-Id: Id3b2cc287d17532482a2dd893c41e2dcd8d29ff0 Signed-off-by: Tom Pantelis Signed-off-by: Robert Varga --- .../config-netty/odl-config-netty/pom.xml | 23 +- .../src/main/feature/feature.xml | 15 - features/mdsal/odl-mdsal-broker-local/pom.xml | 31 +- .../src/main/feature/feature.xml | 3 - features/mdsal/odl-mdsal-broker/pom.xml | 13 - .../src/main/feature/feature.xml | 3 - opendaylight/blueprint/pom.xml | 11 - .../blueprint/BlueprintBundleTracker.java | 31 -- .../BlueprintContainerRestartServiceImpl.java | 154 +------- opendaylight/config/config-parent/pom.xml | 4 - opendaylight/md-sal/md-sal-config/pom.xml | 51 --- .../src/main/resources/initial/01-md-sal.xml | 343 ------------------ opendaylight/md-sal/mdsal-artifacts/pom.xml | 20 - .../mdsal/it/base/AbstractMdsalTestBase.java | 34 +- opendaylight/md-sal/messagebus-impl/pom.xml | 4 - opendaylight/md-sal/parent/pom.xml | 67 +--- opendaylight/md-sal/pom.xml | 8 - .../binding/impl/RootBindingAwareBroker.java | 1 + .../opendaylight/blueprint/binding-broker.xml | 21 +- .../md-sal/sal-binding-config/pom.xml | 72 ---- .../BindingAsyncDataBrokerImplModule.java | 47 --- ...ndingAsyncDataBrokerImplModuleFactory.java | 18 - .../binding/impl/BindingBrokerImplModule.java | 108 ------ .../impl/BindingBrokerImplModuleFactory.java | 27 -- .../BindingNotificationAdapterModule.java | 48 --- ...ndingNotificationAdapterModuleFactory.java | 18 - ...ndingNotificationPublishAdapterModule.java | 48 --- ...tificationPublishAdapterModuleFactory.java | 19 - .../md/sal/binding/impl/DummyDOMProvider.java | 27 -- .../impl/NotificationBrokerImplModule.java | 68 ---- .../NotificationBrokerImplModuleFactory.java | 18 - .../binding/impl/RuntimeMappingModule.java | 65 ---- .../impl/RuntimeMappingModuleFactory.java | 48 --- .../opendaylight-binding-broker-impl.yang | 263 -------------- .../opendaylight-md-sal-binding-v1-codec.yang | 27 -- .../yang/opendaylight-md-sal-binding.yang | 57 --- .../yang/actor-system-provider-service.yang | 19 - .../md-sal/sal-clustering-config/pom.xml | 5 - .../resources/initial/05-clustering.xml.conf | 123 ------- .../md-sal/sal-distributed-datastore/pom.xml | 12 +- .../akka}/impl/ActorSystemProviderImpl.java | 2 +- .../akka/impl}/AkkaConfigFactory.java | 2 +- .../osgi/impl}/BundleClassLoaderFactory.java | 2 +- .../QuarantinedMonitorActorPropsFactory.java | 2 +- .../impl/ActorSystemProviderModule.java | 88 ----- .../ActorSystemProviderModuleFactory.java | 44 --- .../DomConcurrentDataBrokerModule.java | 70 ---- .../DomConcurrentDataBrokerModuleFactory.java | 33 -- ...tributedConfigDataStoreProviderModule.java | 62 ---- ...dConfigDataStoreProviderModuleFactory.java | 38 -- ...tedOperationalDataStoreProviderModule.java | 63 ---- ...ationalDataStoreProviderModuleFactory.java | 37 -- .../blueprint/clustered-datastore.xml | 8 +- .../main/yang/actor-system-provider-impl.yang | 26 -- .../yang/distributed-datastore-provider.yang | 79 ---- .../src/main/yang/odl-sal-cds-cfg.yang | 41 --- .../md-sal/sal-dom-broker-config/pom.xml | 63 ---- .../md/sal/dom/impl/DomBrokerImplModule.java | 134 ------- .../dom/impl/DomBrokerImplModuleFactory.java | 40 -- .../dom/impl/DomInmemoryDataBrokerModule.java | 131 ------- .../DomInmemoryDataBrokerModuleFactory.java | 17 - .../SchemaServiceImplSingletonModule.java | 118 ------ ...hemaServiceImplSingletonModuleFactory.java | 50 --- .../pingpong/PingpongDataBrokerModule.java | 34 -- .../PingpongDataBrokerModuleFactory.java | 18 - .../yang/opendaylight-dom-broker-impl.yang | 224 ------------ .../yang/opendaylight-pingpong-broker.yang | 39 -- opendaylight/md-sal/sal-dom-config/pom.xml | 50 --- .../opendaylight-config-dom-datastore.yang | 22 -- .../main/yang/opendaylight-md-sal-common.yang | 71 ---- .../main/yang/opendaylight-md-sal-dom.yang | 38 -- ...pendaylight-operational-dom-datastore.yang | 22 -- .../md-sal/sal-inmemory-datastore/pom.xml | 5 - ...InMemoryConfigDataStoreProviderModule.java | 54 --- ...yConfigDataStoreProviderModuleFactory.java | 16 - ...oryOperationalDataStoreProviderModule.java | 55 --- ...ationalDataStoreProviderModuleFactory.java | 16 - ...ndaylight-inmemory-datastore-provider.yang | 105 ------ .../md-sal/sal-remoterpc-connector/pom.xml | 4 - .../clustering-test-app/provider/pom.xml | 4 + 80 files changed, 45 insertions(+), 3856 deletions(-) delete mode 100644 features/config-netty/odl-config-netty/src/main/feature/feature.xml delete mode 100644 opendaylight/md-sal/md-sal-config/pom.xml delete mode 100644 opendaylight/md-sal/md-sal-config/src/main/resources/initial/01-md-sal.xml delete mode 100644 opendaylight/md-sal/sal-binding-config/pom.xml delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModule.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModule.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModule.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModule.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/DummyDOMProvider.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModule.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-binding-broker-impl.yang delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding-v1-codec.yang delete mode 100644 opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding.yang delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/yang/actor-system-provider-service.yang delete mode 100644 opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/05-clustering.xml.conf rename opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/{config/yang/config/actor_system_provider => cluster/akka}/impl/ActorSystemProviderImpl.java (96%) rename opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/{config/yang/config/actor_system_provider/impl/factory => cluster/akka/impl}/AkkaConfigFactory.java (89%) rename opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/{config/yang/config/actor_system_provider/impl/factory/osgi => cluster/akka/osgi/impl}/BundleClassLoaderFactory.java (90%) rename opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/{config/yang/config/actor_system_provider/impl/factory/osgi => cluster/akka/osgi/impl}/QuarantinedMonitorActorPropsFactory.java (91%) delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModule.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModule.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/yang/actor-system-provider-impl.yang delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/main/yang/odl-sal-cds-cfg.yang delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/pom.xml delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModule.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModule.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModule.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-dom-broker-impl.yang delete mode 100644 opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-pingpong-broker.yang delete mode 100644 opendaylight/md-sal/sal-dom-config/pom.xml delete mode 100644 opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-config-dom-datastore.yang delete mode 100644 opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-common.yang delete mode 100644 opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-dom.yang delete mode 100644 opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-operational-dom-datastore.yang delete mode 100644 opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModule.java delete mode 100644 opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModule.java delete mode 100644 opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModuleFactory.java delete mode 100644 opendaylight/md-sal/sal-inmemory-datastore/src/main/yang/opendaylight-inmemory-datastore-provider.yang diff --git a/features/config-netty/odl-config-netty/pom.xml b/features/config-netty/odl-config-netty/pom.xml index bdfb932fef..c0bb29dd75 100644 --- a/features/config-netty/odl-config-netty/pom.xml +++ b/features/config-netty/odl-config-netty/pom.xml @@ -23,11 +23,6 @@ OpenDaylight :: Config-Netty - - etc/opendaylight/karaf - 00-netty.xml - - @@ -42,8 +37,8 @@ - ${project.groupId} - odl-config-netty-config-api + org.opendaylight.odlparent + odl-netty-4 xml features @@ -67,20 +62,6 @@ ${project.groupId} threadpool-config-impl - - ${project.groupId} - odl-config-startup - xml - features - - - - ${project.groupId} - config-netty-config - ${project.version} - xml - config - diff --git a/features/config-netty/odl-config-netty/src/main/feature/feature.xml b/features/config-netty/odl-config-netty/src/main/feature/feature.xml deleted file mode 100644 index 84b37487fe..0000000000 --- a/features/config-netty/odl-config-netty/src/main/feature/feature.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - mvn:org.opendaylight.controller/config-netty-config/${project.version}/xml/config - - - diff --git a/features/mdsal/odl-mdsal-broker-local/pom.xml b/features/mdsal/odl-mdsal-broker-local/pom.xml index c56df0c75d..92da77b5de 100644 --- a/features/mdsal/odl-mdsal-broker-local/pom.xml +++ b/features/mdsal/odl-mdsal-broker-local/pom.xml @@ -25,8 +25,6 @@ 0.9.0-SNAPSHOT - etc/opendaylight/karaf - 01-md-sal.xml @@ -59,13 +57,6 @@ pom import - - org.opendaylight.controller - config-artifacts - 0.9.0-SNAPSHOT - pom - import - org.opendaylight.controller mdsal-artifacts @@ -98,12 +89,14 @@ org.opendaylight.controller odl-config-startup + 0.9.0-SNAPSHOT xml features org.opendaylight.controller odl-config-netty + 0.9.0-SNAPSHOT xml features @@ -178,36 +171,16 @@ ${project.groupId} sal-connector-api - - ${project.groupId} - sal-dom-config - - - ${project.groupId} - sal-binding-config - ${project.groupId} sal-inmemory-datastore - - ${project.groupId} - sal-dom-broker-config - ${project.groupId} blueprint 0.9.0-SNAPSHOT - - - ${project.groupId} - md-sal-config - ${project.version} - xml - config - diff --git a/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml index 9301be6ee2..48dd0e7da5 100644 --- a/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml @@ -12,8 +12,5 @@ odl-yangtools-codec mvn:org.opendaylight.controller/sal-schema-service/${project.version} mvn:org.opendaylight.controller/blueprint/${blueprint.version} - - mvn:org.opendaylight.controller/md-sal-config/${project.version}/xml/config - diff --git a/features/mdsal/odl-mdsal-broker/pom.xml b/features/mdsal/odl-mdsal-broker/pom.xml index d9e3c2d135..feb13a329c 100644 --- a/features/mdsal/odl-mdsal-broker/pom.xml +++ b/features/mdsal/odl-mdsal-broker/pom.xml @@ -21,11 +21,6 @@ 1.8.0-SNAPSHOT feature - - etc/opendaylight/karaf - 05-clustering.xml - - ${project.groupId} @@ -41,14 +36,6 @@ xml features - - - ${project.groupId} - sal-clustering-config - ${project.version} - xml - config - ${project.groupId} diff --git a/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml index da9440f8ae..8474cc9b66 100644 --- a/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-broker/src/main/feature/feature.xml @@ -8,9 +8,6 @@ --> - - mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/config - mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/akkaconf diff --git a/opendaylight/blueprint/pom.xml b/opendaylight/blueprint/pom.xml index 3684d8162e..ceebb5be78 100644 --- a/opendaylight/blueprint/pom.xml +++ b/opendaylight/blueprint/pom.xml @@ -24,13 +24,6 @@ pom import - - org.opendaylight.controller - config-artifacts - 0.9.0-SNAPSHOT - pom - import - org.opendaylight.controller mdsal-artifacts @@ -67,10 +60,6 @@ org.opendaylight.controller sal-binding-api - - org.opendaylight.controller - config-manager-facade-xml - org.opendaylight.controller sal-core-api diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java index 08a8da0bb6..4d7780147c 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java @@ -22,7 +22,6 @@ import org.apache.aries.blueprint.services.BlueprintExtenderService; import org.apache.aries.quiesce.participant.QuiesceParticipant; import org.apache.aries.util.AriesFrameworkUtil; import org.opendaylight.controller.blueprint.ext.OpendaylightNamespaceHandler; -import org.opendaylight.controller.config.api.ConfigSystemService; import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; @@ -270,12 +269,6 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus restartService.close(); - // Close all CSS modules first. - ConfigSystemService configSystem = getOSGiService(ConfigSystemService.class); - if (configSystem != null) { - configSystem.closeAllConfigModules(); - } - LOG.info("Shutting down all blueprint containers..."); Collection containerBundles = new HashSet<>(Arrays.asList(bundleContext.getBundles())); @@ -371,28 +364,4 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus Bundle[] usingBundles = ref.getUsingBundles(); return usingBundles != null ? usingBundles.length : 0; } - - private T getOSGiService(final Class serviceInterface) { - try { - ServiceReference serviceReference = bundleContext.getServiceReference(serviceInterface); - if (serviceReference == null) { - LOG.warn("{} service reference not found", serviceInterface.getSimpleName()); - return null; - } - - T service = bundleContext.getService(serviceReference); - if (service == null) { - // This could happen on shutdown if the service was already unregistered so we log as debug. - LOG.debug("{} service instance was not found", serviceInterface.getSimpleName()); - } - - return service; - } catch (final IllegalStateException e) { - // This is thrown if the BundleContext is no longer valid which is possible on shutdown so we - // log as debug. - LOG.debug("Error obtaining OSGi service {}", serviceInterface.getSimpleName(), e); - } - - return null; - } } diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintContainerRestartServiceImpl.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintContainerRestartServiceImpl.java index 05a796843a..2b2af15df9 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintContainerRestartServiceImpl.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintContainerRestartServiceImpl.java @@ -7,12 +7,9 @@ */ package org.opendaylight.controller.blueprint; -import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import java.lang.management.ManagementFactory; -import java.util.AbstractMap.SimpleEntry; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; @@ -21,34 +18,14 @@ import java.util.Deque; import java.util.Hashtable; import java.util.LinkedHashSet; import java.util.List; -import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; -import javax.management.InstanceNotFoundException; -import javax.management.ObjectName; -import javax.xml.parsers.ParserConfigurationException; import org.apache.aries.blueprint.services.BlueprintExtenderService; import org.apache.aries.quiesce.participant.QuiesceParticipant; import org.apache.aries.util.AriesFrameworkUtil; -import org.opendaylight.controller.config.api.ConfigRegistry; -import org.opendaylight.controller.config.api.ConflictingVersionException; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.ValidationException; -import org.opendaylight.controller.config.facade.xml.ConfigExecution; -import org.opendaylight.controller.config.facade.xml.ConfigSubsystemFacade; -import org.opendaylight.controller.config.facade.xml.ConfigSubsystemFacadeFactory; -import org.opendaylight.controller.config.facade.xml.TestOption; -import org.opendaylight.controller.config.facade.xml.mapping.config.Config; -import org.opendaylight.controller.config.facade.xml.strategy.EditStrategyType; -import org.opendaylight.controller.config.util.ConfigRegistryJMXClient; -import org.opendaylight.controller.config.util.xml.DocumentedException; -import org.opendaylight.controller.config.util.xml.XmlElement; -import org.opendaylight.controller.config.util.xml.XmlMappingConstants; -import org.opendaylight.controller.config.util.xml.XmlUtil; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; @@ -57,8 +34,6 @@ import org.osgi.service.blueprint.container.BlueprintEvent; import org.osgi.service.blueprint.container.BlueprintListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Element; /** * Implementation of the BlueprintContainerRestartService. @@ -68,9 +43,6 @@ import org.w3c.dom.Element; class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintContainerRestartService { private static final Logger LOG = LoggerFactory.getLogger(BlueprintContainerRestartServiceImpl.class); private static final int CONTAINER_CREATE_TIMEOUT_IN_MINUTES = 5; - private static final String CONFIG_MODULE_NAMESPACE_PROP = "config-module-namespace"; - private static final String CONFIG_MODULE_NAME_PROP = "config-module-name"; - private static final String CONFIG_INSTANCE_NAME_PROP = "config-instance-name"; private final ExecutorService restartExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder() .setDaemon(true).setNameFormat("BlueprintContainerRestartService").build()); @@ -117,8 +89,7 @@ class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintCo // We use a LinkedHashSet to preserve insertion order as we walk the service usage hierarchy. Set containerBundlesSet = new LinkedHashSet<>(); - List> configModules = new ArrayList<>(); - findDependentContainersRecursively(forBundle, containerBundlesSet, configModules); + findDependentContainersRecursively(forBundle, containerBundlesSet); List containerBundles = new ArrayList<>(containerBundlesSet); @@ -165,9 +136,6 @@ class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintCo AriesFrameworkUtil.safeUnregisterService(eventHandlerReg); - // Now restart any associated config system Modules. - restartConfigModules(forBundle.getBundleContext(), configModules); - LOG.info("Finished restarting blueprint containers for bundle {} and its dependent bundles", forBundle); } @@ -227,90 +195,14 @@ class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintCo }); } - private void restartConfigModules(final BundleContext bundleContext, final List> configModules) { - if (configModules.isEmpty()) { - return; - } - - ServiceReference configFacadeFactoryRef = bundleContext - .getServiceReference(ConfigSubsystemFacadeFactory.class); - if (configFacadeFactoryRef == null) { - LOG.debug("ConfigSubsystemFacadeFactory service reference not found"); - return; - } - - ConfigSubsystemFacadeFactory configFacadeFactory = bundleContext.getService(configFacadeFactoryRef); - if (configFacadeFactory == null) { - LOG.debug("ConfigSubsystemFacadeFactory service not found"); - return; - } - - try (ConfigSubsystemFacade configFacade = configFacadeFactory.createFacade( - "BlueprintContainerRestartService")) { - restartConfigModules(configModules, configFacade); - } catch (ParserConfigurationException | DocumentedException | ValidationException - | ConflictingVersionException e) { - LOG.error("Error restarting config modules", e); - } finally { - bundleContext.ungetService(configFacadeFactoryRef); - } - - } - - private void restartConfigModules(final List> configModules, - final ConfigSubsystemFacade configFacade) throws ParserConfigurationException, DocumentedException, - ValidationException, ConflictingVersionException { - - Document document = XmlUtil.newDocument(); - Element dataElement = XmlUtil.createElement(document, XmlMappingConstants.DATA_KEY, Optional.absent()); - Element modulesElement = XmlUtil.createElement(document, XmlMappingConstants.MODULES_KEY, - Optional.of(XmlMappingConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG)); - dataElement.appendChild(modulesElement); - - Config configMapping = configFacade.getConfigMapping(); - - ConfigRegistry configRegistryClient = new ConfigRegistryJMXClient(ManagementFactory.getPlatformMBeanServer()); - for (Entry entry : configModules) { - String moduleNamespace = entry.getKey(); - ModuleIdentifier moduleId = entry.getValue(); - try { - ObjectName instanceON = configRegistryClient.lookupConfigBean(moduleId.getFactoryName(), - moduleId.getInstanceName()); - - LOG.debug("Found config module instance ObjectName: {}", instanceON); - - Element moduleElement = configMapping.moduleToXml(moduleNamespace, moduleId.getFactoryName(), - moduleId.getInstanceName(), instanceON, document); - modulesElement.appendChild(moduleElement); - } catch (final InstanceNotFoundException e) { - LOG.warn("Error looking up config module: namespace {}, module name {}, instance {}", - moduleNamespace, moduleId.getFactoryName(), moduleId.getInstanceName(), e); - } - } - - if (LOG.isDebugEnabled()) { - LOG.debug("Pushing config xml: {}", XmlUtil.toString(dataElement)); - } - - ConfigExecution execution = new ConfigExecution(configMapping, XmlElement.fromDomElement(dataElement), - TestOption.testThenSet, EditStrategyType.recreate); - configFacade.executeConfigExecution(execution); - configFacade.commitSilentTransaction(); - } - /** * Recursively finds the services registered by the given bundle and the bundles using those services. - * User bundles that have an associated blueprint container are added to containerBundles. In addition, - * if a registered service has an associated config system Module, as determined via the presence of - * certain service properties, the ModuleIdentifier is added to the configModules list. + * User bundles that have an associated blueprint container are added to containerBundles. * * @param bundle the bundle to traverse * @param containerBundles the current set of bundles containing blueprint containers - * @param configModules the current set of bundles containing config modules */ - private void findDependentContainersRecursively(final Bundle bundle, final Set containerBundles, - final List> configModules) { + private void findDependentContainersRecursively(final Bundle bundle, final Set containerBundles) { if (!containerBundles.add(bundle)) { // Already seen this bundle... return; @@ -319,13 +211,11 @@ class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintCo ServiceReference[] references = bundle.getRegisteredServices(); if (references != null) { for (ServiceReference reference : references) { - possiblyAddConfigModuleIdentifier(reference, configModules); - Bundle[] usingBundles = reference.getUsingBundles(); if (usingBundles != null) { for (Bundle usingBundle : usingBundles) { if (blueprintExtenderService.getContainer(usingBundle) != null) { - findDependentContainersRecursively(usingBundle, containerBundles, configModules); + findDependentContainersRecursively(usingBundle, containerBundles); } } } @@ -333,42 +223,6 @@ class BlueprintContainerRestartServiceImpl implements AutoCloseable, BlueprintCo } } - private void possiblyAddConfigModuleIdentifier(final ServiceReference reference, - final List> configModules) { - Object moduleNamespace = reference.getProperty(CONFIG_MODULE_NAMESPACE_PROP); - if (moduleNamespace == null) { - return; - } - - String moduleName = getRequiredConfigModuleProperty(CONFIG_MODULE_NAME_PROP, moduleNamespace, - reference); - String instanceName = getRequiredConfigModuleProperty(CONFIG_INSTANCE_NAME_PROP, moduleNamespace, - reference); - if (moduleName == null || instanceName == null) { - return; - } - - LOG.debug("Found service with config module: namespace {}, module name {}, instance {}", - moduleNamespace, moduleName, instanceName); - - configModules.add(new SimpleEntry<>(moduleNamespace.toString(), - new ModuleIdentifier(moduleName, instanceName))); - } - - @Nullable - private String getRequiredConfigModuleProperty(final String propName, final Object moduleNamespace, - final ServiceReference reference) { - Object value = reference.getProperty(propName); - if (value == null) { - LOG.warn( - "OSGi service with {} property is missing property {} therefore the config module can't be restarted", - CONFIG_MODULE_NAMESPACE_PROP, propName); - return null; - } - - return value.toString(); - } - private ServiceRegistration registerEventHandler(final BundleContext bundleContext, final BlueprintListener listener) { return bundleContext.registerService(BlueprintListener.class.getName(), listener, new Hashtable<>()); diff --git a/opendaylight/config/config-parent/pom.xml b/opendaylight/config/config-parent/pom.xml index af981aed03..4096ec932a 100644 --- a/opendaylight/config/config-parent/pom.xml +++ b/opendaylight/config/config-parent/pom.xml @@ -71,10 +71,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller config-api - - org.opendaylight.controller - sal-binding-config - diff --git a/opendaylight/md-sal/md-sal-config/pom.xml b/opendaylight/md-sal/md-sal-config/pom.xml deleted file mode 100644 index be756ad855..0000000000 --- a/opendaylight/md-sal/md-sal-config/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - 4.0.0 - - org.opendaylight.odlparent - odlparent-lite - 3.1.0 - - - - org.opendaylight.controller - md-sal-config - 1.8.0-SNAPSHOT - Configuration files for md-sal - jar - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/initial/01-md-sal.xml - xml - config - - - - - - - - - diff --git a/opendaylight/md-sal/md-sal-config/src/main/resources/initial/01-md-sal.xml b/opendaylight/md-sal/md-sal-config/src/main/resources/initial/01-md-sal.xml deleted file mode 100644 index 1464f8b0ab..0000000000 --- a/opendaylight/md-sal/md-sal-config/src/main/resources/initial/01-md-sal.xml +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - prefix:schema-service-singleton - yang-schema-service - - - prefix:runtime-generated-mapping - runtime-mapping-singleton - true - - - prefix:binding-notification-adapter - binding-notification-adapter - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - dom:dom-broker-osgi-registry - dom-broker - - - - - prefix:binding-notification-publish-adapter - binding-notification-publish-adapter - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - dom:dom-broker-osgi-registry - dom-broker - - - - - prefix:binding-notification-broker - binding-notification-broker - - prefix:binding-new-notification-service - binding-notification-adapter - - - prefix:binding-new-notification-publish-service - binding-notification-publish-adapter - - - - prefix:binding-broker-impl - binding-broker-impl - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - dom:dom-broker-osgi-registry - dom-broker - - - binding:binding-notification-service - binding-notification-broker - - - binding:binding-async-data-broker - binding-data-broker - - - binding-impl:binding-new-notification-publish-service - binding-notification-publish-adapter - - - - - - - prefix:inmemory-config-datastore-provider - config-store-service - - - dom:schema-service - yang-schema-service - - - - - - prefix:inmemory-operational-datastore-provider - operational-store-service - - - dom:schema-service - yang-schema-service - - - - - - - prefix:pingpong-data-broker - pingpong-data-broker - - dom:dom-async-data-broker - inmemory-data-broker - - - - prefix:binding-forwarded-data-broker - pingpong-binding-data-broker - - - dom:dom-async-data-broker - pingpong-broker - - - dom:schema-service - yang-schema-service - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - - - - - prefix:dom-inmemory-data-broker - inmemory-data-broker - - - dom:schema-service - yang-schema-service - - - - config-dom-store-spi:config-dom-datastore - config-store-service - - - - operational-dom-store-spi:operational-dom-datastore - operational-store-service - - - - prefix:dom-broker-impl - inmemory-dom-broker - - dom:dom-async-data-broker - inmemory-data-broker - - - - prefix:binding-forwarded-data-broker - binding-async-data-broker - - - dom:dom-async-data-broker - inmemory-data-broker - - - dom:schema-service - yang-schema-service - - - binding:binding-dom-mapping-service - runtime-mapping-singleton - - - - - - - dom:schema-service - - yang-schema-service - /modules/module[type='schema-service-singleton'][name='yang-schema-service'] - - - - dom:yang-text-source-provider - - yang-text-source-provider - /modules/module[type='schema-service-singleton'][name='yang-schema-service'] - - - - - config-dom-store-spi:config-dom-datastore - - config-store-service - /modules/module[type='inmemory-config-datastore-provider'][name='config-store-service'] - - - - operational-dom-store-spi:operational-dom-datastore - - operational-store-service - /modules/module[type='inmemory-operational-datastore-provider'][name='operational-store-service'] - - - - binding-impl:binding-dom-mapping-service - - runtime-mapping-singleton - /modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton'] - - - - binding:binding-codec-tree-factory - - runtime-mapping-singleton - /modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton'] - - - - binding:binding-normalized-node-serializer - - runtime-mapping-singleton - /modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton'] - - - - binding:binding-v1-codec-tree-factory - - runtime-mapping-singleton - /modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton'] - - - - binding:binding-v1-normalized-node-serializer - - runtime-mapping-singleton - /modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton'] - - - - binding-impl:binding-new-notification-service - - binding-notification-adapter - /modules/module[type='binding-notification-adapter'][name='binding-notification-adapter'] - - - - binding-impl:binding-new-notification-publish-service - - binding-notification-publish-adapter - /modules/module[type='binding-notification-publish-adapter'][name='binding-notification-publish-adapter'] - - - - binding:binding-notification-service - - binding-notification-broker - /modules/module[type='binding-notification-broker'][name='binding-notification-broker'] - - - - binding:binding-broker-osgi-registry - - binding-osgi-broker - /modules/module[type='binding-broker-impl'][name='binding-broker-impl'] - - - - binding:binding-rpc-registry - - binding-rpc-broker - /modules/module[type='binding-broker-impl'][name='binding-broker-impl'] - - - - - dom:dom-broker-osgi-registry - - dom-broker - /modules/module[type='dom-broker-impl'][name='inmemory-dom-broker'] - - - - - binding:binding-async-data-broker - - binding-data-broker - /modules/module[type='binding-forwarded-data-broker'][name='binding-async-data-broker'] - - - pingpong-binding-data-broker - /modules/module[type='binding-forwarded-data-broker'][name='pingpong-binding-data-broker'] - - - - - dom:dom-async-data-broker - - inmemory-data-broker - /modules/module[type='dom-inmemory-data-broker'][name='inmemory-data-broker'] - - - pingpong-broker - /modules/module[type='pingpong-data-broker'][name='pingpong-data-broker'] - - - - - - - - urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?module=netty-event-executor&revision=2013-11-12 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl?module=opendaylight-sal-binding-broker-impl&revision=2013-10-28 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:pingpong?module=opendaylight-pingpong-broker&revision=2014-11-07 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?module=opendaylight-sal-dom-broker-impl&revision=2013-10-28 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:common?module=opendaylight-md-sal-common&revision=2013-10-28 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store?module=opendaylight-config-dom-datastore&revision=2014-06-17 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store?module=opendaylight-operational-dom-datastore&revision=2014-06-17 - urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider?module=opendaylight-inmemory-datastore-provider&revision=2014-06-17 - - - diff --git a/opendaylight/md-sal/mdsal-artifacts/pom.xml b/opendaylight/md-sal/mdsal-artifacts/pom.xml index 44901d694a..4827669e53 100644 --- a/opendaylight/md-sal/mdsal-artifacts/pom.xml +++ b/opendaylight/md-sal/mdsal-artifacts/pom.xml @@ -86,26 +86,6 @@ sal-inmemory-datastore ${project.version} - - ${project.groupId} - sal-dom-config - ${project.version} - - - ${project.groupId} - sal-dom-broker-config - ${project.version} - - - ${project.groupId} - sal-binding-config - ${project.version} - - - ${project.groupId} - md-sal-config - ${project.version} - ${project.groupId} sal-schema-service diff --git a/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java b/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java index d553fde041..a5fc65130b 100644 --- a/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java +++ b/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java @@ -20,9 +20,6 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRunti import java.io.File; import javax.inject.Inject; import org.junit.Before; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; -import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.OptionUtils; @@ -34,7 +31,7 @@ import org.osgi.framework.BundleContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class AbstractMdsalTestBase implements BindingAwareProvider { +public abstract class AbstractMdsalTestBase { private static final Logger LOG = LoggerFactory.getLogger(AbstractMdsalTestBase.class); private static final String MAVEN_REPO_LOCAL = "maven.repo.local"; @@ -46,7 +43,6 @@ public abstract class AbstractMdsalTestBase implements BindingAwareProvider { private static final String KARAF_DEBUG_PORT = "5005"; private static final String KARAF_DEBUG_PROP = "karaf.debug"; private static final String KEEP_UNPACK_DIRECTORY_PROP = "karaf.keep.unpack"; - private static final int REGISTRATION_TIMEOUT = 70000; /* * Default values for karaf distro type, groupId, and artifactId @@ -59,7 +55,6 @@ public abstract class AbstractMdsalTestBase implements BindingAwareProvider { * Property names to override defaults for karaf distro artifactId, groupId, * version, and type */ - private static final String KARAF_DISTRO_VERSION_PROP = "karaf.distro.version"; private static final String KARAF_DISTRO_TYPE_PROP = "karaf.distro.type"; private static final String KARAF_DISTRO_ARTIFACTID_PROP = "karaf.distro.artifactId"; private static final String KARAF_DISTRO_GROUPID_PROP = "karaf.distro.groupId"; @@ -68,40 +63,13 @@ public abstract class AbstractMdsalTestBase implements BindingAwareProvider { @Inject @Filter(timeout = 60000) private BundleContext context; - @Inject @Filter(timeout = 60000) - private BindingAwareBroker broker; - private ProviderContext session = null; - - public ProviderContext getSession() { - return session; - } public abstract MavenUrlReference getFeatureRepo(); public abstract String getFeatureName(); - @Override - public void onSessionInitiated(ProviderContext session) { - LOG.info("Session Initiated: {}",session); - this.session = session; - } - @Before public void setup() throws Exception { - long start = System.nanoTime(); - broker.registerProvider(this); - for (int i = 0; i < REGISTRATION_TIMEOUT; i++) { - if (session != null) { - long stop = System.nanoTime(); - LOG.info("Registered session {} with the MD-SAL after {} ns", - session, - stop - start); - return; - } else { - Thread.sleep(1); - } - } - throw new RuntimeException("Session not initiated after " + REGISTRATION_TIMEOUT + " ms"); } public Option getLoggingOption() { diff --git a/opendaylight/md-sal/messagebus-impl/pom.xml b/opendaylight/md-sal/messagebus-impl/pom.xml index bae2ad723d..d1573e498a 100644 --- a/opendaylight/md-sal/messagebus-impl/pom.xml +++ b/opendaylight/md-sal/messagebus-impl/pom.xml @@ -29,10 +29,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.controller sal-binding-api - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller sal-core-api diff --git a/opendaylight/md-sal/parent/pom.xml b/opendaylight/md-sal/parent/pom.xml index ae3f5bb7b1..abf36a3cd9 100644 --- a/opendaylight/md-sal/parent/pom.xml +++ b/opendaylight/md-sal/parent/pom.xml @@ -20,10 +20,6 @@ 1.8.0-SNAPSHOT pom - - ${project.build.directory}/generated-sources/config-binding - - @@ -33,13 +29,6 @@ pom import - - org.opendaylight.controller - config-artifacts - 0.9.0-SNAPSHOT - pom - import - @@ -48,65 +37,19 @@ org.opendaylight.yangtools yang-common + + org.osgi + org.osgi.core + org.opendaylight.controller config-api + 0.9.0-SNAPSHOT - - org.opendaylight.yangtools - yang-maven-plugin - 2.0.5 - - - org.opendaylight.controller - yang-jmx-generator-plugin - 0.9.0-SNAPSHOT - - - - - config - - generate-sources - - - - - org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator - ${jmxGeneratorPath} - - urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang - - - - true - - - - - - maven-clean-plugin - - - - ${jmxGeneratorPath} - - ** - - - - ${salGeneratorPath} - - ** - - - - - org.apache.maven.plugins maven-checkstyle-plugin diff --git a/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index dd404d945c..054ba2cd71 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -36,14 +36,6 @@ sal-binding-util - - sal-dom-config - sal-dom-broker-config - sal-binding-config - - - md-sal-config - samples diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RootBindingAwareBroker.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RootBindingAwareBroker.java index 950384eb8e..95204ceabf 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RootBindingAwareBroker.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RootBindingAwareBroker.java @@ -34,6 +34,7 @@ import org.osgi.framework.BundleContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@Deprecated public class RootBindingAwareBroker implements Mutable, Identifiable, BindingAwareBroker, AutoCloseable, RpcProviderRegistry { diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/resources/org/opendaylight/blueprint/binding-broker.xml b/opendaylight/md-sal/sal-binding-broker/src/main/resources/org/opendaylight/blueprint/binding-broker.xml index 55d589428d..2595420c84 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/resources/org/opendaylight/blueprint/binding-broker.xml +++ b/opendaylight/md-sal/sal-binding-broker/src/main/resources/org/opendaylight/blueprint/binding-broker.xml @@ -26,13 +26,7 @@ - - - - - - - + @@ -135,4 +129,17 @@ + + + + + + + + + + + + diff --git a/opendaylight/md-sal/sal-binding-config/pom.xml b/opendaylight/md-sal/sal-binding-config/pom.xml deleted file mode 100644 index 13bf461ade..0000000000 --- a/opendaylight/md-sal/sal-binding-config/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - 4.0.0 - - org.opendaylight.controller - mdsal-parent - 1.8.0-SNAPSHOT - ../parent - - - sal-binding-config - 1.8.0-SNAPSHOT - bundle - - - - true - - - - - org.opendaylight.controller - sal-binding-api - - - org.opendaylight.controller - sal-dom-config - - - org.opendaylight.controller - sal-binding-broker-impl - - - org.opendaylight.mdsal - mdsal-binding-dom-codec - - - org.opendaylight.mdsal.model - ietf-yang-types-20130715 - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - ${project.groupId}.${project.artifactId} - - {local-packages}, - org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.impl.rev131028.*, - org.opendaylight.controller.config.yang.md.sal.binding.impl - - - - - - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - - - diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModule.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModule.java deleted file mode 100644 index 92b8d0ca8c..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModule.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2015 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 - */ - -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter; -import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class BindingAsyncDataBrokerImplModule extends AbstractBindingAsyncDataBrokerImplModule { - - public BindingAsyncDataBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public BindingAsyncDataBrokerImplModule( - final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final BindingAsyncDataBrokerImplModule oldModule, - final 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 BindingToNormalizedNodeCodec mappingService = getBindingMappingServiceDependency(); - final DOMDataBroker domDataBroker = getDomAsyncBrokerDependency(); - return new BindingDOMDataBrokerAdapter(domDataBroker, mappingService); - } -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModuleFactory.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModuleFactory.java deleted file mode 100644 index 5956d78cd3..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingAsyncDataBrokerImplModuleFactory.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2015 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class BindingAsyncDataBrokerImplModuleFactory extends AbstractBindingAsyncDataBrokerImplModuleFactory { - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModule.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModule.java deleted file mode 100644 index f9a64ab071..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModule.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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 - */ -/** - * Generated file - - * Generated from: yang module name: opendaylight-sal-binding-broker-impl yang module local name: binding-broker-impl - * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator - * Generated at: Wed Nov 20 17:33:01 CET 2013 - * - * Do not modify this file unless it is present under src/main directory - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import org.opendaylight.controller.md.sal.binding.api.MountPointService; -import org.opendaylight.controller.md.sal.binding.compat.HeliumRpcProviderRegistry; -import org.opendaylight.controller.md.sal.binding.impl.BindingDOMMountPointServiceAdapter; -import org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcProviderServiceAdapter; -import org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter; -import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService; -import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService; -import org.opendaylight.controller.md.sal.dom.api.DOMRpcService; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; -import org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker; -import org.opendaylight.controller.sal.core.api.Broker; -import org.opendaylight.controller.sal.core.api.Broker.ProviderSession; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public final class BindingBrokerImplModule extends - org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingBrokerImplModule { - - public BindingBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public BindingBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final BindingBrokerImplModule oldModule, final java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void validate() { - super.validate(); - } - - @Override - public RootBindingAwareBroker createInstance() { - final Broker domBroker = getDomAsyncBrokerDependency(); - final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency(); - final ProviderSession session = domBroker.registerProvider(new DummyDOMProvider()); - - final MountPointService mount = createMountPointAdapter(codec,session); - final BindingDOMRpcServiceAdapter rpcConsumer = createRpcConsumer(codec,session); - final BindingDOMRpcProviderServiceAdapter rpcProvider = createRpcProvider(codec,session); - final RootBindingAwareBroker broker = new RootBindingAwareBroker(getIdentifier().getInstanceName()); - final RpcProviderRegistry heliumRpcBroker = new HeliumRpcProviderRegistry(rpcConsumer, rpcProvider); - - broker.setNotificationBroker(getNotificationServiceDependency()); - if (getNotificationPublishServiceDependency() != null) { - broker.setNotificationPublishService(getNotificationPublishServiceDependency()); - } - broker.setRpcBroker(heliumRpcBroker); - broker.setDataBroker(getRootDataBrokerDependency()); - broker.setMountService(mount); - broker.start(); - return broker; - } - - private BindingDOMRpcProviderServiceAdapter createRpcProvider(final BindingToNormalizedNodeCodec codec, - final ProviderSession session) { - final DOMRpcProviderService domService = session.getService(DOMRpcProviderService.class); - if (domService != null) { - return new BindingDOMRpcProviderServiceAdapter(domService, codec); - } - return null; - } - - private BindingDOMRpcServiceAdapter createRpcConsumer(final BindingToNormalizedNodeCodec codec, - final ProviderSession session) { - final DOMRpcService domService = session.getService(DOMRpcService.class); - if (domService != null) { - return new BindingDOMRpcServiceAdapter(domService, codec); - } - return null; - } - - private MountPointService createMountPointAdapter(final BindingToNormalizedNodeCodec codec, - final ProviderSession session) { - final DOMMountPointService domService = session.getService(DOMMountPointService.class); - if (domService != null) { - return new BindingDOMMountPointServiceAdapter(domService, codec); - } - return null; - } - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModuleFactory.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModuleFactory.java deleted file mode 100644 index e655373302..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplModuleFactory.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 - */ -/** -* Generated file - -* Generated from: yang module name: opendaylight-sal-binding-broker-impl yang module local name: binding-broker-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Nov 20 17:33:01 CET 2013 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class BindingBrokerImplModuleFactory extends AbstractBindingBrokerImplModuleFactory { - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModule.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModule.java deleted file mode 100644 index a076163262..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModule.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2015 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter; -import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService; -import org.opendaylight.controller.sal.core.api.Broker; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class BindingNotificationAdapterModule extends AbstractBindingNotificationAdapterModule { - public BindingNotificationAdapterModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public BindingNotificationAdapterModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver, final BindingNotificationAdapterModule oldModule, - final 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 BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency(); - final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider()); - final DOMNotificationService notifService = session.getService(DOMNotificationService.class); - return new BindingDOMNotificationServiceAdapter(codec.getCodecRegistry(), notifService); - } - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModuleFactory.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModuleFactory.java deleted file mode 100644 index 1a28e80f97..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationAdapterModuleFactory.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2015 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class BindingNotificationAdapterModuleFactory extends AbstractBindingNotificationAdapterModuleFactory { - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModule.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModule.java deleted file mode 100644 index e394d66a63..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModule.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2015 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -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.api.DOMNotificationPublishService; -import org.opendaylight.controller.sal.core.api.Broker; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class BindingNotificationPublishAdapterModule extends AbstractBindingNotificationPublishAdapterModule { - public BindingNotificationPublishAdapterModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public BindingNotificationPublishAdapterModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver, final BindingNotificationPublishAdapterModule oldModule, - final AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public AutoCloseable createInstance() { - final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency(); - final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider()); - final DOMNotificationPublishService publishService = session.getService(DOMNotificationPublishService.class); - return new BindingDOMNotificationPublishServiceAdapter(codec, publishService); - } - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModuleFactory.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModuleFactory.java deleted file mode 100644 index 59fec8cbd1..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingNotificationPublishAdapterModuleFactory.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2015 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class BindingNotificationPublishAdapterModuleFactory - extends AbstractBindingNotificationPublishAdapterModuleFactory { - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/DummyDOMProvider.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/DummyDOMProvider.java deleted file mode 100644 index ca3054e692..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/DummyDOMProvider.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2015 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import java.util.Collection; -import java.util.Collections; -import org.opendaylight.controller.sal.core.api.Broker.ProviderSession; -import org.opendaylight.controller.sal.core.api.Provider; - -class DummyDOMProvider implements Provider { - - @Override - @Deprecated - public Collection getProviderFunctionality() { - return Collections.emptyList(); - } - - @Override - public void onSessionInitiated(ProviderSession session) { - // NOOP - } -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModule.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModule.java deleted file mode 100644 index 6016c4a93c..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModule.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.md.sal.binding.api.NotificationService; -import org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceAdapter; -import org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceWithInterestListeners; -import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter; -import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter; -import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService; -import org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public final class NotificationBrokerImplModule extends - org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractNotificationBrokerImplModule { - - public NotificationBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public NotificationBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final NotificationBrokerImplModule oldModule, final java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void validate() { - super.validate(); - // Add custom validation for module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - return createHeliumAdapter(getNotificationPublishAdapterDependency(), getNotificationAdapterDependency()); - } - - private static AutoCloseable createHeliumAdapter(final NotificationPublishService publishService, - final NotificationService listenService) { - if (listenService instanceof BindingDOMNotificationServiceAdapter - && publishService instanceof BindingDOMNotificationPublishServiceAdapter) { - final BindingDOMNotificationPublishServiceAdapter castedPublish = - (BindingDOMNotificationPublishServiceAdapter) publishService; - final BindingDOMNotificationServiceAdapter castedListen = - (BindingDOMNotificationServiceAdapter) listenService; - final DOMNotificationPublishService domPublishService = castedPublish.getDomPublishService(); - if (domPublishService instanceof DOMNotificationSubscriptionListenerRegistry) { - final DOMNotificationSubscriptionListenerRegistry subsRegistry = - (DOMNotificationSubscriptionListenerRegistry) domPublishService; - return new HeliumNotificationProviderServiceWithInterestListeners(castedPublish, castedListen, - subsRegistry); - } - } - return new HeliumNotificationProviderServiceAdapter(publishService, listenService); - } -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModuleFactory.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModuleFactory.java deleted file mode 100644 index 856916ede9..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/NotificationBrokerImplModuleFactory.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class NotificationBrokerImplModuleFactory extends AbstractNotificationBrokerImplModuleFactory { - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java deleted file mode 100644 index ba264635a0..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModule.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import com.google.common.base.Preconditions; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; -import org.osgi.framework.BundleContext; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public final class RuntimeMappingModule extends AbstractRuntimeMappingModule { - private BundleContext bundleContext; - - public RuntimeMappingModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public RuntimeMappingModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final RuntimeMappingModule oldModule, final java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void validate() { - super.validate(); - Preconditions.checkNotNull(bundleContext); - // Add custom validation for module attributes here. - } - - @Override - public boolean canReuseInstance(final AbstractRuntimeMappingModule oldModule) { - return true; - } - - @Override - public AutoCloseable createInstance() { - // We need to return the concrete BindingToNormalizedNodeCodec instance for backwards compatibility - // for CSS users that inject the binding-dom-mapping-service. - final WaitingServiceTracker tracker = - WaitingServiceTracker.create(BindingToNormalizedNodeCodec.class, bundleContext); - final BindingToNormalizedNodeCodec service = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - - // Ideally we would close the ServiceTracker via the returned AutoCloseable but then we'd have to - // proxy the BindingToNormalizedNodeCodec instance which is problematic. It's OK to close the - // ServiceTracker here. - tracker.close(); - return service; - } - - public void setBundleContext(final BundleContext bundleContext) { - this.bundleContext = bundleContext; - } -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModuleFactory.java b/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModuleFactory.java deleted file mode 100644 index 8eaf9d4492..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/RuntimeMappingModuleFactory.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.binding.impl; - -import static com.google.common.base.Preconditions.checkArgument; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.osgi.framework.BundleContext; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class RuntimeMappingModuleFactory extends - org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractRuntimeMappingModuleFactory { - - public static final String SINGLETON_NAME = "runtime-mapping-singleton"; - - @Override - public RuntimeMappingModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, - RuntimeMappingModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) { - checkArgument(SINGLETON_NAME.equals(instanceName), - "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME); - RuntimeMappingModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, oldInstance, - bundleContext); - // FIXME bundle context should not be passed around - module.setBundleContext(bundleContext); - return module; - } - - @Override - public RuntimeMappingModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, - BundleContext bundleContext) { - checkArgument(SINGLETON_NAME.equals(instanceName), - "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME); - RuntimeMappingModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext); - // FIXME bundle context should not be passed around - module.setBundleContext(bundleContext); - return module; - } -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-binding-broker-impl.yang b/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-binding-broker-impl.yang deleted file mode 100644 index a40acc87a0..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-binding-broker-impl.yang +++ /dev/null @@ -1,263 +0,0 @@ -module opendaylight-sal-binding-broker-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl"; - prefix "binding-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import opendaylight-md-sal-binding {prefix sal;} - import opendaylight-md-sal-binding-v1-codec {prefix v1codec;} - import opendaylight-md-sal-dom {prefix dom;} - import opendaylight-md-sal-common {prefix common;} - - description - "Service definition for Binding Aware MD-SAL."; - - revision "2013-10-28" { - description - "Initial revision"; - } - - identity binding-dom-mapping-service { - base config:service-type; - config:java-class "org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec"; - config:disable-osgi-service-registration; - } - - /* FIXME: move to opendaylight-md-sal-binding (cannot be there due to Class name confict with old implementation)*/ - identity binding-new-notification-service { - status deprecated; - base config:service-type; - config:java-class "org.opendaylight.controller.md.sal.binding.api.NotificationService"; - config:disable-osgi-service-registration; - } - - /* TODO: move to opendaylight-md-sal-binding (cannot be there due to Class name confict with old implementation)*/ - identity binding-new-notification-publish-service { - status deprecated; - base config:service-type; - config:java-class "org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"; - config:disable-osgi-service-registration; - } - - identity binding-broker-impl { - status deprecated; - base config:module-type; - config:provided-service sal:binding-broker-osgi-registry; - config:provided-service sal:binding-rpc-registry; - config:java-name-prefix BindingBrokerImpl; - } - - identity binding-forwarded-data-broker { - status deprecated; - base config:module-type; - config:provided-service sal:binding-async-data-broker; - config:java-name-prefix BindingAsyncDataBrokerImpl; - } - - identity binding-notification-broker { - status deprecated; - base config:module-type; - config:provided-service sal:binding-notification-service; - config:provided-service sal:binding-notification-subscription-service; - config:java-name-prefix NotificationBrokerImpl; - } - - identity runtime-generated-mapping { - status deprecated; - base config:module-type; - config:provided-service binding-dom-mapping-service; - config:provided-service sal:binding-codec-tree-factory; - config:provided-service sal:binding-normalized-node-serializer; - config:provided-service v1codec:binding-v1-codec-tree-factory; - config:provided-service v1codec:binding-v1-normalized-node-serializer; - config:java-name-prefix RuntimeMapping; - } - - identity binding-notification-adapter { - status deprecated; - base config:module-type; - config:provided-service binding-new-notification-service; - config:java-name-prefix BindingNotificationAdapter; - } - - identity binding-notification-publish-adapter { - status deprecated; - base config:module-type; - config:provided-service binding-new-notification-publish-service; - config:java-name-prefix BindingNotificationPublishAdapter; - } - - grouping dom-forwarding-component { - status deprecated; - container dom-async-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dom:dom-broker-osgi-registry; - } - } - } - - container binding-mapping-service { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity binding-dom-mapping-service; - } - } - } - } - - augment "/config:modules/config:module/config:configuration" { - case binding-broker-impl { - when "/config:modules/config:module/config:type = 'binding-broker-impl'"; - - /* - container rpc-registry { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity sal:binding-rpc-registry; - } - } - }*/ - container binding-broker-impl { - uses dom-forwarding-component; - - container notification-service { - status deprecated; - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:binding-notification-service; - } - } - } - - container root-data-broker { - status deprecated; - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:binding-async-data-broker; - } - } - } - - container notification-publish-service { - status deprecated; - uses config:service-ref { - refine type { - mandatory false; - config:required-identity binding-new-notification-publish-service; - } - refine name { - mandatory false; - } - } - } - } - } - } - - augment "/config:modules/config:module/config:configuration" { - case binding-forwarded-data-broker { - when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'"; - container binding-forwarded-data-broker { - container dom-async-broker { - status deprecated; - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dom:dom-async-data-broker; - } - } - } - - container binding-mapping-service { - status deprecated; - uses config:service-ref { - refine type { - mandatory true; - config:required-identity binding-dom-mapping-service; - } - } - } - - container schema-service { - status deprecated; - uses config:service-ref { - refine type { - mandatory true; - config:required-identity dom:schema-service; - } - } - } - } - } - } - - - augment "/config:modules/config:module/config:configuration" { - case runtime-generated-mapping { - when "/config:modules/config:module/config:type = 'runtime-generated-mapping'"; - leaf wait-for-schema { - status deprecated; - default "false"; - type boolean; - } - } - } - - augment "/config:modules/config:module/config:configuration" { - case binding-notification-broker { - when "/config:modules/config:module/config:type = 'binding-notification-broker'"; - container notification-adapter { - status deprecated; - uses config:service-ref { - refine type { - mandatory true; - config:required-identity binding-new-notification-service; - } - } - } - - container notification-publish-adapter { - status deprecated; - uses config:service-ref { - refine type { - mandatory true; - config:required-identity binding-new-notification-publish-service; - } - } - } - } - } - - augment "/config:modules/config:module/config:state" { - case binding-notification-broker { - when "/config:modules/config:module/config:type = 'binding-notification-broker'"; - uses common:notification-state; - } - } - - augment "/config:modules/config:module/config:configuration" { - case binding-notification-adapter { - when "/config:modules/config:module/config:type = 'binding-notification-adapter'"; - container binding-notification-adapter { - status deprecated; - uses dom-forwarding-component; - } - } - } - - augment "/config:modules/config:module/config:configuration" { - case binding-notification-publish-adapter { - when "/config:modules/config:module/config:type = 'binding-notification-publish-adapter'"; - container binding-notification-publish-adapter { - status deprecated; - uses dom-forwarding-component; - } - } - } -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding-v1-codec.yang b/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding-v1-codec.yang deleted file mode 100644 index c10af1c2ef..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding-v1-codec.yang +++ /dev/null @@ -1,27 +0,0 @@ -module opendaylight-md-sal-binding-v1-codec { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:v1:codec"; - prefix "md-sal-binding"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "Service definition for Binding Aware MD-SAL."; - - revision "2016-07-14" { - description - "Initial revision"; - } - identity binding-v1-codec-tree-factory { - base "config:service-type"; - config:java-class "org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory"; - config:disable-osgi-service-registration; - } - - identity binding-v1-normalized-node-serializer { - base "config:service-type"; - config:java-class "org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer"; - config:disable-osgi-service-registration; - } - -} diff --git a/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding.yang b/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding.yang deleted file mode 100644 index f52aa3480d..0000000000 --- a/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding.yang +++ /dev/null @@ -1,57 +0,0 @@ -module opendaylight-md-sal-binding { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding"; - prefix "md-sal-binding"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "Service definition for Binding Aware MD-SAL."; - - revision "2013-10-28" { - description - "Initial revision"; - } - - identity binding-broker-osgi-registry { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.BindingAwareBroker"; - } - - identity binding-async-data-broker { - base "config:service-type"; - config:java-class "org.opendaylight.controller.md.sal.binding.api.DataBroker"; - config:disable-osgi-service-registration; - } - - identity binding-rpc-registry { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"; - config:disable-osgi-service-registration; - } - - identity binding-notification-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.NotificationProviderService"; - config:disable-osgi-service-registration; - } - - identity binding-codec-tree-factory { - base "config:service-type"; - config:java-class "org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory"; - config:disable-osgi-service-registration; - } - - identity binding-normalized-node-serializer { - base "config:service-type"; - config:java-class "org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer"; - config:disable-osgi-service-registration; - } - - identity binding-notification-subscription-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.binding.api.NotificationService"; - config:disable-osgi-service-registration; - } - -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/yang/actor-system-provider-service.yang b/opendaylight/md-sal/sal-clustering-commons/src/main/yang/actor-system-provider-service.yang deleted file mode 100644 index 4f97c3ae52..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/yang/actor-system-provider-service.yang +++ /dev/null @@ -1,19 +0,0 @@ -module actor-system-provider-service { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service"; - prefix "actor-system"; - - import config { prefix config; revision-date 2013-04-05; } - - description "Akka actor system provider service definition"; - - revision "2015-10-05" { - description "Initial revision"; - } - - identity actor-system-provider-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.cluster.ActorSystemProvider"; - config:disable-osgi-service-registration; - } -} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-clustering-config/pom.xml b/opendaylight/md-sal/sal-clustering-config/pom.xml index 1ba41e7369..ec78665e35 100644 --- a/opendaylight/md-sal/sal-clustering-config/pom.xml +++ b/opendaylight/md-sal/sal-clustering-config/pom.xml @@ -36,11 +36,6 @@ package - - ${project.build.directory}/classes/initial/05-clustering.xml.conf - xml - config - ${project.build.directory}/classes/initial/akka.conf xml diff --git a/opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/05-clustering.xml.conf b/opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/05-clustering.xml.conf deleted file mode 100644 index 30efc61038..0000000000 --- a/opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/05-clustering.xml.conf +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - prefix:dom-concurrent-data-broker - concurrent-data-broker - - - dom:schema-service - yang-schema-service - - - - config-dom-store-spi:config-dom-datastore - distributed-config-store-service - - - - operational-dom-store-spi:operational-dom-datastore - distributed-operational-store-service - - - - - as:actor-system-provider-impl - actor-system-provider-impl - - - - prefix:distributed-operational-datastore-provider - distributed-operational-store-module - - dom:schema-service - yang-schema-service - - - as:actor-system-provider-service - actor-system-provider - - - false - 20 - - - - - prefix:distributed-config-datastore-provider - distributed-config-store-module - - dom:schema-service - yang-schema-service - - - as:actor-system-provider-service - actor-system-provider - - - 20 - - - - - - - - as:actor-system-provider-service - - actor-system-provider - /modules/module[type='actor-system-provider-impl'][name='actor-system-provider-impl'] - - - - config-dom-store-spi:config-dom-datastore - - distributed-config-store-service - /modules/module[type='distributed-config-datastore-provider'][name='distributed-config-store-module'] - - - - operational-dom-store-spi:operational-dom-datastore - - distributed-operational-store-service - /modules/module[type='distributed-operational-datastore-provider'][name='distributed-operational-store-module'] - - - - - - dom:dom-async-data-broker - - inmemory-data-broker - /modules/module[type='dom-concurrent-data-broker'][name='concurrent-data-broker'] - - - - - - - - urn:opendaylight:params:xml:ns:yang:controller:config:concurrent-data-broker?module=odl-concurrent-data-broker-cfg&revision=2014-11-24 - urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service?module=actor-system-provider-service&revision=2015-10-05 - urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:impl?module=actor-system-provider-impl&revision=2015-10-05 - urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider?module=distributed-datastore-provider&revision=2014-06-12 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store?module=opendaylight-config-dom-datastore&revision=2014-06-17 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store?module=opendaylight-operational-dom-datastore&revision=2014-06-17 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28 - urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 - - diff --git a/opendaylight/md-sal/sal-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-distributed-datastore/pom.xml index 87544ecc62..006bce6a23 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-distributed-datastore/pom.xml @@ -113,10 +113,6 @@ org.opendaylight.controller sal-binding-api - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller sal-clustering-commons @@ -129,10 +125,6 @@ org.opendaylight.controller sal-common-util - - org.opendaylight.controller - sal-dom-broker-config - org.opendaylight.mdsal @@ -150,6 +142,10 @@ org.opendaylight.mdsal mdsal-dom-broker + + org.opendaylight.mdsal + mdsal-binding-dom-codec + org.opendaylight.controller sal-core-spi diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderImpl.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/impl/ActorSystemProviderImpl.java similarity index 96% rename from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderImpl.java rename to opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/impl/ActorSystemProviderImpl.java index ef2db4b0c1..14aedffd2a 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderImpl.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/impl/ActorSystemProviderImpl.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.config.yang.config.actor_system_provider.impl; +package org.opendaylight.controller.cluster.akka.impl; import akka.actor.ActorSystem; import akka.actor.Props; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/AkkaConfigFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/impl/AkkaConfigFactory.java similarity index 89% rename from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/AkkaConfigFactory.java rename to opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/impl/AkkaConfigFactory.java index 0eac56f61c..f29e1c7875 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/AkkaConfigFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/impl/AkkaConfigFactory.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.config.yang.config.actor_system_provider.impl.factory; +package org.opendaylight.controller.cluster.akka.impl; import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/osgi/BundleClassLoaderFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/osgi/impl/BundleClassLoaderFactory.java similarity index 90% rename from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/osgi/BundleClassLoaderFactory.java rename to opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/osgi/impl/BundleClassLoaderFactory.java index f01e85d531..306074f7f4 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/osgi/BundleClassLoaderFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/osgi/impl/BundleClassLoaderFactory.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.config.yang.config.actor_system_provider.impl.factory.osgi; +package org.opendaylight.controller.cluster.akka.osgi.impl; import akka.osgi.BundleDelegatingClassLoader; import java.security.AccessController; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/osgi/QuarantinedMonitorActorPropsFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/osgi/impl/QuarantinedMonitorActorPropsFactory.java similarity index 91% rename from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/osgi/QuarantinedMonitorActorPropsFactory.java rename to opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/osgi/impl/QuarantinedMonitorActorPropsFactory.java index 50a7647754..31d68d9b6a 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/factory/osgi/QuarantinedMonitorActorPropsFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/akka/osgi/impl/QuarantinedMonitorActorPropsFactory.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.config.yang.config.actor_system_provider.impl.factory.osgi; +package org.opendaylight.controller.cluster.akka.osgi.impl; import akka.actor.Props; import org.opendaylight.controller.cluster.common.actor.QuarantinedMonitorActor; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModule.java deleted file mode 100644 index 1981c203e5..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModule.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2015 Brocade Communications 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 - */ - -package org.opendaylight.controller.config.yang.config.actor_system_provider.impl; - -import akka.actor.ActorSystem; -import com.google.common.collect.ForwardingObject; -import org.opendaylight.controller.cluster.ActorSystemProvider; -import org.opendaylight.controller.cluster.ActorSystemProviderListener; -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.osgi.framework.BundleContext; - -public class ActorSystemProviderModule extends AbstractActorSystemProviderModule { - private BundleContext bundleContext; - - public ActorSystemProviderModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public ActorSystemProviderModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, - ActorSystemProviderModule oldModule, AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public boolean canReuseInstance(AbstractActorSystemProviderModule oldModule) { - return true; - } - - @Override - public AutoCloseable createInstance() { - // The service is provided via blueprint so wait for and return it here for backwards compatibility. - WaitingServiceTracker tracker = WaitingServiceTracker.create( - ActorSystemProvider.class, bundleContext); - ActorSystemProvider delegate = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - return new ForwardingActorSystemProvider(delegate, tracker); - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - private static class ForwardingActorSystemProvider extends ForwardingObject - implements ActorSystemProvider, AutoCloseable { - private final ActorSystemProvider delegate; - private final AutoCloseable closeable; - - ForwardingActorSystemProvider(ActorSystemProvider delegate, AutoCloseable closeable) { - this.delegate = delegate; - this.closeable = closeable; - } - - @Override - public ActorSystem getActorSystem() { - return delegate().getActorSystem(); - } - - @Override - public ListenerRegistration registerActorSystemProviderListener( - ActorSystemProviderListener listener) { - return delegate().registerActorSystemProviderListener(listener); - } - - @Override - protected ActorSystemProvider delegate() { - return delegate; - } - - @Override - public void close() throws Exception { - // We don't close the delegate as the life-cycle is controlled via blueprint. - closeable.close(); - } - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModuleFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModuleFactory.java deleted file mode 100644 index 9e15085055..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/actor_system_provider/impl/ActorSystemProviderModuleFactory.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2015 Brocade Communications 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 - */ - -/* -* Generated file -* -* Generated from: yang module name: actor-system-provider-impl yang module local name: actor-system-provider-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Tue Oct 06 02:11:27 EDT 2015 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.controller.config.yang.config.actor_system_provider.impl; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.DynamicMBeanWithInstance; -import org.opendaylight.controller.config.spi.Module; -import org.osgi.framework.BundleContext; - -public class ActorSystemProviderModuleFactory extends AbstractActorSystemProviderModuleFactory { - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - BundleContext bundleContext) { - ActorSystemProviderModule module = (ActorSystemProviderModule)super.createModule(instanceName, - dependencyResolver,bundleContext); - module.setBundleContext(bundleContext); - return module; - } - - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - DynamicMBeanWithInstance old, BundleContext bundleContext) throws Exception { - ActorSystemProviderModule module = (ActorSystemProviderModule)super.createModule(instanceName, - dependencyResolver, - old, bundleContext); - module.setBundleContext(bundleContext); - return module; - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModule.java deleted file mode 100644 index 6723d2b4f6..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModule.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.config.concurrent_data_broker; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.md.sal.dom.spi.ForwardingDOMDataBroker; -import org.osgi.framework.BundleContext; - -public class DomConcurrentDataBrokerModule extends AbstractDomConcurrentDataBrokerModule { - private BundleContext bundleContext; - - public DomConcurrentDataBrokerModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public DomConcurrentDataBrokerModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver, final DomConcurrentDataBrokerModule oldModule, - final AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public boolean canReuseInstance(AbstractDomConcurrentDataBrokerModule oldModule) { - return true; - } - - @Override - public AutoCloseable createInstance() { - // The ConcurrentDOMDataBroker is provided via blueprint so wait for and return it here for - // backwards compatibility. - WaitingServiceTracker tracker = WaitingServiceTracker.create( - DOMDataBroker.class, bundleContext, "(type=default)"); - DOMDataBroker delegate = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - return new ForwardingConcurrentDOMBroker(delegate, tracker); - } - - public void setBundleContext(final BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - private static class ForwardingConcurrentDOMBroker extends ForwardingDOMDataBroker implements AutoCloseable { - private final DOMDataBroker delegate; - private final AutoCloseable closeable; - - ForwardingConcurrentDOMBroker(DOMDataBroker delegate, AutoCloseable closeable) { - this.delegate = delegate; - this.closeable = closeable; - } - - @Override - protected DOMDataBroker delegate() { - return delegate; - } - - @Override - public void close() throws Exception { - // We don't close the delegate as the life-cycle is controlled via blueprint. - closeable.close(); - } - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModuleFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModuleFactory.java deleted file mode 100644 index b44abc9060..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/concurrent_data_broker/DomConcurrentDataBrokerModuleFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.config.concurrent_data_broker; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.DynamicMBeanWithInstance; -import org.opendaylight.controller.config.spi.Module; -import org.osgi.framework.BundleContext; - -public class DomConcurrentDataBrokerModuleFactory extends AbstractDomConcurrentDataBrokerModuleFactory { - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - BundleContext bundleContext) { - DomConcurrentDataBrokerModule module = (DomConcurrentDataBrokerModule)super.createModule(instanceName, - dependencyResolver, bundleContext); - module.setBundleContext(bundleContext); - return module; - } - - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, DynamicMBeanWithInstance old, - BundleContext bundleContext) throws Exception { - DomConcurrentDataBrokerModule module = (DomConcurrentDataBrokerModule)super.createModule(instanceName, - dependencyResolver, old, bundleContext); - module.setBundleContext(bundleContext); - return module; - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java deleted file mode 100644 index 2163449b66..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2014, 2015 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 - */ - -package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; - -import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; -import org.opendaylight.controller.cluster.datastore.compat.LegacyDOMStoreAdapter; -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.osgi.framework.BundleContext; - -@Deprecated -public class DistributedConfigDataStoreProviderModule extends AbstractDistributedConfigDataStoreProviderModule { - private BundleContext bundleContext; - - public DistributedConfigDataStoreProviderModule( - final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public DistributedConfigDataStoreProviderModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver, final DistributedConfigDataStoreProviderModule oldModule, - final AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public boolean canReuseInstance(final AbstractDistributedConfigDataStoreProviderModule oldModule) { - return true; - } - - @Override - public AutoCloseable createInstance() { - // The DistributedConfigDataStore is provided via blueprint so wait for and return it here for - // backwards compatibility. - WaitingServiceTracker tracker = WaitingServiceTracker.create( - DistributedDataStoreInterface.class, bundleContext, "(type=distributed-config)"); - DistributedDataStoreInterface delegate = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - return new LegacyDOMStoreAdapter(delegate) { - @Override - public void close() { - tracker.close(); - } - }; - } - - public void setBundleContext(final BundleContext bundleContext) { - this.bundleContext = bundleContext; - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModuleFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModuleFactory.java deleted file mode 100644 index d645499875..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModuleFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2014, 2015 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 - */ -package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.DynamicMBeanWithInstance; -import org.opendaylight.controller.config.spi.Module; -import org.osgi.framework.BundleContext; - -@Deprecated -public class DistributedConfigDataStoreProviderModuleFactory - extends AbstractDistributedConfigDataStoreProviderModuleFactory { - - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - BundleContext bundleContext) { - DistributedConfigDataStoreProviderModule module = (DistributedConfigDataStoreProviderModule)super.createModule( - instanceName,dependencyResolver,bundleContext); - module.setBundleContext(bundleContext); - return module; - } - - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - DynamicMBeanWithInstance old, BundleContext bundleContext) throws Exception { - DistributedConfigDataStoreProviderModule module = (DistributedConfigDataStoreProviderModule)super.createModule( - instanceName, dependencyResolver, old, bundleContext); - module.setBundleContext(bundleContext); - return module; - } - - -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java deleted file mode 100644 index d06d2ec392..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2014, 2015 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 - */ - -package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; - -import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; -import org.opendaylight.controller.cluster.datastore.compat.LegacyDOMStoreAdapter; -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.osgi.framework.BundleContext; - -@Deprecated -public class DistributedOperationalDataStoreProviderModule - extends AbstractDistributedOperationalDataStoreProviderModule { - private BundleContext bundleContext; - - public DistributedOperationalDataStoreProviderModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public DistributedOperationalDataStoreProviderModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver,final DistributedOperationalDataStoreProviderModule oldModule, - final AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public boolean canReuseInstance(final AbstractDistributedOperationalDataStoreProviderModule oldModule) { - return true; - } - - @Override - public java.lang.AutoCloseable createInstance() { - // The DistributedOperDataStore is provided via blueprint so wait for and return it here for - // backwards compatibility - WaitingServiceTracker tracker = WaitingServiceTracker.create( - DistributedDataStoreInterface.class, bundleContext, "(type=distributed-operational)"); - DistributedDataStoreInterface delegate = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - return new LegacyDOMStoreAdapter(delegate) { - @Override - public void close() { - tracker.close(); - } - }; - } - - public void setBundleContext(final BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModuleFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModuleFactory.java deleted file mode 100644 index 072eceb4f1..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModuleFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014, 2015 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 - */ -package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.DynamicMBeanWithInstance; -import org.opendaylight.controller.config.spi.Module; -import org.osgi.framework.BundleContext; - -@Deprecated -public class DistributedOperationalDataStoreProviderModuleFactory - extends AbstractDistributedOperationalDataStoreProviderModuleFactory { - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - BundleContext bundleContext) { - DistributedOperationalDataStoreProviderModule module = (DistributedOperationalDataStoreProviderModule) - super.createModule(instanceName,dependencyResolver,bundleContext); - module.setBundleContext(bundleContext); - return module; - } - - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - DynamicMBeanWithInstance old, BundleContext bundleContext) throws Exception { - DistributedOperationalDataStoreProviderModule module = (DistributedOperationalDataStoreProviderModule) - super.createModule(instanceName, dependencyResolver, - old, bundleContext); - module.setBundleContext(bundleContext); - return module; - } - -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/org/opendaylight/blueprint/clustered-datastore.xml b/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/org/opendaylight/blueprint/clustered-datastore.xml index cda74adf85..e0153cbaae 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/org/opendaylight/blueprint/clustered-datastore.xml +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/org/opendaylight/blueprint/clustered-datastore.xml @@ -16,23 +16,23 @@ - - - - diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/actor-system-provider-impl.yang b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/actor-system-provider-impl.yang deleted file mode 100644 index 75d6125fda..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/actor-system-provider-impl.yang +++ /dev/null @@ -1,26 +0,0 @@ -module actor-system-provider-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:impl"; - prefix "actor-system-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import actor-system-provider-service {prefix actor-system;} - - description "Akka actor system provider implementation"; - - revision "2015-10-05" { - description "Initial revision"; - } - - identity actor-system-provider-impl { - base config:module-type; - config:provided-service actor-system:actor-system-provider-service; - config:java-name-prefix ActorSystemProvider; - } - - augment "/config:modules/config:module/config:configuration" { - case actor-system-provider-impl { - when "/config:modules/config:module/config:type = 'actor-system-provider-impl'"; - } - } -} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang index be658835be..a49ca8a47d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang @@ -5,13 +5,6 @@ module distributed-datastore-provider { namespace "urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider"; prefix "distributed-datastore-provider"; - import config { prefix config; revision-date 2013-04-05; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - import opendaylight-config-dom-datastore {prefix config-dom-store-spi;} - import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;} - import opendaylight-md-sal-dom {prefix sal;} - import actor-system-provider-service {prefix actor-system;} - description "This module contains the base YANG definitions for the distributed datastore provider implementation"; @@ -21,22 +14,6 @@ module distributed-datastore-provider { "Initial revision."; } - // This is the definition of the service implementation as a module identity. - identity distributed-config-datastore-provider { - base config:module-type; - config:provided-service config-dom-store-spi:config-dom-datastore; - // Specifies the prefix for generated java classes. - config:java-name-prefix DistributedConfigDataStoreProvider; - } - - // This is the definition of the service implementation as a module identity. - identity distributed-operational-datastore-provider { - base config:module-type; - config:provided-service operational-dom-store-spi:operational-dom-datastore; - // Specifies the prefix for generated java classes. - config:java-name-prefix DistributedOperationalDataStoreProvider; - } - typedef non-zero-uint32-type { type uint32 { range "1..max"; @@ -289,60 +266,4 @@ module distributed-datastore-provider { container data-store-properties-container { uses data-store-properties; } - - // Augments the 'configuration' choice node under modules/module. - augment "/config:modules/config:module/config:configuration" { - case distributed-config-datastore-provider { - when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'"; - container config-schema-service { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:schema-service; - } - } - } - - container config-actor-system-provider { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity actor-system:actor-system-provider-service; - } - } - } - - container config-properties { - uses data-store-properties; - } - } - } - - // Augments the 'configuration' choice node under modules/module. - augment "/config:modules/config:module/config:configuration" { - case distributed-operational-datastore-provider { - when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'"; - container operational-schema-service { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:schema-service; - } - } - } - - container operational-actor-system-provider { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity actor-system:actor-system-provider-service; - } - } - } - - container operational-properties { - uses data-store-properties; - } - } - } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/odl-sal-cds-cfg.yang b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/odl-sal-cds-cfg.yang deleted file mode 100644 index 325dad33d7..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/odl-sal-cds-cfg.yang +++ /dev/null @@ -1,41 +0,0 @@ -module odl-concurrent-data-broker-cfg { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:concurrent-data-broker"; - prefix "cdb"; - - import config { prefix config; revision-date 2013-04-05; } - import opendaylight-config-dom-datastore {prefix config-dom-store-spi;} - import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;} - import opendaylight-md-sal-dom {prefix sal; } - import opendaylight-sal-dom-broker-impl { prefix broker; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - - description - "Service definition for concurrent dom broker."; - - revision "2014-11-24" { - description - "Initial revision"; - } - - identity dom-concurrent-data-broker { - base config:module-type; - config:provided-service sal:dom-async-data-broker; - } - - augment "/config:modules/config:module/config:configuration" { - case dom-concurrent-data-broker { - when "/config:modules/config:module/config:type = 'dom-concurrent-data-broker'"; - - uses broker:dom-broker-config; - } - } - - augment "/config:modules/config:module/config:state" { - case dom-concurrent-data-broker { - when "/config:modules/config:module/config:type = 'dom-concurrent-data-broker'"; - - uses broker:dom-broker-operational; - } - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/pom.xml b/opendaylight/md-sal/sal-dom-broker-config/pom.xml deleted file mode 100644 index f0ed089819..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - 4.0.0 - - org.opendaylight.controller - mdsal-parent - 1.8.0-SNAPSHOT - ../parent - - - sal-dom-broker-config - 1.8.0-SNAPSHOT - bundle - - - - true - - - - - org.opendaylight.controller - sal-dom-config - - - org.opendaylight.controller - sal-broker-impl - - - org.opendaylight.mdsal.model - ietf-yang-types-20130715 - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - {local-packages}, - org.opendaylight.controller.config.yang.md.sal.dom.impl, - org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.dom.impl.* - - - - - - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - - - diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModule.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModule.java deleted file mode 100644 index 46b23fa825..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModule.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.impl; - -import com.google.common.base.Preconditions; -import com.google.common.collect.ClassToInstanceMap; -import com.google.common.collect.MutableClassToInstanceMap; -import java.util.ArrayList; -import java.util.List; -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService; -import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService; -import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService; -import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService; -import org.opendaylight.controller.md.sal.dom.api.DOMRpcService; -import org.opendaylight.controller.sal.core.api.BrokerService; -import org.opendaylight.controller.sal.core.api.model.SchemaService; -import org.opendaylight.controller.sal.dom.broker.BrokerImpl; -import org.osgi.framework.BundleContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public final class DomBrokerImplModule extends AbstractDomBrokerImplModule { - private static final Logger LOG = LoggerFactory.getLogger(DomBrokerImplModule.class); - - private BundleContext bundleContext; - - public DomBrokerImplModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public DomBrokerImplModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver, - final DomBrokerImplModule oldModule, final AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void validate() { - super.validate(); - final long depth = getNotificationQueueDepth().getValue(); - Preconditions.checkArgument(Long.lowestOneBit(depth) == Long.highestOneBit(depth), - "Queue depth %s is not power-of-two", depth); - } - - @Override - @SuppressWarnings("checkstyle:IllegalCatch") - public AutoCloseable createInstance() { - // The services are provided via blueprint so retrieve then from the OSGi service registry for - // backwards compatibility. - - final List closeables = new ArrayList<>(); - DOMNotificationService domNotificationService = newTracker( - DOMNotificationService.class, closeables).waitForService(WaitingServiceTracker.FIVE_MINUTES); - - DOMNotificationPublishService domNotificationPublishService = newTracker( - DOMNotificationPublishService.class, closeables).waitForService(WaitingServiceTracker.FIVE_MINUTES); - - DOMRpcService domRpcService = newTracker( - DOMRpcService.class, closeables).waitForService(WaitingServiceTracker.FIVE_MINUTES); - - DOMRpcProviderService domRpcProvider = newTracker( - DOMRpcProviderService.class, closeables).waitForService(WaitingServiceTracker.FIVE_MINUTES); - - DOMMountPointService mountService = newTracker(DOMMountPointService.class, closeables) - .waitForService(WaitingServiceTracker.FIVE_MINUTES); - - SchemaService globalSchemaService = newTracker(SchemaService.class, closeables) - .waitForService(WaitingServiceTracker.FIVE_MINUTES); - - final DOMDataBroker dataBroker = getAsyncDataBrokerDependency(); - - final ClassToInstanceMap services = MutableClassToInstanceMap.create(); - - services.putInstance(DOMNotificationService.class, domNotificationService); - services.putInstance(DOMNotificationPublishService.class, domNotificationPublishService); - - final SchemaService schemaService = getSchemaServiceImpl(globalSchemaService); - services.putInstance(SchemaService.class, schemaService); - - services.putInstance(DOMDataBroker.class, dataBroker); - - services.putInstance(DOMRpcService.class, domRpcService); - services.putInstance(DOMRpcProviderService.class, domRpcProvider); - - services.putInstance(DOMMountPointService.class, mountService); - - BrokerImpl broker = new BrokerImpl(domRpcService, domRpcProvider, services); - broker.setDeactivator(() -> { - for (AutoCloseable ac : closeables) { - try { - ac.close(); - } catch (Exception e) { - LOG.warn("Exception while closing {}", ac, e); - } - } - }); - - return broker; - } - - private WaitingServiceTracker newTracker(Class serviceInterface, List closeables) { - WaitingServiceTracker tracker = WaitingServiceTracker.create(serviceInterface, bundleContext); - closeables.add(tracker); - return tracker; - } - - private SchemaService getSchemaServiceImpl(SchemaService globalSchemaService) { - final SchemaService schemaService; - if (getRootSchemaService() != null) { - schemaService = getRootSchemaServiceDependency(); - } else { - schemaService = globalSchemaService; - } - return schemaService; - } - - public void setBundleContext(final BundleContext bundleContext) { - this.bundleContext = bundleContext; - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModuleFactory.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModuleFactory.java deleted file mode 100644 index 87900d88b6..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomBrokerImplModuleFactory.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.impl; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.DynamicMBeanWithInstance; -import org.opendaylight.controller.config.spi.Module; -import org.osgi.framework.BundleContext; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class DomBrokerImplModuleFactory extends AbstractDomBrokerImplModuleFactory { - - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, - BundleContext bundleContext) { - DomBrokerImplModule module = (DomBrokerImplModule)super.createModule(instanceName, dependencyResolver, - bundleContext); - module.setBundleContext(bundleContext); - return module; - } - - @Override - public Module createModule(String instanceName, DependencyResolver dependencyResolver, DynamicMBeanWithInstance old, - BundleContext bundleContext) throws Exception { - DomBrokerImplModule module = (DomBrokerImplModule)super.createModule(instanceName, dependencyResolver, - old, bundleContext); - module.setBundleContext(bundleContext); - return module; - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java deleted file mode 100644 index 05726e1d1e..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModule.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.impl; - -import com.google.common.collect.Lists; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ExecutorService; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitDeadlockException; -import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean; -import org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl; -import org.opendaylight.controller.md.sal.dom.broker.impl.SerializedDOMDataBroker; -import org.opendaylight.controller.md.sal.dom.broker.impl.jmx.CommitStatsMXBeanImpl; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory; -import org.opendaylight.controller.sal.core.spi.data.DOMStore; -import org.opendaylight.yangtools.util.DurationStatisticsTracker; -import org.opendaylight.yangtools.util.concurrent.DeadlockDetectingListeningExecutorService; -import org.opendaylight.yangtools.util.concurrent.SpecialExecutors; - -/** - * Deprecated. - * - * @deprecated Replaced by the clustered data store. - */ -@Deprecated -public final class DomInmemoryDataBrokerModule extends - org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractDomInmemoryDataBrokerModule { - - private static final String JMX_BEAN_TYPE = "DOMDataBroker"; - - public DomInmemoryDataBrokerModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public DomInmemoryDataBrokerModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final DomInmemoryDataBrokerModule oldModule, final java.lang.AutoCloseable oldInstance) { - - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - protected void customValidation() { - // Add custom validation for module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - //Initializing Operational DOM DataStore defaulting to InMemoryDOMDataStore if one is not configured - DOMStore operStore = getOperationalDataStoreDependency(); - if (operStore == null) { - // we will default to InMemoryDOMDataStore creation - operStore = InMemoryDOMDataStoreFactory.create("DOM-OPER", getSchemaServiceDependency()); - } - - DOMStore configStore = getConfigDataStoreDependency(); - if (configStore == null) { - // we will default to InMemoryDOMDataStore creation - configStore = InMemoryDOMDataStoreFactory.create("DOM-CFG", getSchemaServiceDependency()); - } - - final Map datastores = new EnumMap<>(LogicalDatastoreType.class); - datastores.put(LogicalDatastoreType.OPERATIONAL, operStore); - datastores.put(LogicalDatastoreType.CONFIGURATION, configStore); - - /* - * We use an executor for commit ListenableFuture callbacks that favors reusing available - * threads over creating new threads at the expense of execution time. The assumption is - * that most ListenableFuture callbacks won't execute a lot of business logic where we want - * it to run quicker - many callbacks will likely just handle error conditions and do - * nothing on success. The executor queue capacity is bounded and, if the capacity is - * reached, subsequent submitted tasks will block the caller. - */ - ExecutorService listenableFutureExecutor = SpecialExecutors.newBlockingBoundedCachedThreadPool( - getMaxDataBrokerFutureCallbackPoolSize(), getMaxDataBrokerFutureCallbackQueueSize(), - "CommitFutures", SerializedDOMDataBroker.class); - - final List mBeans = Lists.newArrayList(); - final DurationStatisticsTracker commitStatsTracker; - - /* - * We use a single-threaded executor for commits with a bounded queue capacity. If the - * queue capacity is reached, subsequent commit tasks will be rejected and the commits will - * fail. This is done to relieve back pressure. This should be an extreme scenario - either - * there's deadlock(s) somewhere and the controller is unstable or some rogue component is - * continuously hammering commits too fast or the controller is just over-capacity for the - * system it's running on. - */ - ExecutorService commitExecutor = SpecialExecutors.newBoundedSingleThreadExecutor( - getMaxDataBrokerCommitQueueSize(), "WriteTxCommit", SerializedDOMDataBroker.class); - - SerializedDOMDataBroker sdb = new SerializedDOMDataBroker(datastores, - new DeadlockDetectingListeningExecutorService(commitExecutor, - TransactionCommitDeadlockException.DEADLOCK_EXCEPTION_SUPPLIER, - listenableFutureExecutor)); - commitStatsTracker = sdb.getCommitStatsTracker(); - - final AbstractMXBean commitExecutorStatsMXBean = - ThreadExecutorStatsMXBeanImpl.create(commitExecutor, "CommitExecutorStats", - JMX_BEAN_TYPE, null); - if (commitExecutorStatsMXBean != null) { - mBeans.add(commitExecutorStatsMXBean); - } - - if (commitStatsTracker != null) { - final CommitStatsMXBeanImpl commitStatsMXBean = new CommitStatsMXBeanImpl( - commitStatsTracker, JMX_BEAN_TYPE); - commitStatsMXBean.registerMBean(); - mBeans.add(commitStatsMXBean); - } - - final AbstractMXBean commitFutureStatsMXBean = - ThreadExecutorStatsMXBeanImpl.create(listenableFutureExecutor, - "CommitFutureExecutorStats", JMX_BEAN_TYPE, null); - if (commitFutureStatsMXBean != null) { - mBeans.add(commitFutureStatsMXBean); - } - - sdb.setCloseable(() -> mBeans.forEach(AbstractMXBean::unregisterMBean)); - - return sdb; - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java deleted file mode 100644 index 9134770087..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/DomInmemoryDataBrokerModuleFactory.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.impl; - -/** - * Deprecated. - * - * @deprecated Replaced by the clustered data store. - */ -@Deprecated -public class DomInmemoryDataBrokerModuleFactory extends AbstractDomInmemoryDataBrokerModuleFactory { -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModule.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModule.java deleted file mode 100644 index e5d1e514df..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModule.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.impl; - -import com.google.common.util.concurrent.ListenableFuture; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.opendaylight.controller.sal.core.api.model.SchemaService; -import org.opendaylight.controller.sal.core.api.model.YangTextSourceProvider; -import org.opendaylight.yangtools.concepts.ListenerRegistration; -import org.opendaylight.yangtools.yang.model.api.Module; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; -import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier; -import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource; -import org.osgi.framework.BundleContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public final class SchemaServiceImplSingletonModule extends AbstractSchemaServiceImplSingletonModule { - - private static final Logger LOG = LoggerFactory.getLogger(SchemaServiceImplSingletonModule.class); - - BundleContext bundleContext; - - public SchemaServiceImplSingletonModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public SchemaServiceImplSingletonModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final SchemaServiceImplSingletonModule oldModule, final java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public boolean canReuseInstance(final AbstractSchemaServiceImplSingletonModule oldModule) { - return true; - } - - public BundleContext getBundleContext() { - return bundleContext; - } - - public void setBundleContext(final BundleContext bundleContext) { - this.bundleContext = bundleContext; - } - - @Override - public void validate() { - super.validate(); - } - - @Override - public AutoCloseable createInstance() { - final WaitingServiceTracker schemaServiceTracker = - WaitingServiceTracker.create(SchemaService.class, bundleContext); - final SchemaService schemaService = schemaServiceTracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - - final WaitingServiceTracker sourceProviderTracker = - WaitingServiceTracker.create(YangTextSourceProvider.class, bundleContext); - final YangTextSourceProvider sourceProvider = - sourceProviderTracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - - class GlobalSchemaServiceProxy implements AutoCloseable, SchemaService, YangTextSourceProvider { - @Override - public void close() { - schemaServiceTracker.close(); - sourceProviderTracker.close(); - } - - @Override - public void addModule(final Module arg0) { - schemaService.addModule(arg0); - } - - @Override - public SchemaContext getGlobalContext() { - return schemaService.getGlobalContext(); - } - - @Override - public SchemaContext getSessionContext() { - return schemaService.getSessionContext(); - } - - @Override - public ListenerRegistration registerSchemaContextListener( - final SchemaContextListener arg0) { - return schemaService.registerSchemaContextListener(arg0); - } - - @Override - public void removeModule(final Module arg0) { - schemaService.removeModule(arg0); - } - - @Override - public ListenableFuture getSource( - final SourceIdentifier sourceIdentifier) { - return sourceProvider.getSource(sourceIdentifier); - } - } - - return new GlobalSchemaServiceProxy(); - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModuleFactory.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModuleFactory.java deleted file mode 100644 index 44039b820c..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/impl/SchemaServiceImplSingletonModuleFactory.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.impl; - -import static com.google.common.base.Preconditions.checkArgument; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.osgi.framework.BundleContext; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class SchemaServiceImplSingletonModuleFactory extends - org.opendaylight.controller.config.yang.md.sal.dom.impl.AbstractSchemaServiceImplSingletonModuleFactory { - - public static final String SINGLETON_NAME = "yang-schema-service"; - - @Override - public SchemaServiceImplSingletonModule instantiateModule(String instanceName, - DependencyResolver dependencyResolver, SchemaServiceImplSingletonModule oldModule, - AutoCloseable oldInstance, BundleContext bundleContext) { - checkArgument(SINGLETON_NAME.equals(instanceName), - "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME); - SchemaServiceImplSingletonModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, - oldInstance, bundleContext); - // FIXME bundle context should not be passed around - module.setBundleContext(bundleContext); - return module; - } - - @Override - public SchemaServiceImplSingletonModule instantiateModule(String instanceName, - DependencyResolver dependencyResolver, BundleContext bundleContext) { - checkArgument(SINGLETON_NAME.equals(instanceName), - "Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME); - SchemaServiceImplSingletonModule module = super.instantiateModule(instanceName, dependencyResolver, - bundleContext); - // FIXME bundle context should not be passed around - module.setBundleContext(bundleContext); - return module; - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModule.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModule.java deleted file mode 100644 index 06140f44fd..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModule.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.pingpong; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.md.sal.dom.broker.impl.PingPongDataBroker; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class PingpongDataBrokerModule extends AbstractPingpongDataBrokerModule { - public PingpongDataBrokerModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public PingpongDataBrokerModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver, - final PingpongDataBrokerModule oldModule, final java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public java.lang.AutoCloseable createInstance() { - return new PingPongDataBroker(getDataBrokerDependency()); - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModuleFactory.java b/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModuleFactory.java deleted file mode 100644 index c5ed639bb6..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/java/org/opendaylight/controller/config/yang/md/sal/dom/pingpong/PingpongDataBrokerModuleFactory.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.md.sal.dom.pingpong; - -/** - * Deprecated. - * - * @deprecated Replaced by blueprint wiring - */ -@Deprecated -public class PingpongDataBrokerModuleFactory extends AbstractPingpongDataBrokerModuleFactory { - -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-dom-broker-impl.yang b/opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-dom-broker-impl.yang deleted file mode 100644 index 5bda2d66c1..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-dom-broker-impl.yang +++ /dev/null @@ -1,224 +0,0 @@ -module opendaylight-sal-dom-broker-impl { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl"; - prefix "broker"; - - import config { prefix config; revision-date 2013-04-05; } - import ietf-yang-types { prefix yang; } - import opendaylight-md-sal-dom {prefix sal;} - import opendaylight-md-sal-common {prefix common;} - import opendaylight-config-dom-datastore {prefix config-dom-store-spi;} - import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;} - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - - description - "Service definition for Binding Aware MD-SAL. - Note: The dom-inmemory-data-broker utilizes configurable config-dom-datastore - and operation-dom-datastore. If configuration is not done for this stores - then it defaults to InMemoryDOMDataStore"; - - revision "2013-10-28" { - description - "Initial revision"; - } - - identity dom-broker-impl { - status deprecated; - base config:module-type; - config:provided-service sal:dom-broker-osgi-registry; - config:java-name-prefix DomBrokerImpl; - } - - - identity dom-inmemory-data-broker { - status obsolete; - base config:module-type; - config:provided-service sal:dom-async-data-broker; - } - - identity schema-service-singleton { - status deprecated; - base config:module-type; - config:provided-service sal:schema-service; - config:provided-service sal:yang-text-source-provider; - config:java-name-prefix SchemaServiceImplSingleton; - } - - typedef max-queue-depth { - type uint32 { - range 1..1073741824; - } - } - - augment "/config:modules/config:module/config:configuration" { - case dom-broker-impl { - when "/config:modules/config:module/config:type = 'dom-broker-impl'"; - - container async-data-broker { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:dom-async-data-broker; - } - } - } - - container root-schema-service { - status obsolete; - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:schema-service; - } - } - } - - leaf notification-queue-depth { - status obsolete; - description "Maximum number of elements in the notification queue, must be power-of-two."; - type max-queue-depth; - default 65536; - } - leaf notification-queue-spin { - status obsolete; - description "Number of milliseconds notification queue should spin for new requests before parking."; - type uint16; - units milliseconds; - default 1; - } - leaf notification-queue-park { - status obsolete; - description "Number of milliseconds notification queue should park for new requests before blocking."; - type uint16; - units milliseconds; - default 30; - } - } - } - - grouping dom-broker-config { - status obsolete; - container schema-service { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:schema-service; - } - } - } - - container config-data-store { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity config-dom-store-spi:config-dom-datastore; - } - } - } - - container operational-data-store { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity operational-dom-store-spi:operational-dom-datastore; - } - } - } - - leaf max-data-broker-future-callback-queue-size { - default 1000; - type uint16; - description "The maximum queue size for the data broker's commit future callback executor."; - } - - leaf max-data-broker-future-callback-pool-size { - default 20; - type uint16; - description "The maximum thread pool size for the data broker's commit future callback executor."; - } - - leaf max-data-broker-commit-queue-size { - default 5000; - type uint16; - description "The maximum queue size for the data broker's commit executor."; - } - } - - grouping dom-broker-operational { - status obsolete; - leaf total-commits { - type uint64; - } - - leaf average-commit { - type uint64; - units ns; - } - - leaf longest-commit-duration { - type uint64; - units ns; - } - - leaf longest-commit-timestamp { - type yang:date-and-time; - } - - leaf shortest-commit-duration { - type uint64; - units ns; - } - - leaf shortest-commit-timestamp { - type yang:date-and-time; - } - - rpcx:rpc-context-instance dom-broker-rpc-ctx; - } - - identity dom-broker-rpc-ctx; - - rpc reset-statistics { - description - "JMX call to clear the toasts-made counter."; - - input { - uses rpcx:rpc-context-ref { - refine context-instance { - rpcx:rpc-context-instance dom-broker-rpc-ctx; - } - } - } - } - - augment "/config:modules/config:module/config:configuration" { - case dom-inmemory-data-broker { - when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'"; - - uses dom-broker-config; - } - } - - augment "/config:modules/config:module/config:state" { - case dom-inmemory-data-broker { - when "/config:modules/config:module/config:type = 'dom-inmemory-data-broker'"; - - uses dom-broker-operational; - } - } - - augment "/config:modules/config:module/config:state" { - case schema-service-singleton { - when "/config:modules/config:module/config:type = 'schema-service-singleton'"; - } - } - - augment "/config:modules/config:module/config:state" { - case dom-broker-impl { - when "/config:modules/config:module/config:type = 'dom-broker-impl'"; - container data { - uses common:data-state; - } - } - } -} diff --git a/opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-pingpong-broker.yang b/opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-pingpong-broker.yang deleted file mode 100644 index 0ed1bbd4b9..0000000000 --- a/opendaylight/md-sal/sal-dom-broker-config/src/main/yang/opendaylight-pingpong-broker.yang +++ /dev/null @@ -1,39 +0,0 @@ -module opendaylight-pingpong-broker { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:pingpong"; - prefix "pingpong"; - - import config { prefix config; revision-date 2013-04-05; } - import opendaylight-md-sal-dom {prefix sal;} - import opendaylight-md-sal-common {prefix common;} - import opendaylight-config-dom-datastore {prefix config-dom-store-spi;} - import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;} - - description - "Service definition for Ping-Pong DOM broker"; - - revision "2014-11-07" { - description - "Initial revision"; - } - - identity pingpong-data-broker { - base config:module-type; - config:provided-service sal:dom-async-data-broker; - } - - augment "/config:modules/config:module/config:configuration" { - case pingpong-data-broker { - when "/config:modules/config:module/config:type = 'pingpong-data-broker'"; - - container data-broker { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity sal:dom-async-data-broker; - } - } - } - } - } -} diff --git a/opendaylight/md-sal/sal-dom-config/pom.xml b/opendaylight/md-sal/sal-dom-config/pom.xml deleted file mode 100644 index 11e45c928e..0000000000 --- a/opendaylight/md-sal/sal-dom-config/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - 4.0.0 - - org.opendaylight.controller - mdsal-parent - 1.8.0-SNAPSHOT - ../parent - - sal-dom-config - 1.8.0-SNAPSHOT - bundle - - - - org.opendaylight.controller - sal-common-api - - - org.opendaylight.controller - sal-core-api - - - org.opendaylight.controller - sal-core-spi - - - org.opendaylight.mdsal - mdsal-singleton-dom-impl - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - - - scm:git:http://git.opendaylight.org/gerrit/controller.git - scm:git:ssh://git.opendaylight.org:29418/controller.git - HEAD - https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL - - - diff --git a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-config-dom-datastore.yang b/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-config-dom-datastore.yang deleted file mode 100644 index 4d9c7df5ab..0000000000 --- a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-config-dom-datastore.yang +++ /dev/null @@ -1,22 +0,0 @@ -module opendaylight-config-dom-datastore { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store"; - prefix "config-dom-store-spi"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "DOM Service Provider Interface definition for MD-SAL config store"; - - revision "2014-06-17" { - description - "Initial revision"; - } - - identity config-dom-datastore { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.spi.data.DOMStore"; - config:disable-osgi-service-registration; - } - -} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-common.yang b/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-common.yang deleted file mode 100644 index ac2f924408..0000000000 --- a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-common.yang +++ /dev/null @@ -1,71 +0,0 @@ -module opendaylight-md-sal-common { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:common"; - prefix "md-sal-common"; - - description - "Common definition for MD-SAL."; - - revision "2013-10-28" { - description - "Initial revision"; - } - - grouping rpc-routing-table { - - leaf routing-context { - type string; - } - list routes { - leaf path { - type string; - } - leaf destination { - type string; - } - } - - } - - grouping rpc-router { - leaf module { - type string; - } - container routing-tables { - list routing-table { - uses rpc-routing-table; - } - } - } - - grouping rpc-state { - list rpc-router { - uses rpc-router; - } - } - - grouping notification-state { - container notifications { - leaf published { - type uint32; - } - } - } - - grouping data-state { - container transactions { - leaf created { - type uint32; - } - leaf submitted { - type uint32; - } - leaf successful { - type uint32; - } - leaf failed { - type uint32; - } - } - } -} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-dom.yang b/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-dom.yang deleted file mode 100644 index cf21279ff1..0000000000 --- a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-md-sal-dom.yang +++ /dev/null @@ -1,38 +0,0 @@ -module opendaylight-md-sal-dom { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom"; - prefix "md-sal-dom"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "Service definition for Binding Aware MD-SAL."; - - revision "2013-10-28" { - description - "Initial revision"; - } - - identity dom-broker-osgi-registry { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.api.Broker"; - } - - identity dom-async-data-broker { - base "config:service-type"; - config:java-class "org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"; - config:disable-osgi-service-registration; - } - - identity schema-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.api.model.SchemaService"; - config:disable-osgi-service-registration; - } - - identity yang-text-source-provider { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.api.model.YangTextSourceProvider"; - config:disable-osgi-service-registration; - } -} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-operational-dom-datastore.yang b/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-operational-dom-datastore.yang deleted file mode 100644 index 008010b7d4..0000000000 --- a/opendaylight/md-sal/sal-dom-config/src/main/yang/opendaylight-operational-dom-datastore.yang +++ /dev/null @@ -1,22 +0,0 @@ -module opendaylight-operational-dom-datastore { - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store"; - prefix "operational-dom-store-spi"; - - import config { prefix config; revision-date 2013-04-05; } - - description - "DOM Service Provider Interface definition for MD-SAL operational store"; - - revision "2014-06-17" { - description - "Initial revision"; - } - - identity operational-dom-datastore { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sal.core.spi.data.DOMStore"; - config:disable-osgi-service-registration; - } - -} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-inmemory-datastore/pom.xml b/opendaylight/md-sal/sal-inmemory-datastore/pom.xml index 917ea4faf2..a1c37f8d4a 100644 --- a/opendaylight/md-sal/sal-inmemory-datastore/pom.xml +++ b/opendaylight/md-sal/sal-inmemory-datastore/pom.xml @@ -59,11 +59,6 @@ yang-data-impl - - org.opendaylight.controller - sal-dom-config - - org.osgi org.osgi.core diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModule.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModule.java deleted file mode 100644 index 2d1f041785..0000000000 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModule.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 - */ - -package org.opendaylight.controller.config.yang.inmemory_datastore_provider; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory; -import org.opendaylight.controller.md.sal.dom.store.impl.jmx.InMemoryDataStoreStats; - -/** - * The in-memory data store isn't used anymore. Deprecation notice in Carbon. Removal plan in Nitrogen. - */ -@Deprecated -public class InMemoryConfigDataStoreProviderModule extends AbstractInMemoryConfigDataStoreProviderModule { - - public InMemoryConfigDataStoreProviderModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public InMemoryConfigDataStoreProviderModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver, final InMemoryConfigDataStoreProviderModule oldModule, - final AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - InMemoryDOMDataStore dataStore = InMemoryDOMDataStoreFactory.create("DOM-CFG", - LogicalDatastoreType.CONFIGURATION, getSchemaServiceDependency(), getDebugTransactions(), - InMemoryDOMDataStoreConfigProperties.create(getMaxDataChangeExecutorPoolSize(), - getMaxDataChangeExecutorQueueSize(), getMaxDataChangeListenerQueueSize(), - getMaxDataStoreExecutorQueueSize())); - - InMemoryDataStoreStats statsBean = new InMemoryDataStoreStats("InMemoryConfigDataStore", dataStore); - dataStore.setCloseable(statsBean); - - return dataStore; - } -} diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModuleFactory.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModuleFactory.java deleted file mode 100644 index 9c439b6069..0000000000 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryConfigDataStoreProviderModuleFactory.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.inmemory_datastore_provider; - -/** - * The in-memory data store isn't used anymore. Deprecation notice in Carbon. Removal plan in Nitrogen. - */ -@Deprecated -public class InMemoryConfigDataStoreProviderModuleFactory extends AbstractInMemoryConfigDataStoreProviderModuleFactory { - -} diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModule.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModule.java deleted file mode 100644 index af81254ee5..0000000000 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModule.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 - */ - -package org.opendaylight.controller.config.yang.inmemory_datastore_provider; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.opendaylight.controller.config.api.ModuleIdentifier; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties; -import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreFactory; -import org.opendaylight.controller.md.sal.dom.store.impl.jmx.InMemoryDataStoreStats; - -/** - * The in-memory data store isn't used anymore. Deprecation notice in Carbon. Removal plan in Nitrogen. - */ -@Deprecated -public class InMemoryOperationalDataStoreProviderModule extends AbstractInMemoryOperationalDataStoreProviderModule { - - public InMemoryOperationalDataStoreProviderModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public InMemoryOperationalDataStoreProviderModule(final ModuleIdentifier identifier, - final DependencyResolver dependencyResolver, final InMemoryOperationalDataStoreProviderModule oldModule, - final AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - InMemoryDOMDataStore dataStore = InMemoryDOMDataStoreFactory.create("DOM-OPER", - LogicalDatastoreType.OPERATIONAL, getSchemaServiceDependency(), getDebugTransactions(), - InMemoryDOMDataStoreConfigProperties.create(getMaxDataChangeExecutorPoolSize(), - getMaxDataChangeExecutorQueueSize(), getMaxDataChangeListenerQueueSize(), - getMaxDataStoreExecutorQueueSize())); - - InMemoryDataStoreStats statsBean = new InMemoryDataStoreStats("InMemoryOperationalDataStore", dataStore); - - dataStore.setCloseable(statsBean); - - return dataStore; - } -} diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModuleFactory.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModuleFactory.java deleted file mode 100644 index 535c0c8965..0000000000 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/config/yang/inmemory_datastore_provider/InMemoryOperationalDataStoreProviderModuleFactory.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * 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 - */ -package org.opendaylight.controller.config.yang.inmemory_datastore_provider; - -/** - * The in-memory data store isn't used anymore. Deprecation notice in Carbon. Removal plan in Nitrogen. - */ -@Deprecated -public class InMemoryOperationalDataStoreProviderModuleFactory - extends AbstractInMemoryOperationalDataStoreProviderModuleFactory { -} diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/yang/opendaylight-inmemory-datastore-provider.yang b/opendaylight/md-sal/sal-inmemory-datastore/src/main/yang/opendaylight-inmemory-datastore-provider.yang deleted file mode 100644 index fe6ee3234c..0000000000 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/yang/opendaylight-inmemory-datastore-provider.yang +++ /dev/null @@ -1,105 +0,0 @@ -module opendaylight-inmemory-datastore-provider { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider"; - prefix "inmemory-datastore-provider"; - - import config { prefix config; revision-date 2013-04-05; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - import opendaylight-config-dom-datastore {prefix config-dom-store-spi;} - import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;} - import opendaylight-md-sal-dom {prefix sal;} - - description - "InMemory datastore provider implementation for config & operational datastore"; - - revision "2014-06-17" { - description - "Initial revision."; - } - - // This is the definition of the service implementation as a module identity. - identity inmemory-config-datastore-provider { - base config:module-type; - config:provided-service config-dom-store-spi:config-dom-datastore; - config:java-name-prefix InMemoryConfigDataStoreProvider; - status deprecated; - } - - // This is the definition of the service implementation as a module identity. - - identity inmemory-operational-datastore-provider { - base config:module-type; - config:provided-service operational-dom-store-spi:operational-dom-datastore; - config:java-name-prefix InMemoryOperationalDataStoreProvider; - status deprecated; - } - - grouping datastore-configuration { - leaf max-data-change-executor-queue-size { - default 1000; - type uint16; - description "The maximum queue size for the data change notification executor."; - } - - leaf max-data-change-executor-pool-size { - default 20; - type uint16; - description "The maximum thread pool size for the data change notification executor."; - } - - leaf max-data-change-listener-queue-size { - default 1000; - type uint16; - description "The maximum queue size for the data change listeners."; - } - leaf max-data-store-executor-queue-size { - default 5000; - type uint16; - description "The maximum queue size for the data store executor."; - } - leaf debug-transactions { - type boolean; - default false; - description "Enable transaction lifecycle debugging."; - } - } - - // Augments the 'configuration' choice node under modules/module. - augment "/config:modules/config:module/config:configuration" { - case inmemory-config-datastore-provider { - when "/config:modules/config:module/config:type = 'inmemory-config-datastore-provider'"; - - container inmemory-config-datastore-provider { - container schema-service { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:schema-service; - } - } - } - uses datastore-configuration; - } - } - } - - // Augments the 'configuration' choice node under modules/module. - augment "/config:modules/config:module/config:configuration" { - case inmemory-operational-datastore-provider { - when "/config:modules/config:module/config:type = 'inmemory-operational-datastore-provider'"; - - container inmemory-operational-datastore-provider { - container schema-service { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity sal:schema-service; - } - } - } - uses datastore-configuration; - } - } - } -} diff --git a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml index 2bf8864e9b..a4adb129af 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/pom.xml +++ b/opendaylight/md-sal/sal-remoterpc-connector/pom.xml @@ -57,10 +57,6 @@ org.opendaylight.controller sal-core-spi - - org.opendaylight.controller - sal-dom-config - org.opendaylight.controller sal-common-impl diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/pom.xml b/opendaylight/md-sal/samples/clustering-test-app/provider/pom.xml index be1ba6cf6e..75c2285dba 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/pom.xml +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/pom.xml @@ -18,6 +18,10 @@ org.opendaylight.mdsal mdsal-eos-binding-api + + org.opendaylight.mdsal + mdsal-singleton-common-api + org.opendaylight.controller.samples clustering-it-model -- 2.36.6