Remove the datapathSummary field in the FlowPath (ONOS-990).

Conflicts:

	src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
	src/test/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjectsIFlowPathTest.java
	src/test/java/net/onrc/onos/ofcontroller/core/internal/TestableGraphDBOperation.java
	src/test/java/net/onrc/onos/ofcontroller/flowmanager/FlowManagerTest.java
	src/test/java/net/onrc/onos/ofcontroller/topology/TopologyManagerTest.java

NOTE: The conflict in file FlowDatabaseOperation.java has been resolved
by hand.
The conflicts in the rest of the files are ignored, because they refer
to test files that are removed.

Change-Id: I68399bee0ca44f15b1e32d1bd7676befa5be4ae2
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java b/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
index f237376..26c9a98 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
@@ -11,7 +11,6 @@
 import com.tinkerpop.frames.annotations.gremlin.GremlinParam;
 import com.tinkerpop.frames.VertexFrame;
 
-import net.onrc.onos.ofcontroller.flowmanager.web.DatapathSummarySerializer;
 import net.floodlightcontroller.core.web.serializers.IPv4Serializer;
 
 /*
@@ -303,14 +302,6 @@
 		@Property("dst_port")
 		public void setDstPort(Short dstPort);
 
-		@JsonProperty("dataPath")
-		@JsonSerialize(using=DatapathSummarySerializer.class)
-		@Property("data_path_summary")
-		public String getDataPathSummary();
-
-		@Property("data_path_summary")
-		public void setDataPathSummary(String dataPathSummary);
-
 		@JsonIgnore
 		@Adjacency(label="flow", direction=Direction.IN)
 		public Iterable<IFlowEntry> getFlowEntries();
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
index ec3064e..aee2ecb 100755
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
@@ -164,8 +164,6 @@
             flowPathEntity.setProperty("actions", flowPath.flowEntryActions().toString());
 	    flowProp.setActions(flowPath.flowEntryActions().toString());
 	}
-        flowPathEntity.setProperty("data_path_summary", flowPath.dataPath().dataPathSummary());
-	flowProp.setDataPathSummary(flowPath.dataPath().dataPathSummary());
 
 	flowProp.commitProperties(dbHandler, flowPathObj);
 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java
index f893ac1..5ef1243 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java
@@ -133,10 +133,6 @@
         map.put("actionOutputPort", value);
     }
     
-    public void setDataPathSummary(String value) {
-        map.put("data_path_summary", value);
-    }
-    
     /**
      *
      * @param dbhandler
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowPathProperty.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowPathProperty.java
index 50bbcc8..3b74cbb 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowPathProperty.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowPathProperty.java
@@ -61,10 +61,6 @@
 		map.put("dst_port", dstPort);
 	}
 
-	public void setDataPathSummary(String dataPathSummary) {
-		map.put("data_path_summary", dataPathSummary);
-	}
-
 	public void setMatchSrcMac(String matchSrcMac) {
 		map.put("matchSrcMac", matchSrcMac);
 	}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/DatapathSummarySerializer.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/DatapathSummarySerializer.java
deleted file mode 100644
index 5fa472f..0000000
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/DatapathSummarySerializer.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package net.onrc.onos.ofcontroller.flowmanager.web;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.JsonProcessingException;
-import org.codehaus.jackson.map.JsonSerializer;
-import org.codehaus.jackson.map.SerializerProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class DatapathSummarySerializer extends JsonSerializer<String>{
-	protected final static Logger log = LoggerFactory.getLogger(DatapathSummarySerializer.class);
-	
-	@Override
-	public void serialize(String datapathSummary, JsonGenerator jGen,
-			SerializerProvider serializer) throws IOException,
-			JsonProcessingException {
-		
-		String[] flowEntries = datapathSummary.split(";");
-		if (flowEntries.length < 2){
-			log.debug("datapathSummary string to short to parse: {}", 
-					datapathSummary);
-			jGen.writeStartObject();
-			jGen.writeEndObject();
-			return;
-		}
-		
-		String[] srcFlowEntry = flowEntries[0].split("/");
-		String[] dstFlowEntry = flowEntries[flowEntries.length - 1].split("/");
-		if (srcFlowEntry.length != 3 || dstFlowEntry.length != 3){
-			log.debug("Malformed datapathSummary string: {}", datapathSummary);
-			jGen.writeStartObject();
-			jGen.writeEndObject();
-			return;
-		}
-		
-		jGen.writeStartObject();
-		
-		/*
-		jGen.writeObjectFieldStart("srcPort");
-		jGen.writeObjectFieldStart("dpid");
-		jGen.writeStringField("value", srcFlowEntry[1]);
-		jGen.writeEndObject();
-		jGen.writeObjectFieldStart("port");
-		jGen.writeStringField("value", srcFlowEntry[0]);
-		jGen.writeEndObject();
-		jGen.writeEndObject();
-		
-		jGen.writeObjectFieldStart("dstPort");
-		jGen.writeObjectFieldStart("dpid");
-		jGen.writeStringField("value", srcFlowEntry[1]);
-		jGen.writeEndObject();
-		jGen.writeObjectFieldStart("port");
-		jGen.writeStringField("value", srcFlowEntry[2]);
-		jGen.writeEndObject();
-		jGen.writeEndObject();
-		*/
-		jGen.writeArrayFieldStart("flowEntries");
-		
-		for (String flowEntryString : flowEntries){
-			String[] flowEntry = flowEntryString.split("/");
-			if (flowEntry.length != 3){
-				log.debug("Malformed datapathSummary string: {}", datapathSummary);
-				jGen.writeStartObject();
-				jGen.writeEndObject();
-				continue;
-			}
-			
-			jGen.writeStartObject();
-			jGen.writeObjectFieldStart("dpid");
-			jGen.writeStringField("value", flowEntry[1]);
-			jGen.writeEndObject();
-			jGen.writeEndObject();
-		}
-		
-		jGen.writeEndArray();
-		
-		jGen.writeEndObject();
-	}
-
-}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/DataPath.java b/src/main/java/net/onrc/onos/ofcontroller/util/DataPath.java
index 044cc6d..ba8f458 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/DataPath.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/DataPath.java
@@ -136,36 +136,6 @@
     }
 
     /**
-     * Get a string with the summary of the shortest-path data path
-     * computation.
-     *
-     * NOTE: This method assumes the DataPath was created by
-     * using the TopologyManager shortest path computation, so the inPort
-     * and outPort of the Flow Entries are set.
-     * NOTE: This method is a temporary solution and will be removed
-     * in the future.
-     *
-     * @return a string with the summary of the shortest-path
-     * data path computation if valid, otherwise the string "X".
-     * If the shortest-path was valid, The string has the following form:
-     * inPort/dpid/outPort;inPort/dpid/outPort;...
-     */
-    public String dataPathSummary() {
-	StringBuilder resultStr = new StringBuilder(5+1+20+1+5+1);
-	if (this.flowEntries != null) {
-	    for (FlowEntry flowEntry : this.flowEntries) {
-		// The data path summary string
-		resultStr.append(flowEntry.inPort().toString()).append('/')
-			.append(flowEntry.dpid().toString()).append('/')
-			.append(flowEntry.outPort().toString()).append(';');
-	    }
-	}
-	if (resultStr.length() == 0)
-	    resultStr.append("X");		// Invalid shortest-path
-	return resultStr.toString();
-    }
-
-    /**
      * Convert the data path to a string.
      *
      * The string has the following form: