blob: b270b13a71916892c35e389c4e499278d11aba0b [file] [log] [blame]
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +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 */
16package org.onosproject.sfc.forwarder;
17
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053018import java.util.List;
19
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053020import org.onosproject.net.NshServicePathId;
21import org.onosproject.vtnrsc.PortChain;
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053022import org.onosproject.vtnrsc.PortPairId;
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053023
24/**
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053025 * Abstraction of an entity which provides service function forwarder.
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053026 */
27public interface ServiceFunctionForwarderService {
28
29 /**
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053030 * Install forwarding rule.
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053031 *
32 * @param portChain port-chain
Jonathan Hart51539b82015-10-29 09:53:04 -070033 * @param nshSpi nsh spi
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053034 */
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053035 @Deprecated
Jonathan Hart51539b82015-10-29 09:53:04 -070036 void installForwardingRule(PortChain portChain, NshServicePathId nshSpi);
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053037
38 /**
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053039 * Uninstall forwarding rule.
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053040 *
41 * @param portChain port-chain
Jonathan Hart51539b82015-10-29 09:53:04 -070042 * @param nshSpi nsh spi
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053043 */
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053044 @Deprecated
Jonathan Hart51539b82015-10-29 09:53:04 -070045 void unInstallForwardingRule(PortChain portChain, NshServicePathId nshSpi);
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053046
47 /**
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053048 * Install load balanced forwarding rules.
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053049 *
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053050 * @param path load balanced path of port pairs
51 * @param nshSpi nsh service path index
Mahesh Poojary S7e9a78f2015-12-04 01:55:57 +053052 */
Phaneendra Mandab88b3f82016-02-12 21:51:30 +053053 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 S7e9a78f2015-12-04 01:55:57 +053062}