Removed the old openflowj protocol library
Change-Id: I4fcd0399c6eb0d9089116e365b55505042ded1fc
diff --git a/src/main/java/net/floodlightcontroller/core/web/AllSwitchStatisticsResource.java b/src/main/java/net/floodlightcontroller/core/web/AllSwitchStatisticsResource.java
index 276215b..b312ca0 100644
--- a/src/main/java/net/floodlightcontroller/core/web/AllSwitchStatisticsResource.java
+++ b/src/main/java/net/floodlightcontroller/core/web/AllSwitchStatisticsResource.java
@@ -17,21 +17,6 @@
package net.floodlightcontroller.core.web;
-import java.lang.Thread.State;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import net.floodlightcontroller.core.IFloodlightProviderService;
-
-import org.openflow.protocol.OFFeaturesReply;
-import org.openflow.protocol.statistics.OFStatistics;
-import org.openflow.protocol.statistics.OFStatisticsType;
-import org.openflow.util.HexString;
-import org.restlet.resource.Get;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Return switch statistics information for all switches
@@ -39,7 +24,7 @@
* @author readams
*/
public class AllSwitchStatisticsResource extends SwitchResourceBase {
- protected final static Logger log =
+ /*protected final static Logger log =
LoggerFactory.getLogger(AllSwitchStatisticsResource.class);
@Get("json")
@@ -93,7 +78,7 @@
// Join all the threads after the timeout. Set a hard timeout
// of 12 seconds for the threads to finish. If the thread has not
- // finished the switch has not replied yet and therefore we won't
+ // finished the switch has not replied yet and therefore we won't
// add the switch's stats to the reply.
for (int iSleepCycles = 0; iSleepCycles < 12; iSleepCycles++) {
for (GetConcurrentStatsThread curThread : activeThreads) {
@@ -164,5 +149,5 @@
featuresReply = getSwitchFeaturesReply(switchId);
}
}
- }
+ }*/
}
diff --git a/src/main/java/net/floodlightcontroller/core/web/ControllerSwitchesResource.java b/src/main/java/net/floodlightcontroller/core/web/ControllerSwitchesResource.java
index 223da56..1e115ac 100644
--- a/src/main/java/net/floodlightcontroller/core/web/ControllerSwitchesResource.java
+++ b/src/main/java/net/floodlightcontroller/core/web/ControllerSwitchesResource.java
@@ -24,7 +24,7 @@
import net.floodlightcontroller.core.IOFSwitch;
import net.floodlightcontroller.util.FilterIterator;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.data.Form;
import org.restlet.data.Status;
import org.restlet.resource.Get;
diff --git a/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java b/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java
index d5b534d..176e357 100644
--- a/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java
+++ b/src/main/java/net/floodlightcontroller/core/web/SwitchResourceBase.java
@@ -17,30 +17,7 @@
package net.floodlightcontroller.core.web;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-import net.floodlightcontroller.core.IFloodlightProviderService;
-import net.floodlightcontroller.core.IOFSwitch;
-import net.floodlightcontroller.core.annotations.LogMessageDoc;
-
-import org.openflow.protocol.OFFeaturesReply;
-import org.openflow.protocol.OFMatch;
-import org.openflow.protocol.OFPort;
-import org.openflow.protocol.OFStatisticsRequest;
-import org.openflow.protocol.statistics.OFAggregateStatisticsRequest;
-import org.openflow.protocol.statistics.OFFlowStatisticsRequest;
-import org.openflow.protocol.statistics.OFPortStatisticsRequest;
-import org.openflow.protocol.statistics.OFQueueStatisticsRequest;
-import org.openflow.protocol.statistics.OFStatistics;
-import org.openflow.protocol.statistics.OFStatisticsType;
-import org.openflow.util.HexString;
-import org.restlet.resource.ResourceException;
import org.restlet.resource.ServerResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Base class for server resources related to switches
@@ -49,7 +26,7 @@
*/
public class SwitchResourceBase extends ServerResource {
- protected final static Logger log = LoggerFactory.getLogger(SwitchResourceBase.class);
+ /*protected final static Logger log = LoggerFactory.getLogger(SwitchResourceBase.class);
public enum REQUESTTYPE {
OFSTATS,
@@ -118,12 +95,12 @@
}
req.setLengthU(requestLength);
// XXX S fix when we fix stats
- /*try {
+ try {
future = sw.getStatistics(req);
values = future.get(10, TimeUnit.SECONDS);
} catch (Exception e) {
log.error("Failure retrieving statistics from switch " + sw, e);
- }*/
+ }
}
return values;
}
@@ -141,13 +118,13 @@
Future<OFFeaturesReply> future;
OFFeaturesReply featuresReply = null;
if (sw != null) {
- // XXX S fix when we fix stats
- /*try {
+ // XXX S fix when we fix stats
+ try {
future = sw.getFeaturesReplyFromSwitch();
featuresReply = future.get(10, TimeUnit.SECONDS);
} catch (Exception e) {
log.error("Failure getting features reply from switch" + sw, e);
- }*/
+ }
}
return featuresReply;
@@ -155,6 +132,6 @@
protected OFFeaturesReply getSwitchFeaturesReply(String switchId) {
return getSwitchFeaturesReply(HexString.toLong(switchId));
- }
+ }*/
}
diff --git a/src/main/java/net/floodlightcontroller/core/web/SwitchRoleResource.java b/src/main/java/net/floodlightcontroller/core/web/SwitchRoleResource.java
index d598005..f85b75e 100644
--- a/src/main/java/net/floodlightcontroller/core/web/SwitchRoleResource.java
+++ b/src/main/java/net/floodlightcontroller/core/web/SwitchRoleResource.java
@@ -5,7 +5,7 @@
import net.floodlightcontroller.core.IFloodlightProviderService;
import net.floodlightcontroller.core.IOFSwitch;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;
import org.slf4j.Logger;
diff --git a/src/main/java/net/floodlightcontroller/core/web/SwitchStatisticsResource.java b/src/main/java/net/floodlightcontroller/core/web/SwitchStatisticsResource.java
index 468a50e..cb8860e 100644
--- a/src/main/java/net/floodlightcontroller/core/web/SwitchStatisticsResource.java
+++ b/src/main/java/net/floodlightcontroller/core/web/SwitchStatisticsResource.java
@@ -17,13 +17,6 @@
package net.floodlightcontroller.core.web;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.openflow.protocol.statistics.OFStatisticsType;
-import org.restlet.resource.Get;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Return switch statistics information for specific switches
@@ -31,7 +24,7 @@
* @author readams
*/
public class SwitchStatisticsResource extends SwitchResourceBase {
- protected final static Logger log =
+ /*protected final static Logger log =
LoggerFactory.getLogger(SwitchStatisticsResource.class);
@Get("json")
@@ -60,5 +53,5 @@
result.put(switchId, values);
return result;
- }
+ }*/
}
diff --git a/src/main/java/net/floodlightcontroller/core/web/serializers/ByteArrayMACSerializer.java b/src/main/java/net/floodlightcontroller/core/web/serializers/ByteArrayMACSerializer.java
index 35f810b..674e1e0 100644
--- a/src/main/java/net/floodlightcontroller/core/web/serializers/ByteArrayMACSerializer.java
+++ b/src/main/java/net/floodlightcontroller/core/web/serializers/ByteArrayMACSerializer.java
@@ -23,7 +23,7 @@
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* Serialize a MAC as colon-separated hexadecimal
diff --git a/src/main/java/net/floodlightcontroller/core/web/serializers/DPIDSerializer.java b/src/main/java/net/floodlightcontroller/core/web/serializers/DPIDSerializer.java
index 304e835..a85a10d 100644
--- a/src/main/java/net/floodlightcontroller/core/web/serializers/DPIDSerializer.java
+++ b/src/main/java/net/floodlightcontroller/core/web/serializers/DPIDSerializer.java
@@ -23,7 +23,7 @@
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* Serialize a DPID as colon-separated hexadecimal
diff --git a/src/main/java/net/floodlightcontroller/core/web/serializers/MACSerializer.java b/src/main/java/net/floodlightcontroller/core/web/serializers/MACSerializer.java
index eacf515..8f86a4b 100644
--- a/src/main/java/net/floodlightcontroller/core/web/serializers/MACSerializer.java
+++ b/src/main/java/net/floodlightcontroller/core/web/serializers/MACSerializer.java
@@ -23,7 +23,7 @@
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
-import org.openflow.util.HexString;
+import org.projectfloodlight.openflow.util.HexString;
/**
* Serialize a MAC as colon-separated hexadecimal