Jian Li | 4324438 | 2021-01-09 00:19:02 +0900 | [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 | package org.onosproject.kubevirtnetworking.api; |
| 17 | |
| 18 | import org.onlab.packet.MacAddress; |
| 19 | |
| 20 | /** |
| 21 | * Provides constants used in KubevirtNetworking. |
| 22 | */ |
| 23 | public final class Constants { |
| 24 | |
| 25 | private Constants() { |
| 26 | } |
| 27 | |
| 28 | public static final String KUBEVIRT_NETWORKING_APP_ID = |
| 29 | "org.onosproject.kubevirtnetworking"; |
| 30 | public static final String DEFAULT_GATEWAY_MAC_STR = "fe:00:00:00:00:02"; |
| 31 | public static final MacAddress DEFAULT_GATEWAY_MAC = |
| 32 | MacAddress.valueOf(DEFAULT_GATEWAY_MAC_STR); |
| 33 | |
| 34 | // flow table index |
| 35 | public static final int STAT_INBOUND_TABLE = 0; |
| 36 | public static final int VTAP_INBOUND_TABLE = 1; |
| 37 | public static final int STAT_FLAT_OUTBOUND_TABLE = 10; |
| 38 | public static final int DHCP_TABLE = 5; |
| 39 | public static final int VTAG_TABLE = 30; |
| 40 | public static final int PRE_FLAT_TABLE = 31; |
| 41 | public static final int FLAT_TABLE = 32; |
| 42 | public static final int ARP_TABLE = 35; |
| 43 | public static final int ACL_EGRESS_TABLE = 40; |
| 44 | public static final int ACL_INGRESS_TABLE = 44; |
| 45 | public static final int CT_TABLE = 45; |
| 46 | public static final int ACL_RECIRC_TABLE = 43; |
| 47 | public static final int JUMP_TABLE = 50; |
| 48 | public static final int ROUTING_TABLE = 60; |
| 49 | public static final int STAT_OUTBOUND_TABLE = 70; |
| 50 | public static final int VTAP_OUTBOUND_TABLE = 71; |
| 51 | public static final int FORWARDING_TABLE = 80; |
| 52 | public static final int ERROR_TABLE = 100; |
| 53 | |
| 54 | // flow rule priority |
| 55 | public static final int PRIORITY_SWITCHING_RULE = 30000; |
Jian Li | f97a07e | 2021-01-13 18:05:00 +0900 | [diff] [blame] | 56 | |
| 57 | // CLI item length |
| 58 | public static final int CLI_ID_LENGTH = 30; |
| 59 | public static final int CLI_NAME_LENGTH = 30; |
| 60 | public static final int CLI_IP_ADDRESSES_LENGTH = 50; |
| 61 | public static final int CLI_IP_ADDRESS_LENGTH = 25; |
Jian Li | 3ba5c58 | 2021-01-14 11:30:36 +0900 | [diff] [blame] | 62 | public static final int CLI_IP_ADDRESS_AVAILABILITY = 15; |
Jian Li | f97a07e | 2021-01-13 18:05:00 +0900 | [diff] [blame] | 63 | public static final int CLI_MAC_ADDRESS_LENGTH = 25; |
| 64 | public static final int CLI_PORTS_LENGTH = 20; |
| 65 | public static final int CLI_NAMESPACE_LENGTH = 15; |
Jian Li | ac31f65 | 2021-01-17 02:18:30 +0900 | [diff] [blame] | 66 | public static final int CLI_STATUS_LENGTH = 15; |
Jian Li | f97a07e | 2021-01-13 18:05:00 +0900 | [diff] [blame] | 67 | public static final int CLI_PHASE_LENGTH = 15; |
| 68 | public static final int CLI_TYPE_LENGTH = 15; |
| 69 | public static final int CLI_TYPES_LENGTH = 30; |
| 70 | public static final int CLI_SEG_ID_LENGTH = 10; |
| 71 | public static final int CLI_LABELS_LENGTH = 30; |
| 72 | public static final int CLI_CONTAINERS_LENGTH = 30; |
| 73 | public static final int CLI_MARGIN_LENGTH = 2; |
Jian Li | 4324438 | 2021-01-09 00:19:02 +0900 | [diff] [blame] | 74 | } |