X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsamples%2Fsimpleforwarding%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsamples%2Fsimpleforwarding%2Finternal%2FSimpleForwardingImpl.java;h=7a3625a229ef5ae04f76de4a6eabe28feef657b7;hp=043fdc08c1858153a16fbd0bfe49f9337888ac98;hb=0ae12c54560ef14cb8c08beef4553f7523d41578;hpb=91c77815a47b2f8f9e1a2a1f6a53a770e5ed42dd diff --git a/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java b/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java index 043fdc08c1..7a3625a229 100644 --- a/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java +++ b/opendaylight/samples/simpleforwarding/src/main/java/org/opendaylight/controller/samples/simpleforwarding/internal/SimpleForwardingImpl.java @@ -634,7 +634,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, po = e.getValue(); if (po != null) { // Populate the Policy field now - Status poStatus = this.frm.installFlowEntry(po); + Status poStatus = this.frm.modifyOrAddFlowEntry(po); if (!poStatus.isSuccess()) { log.error("Failed to install policy: " + po.getGroupName() + " (" @@ -800,8 +800,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, log.debug("Host Facing Port in a container came up, install the rules for all hosts from this port !"); Set allHosts = this.hostTracker.getAllHosts(); for (HostNodeConnector host : allHosts) { - if (node.equals(host.getnodeconnectorNode()) - && swPort.equals(host.getnodeConnector())) { + if (node.equals(host.getnodeconnectorNode())) { /* * This host resides behind the same switch and port for which a port up * message is received. Ideally this should not happen, but if it does, @@ -842,8 +841,9 @@ public class SimpleForwardingImpl implements IfNewHostNotify, @Override public void notifyNode(Node node, UpdateType type, Map propMap) { - if (node == null) + if (node == null) { return; + } switch (type) { case REMOVED: @@ -858,8 +858,9 @@ public class SimpleForwardingImpl implements IfNewHostNotify, @Override public void notifyNodeConnector(NodeConnector nodeConnector, UpdateType type, Map propMap) { - if (nodeConnector == null) + if (nodeConnector == null) { return; + } boolean up = false; switch (type) {