blob: 5fc9b2b88d9f2927e580d93ad08a5ff6b8f829b4 [file] [log] [blame]
sanghodbee2332017-05-18 09:59:16 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
sanghodbee2332017-05-18 09:59:16 +09003 *
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.openstacknetworking.api;
17
18
sanghodc375372017-06-08 10:41:30 +090019import org.onosproject.core.ApplicationId;
sanghodbee2332017-05-18 09:59:16 +090020import org.onosproject.net.DeviceId;
sanghodc375372017-06-08 10:41:30 +090021import org.onosproject.net.flow.TrafficSelector;
22import org.onosproject.net.flow.TrafficTreatment;
sanghodbee2332017-05-18 09:59:16 +090023
24/**
25 * Service for setting flow rules.
26 *
27 */
28public interface OpenstackFlowRuleService {
sanghodbee2332017-05-18 09:59:16 +090029 /**
sanghodc375372017-06-08 10:41:30 +090030 * Sets the flow rule.
sanghodbee2332017-05-18 09:59:16 +090031 *
sanghodc375372017-06-08 10:41:30 +090032 * @param appId application ID
33 * @param deviceId device ID
34 * @param selector matches of the flow rule
35 * @param treatment actions of the flow rule
36 * @param priority priority of the flow rule
37 * @param tableType table number to put the flow rule
38 * @param install add the rule if true, remove it otherwise
sanghodbee2332017-05-18 09:59:16 +090039 */
sanghodc375372017-06-08 10:41:30 +090040 void setRule(ApplicationId appId,
41 DeviceId deviceId,
42 TrafficSelector selector,
43 TrafficTreatment treatment,
44 int priority,
45 int tableType,
46 boolean install);
sangho3dd2a8b2017-07-19 15:54:31 +090047
48 /**
49 * Install table miss entry (drop rule) in the table.
50 *
51 * @param deviceId device ID
52 * @param table table number
53 */
54 void setUpTableMissEntry(DeviceId deviceId, int table);
55
56 /**
57 * Install a flor rule for transition from table A to table B.
58 *
59 * @param deviceId device Id
60 * @param fromTable table number of table A
61 * @param toTable table number of table B
62 */
63 void connectTables(DeviceId deviceId, int fromTable, int toTable);
sanghodbee2332017-05-18 09:59:16 +090064}