blob: f276c0dc1e04c85ac367e80ce93facfe13ce0cd5 [file] [log] [blame]
alshabib77b88482015-04-07 15:47:50 -07001/*
2 * Copyright 2015 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.net.flowobjective;
17
Thomas Vachuskaa9d491e2015-05-20 11:17:21 -070018import com.google.common.annotations.Beta;
alshabib77b88482015-04-07 15:47:50 -070019import org.onosproject.net.DeviceId;
20
alshabib77b88482015-04-07 15:47:50 -070021/**
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070022 * Service for programming data plane flow rules in manner independent of
23 * specific device table pipeline configuration.
alshabib77b88482015-04-07 15:47:50 -070024 */
Thomas Vachuskaa9d491e2015-05-20 11:17:21 -070025@Beta
alshabib77b88482015-04-07 15:47:50 -070026public interface FlowObjectiveService {
27
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070028 /**
29 * Installs the filtering rules onto the specified device.
30 *
31 * @param deviceId device identifier
alshabib2a441c62015-04-13 18:39:38 -070032 * @param filteringObjective the filtering objective
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070033 */
alshabib2a441c62015-04-13 18:39:38 -070034 void filter(DeviceId deviceId, FilteringObjective filteringObjective);
alshabib77b88482015-04-07 15:47:50 -070035
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070036 /**
37 * Installs the forwarding rules onto the specified device.
38 *
39 * @param deviceId device identifier
alshabib2a441c62015-04-13 18:39:38 -070040 * @param forwardingObjective the forwarding objective
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070041 */
alshabib2a441c62015-04-13 18:39:38 -070042 void forward(DeviceId deviceId, ForwardingObjective forwardingObjective);
alshabib77b88482015-04-07 15:47:50 -070043
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070044 /**
45 * Installs the next hop elements into the specified device.
46 *
47 * @param deviceId device identifier
alshabib2a441c62015-04-13 18:39:38 -070048 * @param nextObjective a next objective
Thomas Vachuskaca88bb72015-04-08 19:38:02 -070049 */
alshabib2a441c62015-04-13 18:39:38 -070050 void next(DeviceId deviceId, NextObjective nextObjective);
alshabib77b88482015-04-07 15:47:50 -070051
alshabibf6ea9e62015-04-21 17:08:26 -070052 /**
53 * Obtains a globally unique next objective.
54 * @return an integer
55 */
56 int allocateNextId();
57
alshabib77b88482015-04-07 15:47:50 -070058}