Merge "Sonar bug fix"
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / api / Constants.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc.
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  * Authors : Dave Tucker
9  */
10 package org.opendaylight.ovsdb.openstack.netvirt.api;
11
12 /**
13  * A collection of configuration constants
14  */
15 public final class Constants {
16
17     /*
18      * External ID's used by OpenStack Neutron
19      */
20     public static final String EXTERNAL_ID_VM_ID = "vm-id";
21     public static final String EXTERNAL_ID_INTERFACE_ID = "iface-id";
22     public static final String EXTERNAL_ID_VM_MAC = "attached-mac";
23     public static final String EXTERNAL_NETWORK = "external";
24
25     /*
26      * @see http://docs.openstack.org/grizzly/openstack-network/admin/content/ovs_quantum_plugin.html
27      */
28     public static final String TUNNEL_ENDPOINT_KEY = "local_ip";
29     public static final String INTEGRATION_BRIDGE = "br-int";
30     public static final String NETWORK_BRIDGE = "br-net";
31     public static final String EXTERNAL_BRIDGE = "br-ex";
32     public static final String PATCH_PORT_TO_INTEGRATION_BRIDGE_NAME = "patch-int";
33     public static final String PATCH_PORT_TO_NETWORK_BRIDGE_NAME = "patch-net";
34     public static final String PATCH_PORT_TO_EXTERNAL_BRIDGE_NAME = "patch-ext";
35     public static final String PROVIDER_MAPPINGS_KEY = "provider_mappings";
36     public static final String PROVIDER_MAPPING = "physnet1:eth1";
37
38     /*
39      * Flow Priority Defaults
40      */
41     public static final int LLDP_PRIORITY = 1000;
42     public static final int NORMAL_PRIORITY = 0;
43
44     /*
45      * OpenFlow Versions
46      */
47     public static final String OPENFLOW13 = "OpenFlow13";
48
49     /*
50      * VLAN Constants
51      */
52     public static final int MAX_VLAN = 4094;
53
54     /*
55      * OSGi Service Properties
56      */
57     public static final String SOUTHBOUND_PROTOCOL_PROPERTY = "southboundProtocol";
58     public static final String PROVIDER_TYPE_PROPERTY = "providerType";
59     public static final String OPENFLOW_VERSION_PROPERTY = "openflowVersion";
60     public static final String EVENT_HANDLER_TYPE_PROPERTY = "eventHandlerType";
61     public static final String PROVIDER_NAME_PROPERTY = "providerName";
62     public static final String NAT_PROVIDER_DIRECTION = "natDirection";
63
64     /*
65      * MD-SAL
66      */
67
68     public static final String OPENFLOW_NODE_PREFIX = "openflow:";
69
70     /*
71      * Ethertypes
72      */
73     public static final long ARP_ETHERTYPE = 0x0806L;
74
75
76     /*
77      * ACL
78      */
79     public static final Integer PROTO_MATCH_PRIORITY_DROP = 36006;
80     public static final Integer PROTO_PORT_MATCH_PRIORITY_DROP = 36005;
81     public static final Integer PREFIX_MATCH_PRIORITY_DROP = 36004;
82     public static final Integer PROTO_PREFIX_MATCH_PRIORITY_DROP = 36003;
83     public static final Integer PREFIX_PORT_MATCH_PRIORITY_DROP = 36002;
84     public static final Integer PROTO_PORT_PREFIX_MATCH_PRIORITY_DROP = 36001;
85
86     public static final Integer PROTO_MATCH_PRIORITY = 61010;
87     public static final Integer PREFIX_MATCH_PRIORITY = 61009;
88     public static final Integer PROTO_PREFIX_MATCH_PRIORITY = 61008;
89     public static final Integer PROTO_PORT_MATCH_PRIORITY = 61007;
90     public static final Integer PROTO_PORT_PREFIX_MATCH_PRIORITY = 61007;
91
92     public static final int TCP_SYN = 0x002;
93     public static final short INGRESS_ACL = 40; // Flows Destined to the VM Port go here
94     public static final short OUTBOUND_SNAT = 110; // Ingress ACL table drains traffic to this table
95
96     private static Long groupId = 1L;
97
98     //6653 is official openflow port.
99     public static short OPENFLOW_PORT = 6653;
100     public static String OPENFLOW_CONNECTION_PROTOCOL = "tcp";
101 }