Base integration of Binding Aware Broker with Config Subsystem 73/2273/5
authorTony Tkacik <ttkacik@cisco.com>
Wed, 30 Oct 2013 12:32:29 +0000 (13:32 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 31 Oct 2013 16:28:29 +0000 (16:28 +0000)
Binding Aware Broker is now initialized via config subsystem
as default module, not bundle activator, this allows for
configurable modules declare BindingAwareBroker and MD-SAL as
one of their dependencies.

MD-SAL is still also available via OSGI registry and provided
Activators.

Change-Id: I81315312b921fcc2317d93e5dcf001174d02b644
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
20 files changed:
opendaylight/distribution/opendaylight/pom.xml
opendaylight/md-sal/model/pom.xml
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java
opendaylight/md-sal/sal-binding-broker/pom.xml
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplSingletonModule.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplSingletonModuleFactory.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/BindingAwareBrokerImpl.xtend
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/BrokerActivator.java [deleted file]
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcServiceRegistrationImpl.xtend [deleted file]
opendaylight/md-sal/sal-binding-broker/src/main/test/org/opendaylight/controller/sal/binding/test/GenerationTest.java [deleted file]
opendaylight/md-sal/sal-binding-broker/src/main/yang/opendaylight-binding-broker-impl.yang [new file with mode: 0644]
opendaylight/md-sal/sal-binding-config/pom.xml [new file with mode: 0644]
opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding.yang [new file with mode: 0644]
opendaylight/md-sal/sal-binding-it/pom.xml
opendaylight/md-sal/sal-binding-it/src/main/java/org/opendaylight/controller/test/sal/binding/it/TestHelper.java
opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java
opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/RoutedServiceTest.java
opendaylight/md-sal/samples/toaster-it/pom.xml
opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java

index 4c36e5634cd32cc38aad1407fab17c97b02a4a03..790b9b34c0dd30ebe106d4e1ed527112d706140e 100644 (file)
           <artifactId>sal-binding-api</artifactId>
           <version>${mdsal.version}</version>
         </dependency>
           <artifactId>sal-binding-api</artifactId>
           <version>${mdsal.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.opendaylight.controller</groupId>
+          <artifactId>sal-binding-config</artifactId>
+          <version>${mdsal.version}</version>
+        </dependency>
         <dependency>
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>sal-binding-broker-impl</artifactId>
         <dependency>
           <groupId>org.opendaylight.controller</groupId>
           <artifactId>sal-binding-broker-impl</artifactId>
index a5554822cd21792692fbd58dac97644a26bde62d..ca97232cfb66393d579a0ac83514037aae42e339 100644 (file)
                 </executions>
             </plugin>
         </plugins>
                 </executions>
             </plugin>
         </plugins>
-        <pluginManagement>
-            <plugins>
-                <!--This plugin's configuration is used to store Eclipse 
-                    m2e settings only. It has no influence on the Maven build itself. -->
-                <plugin>
-                    <groupId>org.eclipse.m2e</groupId>
-                    <artifactId>lifecycle-mapping</artifactId>
-                    <version>1.0.0</version>
-                    <configuration>
-                        <lifecycleMappingMetadata>
-                            <pluginExecutions>
-                                <pluginExecution>
-                                    <pluginExecutionFilter>
-                                        <groupId>
-                                            org.opendaylight.yangtools
-                                        </groupId>
-                                        <artifactId>
-                                            yang-maven-plugin
-                                        </artifactId>
-                                        <versionRange>
-                                            [0.5,)
-                                        </versionRange>
-                                        <goals>
-                                            <goal>
-                                                generate-sources
-                                            </goal>
-                                        </goals>
-                                    </pluginExecutionFilter>
-                                    <action>
-                                        <ignore></ignore>
-                                    </action>
-                                </pluginExecution>
-                            </pluginExecutions>
-                        </lifecycleMappingMetadata>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
     </build>
 
     <dependencies>
     </build>
 
     <dependencies>
index f6159cabe259485c311149d86e1e899d84c54684..9646fc8c0aa5488f0a9a589dc66827ac8fd6189c 100644 (file)
@@ -25,6 +25,7 @@
 
         <!-- Binding Aware -->
         <module>sal-binding-api</module>
 
         <!-- Binding Aware -->
         <module>sal-binding-api</module>
+        <module>sal-binding-config</module>
         <module>sal-binding-broker</module>
         <module>sal-binding-it</module>
 
         <module>sal-binding-broker</module>
         <module>sal-binding-it</module>
 
                     <artifactId>jacoco-maven-plugin</artifactId>
                     <version>${jacoco.version}</version>
                 </plugin>
                     <artifactId>jacoco-maven-plugin</artifactId>
                     <version>${jacoco.version}</version>
                 </plugin>
+                <!--This plugin's configuration is used to store Eclipse 
+                    m2e settings only. It has no influence on the Maven build itself. -->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.opendaylight.yangtools
+                                        </groupId>
+                                        <artifactId>
+                                            yang-maven-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [0.5,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>
+                                                generate-sources
+                                            </goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>
             </plugins>
         </pluginManagement>
         <plugins>
index 19ca06a265941910077aca475a8195d31b11cecf..db20a13991f8356acf88b3212c4722356aa70fc1 100644 (file)
@@ -168,12 +168,7 @@ public interface BindingAwareBroker {
 
     public interface RpcRegistration<T extends RpcService> extends Registration<T> {
 
 
     public interface RpcRegistration<T extends RpcService> extends Registration<T> {
 
-        /**
-         * 
-         * @return instance for which registration does exists.
-         */
-        @Deprecated
-        T getService();
+        Class<T> getServiceType();
     }
 
     public interface RoutedRpcRegistration<T extends RpcService> extends RpcRegistration<T>,
     }
 
     public interface RoutedRpcRegistration<T extends RpcService> extends RpcRegistration<T>,
@@ -191,6 +186,15 @@ public interface BindingAwareBroker {
         @Deprecated
         void registerInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);
 
         @Deprecated
         void registerInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);
 
+        /**
+         * Unregister particular instance identifier to be processed by this
+         * RpcService
+         * 
+         * Deprecated in favor of {@link RoutedRegistration#unregisterPath(Object, Object)}. 
+         * 
+         * @param context
+         * @param instance
+         */
         @Deprecated
         void unregisterInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);
     }
         @Deprecated
         void unregisterInstance(Class<? extends BaseIdentity> context, InstanceIdentifier<?> instance);
     }
index 54b1eb6c6695068ded33e1e7026741cdadd4dbde..b8b37af58ee42eec8f1ca2b50763013f20c935f8 100644 (file)
 
     <build>
         <plugins>
 
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.opendaylight.yangtools</groupId>
+                <artifactId>yang-maven-plugin</artifactId>
+                <version>0.5.9-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate-sources</goal>
+                        </goals>
+                        <configuration>
+                            <codeGenerators>
+                                <generator>
+                                    <codeGeneratorClass>
+                                        org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+                                    </codeGeneratorClass>
+                                    <outputBaseDir>${project.build.directory}/generated-sources/config</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>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.opendaylight.controller</groupId>
+                        <artifactId>yang-jmx-generator-plugin</artifactId>
+                        <version>0.2.2-SNAPSHOT</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${project.build.directory}/generated-sources/config</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
                         <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                 <configuration>
                     <instructions>
                         <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
-                        <Bundle-Activator>org.opendaylight.controller.sal.binding.impl.BrokerActivator</Bundle-Activator>
                         <Private-Package>
                         <Private-Package>
+                            org.opendaylight.controller.config.yang.md.sal.binding.impl,
+                            org.opendaylight.controller.sal.binding.spi,
+                            org.opendaylight.controller.sal.binding.spi.*,
                             org.opendaylight.controller.sal.binding.impl,
                             org.opendaylight.controller.sal.binding.impl.*,
                             org.opendaylight.controller.sal.binding.codegen.*,
                             org.opendaylight.controller.sal.binding.impl,
                             org.opendaylight.controller.sal.binding.impl.*,
                             org.opendaylight.controller.sal.binding.codegen.*,
                 <artifactId>maven-clean-plugin</artifactId>
             </plugin>
             <plugin>
                 <artifactId>maven-clean-plugin</artifactId>
             </plugin>
             <plugin>
-                   <groupId>org.jacoco</groupId>
-                   <artifactId>jacoco-maven-plugin</artifactId>
-                   <configuration>
-                     <includes>org.opendaylight.controller.*</includes>
-                   </configuration>
-                   <executions>
-                     <execution>
-                       <id>pre-test</id>
-                       <goals>
-                         <goal>prepare-agent</goal>
-                       </goals>
-                     </execution>
-                     <execution>
-                       <id>post-test</id>
-                       <phase>test</phase>
-                       <goals>
-                         <goal>report</goal>
-                       </goals>
-                     </execution>
-                   </executions>
-               </plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <configuration>
+                    <includes>org.opendaylight.controller.*</includes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>pre-test</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>post-test</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
         </plugins>
     </build>
 
             <groupId>org.eclipse.xtend</groupId>
             <artifactId>org.eclipse.xtend.lib</artifactId>
         </dependency>
             <groupId>org.eclipse.xtend</groupId>
             <artifactId>org.eclipse.xtend.lib</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-config</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
     </dependencies>
 </project>
     </dependencies>
 </project>
diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplSingletonModule.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplSingletonModule.java
new file mode 100644 (file)
index 0000000..cf561b3
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * 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
+ */
+package org.opendaylight.controller.config.yang.md.sal.binding.impl;
+
+import org.opendaylight.controller.sal.binding.impl.BindingAwareBrokerImpl;
+import org.osgi.framework.BundleContext;
+
+import com.google.common.base.Preconditions;
+
+/**
+*
+*/
+public final class BindingBrokerImplSingletonModule extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingBrokerImplSingletonModule
+{
+
+    private BundleContext bundleContext;
+
+    public BindingBrokerImplSingletonModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public BindingBrokerImplSingletonModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, BindingBrokerImplSingletonModule oldModule, java.lang.AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void validate() {
+        super.validate();
+        Preconditions.checkNotNull(getBundleContext());
+    }
+
+    
+    
+    
+    
+    public java.lang.AutoCloseable createInstance() {
+        BindingAwareBrokerImpl broker = new BindingAwareBrokerImpl(getBundleContext());
+        broker.start();
+        return broker;
+    }
+
+    public BundleContext getBundleContext() {
+        return bundleContext;
+    }
+
+    public void setBundleContext(BundleContext bundleContext) {
+        this.bundleContext = bundleContext;
+    }
+}
diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplSingletonModuleFactory.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/config/yang/md/sal/binding/impl/BindingBrokerImplSingletonModuleFactory.java
new file mode 100644 (file)
index 0000000..e597b7f
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * 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
+ */
+
+package org.opendaylight.controller.config.yang.md.sal.binding.impl;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.opendaylight.controller.config.api.DependencyResolver;
+import org.opendaylight.controller.config.api.DependencyResolverFactory;
+import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
+import org.opendaylight.controller.config.api.ModuleIdentifier;
+import org.opendaylight.controller.config.spi.Module;
+import org.osgi.framework.BundleContext;
+
+/**
+*
+*/
+public class BindingBrokerImplSingletonModuleFactory extends
+        org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingBrokerImplSingletonModuleFactory {
+
+    private static final String SINGLETON_NAME = "binding-broker-singleton";
+    public static BindingBrokerImplSingletonModule SINGLETON;
+    public static ModuleIdentifier SINGLETON_IDENTIFIER = new ModuleIdentifier(NAME, SINGLETON_NAME);
+
+    @Override
+    public Module createModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
+        throw new UnsupportedOperationException("Only default instance supported.");
+    }
+
+    @Override
+    public Module createModule(String instanceName, DependencyResolver dependencyResolver,
+            DynamicMBeanWithInstance old, BundleContext bundleContext) throws Exception {
+        throw new UnsupportedOperationException("Only default instance supported.");
+    }
+    
+    @Override
+    public Set<BindingBrokerImplSingletonModule> getDefaultModules(DependencyResolverFactory dependencyResolverFactory,
+            BundleContext bundleContext) {
+            if (SINGLETON == null) {
+
+                DependencyResolver dependencyResolver = dependencyResolverFactory
+                        .createDependencyResolver(SINGLETON_IDENTIFIER);
+                SINGLETON = new BindingBrokerImplSingletonModule(SINGLETON_IDENTIFIER, dependencyResolver);
+                SINGLETON.setBundleContext(bundleContext);
+            }
+
+            return Collections.singleton(SINGLETON);
+    }
+
+}
index 1dc2a88bdecbae415b35870cd4b72be024426c05..75655419b057028510282bb170235e3c55021a2e 100644 (file)
@@ -42,10 +42,15 @@ import com.google.common.collect.Multimap
 import com.google.common.collect.HashMultimap
 import static org.opendaylight.controller.sal.binding.impl.osgi.ClassLoaderUtils.*
 import java.util.concurrent.Executors
 import com.google.common.collect.HashMultimap
 import static org.opendaylight.controller.sal.binding.impl.osgi.ClassLoaderUtils.*
 import java.util.concurrent.Executors
+import java.util.Collections
+import org.opendaylight.yangtools.yang.binding.DataObject
 
 
-class BindingAwareBrokerImpl implements BindingAwareBroker {
+class BindingAwareBrokerImpl implements BindingAwareBroker, AutoCloseable {
     private static val log = LoggerFactory.getLogger(BindingAwareBrokerImpl)
 
     private static val log = LoggerFactory.getLogger(BindingAwareBrokerImpl)
 
+
+    private InstanceIdentifier<? extends DataObject> root = InstanceIdentifier.builder().toInstance();
+
     private val clsPool = ClassPool.getDefault()
     private var RuntimeCodeGenerator generator;
     
     private val clsPool = ClassPool.getDefault()
     private var RuntimeCodeGenerator generator;
     
@@ -70,29 +75,52 @@ class BindingAwareBrokerImpl implements BindingAwareBroker {
     @Property
     private var DataBrokerImpl dataBroker
     
     @Property
     private var DataBrokerImpl dataBroker
     
-    private var ServiceRegistration<NotificationProviderService> notifyBrokerRegistration
-
     @Property
     var BundleContext brokerBundleContext
     @Property
     var BundleContext brokerBundleContext
+    
+    ServiceRegistration<NotificationProviderService> notifyProviderRegistration
+    
+    ServiceRegistration<NotificationService> notifyConsumerRegistration
+    
+    ServiceRegistration<DataProviderService> dataProviderRegistration
+    
+    ServiceRegistration<DataBrokerService> dataConsumerRegistration
+    
+    private HashMapDataStore store = new HashMapDataStore();
+    
+    public new(BundleContext bundleContext) {
+        _brokerBundleContext = bundleContext;
+    }
 
     def start() {
 
     def start() {
+        log.info("Starting MD-SAL: Binding Aware Broker");
         initGenerator();
 
         val executor = Executors.newCachedThreadPool;
         // Initialization of notificationBroker
         initGenerator();
 
         val executor = Executors.newCachedThreadPool;
         // Initialization of notificationBroker
+        log.info("Starting MD-SAL: Binding Aware Notification Broker");
         notifyBroker = new NotificationBrokerImpl(executor);
         notifyBroker.invokerFactory = generator.invokerFactory;
         notifyBroker = new NotificationBrokerImpl(executor);
         notifyBroker.invokerFactory = generator.invokerFactory;
+
+        log.info("Starting MD-SAL: Binding Aware Data Broker");
         dataBroker = new DataBrokerImpl();
         dataBroker.executor = executor;
         dataBroker = new DataBrokerImpl();
         dataBroker.executor = executor;
+
         val brokerProperties = newProperties();
         val brokerProperties = newProperties();
-        notifyBrokerRegistration = brokerBundleContext.registerService(NotificationProviderService, notifyBroker,
+        
+        
+        log.info("Starting MD-SAL: Binding Aware Data Broker");
+        notifyProviderRegistration = brokerBundleContext.registerService(NotificationProviderService, notifyBroker,
             brokerProperties)
             brokerProperties)
-        brokerBundleContext.registerService(NotificationService, notifyBroker, brokerProperties)
-        brokerBundleContext.registerService(DataProviderService, dataBroker, brokerProperties)
-        brokerBundleContext.registerService(DataBrokerService, dataBroker, brokerProperties)
+        notifyConsumerRegistration = brokerBundleContext.registerService(NotificationService, notifyBroker, brokerProperties)
+        dataProviderRegistration = brokerBundleContext.registerService(DataProviderService, dataBroker, brokerProperties)
+        dataConsumerRegistration = brokerBundleContext.registerService(DataBrokerService, dataBroker, brokerProperties)
         
         
         
         
-
+        getDataBroker().registerDataReader(root, store);
+        getDataBroker().registerCommitHandler(root, store)
+        
+        log.info("MD-SAL: Binding Aware Broker Started");
     }
 
     def initGenerator() {
     }
 
     def initGenerator() {
@@ -162,12 +190,7 @@ class BindingAwareBrokerImpl implements BindingAwareBroker {
 
         val osgiReg = context.bundleContext.registerService(type, service, properties);
         proxy.delegate = service;
 
         val osgiReg = context.bundleContext.registerService(type, service, properties);
         proxy.delegate = service;
-        return new RpcServiceRegistrationImpl<T>(type, service, osgiReg);
-    }
-
-    def <T extends RpcService> RpcRegistration<T> registerMountedRpcImplementation(Class<T> type, T service,
-        InstanceIdentifier<?> identifier, OsgiProviderContext context) {
-        throw new UnsupportedOperationException("TODO: auto-generated method stub")
+        return new RpcServiceRegistrationImpl<T>(type, service, osgiReg,this);
     }
 
     def <T extends RpcService> RoutedRpcRegistration<T> registerRoutedRpcImplementation(Class<T> type, T service,
     }
 
     def <T extends RpcService> RoutedRpcRegistration<T> registerRoutedRpcImplementation(Class<T> type, T service,
@@ -238,7 +261,16 @@ class BindingAwareBrokerImpl implements BindingAwareBroker {
             val routingTable = router.getRoutingTable(context)
             val path = ctxMap.value
             routingTable.removeRoute(path)
             val routingTable = router.getRoutingTable(context)
             val path = ctxMap.value
             routingTable.removeRoute(path)
+        }
+    }
+    
+    protected def <T extends RpcService> void unregisterRpcService(RpcServiceRegistrationImpl<T> registration) {
 
 
+        val type = registration.serviceType;
+        
+        val proxy = managedProxies.get(type);
+        if(proxy.proxy.delegate === registration.instance) {
+            proxy.proxy.delegate = null;
         }
     }
     
         }
     }
     
@@ -246,6 +278,17 @@ class BindingAwareBrokerImpl implements BindingAwareBroker {
         getManagedDirectProxy(type);
     }
     
         getManagedDirectProxy(type);
     }
     
+    def getRpcRouters() {
+        return Collections.unmodifiableMap(rpcRouters);
+    }
+    
+    override close() {
+        dataConsumerRegistration.unregister()
+        dataProviderRegistration.unregister()
+        notifyConsumerRegistration.unregister()
+        notifyProviderRegistration.unregister()
+    }
+    
 }
 
 class RoutedRpcRegistrationImpl<T extends RpcService> extends AbstractObjectRegistration<T> implements RoutedRpcRegistration<T> {
 }
 
 class RoutedRpcRegistrationImpl<T extends RpcService> extends AbstractObjectRegistration<T> implements RoutedRpcRegistration<T> {
@@ -280,10 +323,6 @@ class RoutedRpcRegistrationImpl<T extends RpcService> extends AbstractObjectRegi
         unregisterPath(context, instance);
     }
 
         unregisterPath(context, instance);
     }
 
-    override getService() {
-        return instance;
-    }
-
     override registerPath(Class<? extends BaseIdentity> context, InstanceIdentifier<? extends Object> path) {
         checkClosed()
         broker.registerPath(this, context, path);
     override registerPath(Class<? extends BaseIdentity> context, InstanceIdentifier<? extends Object> path) {
         checkClosed()
         broker.registerPath(this, context, path);
@@ -293,6 +332,10 @@ class RoutedRpcRegistrationImpl<T extends RpcService> extends AbstractObjectRegi
         checkClosed()
         broker.unregisterPath(this, context, path);
     }
         checkClosed()
         broker.unregisterPath(this, context, path);
     }
+    
+    override getServiceType() {
+        return router.serviceType;
+    }
 
     private def checkClosed() {
         if (closed)
 
     private def checkClosed() {
         if (closed)
@@ -300,3 +343,24 @@ class RoutedRpcRegistrationImpl<T extends RpcService> extends AbstractObjectRegi
     }
 
 }
     }
 
 }
+class RpcServiceRegistrationImpl<T extends RpcService> extends AbstractObjectRegistration<T> implements RpcRegistration<T>  {
+
+    val ServiceRegistration<T> osgiRegistration;
+    private var BindingAwareBrokerImpl broker;
+    
+    @Property
+    val Class<T> serviceType;
+
+    public new(Class<T> type, T service, ServiceRegistration<T> osgiReg,BindingAwareBrokerImpl broker) {
+        super(service);
+        this._serviceType = type;
+        this.osgiRegistration = osgiReg;
+        this.broker= broker;
+    }
+
+    override protected removeRegistration() {
+        broker.unregisterRpcService(this);
+        broker = null;
+    }
+    
+}
diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/BrokerActivator.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/BrokerActivator.java
deleted file mode 100644 (file)
index fd6e0f0..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
- */
-package org.opendaylight.controller.sal.binding.impl;
-
-import java.util.Hashtable;
-
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BrokerActivator implements BundleActivator {
-
-    private static final Logger log = LoggerFactory.getLogger(BrokerActivator.class);
-    private BindingAwareBrokerImpl baSal;
-    private ServiceRegistration<BindingAwareBroker> baSalRegistration;
-    private HashMapDataStore store = new HashMapDataStore();
-    private InstanceIdentifier<?> root = InstanceIdentifier.builder().toInstance();
-    
-    @Override
-    public void start(BundleContext context) throws Exception {
-        log.info("Binding Aware Broker initialized");
-        baSal = new BindingAwareBrokerImpl();
-        baSal.setBrokerBundleContext(context);
-        baSal.start();
-        baSal.getDataBroker().registerDataReader(root, store);
-        baSal.getDataBroker().registerCommitHandler(root, store);
-
-        BindingAwareBroker baSalService = baSal;
-        Hashtable<String, String> properties = new Hashtable<>();
-        this.baSalRegistration = context.registerService(BindingAwareBroker.class, baSalService, properties);
-
-    }
-
-    @Override
-    public void stop(BundleContext context) throws Exception {
-        log.info("Binding Aware Broker stopped");
-        baSalRegistration.unregister();
-    }
-
-}
diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcServiceRegistrationImpl.xtend b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/impl/RpcServiceRegistrationImpl.xtend
deleted file mode 100644 (file)
index 3169471..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- */
-package org.opendaylight.controller.sal.binding.impl
-
-import org.osgi.framework.ServiceRegistration
-import org.opendaylight.yangtools.yang.binding.RpcService
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration
-
-class RpcServiceRegistrationImpl<T extends RpcService> implements RpcRegistration<T> {
-
-    val ServiceRegistration<T> osgiRegistration;
-    private val T service;
-    val Class<T> cls;
-
-    public new(Class<T> type, T service, ServiceRegistration<T> osgiReg) {
-        this.cls = type;
-        this.osgiRegistration = osgiReg;
-        this.service = service;
-    }
-
-    override getService() {
-        this.service
-    }
-    
-    override getInstance() {
-        this.service
-    }
-
-    override close() {
-        throw new UnsupportedOperationException("TODO: auto-generated method stub")
-    }
-}
diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/test/org/opendaylight/controller/sal/binding/test/GenerationTest.java b/opendaylight/md-sal/sal-binding-broker/src/main/test/org/opendaylight/controller/sal/binding/test/GenerationTest.java
deleted file mode 100644 (file)
index 9bbb501..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.opendaylight.controller.sal.binding.test;
-import static org.junit.Assert.*;
-
-import java.util.concurrent.Future;
-
-import org.junit.Test;
-import org.opendaylight.controller.sal.binding.impl.ProxyFactoryGenerator;
-import org.opendaylight.controller.sal.binding.impl.RpcServiceProxy;
-import org.opendaylight.yangtools.yang.binding.RpcService;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-
-
-public class GenerationTest {
-
-       public interface MockService extends RpcService {
-               
-           Future<RpcResult<java.lang.Void>> cancelToast();
-           
-           Future<RpcResult<java.lang.Void>> makeToast(String input);
-       }
-       
-       @Test
-       public void test() {
-               ProxyFactoryGenerator generator = new ProxyFactoryGenerator();
-               Class<? extends RpcServiceProxy<MockService>> ret = generator.generate(MockService.class);
-               
-               assertTrue(RpcServiceProxy.class.isAssignableFrom(ret));
-               assertTrue(MockService.class.isAssignableFrom(ret));
-       }
-
-}
diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/yang/opendaylight-binding-broker-impl.yang b/opendaylight/md-sal/sal-binding-broker/src/main/yang/opendaylight-binding-broker-impl.yang
new file mode 100644 (file)
index 0000000..72bae68
--- /dev/null
@@ -0,0 +1,52 @@
+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;}
+
+    description
+        "Service definition for Binding Aware MD-SAL.";
+    revision "2013-10-28" {
+        description
+            "Initial revision";
+    }
+
+    identity binding-broker-impl-singleton {
+        base config:module-type;
+        config:provided-service sal:binding-broker-osgi-registry;
+        config:java-name-prefix BindingBrokerImplSingleton;
+    }
+
+    grouping rpc-routing-table {
+        
+    
+    }
+
+
+    grouping rpc-router {
+        leaf module {
+            type string;
+        }
+        container routing-tables {
+            list routing-table {
+                uses rpc-routing-table;
+            }
+        }
+    }
+
+
+    augment "/config:modules/config:module/config:state" {
+        case binding-broker-impl-singleton {
+            when "/config:modules/config:module/config:type = 'binding-broker-impl-singleton'";
+            
+            container rpc-routers {
+                list rpc-router {
+                    uses rpc-router;
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/opendaylight/md-sal/sal-binding-config/pom.xml b/opendaylight/md-sal/sal-binding-config/pom.xml
new file mode 100644 (file)
index 0000000..6638050
--- /dev/null
@@ -0,0 +1,93 @@
+<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>sal-parent</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>sal-binding-config</artifactId>
+    <packaging>bundle</packaging>
+    <scm>
+        <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
+        <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
+    </scm>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+            </plugin>
+            <plugin>
+                <groupId>org.opendaylight.yangtools</groupId>
+                <artifactId>yang-maven-plugin</artifactId>
+                <version>0.5.9-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate-sources</goal>
+                        </goals>
+                        <configuration>
+                            <codeGenerators>
+                                <generator>
+                                    <codeGeneratorClass>
+                                        org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+                                    </codeGeneratorClass>
+                                    <outputBaseDir>${project.build.directory}/generated-sources/config</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>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.opendaylight.controller</groupId>
+                        <artifactId>yang-jmx-generator-plugin</artifactId>
+                        <version>0.2.2-SNAPSHOT</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${project.build.directory}/generated-sources/config</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>config-api</artifactId>
+            <version>0.2.2-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-api</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding.yang b/opendaylight/md-sal/sal-binding-config/src/main/yang/opendaylight-md-sal-binding.yang
new file mode 100644 (file)
index 0000000..8fb6c89
--- /dev/null
@@ -0,0 +1,20 @@
+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";
+    }
+}
\ No newline at end of file
index 5f98deb73b148d96a30778297b7d56a5a00aceaa..2b632b4ab0bccfaf1e34df182afe8d9c53021f05 100644 (file)
       <version>1.0-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
       <version>1.0-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
-        <dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>config-manager</artifactId>
+      <version>0.2.2-SNAPSHOT</version>
+    </dependency>
+    <dependency>
       <groupId>org.opendaylight.controller.model</groupId>
       <artifactId>model-flow-management</artifactId>
       <version>1.0-SNAPSHOT</version>
       <groupId>org.opendaylight.controller.model</groupId>
       <artifactId>model-flow-management</artifactId>
       <version>1.0-SNAPSHOT</version>
index a644619aa5c06e640b7d209e63b4ee2bdadd6c17..3e3ee3a8742e1af5ca3a14a30382217064e1d931 100644 (file)
@@ -24,14 +24,24 @@ public class TestHelper {
                 mavenBundle(CONTROLLER, "sal-common").versionAsInProject(), //
                 mavenBundle(CONTROLLER, "sal-common-api").versionAsInProject(), //
                 mavenBundle(CONTROLLER, "sal-common-impl").versionAsInProject(), //
                 mavenBundle(CONTROLLER, "sal-common").versionAsInProject(), //
                 mavenBundle(CONTROLLER, "sal-common-api").versionAsInProject(), //
                 mavenBundle(CONTROLLER, "sal-common-impl").versionAsInProject(), //
+                
                 mavenBundle("com.google.guava", "guava").versionAsInProject(), //
                 mavenBundle(YANGTOOLS + ".thirdparty", "xtend-lib-osgi").versionAsInProject() //
         );
     }
 
                 mavenBundle("com.google.guava", "guava").versionAsInProject(), //
                 mavenBundle(YANGTOOLS + ".thirdparty", "xtend-lib-osgi").versionAsInProject() //
         );
     }
 
+    public static Option configMinumumBundles() {
+        return new DefaultCompositeOption(
+            mavenBundle(CONTROLLER, "config-api").versionAsInProject(), //
+            mavenBundle(CONTROLLER, "config-manager").versionAsInProject(), //
+            mavenBundle("commons-io", "commons-io").versionAsInProject()
+        );
+    }
+    
     public static Option bindingAwareSalBundles() {
         return new DefaultCompositeOption( //
                 mavenBundle(CONTROLLER, "sal-binding-api").versionAsInProject(), //
     public static Option bindingAwareSalBundles() {
         return new DefaultCompositeOption( //
                 mavenBundle(CONTROLLER, "sal-binding-api").versionAsInProject(), //
+                mavenBundle(CONTROLLER, "sal-binding-config").versionAsInProject(),
                 mavenBundle(CONTROLLER, "sal-binding-broker-impl").versionAsInProject(), //
                 mavenBundle("org.javassist", "javassist").versionAsInProject(), //
                 mavenBundle(CONTROLLER, "sal-common-util").versionAsInProject() //
                 mavenBundle(CONTROLLER, "sal-binding-broker-impl").versionAsInProject(), //
                 mavenBundle("org.javassist", "javassist").versionAsInProject(), //
                 mavenBundle(CONTROLLER, "sal-common-util").versionAsInProject() //
index 083741e0ece88e0730028927d5f27df1f4db63d6..4057d9d1bc0ec3807b85754764bbbc108dc095a6 100644 (file)
@@ -52,6 +52,8 @@ public abstract class AbstractTest {
                 mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), //
                 mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), //
 
                 mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), //
                 mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), //
 
+                configMinumumBundles(),
+                
                 mdSalCoreBundles(),
 
                 bindingAwareSalBundles(),
                 mdSalCoreBundles(),
 
                 bindingAwareSalBundles(),
index 3f610ba4f385c1b89b3185464105429253b58345..71d64301915fd36f57f829307b5d430c56804881 100644 (file)
@@ -8,6 +8,7 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
 import java.math.BigInteger;
 import static org.mockito.Mockito.verify;
 
 import java.math.BigInteger;
+import java.util.concurrent.Future;
 
 import org.junit.Before;
 import org.junit.Test;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -17,7 +18,9 @@ import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcR
 import org.opendaylight.controller.sal.binding.api.*;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInputBuilder;
 import org.opendaylight.controller.sal.binding.api.*;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
@@ -25,6 +28,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.RpcResult;
 
 public class RoutedServiceTest extends AbstractTest {
 
 
 public class RoutedServiceTest extends AbstractTest {
 
index f0e3c1a1addb1c85294ea8bb09708b5397f2faa5..f66bfd4b74aafecec742cf803ee58688edc70eb1 100644 (file)
                 </executions>
             </plugin>
             <plugin>
                 </executions>
             </plugin>
             <plugin>
-                   <groupId>org.jacoco</groupId>
-                   <artifactId>jacoco-maven-plugin</artifactId>
-                   <configuration>
-                     <includes>org.opendaylight.controller.*</includes>
-                   </configuration>
-                   <executions>
-                     <execution>
-                       <id>pre-test</id>
-                       <goals>
-                         <goal>prepare-agent</goal>
-                       </goals>
-                     </execution>
-                     <execution>
-                       <id>post-test</id>
-                       <phase>test</phase>
-                       <goals>
-                         <goal>report</goal>
-                       </goals>
-                     </execution>
-                   </executions>
-               </plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <configuration>
+                    <includes>org.opendaylight.controller.*</includes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>pre-test</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>post-test</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
         <pluginManagement>
             <plugins>
         </plugins>
         <pluginManagement>
             <plugins>
-                <!--This plugin's configuration is used to store Eclipse m2e settings 
-                    only. It has no influence on the Maven build itself. -->
+                <!--This plugin's configuration is used to store Eclipse 
+                    m2e settings only. It has no influence on the Maven build itself. -->
                 <plugin>
                     <groupId>org.eclipse.m2e</groupId>
                     <artifactId>lifecycle-mapping</artifactId>
                 <plugin>
                     <groupId>org.eclipse.m2e</groupId>
                     <artifactId>lifecycle-mapping</artifactId>
             <version>${exam.version}</version>
             <scope>test</scope>
         </dependency>
             <version>${exam.version}</version>
             <scope>test</scope>
         </dependency>
+
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>config-manager</artifactId>
+            <version>0.2.2-SNAPSHOT</version>
+        </dependency>
         <dependency>
             <groupId>equinoxSDK381</groupId>
             <artifactId>org.eclipse.osgi</artifactId>
         <dependency>
             <groupId>equinoxSDK381</groupId>
             <artifactId>org.eclipse.osgi</artifactId>
index 0bf589b7817168bfdf75385d74741ea73dc46f18..ca4787a46ecbbfc99e0f53310b9e5e9d47028757 100644 (file)
@@ -60,11 +60,19 @@ public class ToasterTest {
                 mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), //
                 mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), //
                 mavenBundle(ODL, "sal-binding-api").versionAsInProject(), //
                 mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), //
                 mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), //
                 mavenBundle(ODL, "sal-binding-api").versionAsInProject(), //
+                mavenBundle(ODL, "sal-binding-config").versionAsInProject(), 
                 mavenBundle(ODL, "sal-binding-broker-impl").versionAsInProject(), //
                 mavenBundle(ODL, "sal-binding-broker-impl").versionAsInProject(), //
+                
                 mavenBundle(ODL, "sal-common").versionAsInProject(), //
                 mavenBundle(ODL, "sal-common-api").versionAsInProject(),//
                 mavenBundle(ODL, "sal-common-impl").versionAsInProject(), //
                 mavenBundle(ODL, "sal-common-util").versionAsInProject(), //
                 mavenBundle(ODL, "sal-common").versionAsInProject(), //
                 mavenBundle(ODL, "sal-common-api").versionAsInProject(),//
                 mavenBundle(ODL, "sal-common-impl").versionAsInProject(), //
                 mavenBundle(ODL, "sal-common-util").versionAsInProject(), //
+                
+                mavenBundle(ODL, "config-api").versionAsInProject(), //
+                mavenBundle(ODL, "config-manager").versionAsInProject(), //
+                mavenBundle("commons-io", "commons-io").versionAsInProject(),
+                
+                
                 mavenBundle(SAMPLE, "sample-toaster").versionAsInProject(), //
                 mavenBundle(SAMPLE, "sample-toaster-consumer").versionAsInProject(), //
                 mavenBundle(SAMPLE, "sample-toaster-provider").versionAsInProject(), //
                 mavenBundle(SAMPLE, "sample-toaster").versionAsInProject(), //
                 mavenBundle(SAMPLE, "sample-toaster-consumer").versionAsInProject(), //
                 mavenBundle(SAMPLE, "sample-toaster-provider").versionAsInProject(), //