blob: a7205f12a6a7f9ec491626dad81dd44b5580c669 [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present 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.
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080029 *
tom8bb16062014-09-12 14:47:46 -070030 * @param flowRules one or more flow rules
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080031 * throws SomeKindOfException that indicates which ones were applied and
tom8bb16062014-09-12 14:47:46 -070032 * which ones failed
33 */
34 void applyFlowRule(FlowRule... flowRules);
35
alshabib57044ba2014-09-16 15:58:01 -070036 /**
37 * Instructs the provider to remove the specified flow rules to their
38 * respective devices.
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080039 *
alshabib57044ba2014-09-16 15:58:01 -070040 * @param flowRules one or more flow rules
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080041 * throws SomeKindOfException that indicates which ones were applied and
alshabib57044ba2014-09-16 15:58:01 -070042 * which ones failed
43 */
44 void removeFlowRule(FlowRule... flowRules);
45
alshabiba68eb962014-09-24 20:34:13 -070046 /**
47 * Removes rules by their id.
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080048 *
49 * @param id the id to remove
Yuta HIGUCHI5c947272014-11-03 21:39:21 -080050 * @param flowRules one or more flow rules
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080051 * @deprecated since 1.5.0 Falcon
alshabiba68eb962014-09-24 20:34:13 -070052 */
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080053 @Deprecated
alshabiba68eb962014-09-24 20:34:13 -070054 void removeRulesById(ApplicationId id, FlowRule... flowRules);
55
alshabib193525b2014-10-08 18:58:03 -070056 /**
57 * Installs a batch of flow rules. Each flowrule is associated to an
58 * operation which results in either addition, removal or modification.
Thomas Vachuskac4ee7372016-02-02 16:10:09 -080059 *
alshabib193525b2014-10-08 18:58:03 -070060 * @param batch a batch of flow rules
alshabib193525b2014-10-08 18:58:03 -070061 */
Brian O'Connor72cb19a2015-01-16 16:14:41 -080062 void executeBatch(FlowRuleBatchOperation batch);
alshabib902d41b2014-10-07 16:52:05 -070063
tom0eb04ca2014-08-25 14:34:51 -070064}