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