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.vpnmanager.api;
11 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
12 import org.opendaylight.netvirt.fibmanager.api.IFibManager;
13 import org.opendaylight.netvirt.fibmanager.api.RouteOrigin;
14 import java.math.BigInteger;
15 import java.util.List;
17 public interface IVpnManager {
18 void setFibManager(IFibManager fibManager);
19 void addExtraRoute(String destination, String nextHop, String rd, String routerID, int label, RouteOrigin origin);
20 void delExtraRoute(String destination, String nextHop, String rd, String routerID);
23 * Returns true if the specified VPN exists
25 * @param vpnName it must match against the vpn-instance-name attrib in one of the VpnInstances
29 boolean existsVpn(String vpnName);
30 boolean isVPNConfigured();
32 long getArpCacheTimeoutMillis();
34 * Retrieves the list of DPNs where the specified VPN has footprint
36 * @param vpnInstanceName The name of the Vpn instance
37 * @return The list of DPNs
39 List<BigInteger> getDpnsOnVpn(String vpnInstanceName);
42 * Updates the footprint that a VPN has on a given DPN by adding/removing
43 * the specified interface
45 * @param dpId DPN where the VPN interface belongs to
46 * @param vpnName Name of the VPN whose footprint is being modified
47 * @param interfaceName Name of the VPN interface to be added/removed
48 * to/from the specified DPN
49 * @param add true for addition, false for removal
51 void updateVpnFootprint(BigInteger dpId, String vpnName, String interfaceName, boolean add);
53 void setupSubnetMacIntoVpnInstance(String vpnName, String srcMacAddress,
54 BigInteger dpnId, WriteTransaction writeTx, int addOrRemove);