Carmelo Cascone | 1a7e4f9 | 2017-11-20 23:04:02 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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 | */ |
| 16 | |
| 17 | package org.onosproject.net.pi.runtime; |
| 18 | |
| 19 | import com.google.common.annotations.Beta; |
| 20 | |
| 21 | /** |
| 22 | * Type of runtime entity of a protocol-independent pipeline. |
| 23 | */ |
| 24 | @Beta |
| 25 | public enum PiEntityType { |
| 26 | /** |
| 27 | * Table entry. |
| 28 | */ |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 29 | TABLE_ENTRY("table entry"), |
Carmelo Cascone | 1a7e4f9 | 2017-11-20 23:04:02 -0800 | [diff] [blame] | 30 | |
| 31 | /** |
| 32 | * Action profile group. |
| 33 | */ |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 34 | ACTION_PROFILE_GROUP("action profile group"), |
Carmelo Cascone | 5bc7e10 | 2018-02-18 18:27:55 -0800 | [diff] [blame] | 35 | |
| 36 | /** |
Carmelo Cascone | cb4327a | 2018-09-11 15:17:23 -0700 | [diff] [blame] | 37 | * Action profile member. |
Carmelo Cascone | 5bc7e10 | 2018-02-18 18:27:55 -0800 | [diff] [blame] | 38 | */ |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 39 | ACTION_PROFILE_MEMBER("action profile member"), |
Frank Wang | d7e3b4b | 2017-09-24 13:37:54 +0900 | [diff] [blame] | 40 | |
| 41 | /** |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 42 | * Meter cell config. |
Frank Wang | d7e3b4b | 2017-09-24 13:37:54 +0900 | [diff] [blame] | 43 | */ |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 44 | METER_CELL_CONFIG("meter cell config"), |
FrankWang | 2674e45 | 2018-05-24 17:13:35 +0800 | [diff] [blame] | 45 | |
| 46 | /** |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 47 | * Register cell. |
FrankWang | 2674e45 | 2018-05-24 17:13:35 +0800 | [diff] [blame] | 48 | */ |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 49 | REGISTER_CELL("register cell"), |
| 50 | |
| 51 | /** |
| 52 | * Counter cell. |
| 53 | */ |
| 54 | COUNTER_CELL("counter cell"), |
Carmelo Cascone | 5813681 | 2018-07-19 03:40:16 +0200 | [diff] [blame] | 55 | |
| 56 | /** |
Carmelo Cascone | 9db4d5c | 2019-04-16 17:36:33 -0700 | [diff] [blame] | 57 | * Packet Replication Engine (PRE) entry. |
Carmelo Cascone | 5813681 | 2018-07-19 03:40:16 +0200 | [diff] [blame] | 58 | */ |
Carmelo Cascone | 9db4d5c | 2019-04-16 17:36:33 -0700 | [diff] [blame] | 59 | PRE_ENTRY("PRE entry"); |
Carmelo Cascone | 4c289b7 | 2019-01-22 15:30:45 -0800 | [diff] [blame] | 60 | |
| 61 | private final String humanReadableName; |
| 62 | |
| 63 | PiEntityType(String humanReadableName) { |
| 64 | this.humanReadableName = humanReadableName; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Returns a human readable representation of this PI entity type (useful |
| 69 | * for logging). |
| 70 | * |
| 71 | * @return string |
| 72 | */ |
| 73 | public String humanReadableName() { |
| 74 | return humanReadableName; |
| 75 | } |
Carmelo Cascone | 1a7e4f9 | 2017-11-20 23:04:02 -0800 | [diff] [blame] | 76 | } |