Runtime exception handling in addNewAdjToVpnInterface method
[netvirt.git] / vpnmanager / impl / src / main / java / org / opendaylight / netvirt / vpnmanager / VpnConstants.java
1 /*
2  * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.netvirt.vpnmanager;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg3;
13 import org.opendaylight.yangtools.yang.common.Uint32;
14 import org.opendaylight.yangtools.yang.common.Uint64;
15
16 public interface VpnConstants {
17     String VPN_IDPOOL_NAME = "vpnservices";
18     long VPN_IDPOOL_LOW = 100000L;
19     long VPN_IDPOOL_HIGH = 130000L;
20     short DEFAULT_FLOW_PRIORITY = 10;
21     int DEFAULT_LPORT_DISPATCHER_FLOW_PRIORITY = 1;
22     int VPN_ID_LENGTH = 24;
23     Uint32 INVALID_ID = Uint32.ZERO;
24     String SEPARATOR = ".";
25     Uint64 COOKIE_L3_BASE = Uint64.valueOf("8000000", 16).intern();
26     String FLOWID_PREFIX = "L3.";
27     long MIN_WAIT_TIME_IN_MILLISECONDS = 10000;
28     long MAX_WAIT_TIME_IN_MILLISECONDS = 180000;
29     long PER_INTERFACE_MAX_WAIT_TIME_IN_MILLISECONDS = 4000;
30     long PER_VPN_INSTANCE_MAX_WAIT_TIME_IN_MILLISECONDS = 90000;
31     long PER_VPN_INSTANCE_OPDATA_MAX_WAIT_TIME_IN_MILLISECONDS = 180000;
32     int ELAN_GID_MIN = 200000;
33     int INVALID_LABEL = 0;
34
35     String IP_MONITORING_ENTITY = "ipmonitoring";
36     String IP_MONITOR_JOB_PREFIX_KEY = "ip-monitor";
37
38     // An IdPool for Pseudo LPort tags, that is, lportTags that are no related to an interface.
39     // These lportTags must be higher than 170000 to avoid collision with interface LportTags and
40     // also VPN related IDs (vrfTags and labels)
41     String PSEUDO_LPORT_TAG_ID_POOL_NAME = System.getProperty("lport.gid.name", "lporttag");
42     long LOWER_PSEUDO_LPORT_TAG = Long.getLong("lower.lport.gid", 170001);
43     long UPPER_PSEUDO_LPORT_TAG = Long.getLong("upper.lport.gid", 270000);
44
45     int IP_V6_ETHTYPE = 0x86DD;
46     int ETHTYPE_START = 96;
47     int TWO_BYTES = 16;
48     int IP_V6_HDR_START = 112;
49
50     enum ITMTunnelLocType {
51         Invalid(0), Internal(1), External(2), Hwvtep(3);
52
53         private final int type;
54
55         ITMTunnelLocType(int id) {
56             this.type = id;
57         }
58
59         public int getValue() {
60             return type;
61         }
62     }
63
64     enum DCGWPresentStatus {
65         Invalid(0), Present(1), Absent(2);
66
67         private final int status;
68
69         DCGWPresentStatus(int id) {
70             this.status = id;
71         }
72
73         public int getValue() {
74             return status;
75         }
76     }
77
78     String DEFAULT_GATEWAY_MAC_ADDRESS = "de:ad:be:ef:00:01";
79     Class<? extends NxmNxReg> VPN_REG_ID = NxmNxReg3.class;
80 }