Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 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 | */ |
sangho | 6032f34 | 2016-07-07 14:32:03 +0900 | [diff] [blame] | 16 | package org.onosproject.openstacknetworking; |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 17 | |
| 18 | import org.onlab.packet.Ip4Address; |
| 19 | import org.onlab.packet.Ip4Prefix; |
| 20 | import org.onlab.packet.IpPrefix; |
sangho | 6032f34 | 2016-07-07 14:32:03 +0900 | [diff] [blame] | 21 | import org.onlab.packet.MacAddress; |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 22 | |
| 23 | /** |
sangho | 6032f34 | 2016-07-07 14:32:03 +0900 | [diff] [blame] | 24 | * Provides constants used in OpenStackSwitching. |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 25 | */ |
| 26 | public final class Constants { |
| 27 | |
| 28 | private Constants() { |
| 29 | } |
| 30 | |
Hyunsun Moon | b3eb84d | 2016-07-27 19:10:52 -0700 | [diff] [blame] | 31 | public static final String SWITCHING_APP_ID = "org.onosproject.openstackswitching"; |
| 32 | public static final String ROUTING_APP_ID = "org.onosproject.openstackrouting"; |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 33 | |
Hyunsun Moon | b3eb84d | 2016-07-27 19:10:52 -0700 | [diff] [blame] | 34 | public static final String DEVICE_OWNER_ROUTER_INTERFACE = "network:router_interface"; |
| 35 | public static final String DEVICE_OWNER_ROUTER_GATEWAY = "network:router_gateway"; |
| 36 | public static final String DEVICE_OWNER_FLOATING_IP = "network:floatingip"; |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 37 | |
Hyunsun Moon | b3eb84d | 2016-07-27 19:10:52 -0700 | [diff] [blame] | 38 | public static final String PORT_NAME_PREFIX_VM = "tap"; |
| 39 | public static final String PORT_NAME_PREFIX_TUNNEL = "vxlan"; |
sangho | 6032f34 | 2016-07-07 14:32:03 +0900 | [diff] [blame] | 40 | |
Hyunsun Moon | b3eb84d | 2016-07-27 19:10:52 -0700 | [diff] [blame] | 41 | public static final String DEFAULT_GATEWAY_MAC_STR = "fe:00:00:00:00:02"; |
| 42 | public static final MacAddress DEFAULT_GATEWAY_MAC = MacAddress.valueOf(DEFAULT_GATEWAY_MAC_STR); |
| 43 | // TODO make this configurable |
| 44 | public static final MacAddress DEFAULT_EXTERNAL_ROUTER_MAC = MacAddress.valueOf("fe:00:00:00:00:01"); |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 45 | |
| 46 | public static final Ip4Address DNS_SERVER_IP = Ip4Address.valueOf("8.8.8.8"); |
| 47 | public static final IpPrefix IP_PREFIX_ANY = Ip4Prefix.valueOf("0.0.0.0/0"); |
| 48 | public static final int DHCP_INFINITE_LEASE = -1; |
| 49 | |
| 50 | public static final String NETWORK_ID = "networkId"; |
Hyunsun Moon | b3eb84d | 2016-07-27 19:10:52 -0700 | [diff] [blame] | 51 | public static final String SUBNET_ID = "subnetId"; |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 52 | public static final String PORT_ID = "portId"; |
| 53 | public static final String VXLAN_ID = "vxlanId"; |
| 54 | public static final String TENANT_ID = "tenantId"; |
| 55 | public static final String GATEWAY_IP = "gatewayIp"; |
| 56 | public static final String CREATE_TIME = "createTime"; |
| 57 | |
| 58 | public static final int SWITCHING_RULE_PRIORITY = 30000; |
| 59 | public static final int TUNNELTAG_RULE_PRIORITY = 30000; |
| 60 | public static final int ACL_RULE_PRIORITY = 30000; |
sangho | 3d2bf9c | 2016-08-26 17:19:55 +0900 | [diff] [blame] | 61 | public static final int EW_ROUTING_RULE_PRIORITY = 28000; |
Daniel Park | a8d896c | 2016-08-26 14:31:33 +0900 | [diff] [blame] | 62 | |
| 63 | public static final int GATEWAY_ICMP_PRIORITY = 43000; |
Hyunsun Moon | b3eb84d | 2016-07-27 19:10:52 -0700 | [diff] [blame] | 64 | public static final int ROUTING_RULE_PRIORITY = 25000; |
Daniel Park | 1b0cb26 | 2016-09-07 16:31:53 +0900 | [diff] [blame] | 65 | public static final int FLOATING_RULE_FOR_TRAFFIC_FROM_VM_PRIORITY = 42000; |
| 66 | public static final int FLOATING_RULE_PRIORITY = 41000; |
Hyunsun Moon | b3eb84d | 2016-07-27 19:10:52 -0700 | [diff] [blame] | 67 | public static final int PNAT_RULE_PRIORITY = 26000; |
| 68 | public static final int PNAT_TIMEOUT = 120; |
Hyunsun Moon | b974fca | 2016-06-30 21:20:39 -0700 | [diff] [blame] | 69 | } |