Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [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.incubator.net.virtual.provider; |
| 17 | |
| 18 | import org.onosproject.incubator.net.virtual.NetworkId; |
| 19 | import org.onosproject.net.flow.FlowRule; |
Ray Milkey | 7bf273c | 2017-09-27 16:15:15 -0700 | [diff] [blame] | 20 | import org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation; |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 21 | |
| 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 | */ |
| 27 | public 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); |
yoonseon | 6b972c3 | 2016-12-06 16:45:03 -0800 | [diff] [blame] | 46 | |
| 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 Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 55 | } |