2 * Copyright (c) 2016, 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
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
8 package org.opendaylight.netvirt.neutronvpn.api.utils;
10 import java.util.function.Predicate;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.ports.rev150712.ports.attributes.ports.Port;
13 public interface NeutronConstants {
15 String DEVICE_OWNER_GATEWAY_INF = "network:router_gateway";
16 String DEVICE_OWNER_ROUTER_INF = "network:router_interface";
17 String DEVICE_OWNER_FLOATING_IP = "network:floatingip";
18 String DEVICE_OWNER_DHCP = "network:dhcp";
19 String FLOATING_IP_DEVICE_ID_PENDING = "PENDING";
20 String PREFIX_TAP = "tap";
21 String PREFIX_VHOSTUSER = "vhu";
22 String RD_IDPOOL_NAME = "RouteDistinguisherPool";
23 String RD_IDPOOL_SIZE = "65535";// 16 bit AS specific part of RD
24 long RD_IDPOOL_START = 1L;
25 String RD_PROPERTY_KEY = "vpnservice.admin.rdvalue";//stored in etc/custom.properties
26 String VIF_TYPE_VHOSTUSER = "vhostuser";
27 String VIF_TYPE_UNBOUND = "unbound";
28 String VIF_TYPE_BINDING_FAILED = "binding_failed";
29 String VIF_TYPE_DISTRIBUTED = "distributed";
30 String VIF_TYPE_OVS = "ovs";
31 String VIF_TYPE_BRIDGE = "bridge";
32 String VIF_TYPE_OTHER = "other";
33 String VIF_TYPE_MACVTAP = "macvtap";
34 String VNIC_TYPE_NORMAL = "normal";
35 String VNIC_TYPE_DIRECT = "direct";
36 String BINDING_PROFILE_CAPABILITIES = "capabilities";
37 String SWITCHDEV = "switchdev";
38 int MAX_ROUTERS_PER_BGPVPN = 2;
41 Predicate<Port> IS_DHCP_PORT = port -> port != null
42 && DEVICE_OWNER_DHCP.equals(port.getDeviceOwner());
44 Predicate<Port> IS_ODL_DHCP_PORT = port -> port != null
45 && DEVICE_OWNER_DHCP.equals(port.getDeviceOwner()) && port.getDeviceId() != null
46 && port.getDeviceId().startsWith("OpenDaylight");