blob: cecc381b09a7c61f7bfa44366002d59e88d36033 [file] [log] [blame]
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +05303 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.sfc.util;
17
Saurav Das24431192016-03-07 19:13:00 -080018import java.util.List;
19
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053020import org.onosproject.net.DeviceId;
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053021import org.onosproject.net.flowobjective.FilteringObjective;
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053022import org.onosproject.net.flowobjective.FlowObjectiveService;
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053023import org.onosproject.net.flowobjective.ForwardingObjective;
24import org.onosproject.net.flowobjective.NextObjective;
25
Saurav Dasb5c236e2016-06-07 10:08:06 -070026import com.google.common.collect.ImmutableList;
27
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053028/**
29 * Testing version of implementation on FlowObjectiveService.
30 */
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053031public class FlowObjectiveAdapter implements FlowObjectiveService {
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053032
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053033 private ForwardingObjective forwardingObjective;
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053034 @Override
35 public void filter(DeviceId deviceId, FilteringObjective filteringObjective) {
36
37 }
38
39 @Override
40 public void forward(DeviceId deviceId, ForwardingObjective forwardingObjective) {
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053041 this.forwardingObjective = forwardingObjective;
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053042 }
43
44 @Override
45 public void next(DeviceId deviceId, NextObjective nextObjective) {
46
47 }
48
49 @Override
50 public int allocateNextId() {
51 return 0;
52 }
53
54 @Override
55 public void initPolicy(String policy) {
56
57 }
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053058
59 public ForwardingObjective forwardingObjective() {
60 return forwardingObjective;
61 }
Saurav Das24431192016-03-07 19:13:00 -080062
63 @Override
64 public List<String> getNextMappings() {
Saurav Dasb5c236e2016-06-07 10:08:06 -070065 return ImmutableList.of();
66 }
67
68 @Override
69 public List<String> getPendingNexts() {
70 return ImmutableList.of();
Saurav Das24431192016-03-07 19:13:00 -080071 }
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053072}