From 76dc892491948adae5e5e62cf94448967e8d865b Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Sun, 6 Dec 2015 07:15:03 -0800 Subject: Fixes bad POM file with ONOS commit 8c68536972f63069c263635c9d9f4f31d7f3e9a2 Change-Id: I7adb5a2d3738d53dbc41db7577768b0e7ced5450 Signed-off-by: Ashlee Young --- .../impl/compiler/OpticalConnectivityIntentCompiler.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java') diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java index 2941ddba..e017ac58 100644 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java +++ b/framework/src/onos/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java @@ -57,9 +57,9 @@ import java.util.Collections; import java.util.List; import java.util.Set; import java.util.stream.Collectors; +import java.util.stream.Stream; import static com.google.common.base.Preconditions.checkArgument; -import static org.onosproject.net.LinkKey.linkKey; /** * An intent compiler for {@link org.onosproject.net.intent.OpticalConnectivityIntent}. @@ -182,7 +182,10 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler lambdaResources = path.links().stream() - .map(x -> ResourcePath.discrete(linkKey(x.src(), x.dst()))) + .flatMap(x -> Stream.of( + ResourcePath.discrete(x.src().deviceId(), x.src().port()), + ResourcePath.discrete(x.dst().deviceId(), x.dst().port()) + )) .map(x -> x.child(minLambda)) .collect(Collectors.toList()); @@ -197,7 +200,10 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler findCommonLambdasOverLinks(List links) { return links.stream() - .map(x -> ResourcePath.discrete(linkKey(x.src(), x.dst()))) + .flatMap(x -> Stream.of( + ResourcePath.discrete(x.src().deviceId(), x.src().port()), + ResourcePath.discrete(x.dst().deviceId(), x.dst().port()) + )) .map(resourceService::getAvailableResources) .map(x -> Iterables.filter(x, r -> r.last() instanceof IndexedLambda)) .map(x -> Iterables.transform(x, r -> (IndexedLambda) r.last())) -- cgit 1.2.3-korg