Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 3 | * |
| 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 Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 16 | |
Yoonseon Han | feb95f1 | 2016-08-24 16:37:46 -0700 | [diff] [blame] | 17 | package org.onosproject.net.flowobjective; |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 18 | |
Saurav Das | b5c236e | 2016-06-07 10:08:06 -0700 | [diff] [blame] | 19 | import com.google.common.collect.ImmutableList; |
Harshada Chaundkar | 5a198b0 | 2019-07-03 16:27:45 +0000 | [diff] [blame^] | 20 | import com.google.common.collect.ImmutableMap; |
Yoonseon Han | feb95f1 | 2016-08-24 16:37:46 -0700 | [diff] [blame] | 21 | import org.onosproject.net.DeviceId; |
Harshada Chaundkar | 5a198b0 | 2019-07-03 16:27:45 +0000 | [diff] [blame^] | 22 | import org.apache.commons.lang3.tuple.Pair; |
| 23 | import java.util.Map; |
Yoonseon Han | feb95f1 | 2016-08-24 16:37:46 -0700 | [diff] [blame] | 24 | |
| 25 | import java.util.List; |
Saurav Das | b5c236e | 2016-06-07 10:08:06 -0700 | [diff] [blame] | 26 | |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 27 | /** |
| 28 | * Testing version of implementation on FlowObjectiveService. |
| 29 | */ |
Yoonseon Han | feb95f1 | 2016-08-24 16:37:46 -0700 | [diff] [blame] | 30 | public class FlowObjectiveServiceAdapter implements FlowObjectiveService { |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 31 | |
Phaneendra Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 32 | private ForwardingObjective forwardingObjective; |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 33 | @Override |
| 34 | public void filter(DeviceId deviceId, FilteringObjective filteringObjective) { |
| 35 | |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | public void forward(DeviceId deviceId, ForwardingObjective forwardingObjective) { |
Phaneendra Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 40 | this.forwardingObjective = forwardingObjective; |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 41 | } |
| 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 Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 57 | |
| 58 | public ForwardingObjective forwardingObjective() { |
| 59 | return forwardingObjective; |
| 60 | } |
Saurav Das | 2443119 | 2016-03-07 19:13:00 -0800 | [diff] [blame] | 61 | |
| 62 | @Override |
| 63 | public List<String> getNextMappings() { |
Saurav Das | b5c236e | 2016-06-07 10:08:06 -0700 | [diff] [blame] | 64 | return ImmutableList.of(); |
| 65 | } |
| 66 | |
| 67 | @Override |
Saurav Das | 1547b3f | 2017-05-05 17:01:08 -0700 | [diff] [blame] | 68 | public List<String> getPendingFlowObjectives() { |
| 69 | return ImmutableList.of(); |
| 70 | } |
Harshada Chaundkar | 5a198b0 | 2019-07-03 16:27:45 +0000 | [diff] [blame^] | 71 | |
| 72 | @Override |
| 73 | public Map<Pair<Integer, DeviceId>, List<String>> getNextMappingsChain() { |
| 74 | return ImmutableMap.of(); |
| 75 | } |
| 76 | |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 77 | } |