blob: fa64015df6b1dacc43187338d8f84b919902068b [file] [log] [blame]
Hyunsun Moonb974fca2016-06-30 21:20:39 -07001/*
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 */
sangho6032f342016-07-07 14:32:03 +090016package org.onosproject.openstacknetworking;
Hyunsun Moonb974fca2016-06-30 21:20:39 -070017
18import org.onlab.packet.Ip4Address;
19import org.onlab.packet.Ip4Prefix;
20import org.onlab.packet.IpPrefix;
sangho6032f342016-07-07 14:32:03 +090021import org.onlab.packet.MacAddress;
Hyunsun Moonb974fca2016-06-30 21:20:39 -070022
23/**
sangho6032f342016-07-07 14:32:03 +090024 * Provides constants used in OpenStackSwitching.
Hyunsun Moonb974fca2016-06-30 21:20:39 -070025 */
26public final class Constants {
27
28 private Constants() {
29 }
30
Hyunsun Moonb3eb84d2016-07-27 19:10:52 -070031 public static final String SWITCHING_APP_ID = "org.onosproject.openstackswitching";
32 public static final String ROUTING_APP_ID = "org.onosproject.openstackrouting";
Hyunsun Moonb974fca2016-06-30 21:20:39 -070033
Hyunsun Moonb3eb84d2016-07-27 19:10:52 -070034 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 Moonb974fca2016-06-30 21:20:39 -070037
Hyunsun Moonb3eb84d2016-07-27 19:10:52 -070038 public static final String PORT_NAME_PREFIX_VM = "tap";
39 public static final String PORT_NAME_PREFIX_TUNNEL = "vxlan";
sangho6032f342016-07-07 14:32:03 +090040
Hyunsun Moonb3eb84d2016-07-27 19:10:52 -070041 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 Moonb974fca2016-06-30 21:20:39 -070045
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 Moonb3eb84d2016-07-27 19:10:52 -070051 public static final String SUBNET_ID = "subnetId";
Hyunsun Moonb974fca2016-06-30 21:20:39 -070052 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;
sangho3d2bf9c2016-08-26 17:19:55 +090061 public static final int EW_ROUTING_RULE_PRIORITY = 28000;
Daniel Parka8d896c2016-08-26 14:31:33 +090062
63 public static final int GATEWAY_ICMP_PRIORITY = 43000;
Hyunsun Moonb3eb84d2016-07-27 19:10:52 -070064 public static final int ROUTING_RULE_PRIORITY = 25000;
Daniel Park1b0cb262016-09-07 16:31:53 +090065 public static final int FLOATING_RULE_FOR_TRAFFIC_FROM_VM_PRIORITY = 42000;
66 public static final int FLOATING_RULE_PRIORITY = 41000;
Hyunsun Moonb3eb84d2016-07-27 19:10:52 -070067 public static final int PNAT_RULE_PRIORITY = 26000;
68 public static final int PNAT_TIMEOUT = 120;
Hyunsun Moonb974fca2016-06-30 21:20:39 -070069}