[ONOS-6412] allocate resource by Intent.Key

- Allocate resources by Intent.Key instead of IntentId

- ONOS-5808 changed the IntentManager's Intent withdrawal behavior to
  release resouces allocated by Intent.Key
  (was releasing resource allocated by IntentId)

Change-Id: I62e048e4ee8f841b92d9985784c95abba3d37a0a
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java b/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java
index e19044e..22b3500 100644
--- a/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/LabelAllocator.java
@@ -237,6 +237,8 @@
                 ))
                 .collect(Collectors.toSet());
 
+        // FIXME resource allocated by IntentId will not be released
+        // when Intent is withdrawn. Behaviour changed by ONOS-5808
         List<ResourceAllocation> allocations = resourceService.allocate(id, ImmutableList.copyOf(resources));
 
         if (allocations.isEmpty()) {