Adding a very simple output for pingall
Change-Id: I7575d4f6d1c45cdfaeb6a10d1bdc8371bcb25a29
(cherry picked from commit 134c3c051f1d8bdbaee66c4ffee7579e53ffc1f0)
diff --git a/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java b/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java
index 542dcfd..149cba7 100644
--- a/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java
+++ b/apps/t3/src/main/java/org/onosproject/t3/api/StaticPacketTrace.java
@@ -43,6 +43,7 @@
private Map<DeviceId, List<FlowEntry>> flowsForDevice;
private StringBuilder resultMessage;
private Pair<Host, Host> hosts;
+ private boolean success = false;
/**
* Builds the trace with a given packet and a connect point.
@@ -195,6 +196,23 @@
hosts = endpointHosts;
}
+ /**
+ * Return if this trace is successful.
+ * @return true if successful
+ */
+ public boolean isSuccess() {
+ return success;
+ }
+
+ /**
+ * Sets if this trace is successful.
+ * @param success true if trace is successful.
+ */
+ public void setSuccess(boolean success) {
+ this.success = success;
+ }
+
+
@Override
public String toString() {
return "StaticPacketTrace{" +
diff --git a/apps/t3/src/main/java/org/onosproject/t3/api/TroubleshootService.java b/apps/t3/src/main/java/org/onosproject/t3/api/TroubleshootService.java
index 28ff728..ab7ff29 100644
--- a/apps/t3/src/main/java/org/onosproject/t3/api/TroubleshootService.java
+++ b/apps/t3/src/main/java/org/onosproject/t3/api/TroubleshootService.java
@@ -20,6 +20,7 @@
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.HostId;
import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.t3.impl.Generator;
import java.util.List;
import java.util.Set;
@@ -39,6 +40,14 @@
List<StaticPacketTrace> pingAll(EthType.EtherType type);
/**
+ * Requests a static trace be performed between all hosts in the network, given a type of traffic.
+ *
+ * @param type the etherType of the traffic we want to trace.
+ * @return a trace result
+ */
+ Generator<Set<StaticPacketTrace>> pingAllGenerator(EthType.EtherType type);
+
+ /**
* Requests a static trace be performed between the two hosts in the network, given a type of traffic.
*
* @param sourceHost source host