blob: 9b4fb509fb8dbf521093fc265cb2208eb5720d8f [file] [log] [blame]
Yoonseon Han32aae2e2016-10-11 16:46:04 -07001/*
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 */
16package org.onosproject.incubator.net.virtual.provider;
17
Yoonseon Han32aae2e2016-10-11 16:46:04 -070018import org.onosproject.net.DeviceId;
yoonseon6b972c32016-12-06 16:45:03 -080019import org.onosproject.net.flow.CompletedBatchOperation;
Yoonseon Han32aae2e2016-10-11 16:46:04 -070020import org.onosproject.net.flow.FlowEntry;
21import org.onosproject.net.flow.TableStatisticsEntry;
22
23import java.util.List;
24
25/**
26 * Service through which virtual flow rule providers can inject information into
27 * the core.
28 */
29public interface VirtualFlowRuleProviderService
30 extends VirtualProviderService<VirtualFlowRuleProvider> {
31
32 /**
33 * Signals that a flow rule that was previously installed has been removed.
34 *
Yoonseon Han32aae2e2016-10-11 16:46:04 -070035 * @param flowEntry removed flow entry
36 */
yoonseon6b972c32016-12-06 16:45:03 -080037 void flowRemoved(FlowEntry flowEntry);
Yoonseon Han32aae2e2016-10-11 16:46:04 -070038
39 /**
40 * Pushes the collection of flow entries currently applied on the given
41 * virtual device.
42 *
Yoonseon Han32aae2e2016-10-11 16:46:04 -070043 * @param deviceId device identifier
44 * @param flowEntries collection of flow rules
45 */
yoonseon6b972c32016-12-06 16:45:03 -080046 void pushFlowMetrics(DeviceId deviceId, Iterable<FlowEntry> flowEntries);
Yoonseon Han32aae2e2016-10-11 16:46:04 -070047
48 /**
49 * Pushes the collection of flow entries currently applied on the given
50 * device without flowMissing process.
51 *
Yoonseon Han32aae2e2016-10-11 16:46:04 -070052 * @param deviceId device identifier
53 * @param flowEntries collection of flow rules
54 */
yoonseon6b972c32016-12-06 16:45:03 -080055 void pushFlowMetricsWithoutFlowMissing(DeviceId deviceId, Iterable<FlowEntry> flowEntries);
Yoonseon Han32aae2e2016-10-11 16:46:04 -070056
57 /**
58 * Pushes the collection of table statistics entries currently extracted
59 * from the given virtual device.
60 *
Yoonseon Han32aae2e2016-10-11 16:46:04 -070061 * @param deviceId device identifier
62 * @param tableStatsEntries collection of flow table statistics entries
63 */
yoonseon6b972c32016-12-06 16:45:03 -080064 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 Han32aae2e2016-10-11 16:46:04 -070074
75}