blob: d803ca6219e55644986776a19a7387df35909d26 [file] [log] [blame]
Carmelo Cascone1022a4e2017-05-25 00:16:18 -04001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Carmelo Cascone1022a4e2017-05-25 00:16:18 -04003 *
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
17package org.onosproject.net.pi.runtime;
18
19import com.google.common.annotations.Beta;
20
21/**
Carmelo Casconecb4327a2018-09-11 15:17:23 -070022 * Instance of an action that can be executed as a consequence of a match in a
23 * match+action table of a protocol-independent pipeline.
Carmelo Cascone1022a4e2017-05-25 00:16:18 -040024 */
25@Beta
26public interface PiTableAction {
27
28 /**
Carmelo Cascone87892e22017-11-13 16:01:29 -080029 * Types of table action.
Carmelo Cascone1022a4e2017-05-25 00:16:18 -040030 */
Carmelo Cascone1022a4e2017-05-25 00:16:18 -040031 enum Type {
32 /**
33 * Simple action with runtime parameters set by the control plane.
34 */
35 ACTION,
36
Carmelo Casconeb2e3dba2017-07-27 12:07:09 -040037 /**
Carmelo Casconecb4327a2018-09-11 15:17:23 -070038 * Executes the action profile group specified by the given identifier.
Carmelo Casconeb2e3dba2017-07-27 12:07:09 -040039 */
Carmelo Casconecb4327a2018-09-11 15:17:23 -070040 ACTION_PROFILE_GROUP_ID,
Carmelo Casconeb2e3dba2017-07-27 12:07:09 -040041
42 /**
Carmelo Casconecb4327a2018-09-11 15:17:23 -070043 * Executes the action profile member specified by the given
44 * identifier.
Carmelo Casconeb2e3dba2017-07-27 12:07:09 -040045 */
Daniele Morod900fe42021-02-11 16:12:57 +010046 ACTION_PROFILE_MEMBER_ID,
47
48 /**
49 * Executes the given action set. Used in one-shot action profile
50 * programming.
51 */
52 ACTION_SET
Carmelo Cascone1022a4e2017-05-25 00:16:18 -040053 }
Carmelo Cascone87892e22017-11-13 16:01:29 -080054
55 /**
56 * Type of this action.
57 *
58 * @return a type
59 */
60 Type type();
Carmelo Cascone1022a4e2017-05-25 00:16:18 -040061}