[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/intent/impl/compiler/ProtectedTransportIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ProtectedTransportIntentCompiler.java
index e3c7d02..4241eae 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ProtectedTransportIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ProtectedTransportIntentCompiler.java
@@ -417,8 +417,8 @@
 
             List<Resource> resources = concat(primaryResources, secondaryResources)
                                         .collect(Collectors.toList());
-            log.trace("Calling allocate({},{})", intent.id(), resources);
-            if (resourceService.allocate(intent.id(), resources).isEmpty()) {
+            log.trace("Calling allocate({},{})", intent.key(), resources);
+            if (resourceService.allocate(intent.key(), resources).isEmpty()) {
                 log.warn("Allocation failed, retrying");
                 continue;
             }