blob: 0b17ce8217def2944c763a379f470eb56a20f693 [file] [log] [blame]
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
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 */
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053016
Yoonseon Hanfeb95f12016-08-24 16:37:46 -070017package org.onosproject.net.flowobjective;
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053018
Saurav Dasb5c236e2016-06-07 10:08:06 -070019import com.google.common.collect.ImmutableList;
Harshada Chaundkar91908af2019-07-03 16:27:45 +000020import com.google.common.collect.ImmutableMap;
Yoonseon Hanfeb95f12016-08-24 16:37:46 -070021import org.onosproject.net.DeviceId;
Harshada Chaundkar91908af2019-07-03 16:27:45 +000022import org.apache.commons.lang3.tuple.Pair;
23import java.util.Map;
Yoonseon Hanfeb95f12016-08-24 16:37:46 -070024
25import java.util.List;
Saurav Dasb5c236e2016-06-07 10:08:06 -070026
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053027/**
28 * Testing version of implementation on FlowObjectiveService.
29 */
Yoonseon Hanfeb95f12016-08-24 16:37:46 -070030public class FlowObjectiveServiceAdapter implements FlowObjectiveService {
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053031
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053032 private ForwardingObjective forwardingObjective;
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053033 @Override
34 public void filter(DeviceId deviceId, FilteringObjective filteringObjective) {
35
36 }
37
38 @Override
39 public void forward(DeviceId deviceId, ForwardingObjective forwardingObjective) {
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053040 this.forwardingObjective = forwardingObjective;
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053041 }
42
43 @Override
44 public void next(DeviceId deviceId, NextObjective nextObjective) {
45
46 }
47
48 @Override
49 public int allocateNextId() {
50 return 0;
51 }
52
53 @Override
54 public void initPolicy(String policy) {
55
56 }
Phaneendra Manda0f21ad62016-02-12 19:32:13 +053057
58 public ForwardingObjective forwardingObjective() {
59 return forwardingObjective;
60 }
Saurav Das24431192016-03-07 19:13:00 -080061
62 @Override
63 public List<String> getNextMappings() {
Saurav Dasb5c236e2016-06-07 10:08:06 -070064 return ImmutableList.of();
65 }
66
67 @Override
Saurav Das1547b3f2017-05-05 17:01:08 -070068 public List<String> getPendingFlowObjectives() {
69 return ImmutableList.of();
70 }
Harshada Chaundkar91908af2019-07-03 16:27:45 +000071
72 @Override
73 public Map<Pair<Integer, DeviceId>, List<String>> getNextMappingsChain() {
74 return ImmutableMap.of();
75 }
76
Mahesh Poojary Huawei4f7600b2015-12-04 02:31:55 +053077}