Removed the old openflowj protocol library
Change-Id: I4fcd0399c6eb0d9089116e365b55505042ded1fc
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index a2a8e48..d88a296 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -40,7 +40,7 @@
import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
index 28efb33..2593a59 100644
--- a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
@@ -37,7 +37,7 @@
import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/Configuration.java b/src/main/java/net/onrc/onos/apps/sdnip/Configuration.java
index 28f195c..b834603 100644
--- a/src/main/java/net/onrc/onos/apps/sdnip/Configuration.java
+++ b/src/main/java/net/onrc/onos/apps/sdnip/Configuration.java
@@ -6,7 +6,7 @@
import net.floodlightcontroller.util.MACAddress;
import org.codehaus.jackson.annotate.JsonProperty;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* Contains the configuration data for SDN-IP that has been read from a
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/FlowCache.java b/src/main/java/net/onrc/onos/apps/sdnip/FlowCache.java
deleted file mode 100644
index dc9182c..0000000
--- a/src/main/java/net/onrc/onos/apps/sdnip/FlowCache.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package net.onrc.onos.apps.sdnip;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import net.floodlightcontroller.core.IFloodlightProviderService;
-import net.floodlightcontroller.core.IOFSwitch;
-
-import org.openflow.protocol.OFFlowMod;
-import org.openflow.protocol.OFMessage;
-import org.openflow.protocol.OFPort;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class FlowCache {
- private static final Logger log = LoggerFactory.getLogger(FlowCache.class);
-
- private final IFloodlightProviderService floodlightProvider;
-
- private final Map<Long, List<OFFlowMod>> flowCacheMap;
-
- private final Comparator<OFFlowMod> cookieComparator =
- new Comparator<OFFlowMod>() {
- @Override
- public int compare(OFFlowMod fm1, OFFlowMod fm2) {
- long difference = fm2.getCookie() - fm1.getCookie();
-
- if (difference > 0) {
- return 1;
- } else if (difference < 0) {
- return -1;
- } else {
- return 0;
- }
- }
- };
-
- public FlowCache(IFloodlightProviderService floodlightProvider) {
- this.floodlightProvider = floodlightProvider;
-
- flowCacheMap = new HashMap<Long, List<OFFlowMod>>();
- }
-
- public void write(long dpid, OFFlowMod flowMod) {
- synchronized (this) {
- List<OFFlowMod> flowModList = new ArrayList<OFFlowMod>(1);
- flowModList.add(flowMod);
- write(dpid, flowModList);
- }
- }
-
- public void write(long dpid, List<OFFlowMod> flowMods) {
- synchronized (this) {
- ensureCacheForSwitch(dpid);
-
- List<OFFlowMod> clones = new ArrayList<OFFlowMod>(flowMods.size());
-
- // Somehow the OFFlowMods we get passed in will change later on.
- // No idea how this happens, but we can just clone to prevent problems
- try {
- for (OFFlowMod fm : flowMods) {
- clones.add(fm.clone());
- }
- } catch (CloneNotSupportedException e) {
- log.debug("Clone exception", e);
- }
-
- flowCacheMap.get(dpid).addAll(clones);
-
- IOFSwitch sw = floodlightProvider.getSwitches().get(dpid);
-
- if (sw == null) {
- log.debug("Switch not found when writing flow mods");
- return;
- }
-
- List<OFMessage> msgList = new ArrayList<OFMessage>(clones.size());
- msgList.addAll(clones);
-
- // XXX S commenting out the old message writes
- /*try {
- sw.write(msgList, null);
- } catch (IOException e) {
- log.error("Error writing to switch", e);
- }*/
- }
- }
-
- public void delete(long dpid, OFFlowMod flowMod) {
- synchronized (this) {
- List<OFFlowMod> flowModList = new ArrayList<OFFlowMod>(1);
- flowModList.add(flowMod);
- delete(dpid, flowModList);
- }
- }
-
- public void delete(long dpid, List<OFFlowMod> flowMods) {
- synchronized (this) {
- ensureCacheForSwitch(dpid);
-
- // Remove the flow mods from the cache first before we alter them
- flowCacheMap.get(dpid).removeAll(flowMods);
-
- // Alter the original flow mods to make them delete flow mods
- for (OFFlowMod fm : flowMods) {
- fm.setCommand(OFFlowMod.OFPFC_DELETE_STRICT)
- .setOutPort(OFPort.OFPP_NONE)
- .setLengthU(OFFlowMod.MINIMUM_LENGTH);
-
- fm.getActions().clear();
- }
-
- IOFSwitch sw = floodlightProvider.getSwitches().get(dpid);
- if (sw == null) {
- log.debug("Switch not found when writing flow mods");
- return;
- }
-
- List<OFMessage> msgList = new ArrayList<OFMessage>(flowMods.size());
- msgList.addAll(flowMods);
-
- // XXX S commenting out old message writes
- /*try {
- sw.write(msgList, null);
- } catch (IOException e) {
- log.error("Error writing to switch", e);
- }*/
- }
- }
-
- public void switchConnected(IOFSwitch sw) {
- synchronized (this) {
- log.debug("Switch connected: {}", sw);
-
- ensureCacheForSwitch(sw.getId());
-
- List<OFFlowMod> flowMods = flowCacheMap.get(sw.getId());
-
- Collections.sort(flowMods, cookieComparator);
-
- sw.clearAllFlowMods();
-
- List<OFMessage> messages = new ArrayList<OFMessage>(flowMods.size());
- messages.addAll(flowMods);
-
- // XXX S commenting out old message writes
- /* try {
- sw.write(messages, null);
- } catch (IOException e) {
- log.error("Failure writing flow mods to switch {}",
- HexString.toHexString(sw.getId()));
- }
- */
- }
- }
-
- private void ensureCacheForSwitch(long dpid) {
- if (!flowCacheMap.containsKey(dpid)) {
- flowCacheMap.put(dpid, new ArrayList<OFFlowMod>());
- }
- }
-}
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/Interface.java b/src/main/java/net/onrc/onos/apps/sdnip/Interface.java
index de3b48c..463cac8 100644
--- a/src/main/java/net/onrc/onos/apps/sdnip/Interface.java
+++ b/src/main/java/net/onrc/onos/apps/sdnip/Interface.java
@@ -8,7 +8,7 @@
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonProperty;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import com.google.common.net.InetAddresses;
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/Path.java b/src/main/java/net/onrc/onos/apps/sdnip/Path.java
index 28b632b..7a6dd27 100644
--- a/src/main/java/net/onrc/onos/apps/sdnip/Path.java
+++ b/src/main/java/net/onrc/onos/apps/sdnip/Path.java
@@ -1,8 +1,6 @@
package net.onrc.onos.apps.sdnip;
import java.net.InetAddress;
-import java.util.Collections;
-import java.util.List;
/**
* A {@link Path} represents paths within a network that forward traffic from
@@ -35,7 +33,8 @@
private final InetAddress dstIpAddress;
private int numUsers; // initialized to 0
- private List<PushedFlowMod> flowMods; // initialized to null
+ // XXX PushedFlowMod has been removed
+ //private List<PushedFlowMod> flowMods; // initialized to null
private boolean permanent; // initialized to false
/**
@@ -97,9 +96,10 @@
*
* @return the list of {@link PushedFlowMod}s
*/
- public List<PushedFlowMod> getFlowMods() {
+ // XXX PushedFlowMod has been removed
+ /*public List<PushedFlowMod> getFlowMods() {
return Collections.unmodifiableList(flowMods);
- }
+ }*/
/**
* Sets the list of flow mods that were installed to realize this path in
@@ -107,9 +107,10 @@
*
* @param flowMods the list of {@link PushedFlowMod}s
*/
- public void setFlowMods(List<PushedFlowMod> flowMods) {
+ // XXX PushedFlowMod has been removed
+ /*public void setFlowMods(List<PushedFlowMod> flowMods) {
this.flowMods = flowMods;
- }
+ }*/
/**
* Signifies whether the path is permanent and shouldn't be deleted when
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/PushedFlowMod.java b/src/main/java/net/onrc/onos/apps/sdnip/PushedFlowMod.java
deleted file mode 100644
index 38ac37f..0000000
--- a/src/main/java/net/onrc/onos/apps/sdnip/PushedFlowMod.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package net.onrc.onos.apps.sdnip;
-
-import org.openflow.protocol.OFFlowMod;
-
-// TODO This functionality should be handled by ONOS's flow layer in future.
-/**
- * Collects together the DPID and OFFlowMod of a pushed flow mod. This
- * information is used if the flow mod has to be deleted in the future.
- */
-public class PushedFlowMod {
- private final long dpid;
- private OFFlowMod flowMod;
-
- /**
- * Class constructor, taking a DPID and a flow mod.
- *
- * @param dpid the DPID of the switch the flow mod was pushed to
- * @param flowMod the OFFlowMod that was pushed to the switch
- */
- public PushedFlowMod(long dpid, OFFlowMod flowMod) {
- this.dpid = dpid;
- try {
- this.flowMod = flowMod.clone();
- } catch (CloneNotSupportedException e) {
- this.flowMod = flowMod;
- }
- }
-
- /**
- * Gets the DPID of the switch the flow mod was pushed to.
- *
- * @return the DPID of the switch
- */
- public long getDpid() {
- return dpid;
- }
-
- /**
- * Gets the OFFlowMod that was pushed to the switch.
- *
- * @return the OFFlowMod object
- */
- public OFFlowMod getFlowMod() {
- return flowMod;
- }
-}
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java b/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java
index 135d0a7..49128ea 100644
--- a/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java
+++ b/src/main/java/net/onrc/onos/apps/sdnip/SdnIp.java
@@ -62,13 +62,6 @@
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
-import org.openflow.protocol.OFFlowMod;
-import org.openflow.protocol.OFMatch;
-import org.openflow.protocol.OFPacketOut;
-import org.openflow.protocol.OFPort;
-import org.openflow.protocol.action.OFAction;
-import org.openflow.protocol.action.OFActionOutput;
-import org.openflow.util.HexString;
import org.projectfloodlight.openflow.protocol.OFPortDesc;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -160,7 +153,8 @@
// private Multimap<Prefix, PushedFlowMod> pushedFlows;
private Multimap<Prefix, FlowId> pushedFlowIds;
- private FlowCache flowCache;
+ // XXX FlowCache has been removed
+ //private FlowCache flowCache;
// TODO: Fix for the new Topology Network Graph
// private volatile Topology topology = null;
@@ -305,7 +299,7 @@
// pushedFlows = HashMultimap.<Prefix, PushedFlowMod>create();
pushedFlowIds = HashMultimap.create();
- flowCache = new FlowCache(floodlightProvider);
+ //flowCache = new FlowCache(floodlightProvider);
bgpUpdatesExecutor = Executors.newSingleThreadExecutor(
new ThreadFactoryBuilder().setNameFormat("bgp-updates-%d").build());
@@ -1162,8 +1156,8 @@
}
}
- // TODO wait the priority module of the flow Manager
- private void setupArpFlows() {
+ // XXX OpenFlow message classes have been removed
+ /*private void setupArpFlows() {
OFMatch match = new OFMatch();
match.setDataLayerType(Ethernet.TYPE_ARP);
match.setWildcards(match.getWildcards() & ~OFMatch.OFPFW_DL_TYPE);
@@ -1191,7 +1185,6 @@
}
}
- // TODO need update, waiting for the priority feature from flow Manager
private void setupDefaultDropFlows() {
OFFlowMod fm = new OFFlowMod();
fm.setMatch(new OFMatch());
@@ -1247,7 +1240,7 @@
for (String strdpid : switches) {
flowCache.write(HexString.toLong(strdpid), flowModList);
}
- }
+ }*/
private void beginRouting() {
log.debug("Topology is now ready, beginning routing function");
@@ -1469,7 +1462,7 @@
sw.clearAllFlowMods();
}
- flowCache.switchConnected(sw);
+ //flowCache.switchConnected(sw);
}
@Override
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java
index 4a62947..5711287 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowProgrammer.java
@@ -160,7 +160,6 @@
synchronizer.interrupt(sw);
}
pusher.deleteQueue(sw, true);
- pusher.invalidate(sw);
}
@Override
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
index 17bbc1a..419dc43 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowPusher.java
@@ -24,7 +24,6 @@
import net.floodlightcontroller.core.internal.OFMessageFuture;
import net.floodlightcontroller.core.module.FloodlightModuleContext;
import net.floodlightcontroller.threadpool.IThreadPoolService;
-import net.floodlightcontroller.util.OFMessageDamper;
import net.onrc.onos.core.intent.FlowEntry;
import net.onrc.onos.core.util.Pair;
@@ -55,13 +54,6 @@
private static final Logger log = LoggerFactory.getLogger(FlowPusher.class);
protected static final int DEFAULT_NUMBER_THREAD = 1;
- // TODO: Values copied from elsewhere (class LearningSwitch).
- // The local copy should go away!
- //
- protected static final int OFMESSAGE_DAMPER_CAPACITY = 10000; // TODO: find
- // sweet spot
- protected static final int OFMESSAGE_DAMPER_TIMEOUT = 250; // ms
-
// Number of messages sent to switch at once
protected static final int MAX_MESSAGE_SEND = 100;
@@ -251,7 +243,6 @@
}
private FloodlightModuleContext context = null;
- private OFMessageDamper messageDamper = null;
private IThreadPoolService threadPool = null;
private IFloodlightProviderService floodlightProvider = null;
protected Map<OFVersion, OFFactory> ofFactoryMap = null;
@@ -346,8 +337,6 @@
OFMessage msg = queueEntry.getOFMessage();
try {
- // TODO BOC do we need to use the message damper?
- // messageDamper.write(sw, msg, context);
sw.write(msg, null);
if (log.isTraceEnabled()) {
log.trace("Pusher sends message to switch {}: {}", sw.getStringId(), msg);
@@ -415,22 +404,11 @@
this.floodlightProvider = context
.getServiceImpl(IFloodlightProviderService.class);
this.threadPool = context.getServiceImpl(IThreadPoolService.class);
- this.messageDamper = null;
ofFactoryMap = new HashMap<>();
ofFactoryMap.put(OFVersion.OF_10, floodlightProvider.getOFMessageFactory_10());
ofFactoryMap.put(OFVersion.OF_13, floodlightProvider.getOFMessageFactory_13());
floodlightProvider.addOFMessageListener(OFType.BARRIER_REPLY, this);
-
- // TODO BOC message damper may not be needed...
- // if (damper != null) {
- // messageDamper = damper;
- // } else {
- // use default values
- /*messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
- EnumSet.of(OFType.FLOW_MOD),
- OFMESSAGE_DAMPER_TIMEOUT);*/
- // }
}
/**
@@ -584,16 +562,6 @@
}
}
- /**
- * Invalidate.
- * <p>
- * @param sw switch
- * @see OFMessageDamper#invalidate(IOFSwitch)
- */
- public void invalidate(IOFSwitch sw) {
- // messageDamper.invalidate(sw); currently a null ptr - commenting out
- }
-
@Override
public boolean add(IOFSwitch sw, OFMessage msg) {
return add(sw, msg, MsgPriority.NORMAL);
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
index 7b2bfd0..0441ddc 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
@@ -1,9 +1,7 @@
package net.onrc.onos.core.flowprogrammer;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
@@ -11,16 +9,7 @@
import java.util.concurrent.FutureTask;
import net.floodlightcontroller.core.IOFSwitch;
-import net.onrc.onos.core.util.FlowEntryId;
-import org.openflow.protocol.OFFlowMod;
-import org.openflow.protocol.OFMatch;
-import org.openflow.protocol.OFPort;
-import org.openflow.protocol.OFStatisticsRequest;
-import org.openflow.protocol.statistics.OFFlowStatisticsReply;
-import org.openflow.protocol.statistics.OFFlowStatisticsRequest;
-import org.openflow.protocol.statistics.OFStatistics;
-import org.openflow.protocol.statistics.OFStatisticsType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -193,7 +182,7 @@
*/
private Set<FlowEntryWrapper> getFlowEntriesFromSwitch() {
- int lengthU = 0;
+ /*int lengthU = 0;
OFMatch match = new OFMatch();
match.setWildcards(OFMatch.OFPFW_ALL);
@@ -209,7 +198,7 @@
req.setStatisticType(OFStatisticsType.FLOW);
req.setStatistics(stats);
lengthU += req.getLengthU();
- req.setLengthU(lengthU);
+ req.setLengthU(lengthU);*/
//List<OFStatistics> entries = null;
// XXX S when we fix stats, we fix this
@@ -245,10 +234,10 @@
* by FlowEntryId (from GraphDB) or OFFlowStatisticsReply (from switch).
*/
static class FlowEntryWrapper {
- FlowEntryId flowEntryId;
+ //FlowEntryId flowEntryId;
// TODO: fix when FlowSynchronizer is refactored
// IFlowEntry iFlowEntry;
- OFFlowStatisticsReply statisticsReply;
+ //OFFlowStatisticsReply statisticsReply;
// TODO: fix when FlowSynchronizer is refactored
@@ -259,10 +248,10 @@
}
*/
- public FlowEntryWrapper(OFFlowStatisticsReply entry) {
+ /*public FlowEntryWrapper(OFFlowStatisticsReply entry) {
flowEntryId = new FlowEntryId(entry.getCookie());
statisticsReply = entry;
- }
+ }*/
/**
* Install this FlowEntry to a switch via FlowPusher.
@@ -272,13 +261,13 @@
double dbTime, extractTime, pushTime;
public void addToSwitch(IOFSwitch sw) {
- if (statisticsReply != null) {
+ /*if (statisticsReply != null) {
log.error("Error adding existing flow entry {} to sw {}",
statisticsReply.getCookie(), sw.getId());
return;
}
- double startDB = System.nanoTime();
+ double startDB = System.nanoTime();*/
// Get the Flow Entry state from the Network Graph
// TODO: fix when FlowSynchronizer is refactored
/*
@@ -293,7 +282,7 @@
}
}
*/
- dbTime = System.nanoTime() - startDB;
+ //dbTime = System.nanoTime() - startDB;
//
// TODO: The old FlowDatabaseOperation class is gone, so the code
@@ -321,7 +310,7 @@
* @param sw Switch from which flow will be removed.
*/
public void removeFromSwitch(IOFSwitch sw) {
- if (statisticsReply == null) {
+ /*if (statisticsReply == null) {
log.error("Error removing non-existent flow entry {} from sw {}",
flowEntryId, sw.getId());
return;
@@ -334,7 +323,7 @@
fm.setLengthU(OFFlowMod.MINIMUM_LENGTH);
fm.setMatch(statisticsReply.getMatch());
fm.setPriority(statisticsReply.getPriority());
- fm.setOutPort(OFPort.OFPP_NONE);
+ fm.setOutPort(OFPort.OFPP_NONE);*/
// XXX BOC commented out pending FlowSync refactor
//pusher.add(sw, fm, MsgPriority.HIGH);
@@ -345,7 +334,8 @@
*/
@Override
public int hashCode() {
- return flowEntryId.hashCode();
+ //return flowEntryId.hashCode();
+ return 0;
}
/**
@@ -358,16 +348,18 @@
@Override
public boolean equals(Object obj) {
if (obj != null && obj.getClass() == this.getClass()) {
- FlowEntryWrapper entry = (FlowEntryWrapper) obj;
+ //FlowEntryWrapper entry = (FlowEntryWrapper) obj;
// TODO: we need to actually compare the match + actions
- return this.flowEntryId.equals(entry.flowEntryId);
+ //return this.flowEntryId.equals(entry.flowEntryId);
+ return true;
}
return false;
}
@Override
public String toString() {
- return flowEntryId.toString();
+ //return flowEntryId.toString();
+ return "";
}
}
}
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java
index f2b4631..537167b 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoInterruptResource.java
@@ -2,7 +2,7 @@
import net.floodlightcontroller.core.IOFSwitch;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
/**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java
index 51d39d8..956a7fb 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/DoSynchronizeResource.java
@@ -2,7 +2,7 @@
import net.floodlightcontroller.core.IOFSwitch;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
/**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java
index a9e6c81..ecfec7e 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/ResumePusherResource.java
@@ -2,7 +2,7 @@
import net.floodlightcontroller.core.IOFSwitch;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
/**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java
index 4fc6782..bdcdcb6 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SendBarrierResource.java
@@ -2,8 +2,8 @@
import net.floodlightcontroller.core.IOFSwitch;
-import org.openflow.util.HexString;
import org.projectfloodlight.openflow.protocol.OFBarrierReply;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
/**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java
index a2993a5..63717a1 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SetPushRateResource.java
@@ -2,7 +2,7 @@
import net.floodlightcontroller.core.IOFSwitch;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
/**
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
index ba752e6..e1aa320 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
@@ -2,7 +2,7 @@
import net.floodlightcontroller.core.IOFSwitch;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/web/serializers/ShortestPathIntentSerializer.java b/src/main/java/net/onrc/onos/core/intent/runtime/web/serializers/ShortestPathIntentSerializer.java
index ce0709e..be316ac 100644
--- a/src/main/java/net/onrc/onos/core/intent/runtime/web/serializers/ShortestPathIntentSerializer.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/web/serializers/ShortestPathIntentSerializer.java
@@ -1,15 +1,17 @@
package net.onrc.onos.core.intent.runtime.web.serializers;
-import com.google.common.net.InetAddresses;
+import java.io.IOException;
+
import net.floodlightcontroller.util.MACAddress;
import net.onrc.onos.core.intent.ShortestPathIntent;
+
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.SerializerProvider;
import org.codehaus.jackson.map.ser.std.SerializerBase;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
-import java.io.IOException;
+import com.google.common.net.InetAddresses;
/**
* JSON serializer for ShortestPathIntents.
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/Link.java b/src/main/java/net/onrc/onos/core/linkdiscovery/Link.java
index 2d1508f..193db07 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/Link.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/Link.java
@@ -22,7 +22,7 @@
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
public final class Link {
private final long src;
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java b/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java
index 9288dad..cff6633 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/NodePortTuple.java
@@ -5,7 +5,7 @@
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* A NodePortTuple is similar to a SwitchPortTuple
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java b/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java
index 01a1539..8c4a7a8d 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/web/LinkWithType.java
@@ -10,7 +10,7 @@
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* This class is both the datastructure and the serializer
diff --git a/src/main/java/net/onrc/onos/core/main/config/DefaultConfiguration.java b/src/main/java/net/onrc/onos/core/main/config/DefaultConfiguration.java
index 13b9b53..219cdf3 100644
--- a/src/main/java/net/onrc/onos/core/main/config/DefaultConfiguration.java
+++ b/src/main/java/net/onrc/onos/core/main/config/DefaultConfiguration.java
@@ -13,7 +13,7 @@
import net.floodlightcontroller.util.MACAddress;
import net.onrc.onos.apps.sdnip.Interface;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
public class DefaultConfiguration implements IConfigInfoService, IFloodlightModule {
diff --git a/src/main/java/net/onrc/onos/core/packet/BSNPROBE.java b/src/main/java/net/onrc/onos/core/packet/BSNPROBE.java
index c64d1a5..b007cd9 100644
--- a/src/main/java/net/onrc/onos/core/packet/BSNPROBE.java
+++ b/src/main/java/net/onrc/onos/core/packet/BSNPROBE.java
@@ -23,7 +23,7 @@
import java.util.Arrays;
import org.apache.commons.lang.ArrayUtils;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
// CHECKSTYLE IGNORE WriteTag FOR NEXT 2 LINES
/**
diff --git a/src/main/java/net/onrc/onos/core/packet/Ethernet.java b/src/main/java/net/onrc/onos/core/packet/Ethernet.java
index e75822f..62e30f5 100644
--- a/src/main/java/net/onrc/onos/core/packet/Ethernet.java
+++ b/src/main/java/net/onrc/onos/core/packet/Ethernet.java
@@ -24,7 +24,7 @@
import net.floodlightcontroller.util.MACAddress;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
// CHECKSTYLE IGNORE WriteTag FOR NEXT 2 LINES
/**
diff --git a/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java b/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
index bec8bb4..97e445f 100644
--- a/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
+++ b/src/main/java/net/onrc/onos/core/registry/StandaloneRegistry.java
@@ -18,7 +18,7 @@
import net.onrc.onos.core.util.OnosInstanceId;
import org.apache.commons.lang.NotImplementedException;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
index fb7b573..5bb7f00 100644
--- a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
+++ b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
@@ -44,7 +44,7 @@
import org.apache.curator.x.discovery.ServiceDiscovery;
import org.apache.curator.x.discovery.ServiceDiscoveryBuilder;
import org.apache.curator.x.discovery.ServiceInstance;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/src/main/java/net/onrc/onos/core/util/Dpid.java b/src/main/java/net/onrc/onos/core/util/Dpid.java
index 1abd0f1..e157975 100644
--- a/src/main/java/net/onrc/onos/core/util/Dpid.java
+++ b/src/main/java/net/onrc/onos/core/util/Dpid.java
@@ -5,7 +5,7 @@
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* The class representing a network switch DPID.
diff --git a/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java b/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java
index d5ad674..0cc1d6d 100644
--- a/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java
+++ b/src/main/java/net/onrc/onos/core/util/FlowEntryAction.java
@@ -3,7 +3,7 @@
import net.floodlightcontroller.util.MACAddress;
import org.codehaus.jackson.annotate.JsonProperty;
-import org.openflow.protocol.OFPort;
+import org.projectfloodlight.openflow.types.OFPort;
/**
* The class representing a single Flow Entry action.
@@ -1212,7 +1212,7 @@
* @param maxLen the maximum length (in bytes) to send to controller.
*/
public void setActionOutputToController(short maxLen) {
- PortNumber port = new PortNumber(OFPort.OFPP_CONTROLLER.getValue());
+ PortNumber port = new PortNumber(OFPort.CONTROLLER.getShortPortNumber());
actionOutput = new ActionOutput(port, maxLen);
actionType = ActionValues.ACTION_OUTPUT;
}
diff --git a/src/main/java/net/onrc/onos/core/util/IPv6.java b/src/main/java/net/onrc/onos/core/util/IPv6.java
index 986fd11..cd1a192 100644
--- a/src/main/java/net/onrc/onos/core/util/IPv6.java
+++ b/src/main/java/net/onrc/onos/core/util/IPv6.java
@@ -5,7 +5,7 @@
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* The class representing an IPv6 address.