Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 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 | |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 18 | import org.onosproject.net.DeviceId; |
yoonseon | 6b972c3 | 2016-12-06 16:45:03 -0800 | [diff] [blame^] | 19 | import org.onosproject.net.flow.CompletedBatchOperation; |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 20 | import org.onosproject.net.flow.FlowEntry; |
| 21 | import org.onosproject.net.flow.TableStatisticsEntry; |
| 22 | |
| 23 | import java.util.List; |
| 24 | |
| 25 | /** |
| 26 | * Service through which virtual flow rule providers can inject information into |
| 27 | * the core. |
| 28 | */ |
| 29 | public interface VirtualFlowRuleProviderService |
| 30 | extends VirtualProviderService<VirtualFlowRuleProvider> { |
| 31 | |
| 32 | /** |
| 33 | * Signals that a flow rule that was previously installed has been removed. |
| 34 | * |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 35 | * @param flowEntry removed flow entry |
| 36 | */ |
yoonseon | 6b972c3 | 2016-12-06 16:45:03 -0800 | [diff] [blame^] | 37 | void flowRemoved(FlowEntry flowEntry); |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 38 | |
| 39 | /** |
| 40 | * Pushes the collection of flow entries currently applied on the given |
| 41 | * virtual device. |
| 42 | * |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 43 | * @param deviceId device identifier |
| 44 | * @param flowEntries collection of flow rules |
| 45 | */ |
yoonseon | 6b972c3 | 2016-12-06 16:45:03 -0800 | [diff] [blame^] | 46 | void pushFlowMetrics(DeviceId deviceId, Iterable<FlowEntry> flowEntries); |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 47 | |
| 48 | /** |
| 49 | * Pushes the collection of flow entries currently applied on the given |
| 50 | * device without flowMissing process. |
| 51 | * |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 52 | * @param deviceId device identifier |
| 53 | * @param flowEntries collection of flow rules |
| 54 | */ |
yoonseon | 6b972c3 | 2016-12-06 16:45:03 -0800 | [diff] [blame^] | 55 | void pushFlowMetricsWithoutFlowMissing(DeviceId deviceId, Iterable<FlowEntry> flowEntries); |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 56 | |
| 57 | /** |
| 58 | * Pushes the collection of table statistics entries currently extracted |
| 59 | * from the given virtual device. |
| 60 | * |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 61 | * @param deviceId device identifier |
| 62 | * @param tableStatsEntries collection of flow table statistics entries |
| 63 | */ |
yoonseon | 6b972c3 | 2016-12-06 16:45:03 -0800 | [diff] [blame^] | 64 | void pushTableStatistics(DeviceId deviceId, List<TableStatisticsEntry> tableStatsEntries); |
| 65 | |
| 66 | /** |
| 67 | * Indicates to the core that the requested batch operation has |
| 68 | * been completed. |
| 69 | * |
| 70 | * @param batchId the batch which was processed |
| 71 | * @param operation the resulting outcome of the operation |
| 72 | */ |
| 73 | void batchOperationCompleted(long batchId, CompletedBatchOperation operation); |
Yoonseon Han | 32aae2e | 2016-10-11 16:46:04 -0700 | [diff] [blame] | 74 | |
| 75 | } |