[AETHER-76] Impelentation of a new Trellis Troubleshoot Tool (T3) for offline mode
- For the performance improvement, T3 offline mode uses snapshots of the network states
called Network Information Base (NIB) instead of runtime interactions with ONOS core
during troubleshooting a Trellis system.
- Partially tested with some mininet topos for trellis
(https://github.com/opennetworkinglab/routing/tree/master/trellis).
- Usage instruction docs (https://docs.trellisfabric.org/troubleshooting.html).
Change-Id: Ice608f77aa96bfbcadfff34991c4a1b6d93125b6
(cherry picked from commit eaa6329aba67c2577fdca7d3ddf230611e82f9f7)
diff --git a/app/src/main/java/org/onosproject/t3/cli/TroubleshootPingAllCommand.java b/app/src/main/java/org/onosproject/t3/cli/TroubleshootPingAllCommand.java
index 93e843a..3e7003f 100644
--- a/app/src/main/java/org/onosproject/t3/cli/TroubleshootPingAllCommand.java
+++ b/app/src/main/java/org/onosproject/t3/cli/TroubleshootPingAllCommand.java
@@ -23,6 +23,7 @@
import org.apache.karaf.shell.api.action.lifecycle.Service;
import org.onlab.packet.IpAddress;
import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.cli.PlaceholderCompleter;
import org.onosproject.cli.net.EthTypeCompleter;
import org.onosproject.net.Host;
import org.onosproject.net.flow.criteria.Criterion;
@@ -54,17 +55,24 @@
String ethType = "ipv4";
@Option(name = "-v", aliases = "--verbose", description = "Outputs trace for each host to host combination")
+ @Completion(PlaceholderCompleter.class)
private boolean verbosity1 = false;
@Option(name = "-vv", aliases = "--veryverbose", description = "Outputs details of every trace")
+ @Completion(PlaceholderCompleter.class)
private boolean verbosity2 = false;
@Option(name = "-d", aliases = "--delay", description = "delay between host to host trace display")
+ @Completion(PlaceholderCompleter.class)
private long delay = 0;
@Override
protected void doExecute() {
TroubleshootService service = get(TroubleshootService.class);
+ if (service.checkNibsUnavailable()) {
+ print(TroubleshootLoadFileCommand.ERROR_NULL);
+ return;
+ }
EtherType type = EtherType.valueOf(ethType.toUpperCase());