X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fprotocol_plugins%2Fopenflow%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fprotocol_plugin%2Fopenflow%2Finternal%2FFlowProgrammerService.java;h=b163c639a5c53d507988958ef04afc0b1d1d540f;hb=18e1184615fd939644d3660e5edcfbb676c187fa;hp=c55a88cd3f0224cc587bc01e632e742405cc34f1;hpb=850d5b748e96c2667bb95ce423bdb00083838619;p=controller.git diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java index c55a88cd3f..b163c639a5 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/FlowProgrammerService.java @@ -25,6 +25,7 @@ import org.opendaylight.controller.protocol_plugin.openflow.core.IMessageListene import org.opendaylight.controller.protocol_plugin.openflow.core.ISwitch; import org.opendaylight.controller.sal.connection.IPluginOutConnectionService; import org.opendaylight.controller.sal.core.ContainerFlow; +import org.opendaylight.controller.sal.core.IContainerAware; import org.opendaylight.controller.sal.core.IContainerListener; import org.opendaylight.controller.sal.core.Node; import org.opendaylight.controller.sal.core.Node.NodeIDType; @@ -58,7 +59,7 @@ import org.slf4j.LoggerFactory; */ public class FlowProgrammerService implements IPluginInFlowProgrammerService, IMessageListener, IContainerListener, IInventoryShimExternalListener, - CommandProvider { + CommandProvider, IContainerAware { private static final Logger log = LoggerFactory .getLogger(FlowProgrammerService.class); private IController controller; @@ -447,7 +448,7 @@ public class FlowProgrammerService implements IPluginInFlowProgrammerService, for (Map.Entry containerNotifier : flowProgrammerNotifiers .entrySet()) { IFlowProgrammerNotifier notifier = containerNotifier.getValue(); - notifier.flowErrorReported(node, rid, errorMsg); + notifier.flowErrorReported(node, rid, Utils.getOFErrorString(errorMsg)); } } @@ -465,8 +466,6 @@ public class FlowProgrammerService implements IPluginInFlowProgrammerService, @Override public void nodeConnectorUpdated(String containerName, NodeConnector p, UpdateType type) { - Set target = null; - switch (type) { case ADDED: if (!containerToNc.containsKey(containerName)) { @@ -477,7 +476,7 @@ public class FlowProgrammerService implements IPluginInFlowProgrammerService, case CHANGED: break; case REMOVED: - target = containerToNc.get(containerName); + Set target = containerToNc.get(containerName); if (target != null) { target.remove(p); } @@ -800,4 +799,14 @@ public class FlowProgrammerService implements IPluginInFlowProgrammerService, ci.println("Max num of async messages sent prior to the Barrier message is " + barrierMessagePriorCount); } + + @Override + public void containerCreate(String containerName) { + // do nothing + } + + @Override + public void containerDestroy(String containerName) { + containerToNc.remove(containerName); + } }