Made ResourceManager to accept arbitrary ResourceConsumer implementation. (ONOS-4406)

Change-Id: If41564824770c2a8b78237a206c036df94141117
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentId.java b/core/api/src/main/java/org/onosproject/net/intent/IntentId.java
index 0e50eb0..c86471d 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentId.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentId.java
@@ -18,6 +18,7 @@
 import com.google.common.annotations.Beta;
 import org.onlab.util.Identifier;
 import org.onosproject.net.resource.ResourceConsumer;
+import org.onosproject.net.resource.ResourceConsumerId;
 
 /**
  * Intent identifier suitable as an external key.
@@ -66,4 +67,8 @@
         return "0x" + Long.toHexString(identifier);
     }
 
+    @Override
+    public ResourceConsumerId consumerId() {
+        return ResourceConsumerId.of(this);
+    }
 }