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
}
@SuppressWarnings("deprecation")
- private void allocateCaches() {
+ private void allocateCaches() {
if (this.clusterContainerService == null) {
log.info("un-initialized clusterContainerService, can't create cache");
return;
try {
clusterContainerService.createCache("forwarding.ipswitch.rules",
- EnumSet.of(IClusterServices.cacheMode.NON_TRANSACTIONAL));
+ EnumSet.of(IClusterServices.cacheMode.TRANSACTIONAL));
} catch (CacheExistException cee) {
log.error("\nCache already exists - destroy and recreate if needed");
} catch (CacheConfigException cce) {
}
@SuppressWarnings("deprecation")
- private void destroyCaches() {
+ private void destroyCaches() {
if (this.clusterContainerService == null) {
log.info("un-initialized clusterContainerService, can't destroy cache");
return;
}
} else {
- log.debug("Adding policyMatch(DIP = {}) Action(outPort= {}) " +
+ log.debug("Adding policyMatch(DIP = {}) Action(outPort= {}) " +
"to node {}", new Object[] {
host.getNetworkAddress().getHostAddress(), outPort,
currNode});
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;
}
// 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;
}
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;
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)); */
/* } */
}
}