<name>OpenDaylight :: Config-Netty</name>
- <properties>
- <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
- <config.netty.configfile>00-netty.xml</config.netty.configfile>
- </properties>
-
<dependencyManagement>
<dependencies>
<dependency>
<dependencies>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>odl-config-netty-config-api</artifactId>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>odl-netty-4</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<groupId>${project.groupId}</groupId>
<artifactId>threadpool-config-impl</artifactId>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>odl-config-startup</artifactId>
- <type>xml</type>
- <classifier>features</classifier>
- </dependency>
- <dependency>
- <!-- finalname="${config.configfile.directory}/${config.netty.configfile}" -->
- <groupId>${project.groupId}</groupId>
- <artifactId>config-netty-config</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
</dependencies>
</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright © 2016, 2017 Red Hat, Inc. and others.
-
- 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
- -->
-<features name="odl-config-persister-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
- <feature name="odl-config-netty" version="${project.version}">
- <configfile finalname="${config.configfile.directory}/${config.netty.configfile}">
- mvn:org.opendaylight.controller/config-netty-config/${project.version}/xml/config
- </configfile>
- </feature>
-</features>
<properties>
<blueprint.version>0.9.0-SNAPSHOT</blueprint.version>
- <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
- <config.mdsal.configfile>01-md-sal.xml</config.mdsal.configfile>
</properties>
<dependencyManagement>
<type>pom</type>
<scope>import</scope>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>config-artifacts</artifactId>
- <version>0.9.0-SNAPSHOT</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>odl-config-startup</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>odl-config-netty</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
<type>xml</type>
<classifier>features</classifier>
</dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sal-connector-api</artifactId>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sal-dom-config</artifactId>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sal-binding-config</artifactId>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sal-inmemory-datastore</artifactId>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sal-dom-broker-config</artifactId>
- </dependency>
<dependency>
<!-- TODO start-level="40" -->
<groupId>${project.groupId}</groupId>
<artifactId>blueprint</artifactId>
<version>0.9.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <!-- finalname="${config.configfile.directory}/${config.mdsal.configfile}" -->
- <groupId>${project.groupId}</groupId>
- <artifactId>md-sal-config</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
</dependencies>
</project>
<feature version="[2.0.3,3)">odl-yangtools-codec</feature>
<bundle start-level="70">mvn:org.opendaylight.controller/sal-schema-service/${project.version}</bundle>
<bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>
- <configfile finalname="${config.configfile.directory}/${config.mdsal.configfile}" override="true">
- mvn:org.opendaylight.controller/md-sal-config/${project.version}/xml/config
- </configfile>
</feature>
</features>
<version>1.8.0-SNAPSHOT</version>
<packaging>feature</packaging>
- <properties>
- <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
- <config.clustering.configfile>05-clustering.xml</config.clustering.configfile>
- </properties>
-
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <!-- finalname="${config.configfile.directory}/${config.clustering.configfile}" override="true" -->
- <groupId>${project.groupId}</groupId>
- <artifactId>sal-clustering-config</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
<dependency>
<!-- finalname="configuration/initial/akka.conf" -->
<groupId>${project.groupId}</groupId>
-->
<features name="odl-mdsal-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
<feature name="odl-mdsal-broker" version="${project.version}">
- <configfile finalname="${config.configfile.directory}/${config.clustering.configfile}" override="true">
- mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/config
- </configfile>
<configfile finalname="configuration/initial/akka.conf">
mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/akkaconf
</configfile>
<type>pom</type>
<scope>import</scope>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>config-artifacts</artifactId>
- <version>0.9.0-SNAPSHOT</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>config-manager-facade-xml</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
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;
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<Bundle> containerBundles = new HashSet<>(Arrays.asList(bundleContext.getBundles()));
Bundle[] usingBundles = ref.getUsingBundles();
return usingBundles != null ? usingBundles.length : 0;
}
-
- private <T> T getOSGiService(final Class<T> serviceInterface) {
- try {
- ServiceReference<T> 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;
- }
}
*/
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;
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;
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.
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());
// We use a LinkedHashSet to preserve insertion order as we walk the service usage hierarchy.
Set<Bundle> containerBundlesSet = new LinkedHashSet<>();
- List<Entry<String, ModuleIdentifier>> configModules = new ArrayList<>();
- findDependentContainersRecursively(forBundle, containerBundlesSet, configModules);
+ findDependentContainersRecursively(forBundle, containerBundlesSet);
List<Bundle> containerBundles = new ArrayList<>(containerBundlesSet);
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);
}
});
}
- private void restartConfigModules(final BundleContext bundleContext, final List<Entry<String,
- ModuleIdentifier>> configModules) {
- if (configModules.isEmpty()) {
- return;
- }
-
- ServiceReference<ConfigSubsystemFacadeFactory> 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<Entry<String, ModuleIdentifier>> configModules,
- final ConfigSubsystemFacade configFacade) throws ParserConfigurationException, DocumentedException,
- ValidationException, ConflictingVersionException {
-
- Document document = XmlUtil.newDocument();
- Element dataElement = XmlUtil.createElement(document, XmlMappingConstants.DATA_KEY, Optional.<String>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<String, ModuleIdentifier> 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<Bundle> containerBundles,
- final List<Entry<String, ModuleIdentifier>> configModules) {
+ private void findDependentContainersRecursively(final Bundle bundle, final Set<Bundle> containerBundles) {
if (!containerBundles.add(bundle)) {
// Already seen this bundle...
return;
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);
}
}
}
}
}
- private void possiblyAddConfigModuleIdentifier(final ServiceReference<?> reference,
- final List<Entry<String, ModuleIdentifier>> 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<>());
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-config</artifactId>
- </dependency>
</dependencies>
<build>
<pluginManagement>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>odlparent-lite</artifactId>
- <version>3.1.0</version>
- <relativePath/>
- </parent>
-
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>md-sal-config</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <description>Configuration files for md-sal</description>
- <packaging>jar</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/classes/initial/01-md-sal.xml</file>
- <type>xml</type>
- <classifier>config</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 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
-
- NOTE: This file is deprecated as wiring is now done via blueprint. This file is kept for backwards
- compatibility. Runtime modifications may not be honored.
--->
-<snapshot>
- <configuration>
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:schema-service-singleton</type>
- <name>yang-schema-service</name>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:runtime-generated-mapping</type>
- <name>runtime-mapping-singleton</name>
- <wait-for-schema xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">true</wait-for-schema>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-notification-adapter</type>
- <name>binding-notification-adapter</name>
- <binding-notification-adapter xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
- <name>dom-broker</name>
- </dom-async-broker>
- </binding-notification-adapter>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-notification-publish-adapter</type>
- <name>binding-notification-publish-adapter</name>
- <binding-notification-publish-adapter xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
- <name>dom-broker</name>
- </dom-async-broker>
- </binding-notification-publish-adapter>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-notification-broker</type>
- <name>binding-notification-broker</name>
- <notification-adapter xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-new-notification-service</type>
- <name>binding-notification-adapter</name>
- </notification-adapter>
- <notification-publish-adapter xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-new-notification-publish-service</type>
- <name>binding-notification-publish-adapter</name>
- </notification-publish-adapter>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-broker-impl</type>
- <name>binding-broker-impl</name>
- <binding-broker-impl xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
- <name>dom-broker</name>
- </dom-async-broker>
- <notification-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
- <name>binding-notification-broker</name>
- </notification-service>
- <root-data-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>binding-data-broker</name>
- </root-data-broker>
- <notification-publish-service>
- <type xmlns:binding-impl="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding-impl:binding-new-notification-publish-service</type>
- <name>binding-notification-publish-adapter</name>
- </notification-publish-service>
- </binding-broker-impl>
- </module>
-
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">prefix:inmemory-config-datastore-provider</type>
- <name>config-store-service</name>
- <inmemory-config-datastore-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- </inmemory-config-datastore-provider>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">prefix:inmemory-operational-datastore-provider</type>
- <name>operational-store-service</name>
- <inmemory-operational-datastore-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider">
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- </inmemory-operational-datastore-provider>
- </module>
-
- <!-- PingPong broker -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:pingpong">prefix:pingpong-data-broker</type>
- <name>pingpong-data-broker</name>
- <data-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>inmemory-data-broker</name>
- </data-broker>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-forwarded-data-broker</type>
- <name>pingpong-binding-data-broker</name>
- <binding-forwarded-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>pingpong-broker</name>
- </dom-async-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </binding-forwarded-data-broker>
- </module>
-
- <!--
- Tree-based in-memory data store. This is the data store which is currently
- recommended for single-node deployments.
- -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:dom-inmemory-data-broker</type>
- <name>inmemory-data-broker</name>
-
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
-
- <config-data-store>
- <type xmlns:config-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store">config-dom-store-spi:config-dom-datastore</type>
- <name>config-store-service</name>
- </config-data-store>
-
- <operational-data-store>
- <type xmlns:operational-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store">operational-dom-store-spi:operational-dom-datastore</type>
- <name>operational-store-service</name>
- </operational-data-store>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:dom-broker-impl</type>
- <name>inmemory-dom-broker</name>
- <async-data-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>inmemory-data-broker</name>
- </async-data-broker>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-forwarded-data-broker</type>
- <name>binding-async-data-broker</name>
- <binding-forwarded-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>inmemory-data-broker</name>
- </dom-async-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </binding-forwarded-data-broker>
- </module>
- </modules>
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <instance>
- <name>yang-schema-service</name>
- <provider>/modules/module[type='schema-service-singleton'][name='yang-schema-service']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:yang-text-source-provider</type>
- <instance>
- <name>yang-text-source-provider</name>
- <provider>/modules/module[type='schema-service-singleton'][name='yang-schema-service']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:config-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store">config-dom-store-spi:config-dom-datastore</type>
- <instance>
- <name>config-store-service</name>
- <provider>/modules/module[type='inmemory-config-datastore-provider'][name='config-store-service']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:operational-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store">operational-dom-store-spi:operational-dom-datastore</type>
- <instance>
- <name>operational-store-service</name>
- <provider>/modules/module[type='inmemory-operational-datastore-provider'][name='operational-store-service']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding-impl="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding-impl:binding-dom-mapping-service</type>
- <instance>
- <name>runtime-mapping-singleton</name>
- <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-codec-tree-factory</type>
- <instance>
- <name>runtime-mapping-singleton</name>
- <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-normalized-node-serializer</type>
- <instance>
- <name>runtime-mapping-singleton</name>
- <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:v1:codec">binding:binding-v1-codec-tree-factory</type>
- <instance>
- <name>runtime-mapping-singleton</name>
- <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:v1:codec">binding:binding-v1-normalized-node-serializer</type>
- <instance>
- <name>runtime-mapping-singleton</name>
- <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding-impl="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding-impl:binding-new-notification-service</type>
- <instance>
- <name>binding-notification-adapter</name>
- <provider>/modules/module[type='binding-notification-adapter'][name='binding-notification-adapter']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding-impl="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding-impl:binding-new-notification-publish-service</type>
- <instance>
- <name>binding-notification-publish-adapter</name>
- <provider>/modules/module[type='binding-notification-publish-adapter'][name='binding-notification-publish-adapter']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
- <instance>
- <name>binding-notification-broker</name>
- <provider>/modules/module[type='binding-notification-broker'][name='binding-notification-broker']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
- <instance>
- <name>binding-osgi-broker</name>
- <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
- <instance>
- <name>binding-rpc-broker</name>
- <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
- <instance>
- <name>dom-broker</name>
- <provider>/modules/module[type='dom-broker-impl'][name='inmemory-dom-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <instance>
- <name>binding-data-broker</name>
- <provider>/modules/module[type='binding-forwarded-data-broker'][name='binding-async-data-broker']</provider>
- </instance>
- <instance>
- <name>pingpong-binding-data-broker</name>
- <provider>/modules/module[type='binding-forwarded-data-broker'][name='pingpong-binding-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <instance>
- <name>inmemory-data-broker</name>
- <provider>/modules/module[type='dom-inmemory-data-broker'][name='inmemory-data-broker']</provider>
- </instance>
- <instance>
- <name>pingpong-broker</name>
- <provider>/modules/module[type='pingpong-data-broker'][name='pingpong-data-broker']</provider>
- </instance>
- </service>
-
- </services>
- </data>
- </configuration>
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:netty:eventexecutor?module=netty-event-executor&revision=2013-11-12</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl?module=opendaylight-sal-binding-broker-impl&revision=2013-10-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:pingpong?module=opendaylight-pingpong-broker&revision=2014-11-07</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?module=opendaylight-sal-dom-broker-impl&revision=2013-10-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:common?module=opendaylight-md-sal-common&revision=2013-10-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store?module=opendaylight-config-dom-datastore&revision=2014-06-17</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store?module=opendaylight-operational-dom-datastore&revision=2014-06-17</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:inmemory-datastore-provider?module=opendaylight-inmemory-datastore-provider&revision=2014-06-17</capability>
-
- </required-capabilities>
-</snapshot>
<artifactId>sal-inmemory-datastore</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sal-dom-config</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sal-dom-broker-config</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>sal-binding-config</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>md-sal-config</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>sal-schema-service</artifactId>
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;
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";
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
* 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";
@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() {
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-config</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-api</artifactId>
<version>1.8.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <properties>
- <jmxGeneratorPath>${project.build.directory}/generated-sources/config-binding</jmxGeneratorPath>
- </properties>
-
<dependencyManagement>
<dependencies>
<dependency>
<type>pom</type>
<scope>import</scope>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>config-artifacts</artifactId>
- <version>0.9.0-SNAPSHOT</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
</dependencies>
</dependencyManagement>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-common</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-api</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <version>2.0.5</version>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-jmx-generator-plugin</artifactId>
- <version>0.9.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>config</id>
- <goals>
- <goal>generate-sources</goal>
- </goals>
- <configuration>
- <codeGenerators>
- <generator>
- <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
- <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
- <additionalConfiguration>
- <namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1>
- </additionalConfiguration>
- </generator>
- </codeGenerators>
- <inspectDependencies>true</inspectDependencies>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>${jmxGeneratorPath}</directory>
- <includes>
- <include>**</include>
- </includes>
- </fileset>
- <fileset>
- <directory>${salGeneratorPath}</directory>
- <includes>
- <include>**</include>
- </includes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<module>sal-binding-util</module>
- <!-- Config subsystem bindings -->
- <module>sal-dom-config</module>
- <module>sal-dom-broker-config</module>
- <module>sal-binding-config</module>
-
- <!-- Configuration File -->
- <module>md-sal-config</module>
-
<!-- Samples -->
<module>samples</module>
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Deprecated
public class RootBindingAwareBroker implements Mutable, Identifiable<String>, BindingAwareBroker, AutoCloseable,
RpcProviderRegistry {
</interfaces>
</service>
- <service id="codec" ref="mappingCodec" interface="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec">
- <service-properties>
- <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl"/>
- <entry key="config-module-name" value="runtime-generated-mapping"/>
- <entry key="config-instance-name" value="runtime-mapping-singleton"/>
- </service-properties>
- </service>
+ <service id="codec" ref="mappingCodec" interface="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec"/>
<!-- Binding RPC Registry Service -->
<service ref="bindingPingPongDataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
odl:type="pingpong"/>
+ <!-- Legacy BindingAwareBroker -->
+
+ <bean id="bindingAwareBroker" class="org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker"
+ init-method="start" destroy-method="close">
+ <argument value="deprecated-BindingAwareBroker"/>
+ <property name="dataBroker" ref="bindingDataBroker"/>
+ <property name="mountService" ref="bindingMountPointService"/>
+ <property name="rpcBroker" ref="bindingRpcRegistry"/>
+ <property name="notificationBroker" ref="bindingNotificationProviderService"/>
+ <property name="notificationPublishService" ref="bindingNotificationPublishAdapter"/>
+ </bean>
+
+ <service ref="bindingAwareBroker" interface="org.opendaylight.controller.sal.binding.api.BindingAwareBroker"/>
</blueprint>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-parent</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
-
- <artifactId>sal-binding-config</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <properties>
- <!-- The Java classes are mostly config yang-generated wjich we don't want analyzed by findbugs.
- However the generated package names don't conform to the findbugs exclusion filter
- hence we explicitly skip findbugs. -->
- <findbugs.skip>true</findbugs.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-dom-config</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-broker-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>mdsal-binding-dom-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>ietf-yang-types-20130715</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
- <Export-Package>
- {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
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <scm>
- <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
- </scm>
-
-</project>
+++ /dev/null
-/*
- * 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);
- }
-}
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-/*
- * 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;
- }
-
-}
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-/*
- * 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);
- }
-
-}
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-/*
- * 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);
- }
-
-}
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-/*
- * 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<ProviderFunctionality> getProviderFunctionality() {
- return Collections.emptyList();
- }
-
- @Override
- public void onSessionInitiated(ProviderSession session) {
- // NOOP
- }
-}
+++ /dev/null
-/*
- * 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);
- }
-}
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-/*
- * 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<BindingToNormalizedNodeCodec> 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;
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-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;
- }
- }
- }
-}
+++ /dev/null
-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;
- }
-
-}
+++ /dev/null
-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;
- }
-
-}
+++ /dev/null
-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
<phase>package</phase>
<configuration>
<artifacts>
- <artifact>
- <file>${project.build.directory}/classes/initial/05-clustering.xml.conf</file>
- <type>xml</type>
- <classifier>config</classifier>
- </artifact>
<artifact>
<file>${project.build.directory}/classes/initial/akka.conf</file>
<type>xml</type>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 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
-
- NOTE: This file is deprecated as wiring is now done via blueprint. This file is kept
- for backward compatibility and runtime modifications will not be honored. In
- addition, this file is overwritten on feature re-install.
--->
-<snapshot>
- <configuration>
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:concurrent-data-broker">prefix:dom-concurrent-data-broker</type>
- <name>concurrent-data-broker</name>
-
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
-
- <config-data-store>
- <type xmlns:config-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store">config-dom-store-spi:config-dom-datastore</type>
- <name>distributed-config-store-service</name>
- </config-data-store>
-
- <operational-data-store>
- <type xmlns:operational-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store">operational-dom-store-spi:operational-dom-datastore</type>
- <name>distributed-operational-store-service</name>
- </operational-data-store>
- </module>
-
- <module>
- <type xmlns:as="urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:impl">as:actor-system-provider-impl</type>
- <name>actor-system-provider-impl</name>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider">prefix:distributed-operational-datastore-provider</type>
- <name>distributed-operational-store-module</name>
- <operational-schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </operational-schema-service>
- <operational-actor-system-provider>
- <type xmlns:as="urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service">as:actor-system-provider-service</type>
- <name>actor-system-provider</name>
- </operational-actor-system-provider>
- <operational-properties>
- <persistent>false</persistent>
- <shard-election-timeout-factor>20</shard-election-timeout-factor>
- </operational-properties>
- </module>
-
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider">prefix:distributed-config-datastore-provider</type>
- <name>distributed-config-store-module</name>
- <config-schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </config-schema-service>
- <config-actor-system-provider>
- <type xmlns:as="urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service">as:actor-system-provider-service</type>
- <name>actor-system-provider</name>
- </config-actor-system-provider>
- <config-properties>
- <shard-election-timeout-factor>20</shard-election-timeout-factor>
- </config-properties>
- </module>
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-
- <service>
- <type xmlns:as="urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service">as:actor-system-provider-service</type>
- <instance>
- <name>actor-system-provider</name>
- <provider>/modules/module[type='actor-system-provider-impl'][name='actor-system-provider-impl']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:config-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store">config-dom-store-spi:config-dom-datastore</type>
- <instance>
- <name>distributed-config-store-service</name>
- <provider>/modules/module[type='distributed-config-datastore-provider'][name='distributed-config-store-module']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:operational-dom-store-spi="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store">operational-dom-store-spi:operational-dom-datastore</type>
- <instance>
- <name>distributed-operational-store-service</name>
- <provider>/modules/module[type='distributed-operational-datastore-provider'][name='distributed-operational-store-module']</provider>
- </instance>
- </service>
-
- <!-- Overrides the definition from 01-md-sal.xml -->
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <instance>
- <name>inmemory-data-broker</name>
- <provider>/modules/module[type='dom-concurrent-data-broker'][name='concurrent-data-broker']</provider>
- </instance>
- </service>
-
- </services>
- </data>
- </configuration>
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:config:concurrent-data-broker?module=odl-concurrent-data-broker-cfg&revision=2014-11-24</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:service?module=actor-system-provider-service&revision=2015-10-05</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:config:actor-system-provider:impl?module=actor-system-provider-impl&revision=2015-10-05</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider?module=distributed-datastore-provider&revision=2014-06-12</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:config-dom-store?module=opendaylight-config-dom-datastore&revision=2014-06-17</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:operational-dom-store?module=opendaylight-operational-dom-datastore&revision=2014-06-17</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
- </required-capabilities>
-</snapshot>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-config</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-clustering-commons</artifactId>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-common-util</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-dom-broker-config</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-dom-broker</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-binding-dom-codec</artifactId>
+ </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-spi</artifactId>
* 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;
* 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;
* 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;
* 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;
+++ /dev/null
-/*
- * 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<ActorSystemProvider> 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<ActorSystemProviderListener> 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();
- }
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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<DOMDataBroker> 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();
- }
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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<DistributedDataStoreInterface> 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;
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-
-
-}
+++ /dev/null
-/*
- * 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<DistributedDataStoreInterface> 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;
- }
-
-}
+++ /dev/null
-/*
- * 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;
- }
-
-}
<!-- ActorSystemProvider -->
- <bean id="bundleClassLoader" class="org.opendaylight.controller.config.yang.config.actor_system_provider.impl.factory.osgi.BundleClassLoaderFactory"
+ <bean id="bundleClassLoader" class="org.opendaylight.controller.cluster.akka.osgi.impl.BundleClassLoaderFactory"
factory-method="createClassLoader">
<argument ref="blueprintBundleContext" />
</bean>
- <bean id="actorSystemProps" class="org.opendaylight.controller.config.yang.config.actor_system_provider.impl.factory.osgi.QuarantinedMonitorActorPropsFactory"
+ <bean id="actorSystemProps" class="org.opendaylight.controller.cluster.akka.osgi.impl.QuarantinedMonitorActorPropsFactory"
factory-method="createProps">
<argument ref="blueprintBundleContext" />
</bean>
<bean id="akkaReader" class="org.opendaylight.controller.cluster.common.actor.FileAkkaConfigurationReader"/>
- <bean id="akkaConfig" class="org.opendaylight.controller.config.yang.config.actor_system_provider.impl.factory.AkkaConfigFactory"
+ <bean id="akkaConfig" class="org.opendaylight.controller.cluster.akka.impl.AkkaConfigFactory"
factory-method="createAkkaConfig">
<argument ref="akkaReader" />
</bean>
- <bean id="actorSystemProvider" class="org.opendaylight.controller.config.yang.config.actor_system_provider.impl.ActorSystemProviderImpl"
+ <bean id="actorSystemProvider" class="org.opendaylight.controller.cluster.akka.impl.ActorSystemProviderImpl"
destroy-method="close">
<argument ref="bundleClassLoader" />
<argument ref="actorSystemProps"/>
+++ /dev/null
-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
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";
"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";
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;
- }
- }
- }
}
+++ /dev/null
-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;
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-parent</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
-
- <artifactId>sal-dom-broker-config</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <properties>
- <!-- The Java classes are mostly config yang-generated wjich we don't want analyzed by findbugs.
- However the generated package names don't conform to the findbugs exclusion filter
- hence we explicitly skip findbugs. -->
- <findbugs.skip>true</findbugs.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-dom-config</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-broker-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>ietf-yang-types-20130715</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Export-Package>
- {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.*
- </Export-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <scm>
- <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
- </scm>
-
-</project>
+++ /dev/null
-/*
- * 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<AutoCloseable> 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<BrokerService> 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 <T> WaitingServiceTracker<T> newTracker(Class<T> serviceInterface, List<AutoCloseable> closeables) {
- WaitingServiceTracker<T> 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;
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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<LogicalDatastoreType, DOMStore> 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<AbstractMXBean> 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;
- }
-}
+++ /dev/null
-/*
- * 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 {
-}
+++ /dev/null
-/*
- * 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<SchemaService> schemaServiceTracker =
- WaitingServiceTracker.create(SchemaService.class, bundleContext);
- final SchemaService schemaService = schemaServiceTracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
-
- final WaitingServiceTracker<YangTextSourceProvider> 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<SchemaContextListener> registerSchemaContextListener(
- final SchemaContextListener arg0) {
- return schemaService.registerSchemaContextListener(arg0);
- }
-
- @Override
- public void removeModule(final Module arg0) {
- schemaService.removeModule(arg0);
- }
-
- @Override
- public ListenableFuture<? extends YangTextSchemaSource> getSource(
- final SourceIdentifier sourceIdentifier) {
- return sourceProvider.getSource(sourceIdentifier);
- }
- }
-
- return new GlobalSchemaServiceProxy();
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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());
- }
-}
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-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;
- }
- }
- }
-}
+++ /dev/null
-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;
- }
- }
- }
- }
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-parent</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <artifactId>sal-dom-config</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-common-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-core-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-core-spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>mdsal-singleton-dom-impl</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- </plugin>
- </plugins>
- </build>
-
- <scm>
- <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
- </scm>
-
-</project>
+++ /dev/null
-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
+++ /dev/null
-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
+++ /dev/null
-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
+++ /dev/null
-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
<artifactId>yang-data-impl</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-dom-config</artifactId>
- </dependency>
-
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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 {
-
-}
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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 {
-}
+++ /dev/null
-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;
- }
- }
- }
-}
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-core-spi</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-dom-config</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-common-impl</artifactId>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-eos-binding-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>mdsal-singleton-common-api</artifactId>
+ </dependency>
<dependency>
<groupId>org.opendaylight.controller.samples</groupId>
<artifactId>clustering-it-model</artifactId>