blob: 8a4ec34430db9b20c4d5746197d3c372fd706bdc [file] [log] [blame]
Yoonseon Han32aae2e2016-10-11 16:46:04 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Yoonseon Han32aae2e2016-10-11 16:46:04 -07003 *
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.incubator.net.virtual.provider;
17
18import org.onosproject.incubator.net.virtual.NetworkId;
19import org.onosproject.net.flow.FlowRule;
Ray Milkey7bf273c2017-09-27 16:15:15 -070020import org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation;
Yoonseon Han32aae2e2016-10-11 16:46:04 -070021
22/**
23 * Abstraction of a virtual flow rule provider.
24 * This provider virtualizes and de-virtualizes FlowRule.
25 * See {@link org.onosproject.net.flow.FlowRule}.
26 */
27public interface VirtualFlowRuleProvider extends VirtualProvider {
28
29 /**
30 * Instructs the provider to apply the specified flow rules to their
31 * respective virtual devices.
32 *
33 * @param networkId the identity of the virtual network where this rule applies
34 * @param flowRules one or more flow rules
35 */
36 void applyFlowRule(NetworkId networkId, FlowRule... flowRules);
37
38 /**
39 * Instructs the provider to remove the specified flow rules to their
40 * respective virtual devices.
41 *
42 * @param networkId the identity of the virtual network where this rule applies
43 * @param flowRules one or more flow rules
44 */
45 void removeFlowRule(NetworkId networkId, FlowRule... flowRules);
yoonseon6b972c32016-12-06 16:45:03 -080046
47 /**
48 * Installs a batch of flow rules. Each flowrule is associated to an
49 * operation which results in either addition, removal or modification.
50 *
51 * @param networkId the identity of the virtual network where this rule applies
52 * @param batch a batch of flow rules
53 */
54 void executeBatch(NetworkId networkId, FlowRuleBatchOperation batch);
Yoonseon Han32aae2e2016-10-11 16:46:04 -070055}