commit | 65d9d0ebc6174b8ba8bab4206c4e9686175fbc5c | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@ak.jp.nec.com> | Thu May 04 12:44:32 2017 -0700 |
committer | Luca Prete <luca@onlab.us> | Thu May 04 22:31:56 2017 +0000 |
tree | 82b215412bad4d24a5ec59b146182d4fd9d8d1c3 | |
parent | f00087c1326a5f713c6fe8eeb7f4e12168a29172 [diff] [blame] |
[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()) {