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 java.math.BigInteger;
12 import java.util.Collection;
13 import java.util.List;
15 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
16 import org.opendaylight.netvirt.fibmanager.api.IFibManager;
17 import org.opendaylight.netvirt.fibmanager.api.RouteOrigin;
18 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
20 public interface IVpnManager {
21 void setFibManager(IFibManager fibManager);
22 void addExtraRoute(String destination, String nextHop, String rd, String routerID, int label, RouteOrigin origin);
23 void delExtraRoute(String destination, String nextHop, String rd, String routerID);
26 * Returns true if the specified VPN exists
28 * @param vpnName it must match against the vpn-instance-name attrib in one of the VpnInstances
32 boolean existsVpn(String vpnName);
33 boolean isVPNConfigured();
35 long getArpCacheTimeoutMillis();
37 * Retrieves the list of DPNs where the specified VPN has footprint
39 * @param vpnInstanceName The name of the Vpn instance
40 * @return The list of DPNs
42 List<BigInteger> getDpnsOnVpn(String vpnInstanceName);
45 * Updates the footprint that a VPN has on a given DPN by adding/removing
46 * the specified interface
48 * @param dpId DPN where the VPN interface belongs to
49 * @param vpnName Name of the VPN whose footprint is being modified
50 * @param interfaceName Name of the VPN interface to be added/removed
51 * to/from the specified DPN
52 * @param add true for addition, false for removal
54 void updateVpnFootprint(BigInteger dpId, String vpnName, String interfaceName, boolean add);
56 void setupSubnetMacIntoVpnInstance(String vpnName, String srcMacAddress,
57 BigInteger dpnId, WriteTransaction writeTx, int addOrRemove);
59 void setupRouterGwMacFlow(String routerName, String routerGwMac, BigInteger dpnId, Uuid extNetworkId,
60 WriteTransaction writeTx, int addOrRemove);
62 void setupArpResponderFlowsToExternalNetworkIps(String id, Collection<String> fixedIps, String macAddress,
63 BigInteger dpnId, Uuid extNetworkId, WriteTransaction writeTx, int addOrRemove);
65 void setupArpResponderFlowsToExternalNetworkIps(String id, Collection<String> fixedIps, String routerGwMac,
66 BigInteger dpnId, long vpnId, String extInterfaceName, int lPortTag, WriteTransaction writeTx,