blob: ac2895eb519aa49865909b1dd20e381c351bf309 [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Ray Milkey34c95902015-04-15 09:47:53 -07002 * Copyright 2014-2015 Open Networking Laboratory
Thomas Vachuska83e090e2014-10-22 14:25:35 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuska83e090e2014-10-22 14:25:35 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuska83e090e2014-10-22 14:25:35 -070015 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.flow;
tom0eb04ca2014-08-25 14:34:51 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.core.ApplicationId;
19import org.onosproject.net.provider.Provider;
tom0eb04ca2014-08-25 14:34:51 -070020
21/**
22 * Abstraction of a flow rule provider.
23 */
24public interface FlowRuleProvider extends Provider {
tome33cc1a2014-08-25 21:59:41 -070025
tom8bb16062014-09-12 14:47:46 -070026 /**
27 * Instructs the provider to apply the specified flow rules to their
28 * respective devices.
29 * @param flowRules one or more flow rules
30 * throws SomeKindOfException that indicates which ones were applied and
31 * which ones failed
32 */
33 void applyFlowRule(FlowRule... flowRules);
34
alshabib57044ba2014-09-16 15:58:01 -070035 /**
36 * Instructs the provider to remove the specified flow rules to their
37 * respective devices.
38 * @param flowRules one or more flow rules
39 * throws SomeKindOfException that indicates which ones were applied and
40 * which ones failed
41 */
42 void removeFlowRule(FlowRule... flowRules);
43
alshabiba68eb962014-09-24 20:34:13 -070044 /**
45 * Removes rules by their id.
46 * @param id the id to remove
Yuta HIGUCHI5c947272014-11-03 21:39:21 -080047 * @param flowRules one or more flow rules
alshabiba68eb962014-09-24 20:34:13 -070048 */
49 void removeRulesById(ApplicationId id, FlowRule... flowRules);
50
alshabib193525b2014-10-08 18:58:03 -070051 /**
52 * Installs a batch of flow rules. Each flowrule is associated to an
53 * operation which results in either addition, removal or modification.
54 * @param batch a batch of flow rules
alshabib193525b2014-10-08 18:58:03 -070055 */
Brian O'Connor72cb19a2015-01-16 16:14:41 -080056 void executeBatch(FlowRuleBatchOperation batch);
alshabib902d41b2014-10-07 16:52:05 -070057
tom0eb04ca2014-08-25 14:34:51 -070058}