Adding resource-{available,allocated} CLI commands and lots of toStrings

Change-Id: Ib23eda2d9feb523e23dc33fb437994267b4cc555
diff --git a/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java b/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java
index 88548a1..f5c65e5 100644
--- a/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java
+++ b/cli/src/main/java/org/onlab/onos/cli/net/IntentsListCommand.java
@@ -20,6 +20,7 @@
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
 import org.onlab.onos.cli.AbstractShellCommand;
 import org.onlab.onos.net.ConnectPoint;
 import org.onlab.onos.net.Link;
@@ -44,6 +45,11 @@
          description = "Lists the inventory of intents and their states")
 public class IntentsListCommand extends AbstractShellCommand {
 
+    @Option(name = "-i", aliases = "--installable", description = "Output Installable Intents",
+            required = false, multiValued = false)
+    private boolean showInstallable = false;
+
+
     @Override
     protected void execute() {
         IntentService service = get(IntentService.class);
@@ -93,7 +99,7 @@
         }
 
         List<Intent> installable = service.getInstallableIntents(intent.id());
-        if (installable != null && !installable.isEmpty()) {
+        if (showInstallable && installable != null && !installable.isEmpty()) {
             print("    installable=%s", installable);
         }
     }