Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
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 | */ |
| 16 | package org.onosproject.sfc.util; |
| 17 | |
Saurav Das | 2443119 | 2016-03-07 19:13:00 -0800 | [diff] [blame] | 18 | import java.util.List; |
| 19 | |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 20 | import org.onosproject.net.DeviceId; |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 21 | import org.onosproject.net.flowobjective.FilteringObjective; |
Phaneendra Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 22 | import org.onosproject.net.flowobjective.FlowObjectiveService; |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 23 | import org.onosproject.net.flowobjective.ForwardingObjective; |
| 24 | import org.onosproject.net.flowobjective.NextObjective; |
| 25 | |
| 26 | /** |
| 27 | * Testing version of implementation on FlowObjectiveService. |
| 28 | */ |
Phaneendra Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 29 | public class FlowObjectiveAdapter implements FlowObjectiveService { |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 30 | |
Phaneendra Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 31 | private ForwardingObjective forwardingObjective; |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 32 | @Override |
| 33 | public void filter(DeviceId deviceId, FilteringObjective filteringObjective) { |
| 34 | |
| 35 | } |
| 36 | |
| 37 | @Override |
| 38 | public void forward(DeviceId deviceId, ForwardingObjective forwardingObjective) { |
Phaneendra Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 39 | this.forwardingObjective = forwardingObjective; |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public void next(DeviceId deviceId, NextObjective nextObjective) { |
| 44 | |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public int allocateNextId() { |
| 49 | return 0; |
| 50 | } |
| 51 | |
| 52 | @Override |
| 53 | public void initPolicy(String policy) { |
| 54 | |
| 55 | } |
Phaneendra Manda | 0f21ad6 | 2016-02-12 19:32:13 +0530 | [diff] [blame] | 56 | |
| 57 | public ForwardingObjective forwardingObjective() { |
| 58 | return forwardingObjective; |
| 59 | } |
Saurav Das | 2443119 | 2016-03-07 19:13:00 -0800 | [diff] [blame] | 60 | |
| 61 | @Override |
| 62 | public List<String> getNextMappings() { |
| 63 | return null; |
| 64 | } |
Mahesh Poojary Huawei | 4f7600b | 2015-12-04 02:31:55 +0530 | [diff] [blame] | 65 | } |