mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-15 09:46:14 +02:00
Fix for MP2S intent with ingress/egress on same switch.
Fixes ONOS-1872 to enable support for 2 external SDN-IP connections on the same switch. Change-Id: I4475485f2f611c61e33ca34f17bef1950c3b4ed8
This commit is contained in:
parent
6f00489dfc
commit
ebc8f714af
@ -15,13 +15,8 @@
|
||||
*/
|
||||
package org.onosproject.net.intent.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.felix.scr.annotations.Activate;
|
||||
import org.apache.felix.scr.annotations.Component;
|
||||
import org.apache.felix.scr.annotations.Deactivate;
|
||||
@ -40,8 +35,12 @@ import org.onosproject.net.intent.PointToPointIntent;
|
||||
import org.onosproject.net.resource.LinkResourceAllocations;
|
||||
import org.onosproject.net.topology.PathService;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* An intent compiler for
|
||||
@ -73,6 +72,9 @@ public class MultiPointToSinglePointIntentCompiler
|
||||
Map<DeviceId, Link> links = new HashMap<>();
|
||||
|
||||
for (ConnectPoint ingressPoint : intent.ingressPoints()) {
|
||||
if (ingressPoint.deviceId().equals(intent.egressPoint().deviceId())) {
|
||||
continue;
|
||||
}
|
||||
Path path = getPath(ingressPoint, intent.egressPoint());
|
||||
for (Link link : path.links()) {
|
||||
if (links.containsKey(link.src().deviceId())) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user