blob: 3f6bf8c5363b99eb8914e845fdff0eaeb8d08e3f [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
18import org.onosproject.incubator.net.virtual.NetworkId;
19import org.onosproject.net.DeviceId;
20import 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 *
35 * @param networkId the identity of the virtual network where this rule applies
36 * @param flowEntry removed flow entry
37 */
38 void flowRemoved(NetworkId networkId, FlowEntry flowEntry);
39
40 /**
41 * Pushes the collection of flow entries currently applied on the given
42 * virtual device.
43 *
44 * @param networkId the identity of the virtual network where this rule applies
45 * @param deviceId device identifier
46 * @param flowEntries collection of flow rules
47 */
48 void pushFlowMetrics(NetworkId networkId, DeviceId deviceId,
49 Iterable<FlowEntry> flowEntries);
50
51 /**
52 * Pushes the collection of flow entries currently applied on the given
53 * device without flowMissing process.
54 *
55 * @param networkId the identity of the virtual network where this rule applies
56 * @param deviceId device identifier
57 * @param flowEntries collection of flow rules
58 */
59 void pushFlowMetricsWithoutFlowMissing(NetworkId networkId, DeviceId deviceId,
60 Iterable<FlowEntry> flowEntries);
61
62 /**
63 * Pushes the collection of table statistics entries currently extracted
64 * from the given virtual device.
65 *
66 * @param networkId the identity of the virtual network where this rule applies
67 * @param deviceId device identifier
68 * @param tableStatsEntries collection of flow table statistics entries
69 */
70 void pushTableStatistics(NetworkId networkId, DeviceId deviceId,
71 List<TableStatisticsEntry> tableStatsEntries);
72
73}