Just a copy from FlowObjectiveAdapter of org.onosproject.sfc.util.
Now, FlowObjectiveAdapter is not exposed to external applications.
So, each App developer has to define own FlowObjectiveService in their test code.
I removed the previous copy in sfc package.
FlowObjectiveAdaptor is renamed into FlowObjectiveServiceAdaptor
Change-Id: I25545669eea3a73deebaf2a6f2c46e2ff2890b34
diff --git a/apps/vtn/sfcmgr/src/test/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImplTest.java b/apps/vtn/sfcmgr/src/test/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImplTest.java
index 61ad4e8..5d60870 100644
--- a/apps/vtn/sfcmgr/src/test/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImplTest.java
+++ b/apps/vtn/sfcmgr/src/test/java/org/onosproject/sfc/installer/impl/SfcFlowRuleInstallerImplTest.java
@@ -58,13 +58,13 @@
import org.onosproject.net.flow.criteria.PortCriterion;
import org.onosproject.net.flow.instructions.Instruction;
import org.onosproject.net.flow.instructions.Instructions.OutputInstruction;
+import org.onosproject.net.flowobjective.FlowObjectiveServiceAdapter;
import org.onosproject.net.flowobjective.FlowObjectiveService;
import org.onosproject.net.flowobjective.ForwardingObjective;
import org.onosproject.net.host.HostService;
import org.onosproject.net.host.HostServiceAdapter;
import org.onosproject.net.provider.ProviderId;
import org.onosproject.sfc.util.FlowClassifierAdapter;
-import org.onosproject.sfc.util.FlowObjectiveAdapter;
import org.onosproject.sfc.util.MockDriverHandler;
import org.onosproject.sfc.util.PortPairAdapter;
import org.onosproject.sfc.util.PortPairGroupAdapter;
@@ -113,7 +113,7 @@
public class SfcFlowRuleInstallerImplTest {
- FlowObjectiveService flowObjectiveService = new FlowObjectiveAdapter();
+ FlowObjectiveService flowObjectiveService = new FlowObjectiveServiceAdapter();
DeviceService deviceService = new DeviceServiceAdapter(createPortList());
HostService hostService = new HostServiceAdapter();
@@ -401,7 +401,7 @@
flowRuleInstaller.installLoadBalancedFlowRules(portChain, fiveTuple, nshSpiId);
- ForwardingObjective forObj = ((FlowObjectiveAdapter) flowObjectiveService).forwardingObjective();
+ ForwardingObjective forObj = ((FlowObjectiveServiceAdapter) flowObjectiveService).forwardingObjective();
// Check for Selector
assertThat(forObj.selector().getCriterion(Criterion.Type.IN_PORT), instanceOf(PortCriterion.class));
diff --git a/apps/vtn/sfcmgr/src/test/java/org/onosproject/sfc/util/FlowObjectiveAdapter.java b/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java
similarity index 82%
rename from apps/vtn/sfcmgr/src/test/java/org/onosproject/sfc/util/FlowObjectiveAdapter.java
rename to core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java
index cecc381..9d5e806 100644
--- a/apps/vtn/sfcmgr/src/test/java/org/onosproject/sfc/util/FlowObjectiveAdapter.java
+++ b/core/api/src/test/java/org/onosproject/net/flowobjective/FlowObjectiveServiceAdapter.java
@@ -13,22 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.sfc.util;
-import java.util.List;
-
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.flowobjective.FilteringObjective;
-import org.onosproject.net.flowobjective.FlowObjectiveService;
-import org.onosproject.net.flowobjective.ForwardingObjective;
-import org.onosproject.net.flowobjective.NextObjective;
+package org.onosproject.net.flowobjective;
import com.google.common.collect.ImmutableList;
+import org.onosproject.net.DeviceId;
+
+import java.util.List;
/**
* Testing version of implementation on FlowObjectiveService.
*/
-public class FlowObjectiveAdapter implements FlowObjectiveService {
+public class FlowObjectiveServiceAdapter implements FlowObjectiveService {
private ForwardingObjective forwardingObjective;
@Override