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

Change-Id: Ib23eda2d9feb523e23dc33fb437994267b4cc555
diff --git a/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java b/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java
index 28ace88..13e02e5 100644
--- a/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java
+++ b/core/net/src/main/java/org/onlab/onos/net/resource/impl/DefaultLinkResourceAllocations.java
@@ -15,11 +15,7 @@
  */
 package org.onlab.onos.net.resource.impl;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
+import com.google.common.base.MoreObjects;
 import org.onlab.onos.net.Link;
 import org.onlab.onos.net.intent.IntentId;
 import org.onlab.onos.net.resource.LinkResourceAllocations;
@@ -28,6 +24,11 @@
 import org.onlab.onos.net.resource.ResourceRequest;
 import org.onlab.onos.net.resource.ResourceType;
 
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * Implementation of {@link LinkResourceAllocations}.
  */
@@ -38,11 +39,11 @@
     /**
      * Creates a new link resource allocations.
      *
-     * @param request requested resources
+     * @param request     requested resources
      * @param allocations allocated resources
      */
     DefaultLinkResourceAllocations(LinkResourceRequest request,
-            Map<Link, Set<ResourceAllocation>> allocations) {
+                                   Map<Link, Set<ResourceAllocation>> allocations) {
         this.request = request;
         this.allocations = allocations;
     }
@@ -76,4 +77,10 @@
         return result;
     }
 
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(this)
+                .add("allocations", allocations)
+                .toString();
+    }
 }