2 * Copyright (c) 2015 - 2016 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
9 package org.opendaylight.netvirt.fibmanager;
11 import org.opendaylight.genius.itm.globals.ITMConstants;
12 import java.util.HashMap;
16 public enum L3VPNTransportTypes {
17 VxLAN (ITMConstants.TUNNEL_TYPE_VXLAN),
18 GRE (ITMConstants.TUNNEL_TYPE_GRE),
19 Invalid (ITMConstants.TUNNEL_TYPE_INVALID);
21 private String transportType;
23 L3VPNTransportTypes (String type) {
26 public void setL3VPNTransportTypes(String transportType) {
27 this.transportType = transportType;
30 private static final Map<String, L3VPNTransportTypes> strToTypeMap = new HashMap<String, L3VPNTransportTypes>();
32 for (L3VPNTransportTypes type : L3VPNTransportTypes.values()) {
33 strToTypeMap.put(type.transportType, type);
37 public String getTransportType() {
38 return this.transportType;
41 public static L3VPNTransportTypes validateTransportType(String transportType) {
42 L3VPNTransportTypes type = strToTypeMap.get(transportType);
44 return L3VPNTransportTypes.Invalid;