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;
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 @@ import com.google.common.collect.Sets;
public class SfcFlowRuleInstallerImplTest {
FlowObjectiveService flowObjectiveService = new FlowObjectiveAdapter();
FlowObjectiveService flowObjectiveService = new FlowObjectiveServiceAdapter();
DeviceService deviceService = new DeviceServiceAdapter(createPortList());
HostService hostService = new HostServiceAdapter();
......@@ -401,7 +401,7 @@ public class SfcFlowRuleInstallerImplTest {
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));
......
......@@ -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;
package org.onosproject.net.flowobjective;
import com.google.common.collect.ImmutableList;
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;
import com.google.common.collect.ImmutableList;
import java.util.List;
/**
* Testing version of implementation on FlowObjectiveService.
*/
public class FlowObjectiveAdapter implements FlowObjectiveService {
public class FlowObjectiveServiceAdapter implements FlowObjectiveService {
private ForwardingObjective forwardingObjective;
@Override
......