From b6f95e243368614e984d4f3c4638d58aad9eaffc Mon Sep 17 00:00:00 2001 From: Marc De Leenheer Date: Wed, 15 Mar 2017 12:18:59 -0700 Subject: [PATCH] Do not create wavelength-based match/actions for wavelength-transparent devices. Change-Id: I665daad954210101cf0ab04671673bf7cb1e4e46 --- .../compiler/OpticalPathIntentCompiler.java | 70 ++++++++++++++----- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalPathIntentCompiler.java b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalPathIntentCompiler.java index b848dc1a40..8b17246e21 100644 --- a/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalPathIntentCompiler.java +++ b/apps/optical-model/src/main/java/org/onosproject/net/optical/intent/impl/compiler/OpticalPathIntentCompiler.java @@ -15,6 +15,7 @@ */ package org.onosproject.net.optical.intent.impl.compiler; +import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; @@ -51,6 +52,7 @@ import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Optional; +import java.util.Set; @Component(immediate = true) public class OpticalPathIntentCompiler implements IntentCompiler { @@ -67,6 +69,12 @@ public class OpticalPathIntentCompiler implements IntentCompiler TRANSPARENT_DEVICES = + ImmutableSet.of(Type.OPTICAL_AMPLIFIER, Type.FIBER_SWITCH); + // Devices which don't accept flow rules + private static final Set NO_FLOWRULE_DEVICES = + ImmutableSet.of(Type.OPTICAL_AMPLIFIER); @Activate public void activate() { @@ -100,14 +108,6 @@ public class OpticalPathIntentCompiler implements IntentCompiler