X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsamples%2Fsimpleforwarding%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsamples%2Fsimpleforwarding%2Finternal%2FSimpleForwardingImpl.java;h=7f4c98a6483969fabfd14f6bc54219873ae00cd8;hb=7aac9c5fcb0f617c6b15e527f3c0f3d87032b83a;hp=c2fee970ac00c8354140de8318786cd0bfcac7c4;hpb=06aa5ce746e29a3760688b2ef2817f50bec5ea7a;p=controller.git 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 c2fee970ac..7f4c98a648 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 @@ -50,12 +50,15 @@ import org.opendaylight.controller.sal.routing.IRouting; import org.opendaylight.controller.sal.utils.EtherTypes; import org.opendaylight.controller.sal.utils.NodeConnectorCreator; import org.opendaylight.controller.sal.utils.Status; +import org.opendaylight.controller.samples.simpleforwarding.HostNodePair; import org.opendaylight.controller.switchmanager.IInventoryListener; import org.opendaylight.controller.switchmanager.ISwitchManager; import org.opendaylight.controller.topologymanager.ITopologyManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + + public class SimpleForwardingImpl implements IfNewHostNotify, IListenRoutingUpdates, IInventoryListener { private static Logger log = LoggerFactory @@ -147,7 +150,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, } @SuppressWarnings("deprecation") - private void allocateCaches() { + private void allocateCaches() { if (this.clusterContainerService == null) { log.info("un-initialized clusterContainerService, can't create cache"); return; @@ -178,7 +181,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, } @SuppressWarnings("deprecation") - private void destroyCaches() { + private void destroyCaches() { if (this.clusterContainerService == null) { log.info("un-initialized clusterContainerService, can't destroy cache"); return; @@ -367,7 +370,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, } } else { - log.debug("Adding policyMatch(DIP = {}) Action(outPort= {}) " + + log.debug("Adding policyMatch(DIP = {}) Action(outPort= {}) " + "to node {}", new Object[] { host.getNetworkAddress().getHostAddress(), outPort, currNode}); @@ -482,7 +485,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, updatePerHostRuleInSW(host, rootNode, rootNode, null, new HostNodePair( host, rootNode), ports); - // log.debug("Getting out at the end!"); + // log.debug("Getting out at the end!"); return switchesToProgram; } @@ -575,10 +578,10 @@ public class SimpleForwardingImpl implements IfNewHostNotify, // rest of the world // switchesToProgram.add(rootNode); //updatePerHostRuleInSW(host, rootNode, - // rootNode, null, - // new HostNodePair(host, rootNode),ports); + // rootNode, null, + // new HostNodePair(host, rootNode),ports); - // log.debug("Getting out at the end!"); + // log.debug("Getting out at the end!"); return switchesToProgram; } @@ -617,7 +620,7 @@ public class SimpleForwardingImpl implements IfNewHostNotify, Status poStatus = this.frm.installFlowEntry(po); if (!poStatus.isSuccess()) { log.error("Failed to install policy: " - + po.getGroupName() + " (" + + po.getGroupName() + " (" + poStatus.getDescription() + ")"); retCode = RulesProgrammingReturnCode.FAILED_FEW_SWITCHES; @@ -632,8 +635,8 @@ public class SimpleForwardingImpl implements IfNewHostNotify, swId, host); /* // Now dump every single rule */ /* for (HostNodePair dumpkey : this.rulesDB.keySet()) { */ - /* po = this.rulesDB.get(dumpkey); */ - /* log.debug("Dumping entry H{" + dumpkey.getHost() + "} S{" + dumpkey.getSwitchId() + "} = {" + (po == null ? "null policy" : po)); */ + /* po = this.rulesDB.get(dumpkey); */ + /* log.debug("Dumping entry H{" + dumpkey.getHost() + "} S{" + dumpkey.getSwitchId() + "} = {" + (po == null ? "null policy" : po)); */ /* } */ } }