Changes related to the "LinkCollectionIntent" type of intents
(e.g., Multipoint-to-singlepoint and Singlepoint-to-multipoint)
* Apply the Intent-defined traffic treatment only on the flowmods
on the ingress switch with ingress inport for a flowmod.
Previously, the traffic treatments were applied on each switch,
and semantically it is not the correct (default) behavior.
* Express the flowmods by explicitly specifying the expected inport
in the matching conditions for each flowmod.
Previously, the inport was not included in the matching conditions.
[Merge from branch onos-1.0 - manually]
Change-Id: Ic378b6e8be033a70b016f4ba5550d91fe08ddd9a
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
index fd344e2..8360820 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
@@ -33,6 +33,8 @@
import org.onosproject.net.provider.ProviderId;
import org.onosproject.net.resource.LinkResourceAllocations;
+import com.google.common.collect.ImmutableSet;
+
@Component(immediate = true)
public class SinglePointToMultiPointIntentCompiler
extends ConnectivityIntentCompiler<SinglePointToMultiPointIntent> {
@@ -67,6 +69,7 @@
Intent result = new LinkCollectionIntent(intent.appId(),
intent.selector(),
intent.treatment(), links,
+ ImmutableSet.of(intent.ingressPoint()),
intent.egressPoints(), Collections.emptyList());
return Arrays.asList(result);