Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Topology discovery is broken in Active/Active controllers
[controller.git]
/
opendaylight
/
protocol_plugins
/
openflow
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
protocol_plugin
/
openflow
/
internal
/
Activator.java
diff --git
a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java
b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java
index 26471a7f754247c9b68d7845550ee382aabfa3b5..a93a8b7243cede7e2d81d212160dbe7a97806539 100644
(file)
--- a/
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java
+++ b/
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java
@@
-14,7
+14,9
@@
import java.util.Hashtable;
import org.apache.felix.dm.Component;
import org.opendaylight.controller.protocol_plugin.openflow.IDataPacketListen;
import org.opendaylight.controller.protocol_plugin.openflow.IDataPacketMux;
import org.apache.felix.dm.Component;
import org.opendaylight.controller.protocol_plugin.openflow.IDataPacketListen;
import org.opendaylight.controller.protocol_plugin.openflow.IDataPacketMux;
+import org.opendaylight.controller.protocol_plugin.openflow.IDiscoveryListener;
import org.opendaylight.controller.protocol_plugin.openflow.IFlowProgrammerNotifier;
import org.opendaylight.controller.protocol_plugin.openflow.IFlowProgrammerNotifier;
+import org.opendaylight.controller.protocol_plugin.openflow.IInventoryProvider;
import org.opendaylight.controller.protocol_plugin.openflow.IInventoryShimExternalListener;
import org.opendaylight.controller.protocol_plugin.openflow.IInventoryShimInternalListener;
import org.opendaylight.controller.protocol_plugin.openflow.IOFStatisticsManager;
import org.opendaylight.controller.protocol_plugin.openflow.IInventoryShimExternalListener;
import org.opendaylight.controller.protocol_plugin.openflow.IInventoryShimInternalListener;
import org.opendaylight.controller.protocol_plugin.openflow.IOFStatisticsManager;
@@
-28,7
+30,6
@@
import org.opendaylight.controller.protocol_plugin.openflow.core.internal.Contro
import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
import org.opendaylight.controller.sal.core.IContainerListener;
import org.opendaylight.controller.sal.core.Node;
import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
import org.opendaylight.controller.sal.core.IContainerListener;
import org.opendaylight.controller.sal.core.Node;
-import org.opendaylight.controller.sal.discovery.IDiscoveryService;
import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerService;
import org.opendaylight.controller.sal.inventory.IPluginInInventoryService;
import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
import org.opendaylight.controller.sal.flowprogrammer.IPluginOutFlowProgrammerService;
import org.opendaylight.controller.sal.inventory.IPluginInInventoryService;
@@
-44,8
+45,8
@@
import org.slf4j.LoggerFactory;
/**
* Openflow protocol plugin Activator
/**
* Openflow protocol plugin Activator
- *
- *
+ *
+ *
*/
public class Activator extends ComponentActivatorAbstractBase {
protected static final Logger logger = LoggerFactory
*/
public class Activator extends ComponentActivatorAbstractBase {
protected static final Logger logger = LoggerFactory
@@
-54,7
+55,7
@@
public class Activator extends ComponentActivatorAbstractBase {
/**
* Function called when the activator starts just after some initializations
* are done by the ComponentActivatorAbstractBase.
/**
* Function called when the activator starts just after some initializations
* are done by the ComponentActivatorAbstractBase.
- *
+ *
*/
public void init() {
}
*/
public void init() {
}
@@
-62,7
+63,7
@@
public class Activator extends ComponentActivatorAbstractBase {
/**
* Function called when the activator stops just before the cleanup done by
* ComponentActivatorAbstractBase
/**
* Function called when the activator stops just before the cleanup done by
* ComponentActivatorAbstractBase
- *
+ *
*/
public void destroy() {
}
*/
public void destroy() {
}
@@
-70,8
+71,8
@@
public class Activator extends ComponentActivatorAbstractBase {
/**
* Function that is used to communicate to dependency manager the list of
* known implementations for services inside a container
/**
* Function that is used to communicate to dependency manager the list of
* known implementations for services inside a container
- *
- *
+ *
+ *
* @return An array containing all the CLASS objects that will be
* instantiated in order to get an fully working implementation
* Object
* @return An array containing all the CLASS objects that will be
* instantiated in order to get an fully working implementation
* Object
@@
-86,7
+87,7
@@
public class Activator extends ComponentActivatorAbstractBase {
/**
* Function that is called when configuration of the dependencies is
* required.
/**
* Function that is called when configuration of the dependencies is
* required.
- *
+ *
* @param c
* dependency manager Component object, used for configuring the
* dependencies exported and imported
* @param c
* dependency manager Component object, used for configuring the
* dependencies exported and imported
@@
-121,9
+122,8
@@
public class Activator extends ComponentActivatorAbstractBase {
// export the service
c.setInterface(
new String[] { IPluginInInventoryService.class.getName(),
// export the service
c.setInterface(
new String[] { IPluginInInventoryService.class.getName(),
- IStatisticsListener.class.getName(),
- IInventoryShimInternalListener.class.getName() },
- null);
+ IInventoryShimInternalListener.class.getName(),
+ IInventoryProvider.class.getName() }, null);
// Now lets add a service dependency to make sure the
// provider of service exists
// Now lets add a service dependency to make sure the
// provider of service exists
@@
-194,8
+194,8
@@
public class Activator extends ComponentActivatorAbstractBase {
/**
* Function that is used to communicate to dependency manager the list of
* known implementations for services that are container independent.
/**
* Function that is used to communicate to dependency manager the list of
* known implementations for services that are container independent.
- *
- *
+ *
+ *
* @return An array containing all the CLASS objects that will be
* instantiated in order to get an fully working implementation
* Object
* @return An array containing all the CLASS objects that will be
* instantiated in order to get an fully working implementation
* Object
@@
-211,7
+211,7
@@
public class Activator extends ComponentActivatorAbstractBase {
/**
* Function that is called when configuration of the dependencies is
* required.
/**
* Function that is called when configuration of the dependencies is
* required.
- *
+ *
* @param c
* dependency manager Component object, used for configuring the
* dependencies exported and imported
* @param c
* dependency manager Component object, used for configuring the
* dependencies exported and imported
@@
-238,7
+238,9
@@
public class Activator extends ComponentActivatorAbstractBase {
new String[] {
IPluginInFlowProgrammerService.class.getName(),
IMessageListener.class.getName(),
new String[] {
IPluginInFlowProgrammerService.class.getName(),
IMessageListener.class.getName(),
- IContainerListener.class.getName() }, props);
+ IContainerListener.class.getName(),
+ IInventoryShimExternalListener.class.getName() },
+ props);
c.add(createServiceDependency()
.setService(IController.class, "(name=Controller)")
c.add(createServiceDependency()
.setService(IController.class, "(name=Controller)")
@@
-298,16
+300,16
@@
public class Activator extends ComponentActivatorAbstractBase {
.setRequired(true));
c.add(createContainerServiceDependency(
GlobalConstants.DEFAULT.toString())
.setRequired(true));
c.add(createContainerServiceDependency(
GlobalConstants.DEFAULT.toString())
- .setService(I
PluginInInventoryService
.class)
- .setCallbacks("set
PluginInInventoryService
",
-
"unsetPluginInInventoryService
").setRequired(true));
+ .setService(I
InventoryProvider
.class)
+ .setCallbacks("set
InventoryProvider
",
+
"unsetInventoryProvider
").setRequired(true));
c.add(createServiceDependency().setService(IDataPacketMux.class)
.setCallbacks("setIDataPacketMux", "unsetIDataPacketMux")
.setRequired(true));
c.add(createServiceDependency()
c.add(createServiceDependency().setService(IDataPacketMux.class)
.setCallbacks("setIDataPacketMux", "unsetIDataPacketMux")
.setRequired(true));
c.add(createServiceDependency()
- .setService(IDiscovery
Service
.class)
- .setCallbacks("setDiscovery
Service
",
- "unsetDiscovery
Service
").setRequired(true));
+ .setService(IDiscovery
Listener
.class)
+ .setCallbacks("setDiscovery
Listener
",
+ "unsetDiscovery
Listener
").setRequired(true));
}
// DataPacket mux/demux services, which is teh actual engine
}
// DataPacket mux/demux services, which is teh actual engine
@@
-334,8
+336,8
@@
public class Activator extends ComponentActivatorAbstractBase {
}
if (imp.equals(InventoryServiceShim.class)) {
}
if (imp.equals(InventoryServiceShim.class)) {
- c.setInterface(new String[] { IContainerListener.class.getName()
}
,
- null);
+ c.setInterface(new String[] { IContainerListener.class.getName(),
+
IStatisticsListener.class.getName()},
null);
c.add(createServiceDependency()
.setService(IController.class, "(name=Controller)")
c.add(createServiceDependency()
.setService(IController.class, "(name=Controller)")
@@
-354,10
+356,11
@@
public class Activator extends ComponentActivatorAbstractBase {
}
if (imp.equals(TopologyServiceShim.class)) {
}
if (imp.equals(TopologyServiceShim.class)) {
- c.setInterface(new String[] { IDiscovery
Service
.class.getName(),
+ c.setInterface(new String[] { IDiscovery
Listener
.class.getName(),
IContainerListener.class.getName(),
IContainerListener.class.getName(),
- IRefreshInternalProvider.class.getName() }, null);
- c.add(createServiceDependency()
+ IRefreshInternalProvider.class.getName(),
+ IInventoryShimExternalListener.class.getName() }, null);
+ c.add(createServiceDependency()
.setService(ITopologyServiceShimListener.class)
.setCallbacks("setTopologyServiceShimListener",
"unsetTopologyServiceShimListener")
.setService(ITopologyServiceShimListener.class)
.setCallbacks("setTopologyServiceShimListener",
"unsetTopologyServiceShimListener")