Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +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.forwarder; |
| 17 | |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 18 | import java.util.List; |
| 19 | |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 20 | import org.onosproject.net.NshServicePathId; |
| 21 | import org.onosproject.vtnrsc.PortChain; |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 22 | import org.onosproject.vtnrsc.PortPairId; |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 23 | |
| 24 | /** |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 25 | * Abstraction of an entity which provides service function forwarder. |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 26 | */ |
| 27 | public interface ServiceFunctionForwarderService { |
| 28 | |
| 29 | /** |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 30 | * Install forwarding rule. |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 31 | * |
| 32 | * @param portChain port-chain |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 33 | * @param nshSpi nsh spi |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 34 | */ |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 35 | @Deprecated |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 36 | void installForwardingRule(PortChain portChain, NshServicePathId nshSpi); |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 37 | |
| 38 | /** |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 39 | * Uninstall forwarding rule. |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 40 | * |
| 41 | * @param portChain port-chain |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 42 | * @param nshSpi nsh spi |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 43 | */ |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 44 | @Deprecated |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 45 | void unInstallForwardingRule(PortChain portChain, NshServicePathId nshSpi); |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 46 | |
| 47 | /** |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 48 | * Install load balanced forwarding rules. |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 49 | * |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 50 | * @param path load balanced path of port pairs |
| 51 | * @param nshSpi nsh service path index |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 52 | */ |
Phaneendra Manda | b88b3f8 | 2016-02-12 21:51:30 +0530 | [diff] [blame] | 53 | void installLoadBalancedForwardingRule(List<PortPairId> path, NshServicePathId nshSpi); |
| 54 | |
| 55 | /** |
| 56 | * Uninstall load balanced forwarding rules. |
| 57 | * |
| 58 | * @param path load balanced path of port pairs |
| 59 | * @param nshSpi nsh service path index |
| 60 | */ |
| 61 | void unInstallLoadBalancedForwardingRule(List<PortPairId> path, NshServicePathId nshSpi); |
Mahesh Poojary S | 7e9a78f | 2015-12-04 01:55:57 +0530 | [diff] [blame] | 62 | } |