Yoonseon Han
Committed by Gerrit Code Review

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
...@@ -58,13 +58,13 @@ import org.onosproject.net.flow.criteria.Criterion; ...@@ -58,13 +58,13 @@ import org.onosproject.net.flow.criteria.Criterion;
58 import org.onosproject.net.flow.criteria.PortCriterion; 58 import org.onosproject.net.flow.criteria.PortCriterion;
59 import org.onosproject.net.flow.instructions.Instruction; 59 import org.onosproject.net.flow.instructions.Instruction;
60 import org.onosproject.net.flow.instructions.Instructions.OutputInstruction; 60 import org.onosproject.net.flow.instructions.Instructions.OutputInstruction;
61 +import org.onosproject.net.flowobjective.FlowObjectiveServiceAdapter;
61 import org.onosproject.net.flowobjective.FlowObjectiveService; 62 import org.onosproject.net.flowobjective.FlowObjectiveService;
62 import org.onosproject.net.flowobjective.ForwardingObjective; 63 import org.onosproject.net.flowobjective.ForwardingObjective;
63 import org.onosproject.net.host.HostService; 64 import org.onosproject.net.host.HostService;
64 import org.onosproject.net.host.HostServiceAdapter; 65 import org.onosproject.net.host.HostServiceAdapter;
65 import org.onosproject.net.provider.ProviderId; 66 import org.onosproject.net.provider.ProviderId;
66 import org.onosproject.sfc.util.FlowClassifierAdapter; 67 import org.onosproject.sfc.util.FlowClassifierAdapter;
67 -import org.onosproject.sfc.util.FlowObjectiveAdapter;
68 import org.onosproject.sfc.util.MockDriverHandler; 68 import org.onosproject.sfc.util.MockDriverHandler;
69 import org.onosproject.sfc.util.PortPairAdapter; 69 import org.onosproject.sfc.util.PortPairAdapter;
70 import org.onosproject.sfc.util.PortPairGroupAdapter; 70 import org.onosproject.sfc.util.PortPairGroupAdapter;
...@@ -113,7 +113,7 @@ import com.google.common.collect.Sets; ...@@ -113,7 +113,7 @@ import com.google.common.collect.Sets;
113 113
114 public class SfcFlowRuleInstallerImplTest { 114 public class SfcFlowRuleInstallerImplTest {
115 115
116 - FlowObjectiveService flowObjectiveService = new FlowObjectiveAdapter(); 116 + FlowObjectiveService flowObjectiveService = new FlowObjectiveServiceAdapter();
117 DeviceService deviceService = new DeviceServiceAdapter(createPortList()); 117 DeviceService deviceService = new DeviceServiceAdapter(createPortList());
118 118
119 HostService hostService = new HostServiceAdapter(); 119 HostService hostService = new HostServiceAdapter();
...@@ -401,7 +401,7 @@ public class SfcFlowRuleInstallerImplTest { ...@@ -401,7 +401,7 @@ public class SfcFlowRuleInstallerImplTest {
401 401
402 flowRuleInstaller.installLoadBalancedFlowRules(portChain, fiveTuple, nshSpiId); 402 flowRuleInstaller.installLoadBalancedFlowRules(portChain, fiveTuple, nshSpiId);
403 403
404 - ForwardingObjective forObj = ((FlowObjectiveAdapter) flowObjectiveService).forwardingObjective(); 404 + ForwardingObjective forObj = ((FlowObjectiveServiceAdapter) flowObjectiveService).forwardingObjective();
405 405
406 // Check for Selector 406 // Check for Selector
407 assertThat(forObj.selector().getCriterion(Criterion.Type.IN_PORT), instanceOf(PortCriterion.class)); 407 assertThat(forObj.selector().getCriterion(Criterion.Type.IN_PORT), instanceOf(PortCriterion.class));
......
...@@ -13,22 +13,18 @@ ...@@ -13,22 +13,18 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 -package org.onosproject.sfc.util;
17 16
18 -import java.util.List; 17 +package org.onosproject.net.flowobjective;
19 18
19 +import com.google.common.collect.ImmutableList;
20 import org.onosproject.net.DeviceId; 20 import org.onosproject.net.DeviceId;
21 -import org.onosproject.net.flowobjective.FilteringObjective;
22 -import org.onosproject.net.flowobjective.FlowObjectiveService;
23 -import org.onosproject.net.flowobjective.ForwardingObjective;
24 -import org.onosproject.net.flowobjective.NextObjective;
25 21
26 -import com.google.common.collect.ImmutableList; 22 +import java.util.List;
27 23
28 /** 24 /**
29 * Testing version of implementation on FlowObjectiveService. 25 * Testing version of implementation on FlowObjectiveService.
30 */ 26 */
31 -public class FlowObjectiveAdapter implements FlowObjectiveService { 27 +public class FlowObjectiveServiceAdapter implements FlowObjectiveService {
32 28
33 private ForwardingObjective forwardingObjective; 29 private ForwardingObjective forwardingObjective;
34 @Override 30 @Override
......