commit | 6e0fb3028932245a91413e74cf5b1bafe2f107d2 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@onlab.us> | Thu Apr 16 14:44:12 2015 -0700 |
committer | Ray Milkey <ray@onlab.us> | Mon Apr 20 10:28:56 2015 -0700 |
tree | 8d1a35f31611f381f2a5a9729d4484f6b2fcbca6 | |
parent | 67cf7de3901c843fc813ab8deae51accdb2bbb97 [diff] [blame] |
ONOS-1334 - Allow multi to single intent across a single switch Change-Id: I8be3dbc403ea1202fd496e666955402247f71bf1
diff --git a/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java b/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java index 48a86c4..d34143c 100644 --- a/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java +++ b/core/net/src/test/java/org/onosproject/net/intent/LinksHaveEntryWithSourceDestinationPairMatcher.java
@@ -19,6 +19,7 @@ import org.hamcrest.Description; import org.hamcrest.TypeSafeMatcher; +import org.onosproject.net.EdgeLink; import org.onosproject.net.Link; /** @@ -46,6 +47,14 @@ @Override public boolean matchesSafely(Collection<Link> links) { for (Link link : links) { + if (source.equals(destination) && link instanceof EdgeLink) { + EdgeLink edgeLink = (EdgeLink) link; + if (edgeLink.hostLocation().elementId() + .toString().endsWith(source)) { + return true; + } + } + if (link.src().elementId().toString().endsWith(source) && link.dst().elementId().toString().endsWith(destination)) { return true;