tosinski | 36ba33a | 2021-11-22 16:53:00 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2021-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.behaviour.upf; |
| 18 | |
| 19 | import com.google.common.annotations.Beta; |
| 20 | |
| 21 | /** |
| 22 | * Type of UPF entity. |
| 23 | */ |
| 24 | @Beta |
| 25 | public enum UpfEntityType { |
| 26 | INTERFACE("interface"), |
| 27 | TERMINATION_DOWNLINK("termination_downlink"), |
| 28 | TERMINATION_UPLINK("termination_uplink"), |
| 29 | SESSION_DOWNLINK("session_downlink"), |
| 30 | SESSION_UPLINK("session_downlink"), |
| 31 | TUNNEL_PEER("tunnel_peer"), |
Daniele Moro | e719836 | 2022-04-28 19:37:32 +0200 | [diff] [blame] | 32 | INGRESS_COUNTER("ingress_counter"), |
| 33 | EGRESS_COUNTER("egress_counter"), |
Daniele Moro | a1c7ba4 | 2022-01-13 19:16:34 +0100 | [diff] [blame] | 34 | COUNTER("counter"), |
Daniele Moro | 909b958 | 2022-01-26 15:47:29 +0100 | [diff] [blame] | 35 | APPLICATION("application"), |
| 36 | SESSION_METER("session_meter"), |
Daniele Moro | 31faf95 | 2022-03-09 10:52:32 +0100 | [diff] [blame] | 37 | APPLICATION_METER("application_meter"), |
| 38 | // TODO: slice meter shouldn't be exposed via UpfProgrammable driver behaviour |
| 39 | // we should have dedicated driver behaviour for the slicing functionality. |
| 40 | SLICE_METER("slice_meter"); |
tosinski | 36ba33a | 2021-11-22 16:53:00 +0100 | [diff] [blame] | 41 | |
| 42 | private final String humanReadableName; |
| 43 | |
| 44 | UpfEntityType(String humanReadableName) { |
| 45 | this.humanReadableName = humanReadableName; |
| 46 | } |
| 47 | |
| 48 | /** |
Daniele Moro | f3a5ab0 | 2022-01-26 16:47:08 +0100 | [diff] [blame] | 49 | * Returns a human-readable representation of this UPF entity type (useful |
tosinski | 36ba33a | 2021-11-22 16:53:00 +0100 | [diff] [blame] | 50 | * for logging). |
| 51 | * |
| 52 | * @return string |
| 53 | */ |
| 54 | public String humanReadableName() { |
| 55 | return humanReadableName; |
| 56 | } |
| 57 | } |