Bug 8902 - Reconciliation Framework changes 26/60126/29
authorGobinath <gobinath@ericsson.com>
Mon, 10 Jul 2017 09:15:25 +0000 (14:45 +0530)
committerGobinath <gobinath@ericsson.com>
Wed, 9 Aug 2017 06:37:58 +0000 (12:07 +0530)
Changes related to the Reconciliation Framework are done in this patch.
The APIs needed to be implemented by the services registering to the
Reconciliation framework are present in the interface
ReconciliationNotificationListener.The APIs to register the service to
Reconciliation framework and the APIs to start the reconciliation /
cancellation of the ongoing reconciliation of a node are present in
ReconciliationManager.

Change-Id: I8bd1845db8b86f4a4314977e05c6b699592f5658
Signed-off-by: gobinath <gobinath@ericsson.com>
15 files changed:
applications/pom.xml
applications/reconciliation-framework/pom.xml [new file with mode: 0644]
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/NotificationRegistration.java [new file with mode: 0644]
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/ReconciliationManager.java [new file with mode: 0644]
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/ReconciliationNotificationListener.java [new file with mode: 0644]
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/cli/GetRegisteredServices.java [new file with mode: 0644]
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/impl/ReconciliationManagerImpl.java [new file with mode: 0644]
applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/impl/ReconciliationServiceDelegate.java [new file with mode: 0644]
applications/reconciliation-framework/src/main/resources/org/opendaylight/blueprint/commands.xml [new file with mode: 0644]
applications/reconciliation-framework/src/main/resources/org/opendaylight/blueprint/reconciliation-framework.xml [new file with mode: 0644]
artifacts/pom.xml
features-aggregator/features-openflowplugin/pom.xml
features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml [new file with mode: 0644]
features-aggregator/odl-openflowplugin-flow-services/pom.xml
features-aggregator/pom.xml

index 4eea9e1d030140062211c97c91ce91e0ce4a27f2..a7a8488e2143d1345e14f1334ca3b0e9a9db197c 100644 (file)
@@ -96,6 +96,7 @@
         <module>topology-lldp-discovery</module>
         <!-- experimental apps -->
         <module>bulk-o-matic</module>
+        <module>reconciliation-framework</module>
     </modules>
 
 </project>
diff --git a/applications/reconciliation-framework/pom.xml b/applications/reconciliation-framework/pom.xml
new file mode 100644 (file)
index 0000000..3b937fa
--- /dev/null
@@ -0,0 +1,91 @@
+<?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.openflowplugin</groupId>
+        <artifactId>applications</artifactId>
+        <version>0.5.0-SNAPSHOT</version>
+    </parent>
+    <groupId>org.opendaylight.openflowplugin.applications</groupId>
+    <artifactId>reconciliation-framework</artifactId>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.openflowplugin</groupId>
+            <artifactId>openflowplugin-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.openflowplugin</groupId>
+            <artifactId>openflowplugin-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>yang-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-common-util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>mdsal-singleton-common-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.openflowplugin.model</groupId>
+            <artifactId>model-flow-service</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-broker-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-broker-impl</artifactId>
+            <scope>test</scope>
+            <type>test-jar</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.opendaylight.yangtools</groupId>
+                <artifactId>yang-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+
+    <scm>
+        <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
+        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
+        <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
+        <tag>HEAD</tag>
+    </scm>
+
+</project>
diff --git a/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/NotificationRegistration.java b/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/NotificationRegistration.java
new file mode 100644 (file)
index 0000000..98d8e92
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.openflowplugin.applications.reconciliation;
+
+/*
+ * Interface to be returned after services registers itself with reconciliation framework
+ * Services call close() on NotificationRegistration for unregister
+ */
+public interface NotificationRegistration extends AutoCloseable {
+}
diff --git a/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/ReconciliationManager.java b/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/ReconciliationManager.java
new file mode 100644 (file)
index 0000000..2e67de6
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.openflowplugin.applications.reconciliation;
+
+import java.util.List;
+import java.util.Map;
+
+/*
+ * Provider to register the service to reconciliation framework
+ *
+ */
+public interface ReconciliationManager {
+    /*
+     * Application who are interested in reconciliation should use this API to
+     * register their services to the Reconciliation Framework
+     *
+     * @param object - the reference to the ReconciliationNotificationListener
+     */
+    NotificationRegistration registerService(ReconciliationNotificationListener service);
+
+    /*
+     * API exposed by RF for get list of registered services
+     *
+     * @return the Map containing registered services with priority as Key
+     */
+    Map<Integer, List<ReconciliationNotificationListener>> getRegisteredServices();
+}
diff --git a/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/ReconciliationNotificationListener.java b/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/ReconciliationNotificationListener.java
new file mode 100644 (file)
index 0000000..593ab7b
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.openflowplugin.applications.reconciliation;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import java.util.concurrent.Future;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.rf.state.rev170713.ResultState;
+
+/*
+ * Provider to start the reconciliation of a node
+ * Provider to end the reconciliation of a node
+ */
+public interface ReconciliationNotificationListener extends AutoCloseable {
+    /*
+     * This method will be a callback from RF to start the application
+     * reconciliation. If the reconciliation fails for the services with a priority, the reconciliation of the node for
+     * other services with lower priority has to be carried out or cancelled depending on the resultstate decided by
+     * the services so that it is "fail fast" and doesn't block. This enhancement would be done later and currently the
+     * reconciliation for all the services is carried out irrespective of the intent.
+     *
+     * @param nodeId - Node InstanceIdentifier
+     *
+     * @return the nodeId
+     */
+    ListenableFuture<Boolean> startReconciliation(DeviceInfo node);
+
+    /*
+     * This method will be a callback from RF when dpn disconnects during
+     * reconciliation
+     *
+     * @param nodeId - Node InstanceIdentifier
+     *
+     * @return the nodeId
+     */
+    ListenableFuture<Boolean> endReconciliation(DeviceInfo node);
+
+    /*
+     * Priority of the application. The priority should be a set of values from which the user should be able to select
+     * for the service instead of allowing any random values for priority from the user. Enhancement to be made to
+     * restrict the user to choose from among a set of priorities by making this enum. Also enhancement to be made to
+     * add the service reconciliation property as a configurable property.
+     *
+     * @return the priority of the service
+     */
+    int getPriority();
+
+    /*
+     * Name of the application
+     *
+     * @return the name of the service
+     */
+    String getName();
+
+    /*
+     * Application's intent when the application's reconciliation fails
+     *
+     * @return the intent of the service if the reconciliation fails
+     */
+    ResultState getResultState();
+}
diff --git a/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/cli/GetRegisteredServices.java b/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/cli/GetRegisteredServices.java
new file mode 100644 (file)
index 0000000..cea096e
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.openflowplugin.applications.reconciliation.cli;
+
+import com.google.common.base.Preconditions;
+import java.util.List;
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationManager;
+import org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationNotificationListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Command(scope = "reconciliation", name = "getRegisteredServices", description = "displaying services registered to "
+        + "Reconciliation Framework")
+/*
+ * CLI to display the service priority, service name and service status TODO
+ * service status
+ */
+public class GetRegisteredServices extends OsgiCommandSupport {
+    private static final Logger LOG = LoggerFactory.getLogger(GetRegisteredServices.class);
+    public static final String CLI_FORMAT = "%d %-20s ";
+
+    private ReconciliationManager reconciliationManager;
+
+    public void setReconciliationManager(ReconciliationManager reconciliationManager) {
+        this.reconciliationManager = Preconditions.checkNotNull(reconciliationManager,
+                "ReconciliationManager can not be null!");
+    }
+
+    @Override
+    protected Object doExecute() throws Exception {
+        LOG.debug("Executing getRegisteredServices to Reconciliation Framework command");
+        if (reconciliationManager.getRegisteredServices().isEmpty()) {
+            session.getConsole().println("No Services have registered to Reconciliation Framework");
+        } else {
+            for (List<ReconciliationNotificationListener> services : reconciliationManager.getRegisteredServices()
+                    .values()) {
+                for (ReconciliationNotificationListener service : services) {
+                    session.getConsole().println(String.format(CLI_FORMAT, service.getPriority(), service.getName()));
+                }
+            }
+        }
+
+        return null;
+    }
+}
diff --git a/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/impl/ReconciliationManagerImpl.java b/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/impl/ReconciliationManagerImpl.java
new file mode 100644 (file)
index 0000000..673e5ef
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.openflowplugin.applications.reconciliation.impl;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
+import org.opendaylight.openflowplugin.api.openflow.mastership.MastershipChangeException;
+import org.opendaylight.openflowplugin.api.openflow.mastership.MastershipChangeServiceManager;
+import org.opendaylight.openflowplugin.api.openflow.mastership.ReconciliationFrameworkEvent;
+import org.opendaylight.openflowplugin.applications.reconciliation.NotificationRegistration;
+import org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationManager;
+import org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationNotificationListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.rf.state.rev170713.ResultState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ReconciliationManagerImpl implements ReconciliationManager, ReconciliationFrameworkEvent {
+    private static final Logger LOG = LoggerFactory.getLogger(ReconciliationManagerImpl.class);
+
+    private MastershipChangeServiceManager mastershipChangeServiceManager;
+    private Map<Integer, List<ReconciliationNotificationListener>> registeredServices = new ConcurrentSkipListMap<>();
+    private Map<DeviceInfo, ListenableFuture<ResultState>> futureMap = new ConcurrentHashMap<>();
+    private Map<ResultState,Integer> resultStateMap = new ConcurrentHashMap<>();
+    private AtomicReference<ResultState> decidedResultState = new AtomicReference<>(ResultState.DONOTHING);
+
+    public ReconciliationManagerImpl(MastershipChangeServiceManager mastershipChangeServiceManager) {
+        this.mastershipChangeServiceManager = Preconditions.checkNotNull(mastershipChangeServiceManager,
+                "MastershipChangeServiceManager can not be null!");
+    }
+
+    public void start() throws MastershipChangeException {
+        mastershipChangeServiceManager.reconciliationFrameworkRegistration(this);
+        LOG.info("ReconciliationManager has started successfully.");
+    }
+
+    @Override
+    public NotificationRegistration registerService(ReconciliationNotificationListener reconciliationTask) {
+        LOG.debug("Registered service {} with priority {} and intent {}", reconciliationTask.getName(),
+                reconciliationTask.getPriority(), reconciliationTask.getResultState());
+        registeredServices.computeIfAbsent(reconciliationTask.getPriority(), services -> new ArrayList<>())
+        .add(reconciliationTask);
+        ReconciliationServiceDelegate registration = new ReconciliationServiceDelegate(reconciliationTask, () -> {
+            LOG.debug("Service un-registered from Reconciliation framework {}", reconciliationTask.getName());
+            registeredServices.computeIfPresent(reconciliationTask.getPriority(), (priority, services) -> services)
+            .remove(reconciliationTask);
+            decideResultState(reconciliationTask.getResultState());
+        });
+        decideResultState(reconciliationTask.getResultState());
+        return registration;
+    }
+
+    private void decideResultState(ResultState resultState) {
+        Integer count = resultStateMap.get(resultState);
+        resultStateMap.put(resultState, count = (count == null ? 1 : count+1));
+        Map.Entry<ResultState,Integer> maxEntry = null;
+        for(Map.Entry<ResultState,Integer> entry : resultStateMap.entrySet()) {
+            if (maxEntry == null || entry.getValue() > maxEntry.getValue()) {
+                maxEntry = entry;
+            }
+        }
+        decidedResultState.set(maxEntry.getKey());
+    }
+
+    @Override
+    public Map<Integer, List<ReconciliationNotificationListener>> getRegisteredServices() {
+        ImmutableMap.Builder<Integer, List<ReconciliationNotificationListener>> builder = ImmutableMap.builder();
+        builder.putAll(registeredServices);
+        return builder.build();
+    }
+
+    @Override
+    public void close() throws Exception {
+    }
+
+    @Override
+    public ListenableFuture<ResultState> onDevicePrepared(@Nonnull DeviceInfo node) {
+        LOG.debug("Triggering reconciliation for node : {}", node.getNodeId());
+        return futureMap.computeIfAbsent(node, value -> reconcileNode(node));
+    }
+
+    @Override
+    public ListenableFuture<Void> onDeviceDisconnected(@Nonnull DeviceInfo node) {
+        LOG.info("Stopping reconciliation for node {}", node.getNodeId());
+        if (futureMap.containsKey(node)) {
+            return cancelNodeReconciliation(node);
+        }
+        return Futures.immediateFuture(null);
+    }
+
+    ListenableFuture<ResultState> reconcileNode(DeviceInfo node) {
+        ListenableFuture<ResultState> lastFuture = Futures.immediateFuture(null);
+        for (List<ReconciliationNotificationListener> services : registeredServices.values()) {
+            lastFuture = reconcileServices(lastFuture, services, node);
+        }
+        return lastFuture;
+    }
+
+    ListenableFuture<ResultState> reconcileServices(ListenableFuture<ResultState> prevFuture,
+            List<ReconciliationNotificationListener> servicesForPriority, DeviceInfo node) {
+        return Futures.transformAsync(prevFuture, prevResult -> {
+            return Futures.transform(Futures.allAsList(servicesForPriority.stream().
+                    map(service -> service.startReconciliation(node)).collect(Collectors.toList())),
+                    results->decidedResultState.get());
+        });
+    }
+
+    ListenableFuture<Void> cancelNodeReconciliation(DeviceInfo node) {
+        ListenableFuture<Void> lastFuture = Futures.immediateFuture(null);
+        futureMap.get(node).cancel(true);
+        futureMap.remove(node);
+        for (List<ReconciliationNotificationListener> services : registeredServices.values()) {
+            lastFuture = cancelServiceReconciliation(lastFuture, services, node);
+        }
+        return lastFuture;
+    }
+
+    ListenableFuture<Void> cancelServiceReconciliation(ListenableFuture<Void> prevFuture,
+            List<ReconciliationNotificationListener> servicesForPriority, DeviceInfo node) {
+        return Futures.transformAsync(prevFuture, prevResult -> {
+            return Futures.transform(Futures.allAsList(servicesForPriority.stream().
+                    map(service -> service.endReconciliation(node)).collect(Collectors.toList())),
+                    results->null);
+        });
+    }
+}
\ No newline at end of file
diff --git a/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/impl/ReconciliationServiceDelegate.java b/applications/reconciliation-framework/src/main/java/org/opendaylight/openflowplugin/applications/reconciliation/impl/ReconciliationServiceDelegate.java
new file mode 100644 (file)
index 0000000..3b4802d
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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.openflowplugin.applications.reconciliation.impl;
+
+import com.google.common.base.Preconditions;
+import org.opendaylight.openflowplugin.applications.reconciliation.NotificationRegistration;
+import org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationNotificationListener;
+
+public class ReconciliationServiceDelegate implements NotificationRegistration {
+
+    private ReconciliationNotificationListener reconciliationNotificationListener;
+    private AutoCloseable unregisterService;
+
+    public ReconciliationServiceDelegate( ReconciliationNotificationListener reconciliationNotificationListener,
+            AutoCloseable unregisterService) {
+        this.reconciliationNotificationListener = Preconditions.checkNotNull(reconciliationNotificationListener,
+                "ReconciliationNotificationListener can not be null!");
+        this.unregisterService = unregisterService;
+    }
+
+    @Override
+    public void close() throws Exception {
+        this.unregisterService.close();
+        this.reconciliationNotificationListener.close();
+    }
+}
diff --git a/applications/reconciliation-framework/src/main/resources/org/opendaylight/blueprint/commands.xml b/applications/reconciliation-framework/src/main/resources/org/opendaylight/blueprint/commands.xml
new file mode 100644 (file)
index 0000000..03aff83
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+           odl:use-default-for-reference-types="true">
+
+    <reference id="reconciliationManagerRef"
+               interface="org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationManager"
+               availability="optional"/>
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.opendaylight.openflowplugin.applications.reconciliation.cli.GetRegisteredServices">
+                <property name="reconciliationManager"
+                          ref="reconciliationManagerRef"/>
+            </action>
+        </command>
+    </command-bundle>
+
+</blueprint>
diff --git a/applications/reconciliation-framework/src/main/resources/org/opendaylight/blueprint/reconciliation-framework.xml b/applications/reconciliation-framework/src/main/resources/org/opendaylight/blueprint/reconciliation-framework.xml
new file mode 100644 (file)
index 0000000..f5ad65a
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+           odl:use-default-for-reference-types="true">
+
+  <reference id="mastershipChangeServiceManager"
+             interface="org.opendaylight.openflowplugin.api.openflow.mastership.MastershipChangeServiceManager"/>
+  <bean id="reconciliationManagerImpl"
+        class="org.opendaylight.openflowplugin.applications.reconciliation.impl.ReconciliationManagerImpl"
+        init-method="start"
+        destroy-method="close">
+    <argument ref="mastershipChangeServiceManager"/>
+  </bean>
+  <service ref="reconciliationManagerImpl"
+           interface="org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationManager"
+           odl:type="default"/>
+
+</blueprint>
\ No newline at end of file
index 542aa877b88c24f4e648febf5c8541e7f2d7bc89..2933a279b8dce668e2e75cca4c34be051fb3eb3f 100644 (file)
@@ -8,7 +8,6 @@
     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>
                 <type>xml</type>
                 <version>${project.version}</version>
             </dependency>
+             <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>odl-openflowplugin-app-reconciliation-framework</artifactId>
+                <classifier>features</classifier>
+                <type>xml</type>
+                <version>${project.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>
index d17776dccb3b9a2cf9faf9d8e2aec24c0db2d247..2c6559584b170b03c2e5c4416264b1b39890083d 100644 (file)
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>odl-openflowplugin-app-reconciliation-framework</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
     </dependencies>
 
 </project>
diff --git a/features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml b/features-aggregator/odl-openflowplugin-app-reconciliation-framework/pom.xml
new file mode 100644 (file)
index 0000000..a2b3d64
--- /dev/null
@@ -0,0 +1,37 @@
+<?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.odlparent</groupId>
+    <artifactId>single-feature-parent</artifactId>
+    <version>2.0.0</version>
+    <relativePath/>
+</parent>
+
+<groupId>org.opendaylight.openflowplugin</groupId>
+<artifactId>odl-openflowplugin-app-reconciliation-framework</artifactId>
+<packaging>feature</packaging>
+<version>0.5.0-SNAPSHOT</version>
+
+<name>OpenDaylight :: Openflow Plugin :: Application - Reconciliation Framework</name>
+
+<dependencies>
+    <!-- feature dependencies -->
+    <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>odl-openflowplugin-southbound</artifactId>
+        <version>${project.version}</version>
+        <classifier>features</classifier>
+        <type>xml</type>
+    </dependency>
+
+    <dependency>
+        <groupId>org.opendaylight.openflowplugin.applications</groupId>
+        <artifactId>reconciliation-framework</artifactId>
+        <version>${project.version}</version>
+    </dependency>
+
+</dependencies>
+
+</project>
index d858f9b579ad577e247e665c2a5ba76931180400..ff7f2452496c905bbee639d9b4e586e15e6393ab 100644 (file)
             <classifier>features</classifier>
             <type>xml</type>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.openflowplugin</groupId>
+            <artifactId>odl-openflowplugin-app-reconciliation-framework</artifactId>
+            <version>${project.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
+        </dependency>
     </dependencies>
 
 </project>
index 0d1a59b8a66c0a6959e373e20165c83c013caa3c..9bdac794744c1b6a21bc5b81ae81555722a9b7e9 100644 (file)
@@ -28,6 +28,7 @@
         <module>odl-openflowplugin-app-notifications</module>
         <module>odl-openflowplugin-app-forwardingrules-manager</module>
         <module>odl-openflowplugin-app-forwardingrules-sync</module>
+        <module>odl-openflowplugin-app-reconciliation-framework</module>
     </modules>
 
 </project>