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