Skip to content
Snippets Groups Projects
Commit 41ffcb21 authored by Ryan Izard's avatar Ryan Izard
Browse files

convert integer DPIDs specified to the SEP to DatapathId to prevent duplicate...

convert integer DPIDs specified to the SEP to DatapathId to prevent duplicate DPID flow sets listed just because the DPID was entered in a different format. hexstring is what will be used
parent 0e50d1e4
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,7 @@ implements IOFSwitchListener, IFloodlightModule, IStaticEntryPusherService, ISto
}
try {
switchName = (String) row.get(Columns.COLUMN_SWITCH);
switchName = DatapathId.of((String) row.get(Columns.COLUMN_SWITCH)).toString();
entryName = (String) row.get(Columns.COLUMN_NAME);
String tmp = (String) row.get(Columns.COLUMN_ENTRY_TYPE);
......@@ -399,7 +399,7 @@ implements IOFSwitchListener, IFloodlightModule, IStaticEntryPusherService, ISto
matchString.append(key + "=" + row.get(key).toString());
}
}
} catch (ClassCastException e) {
} catch (Exception e) {
if (entryName != null && switchName != null) {
log.warn("Skipping entry {} on switch {} with bad data : " + e.getMessage(), entryName, switchName);
} else {
......
......@@ -110,6 +110,7 @@ import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.core.JsonGenerator.Feature;
import com.fasterxml.jackson.core.JsonParser;
......@@ -184,7 +185,7 @@ public class ActionUtils {
}
switch(a.getType()) {
case OUTPUT:
sb.append(STR_OUTPUT).append("=").append(Integer.toString(((OFActionOutput)a).getPort().getPortNumber()));
sb.append(STR_OUTPUT).append("=").append(ActionUtils.portToString(((OFActionOutput)a).getPort()));
break;
case ENQUEUE:
long queue = ((OFActionEnqueue)a).getQueueId();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment