Added commands to list paths.
Added protection against bad input on some command-lines.
diff --git a/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java
index 246c39e..be5105c 100644
--- a/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java
+++ b/cli/src/main/java/org/onlab/onos/cli/net/ClusterLinksCommand.java
@@ -24,8 +24,12 @@
int cid = Integer.parseInt(id);
init();
TopologyCluster cluster = service.getCluster(topology, clusterId(cid));
- for (Link link : service.getClusterLinks(topology, cluster)) {
- print(linkString(link));
+ if (cluster == null) {
+ error("No such cluster %s", cid);
+ } else {
+ for (Link link : service.getClusterLinks(topology, cluster)) {
+ print(linkString(link));
+ }
}
return null;
}