EVPN RT2 elan changes to adv/withdraw RT2 routes..
[netvirt.git] / vpnservice / vpnmanager / vpnmanager-api / src / main / java / org / opendaylight / netvirt / vpnmanager / api / IVpnManager.java
index d990f28c788ba6b6e4c0ac015f017825c1cda2c3..ac5c93c32626b8a4a4f528ccfb3ecc0d7cfc5c93 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
+ * Copyright © 2015, 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -11,49 +11,40 @@ package org.opendaylight.netvirt.vpnmanager.api;
 import java.math.BigInteger;
 import java.util.Collection;
 import java.util.List;
-
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
-import org.opendaylight.netvirt.fibmanager.api.IFibManager;
+import org.opendaylight.genius.mdsalutil.MatchInfoBase;
 import org.opendaylight.netvirt.fibmanager.api.RouteOrigin;
+import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPort;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap;
+
 
 public interface IVpnManager {
-    void setFibManager(IFibManager fibManager);
-    void addExtraRoute(String destination, String nextHop, String rd, String routerID, int label, RouteOrigin origin);
-    void delExtraRoute(String destination, String nextHop, String rd, String routerID);
+    void addExtraRoute(String vpnName, String destination, String nextHop,
+            String rd, String routerID, int label, RouteOrigin origin);
+
+    void delExtraRoute(String vpnName, String destination, String nextHop, String rd, String routerID);
 
     /**
-     * Returns true if the specified VPN exists
+     * Returns true if the specified VPN exists.
      *
      * @param vpnName it must match against the vpn-instance-name attrib in one of the VpnInstances
-     *
-     * @return
      */
     boolean existsVpn(String vpnName);
+
     boolean isVPNConfigured();
 
-    long getArpCacheTimeoutMillis();
     /**
-     * Retrieves the list of DPNs where the specified VPN has footprint
+     * Retrieves the list of DPNs where the specified VPN has footprint.
      *
      * @param vpnInstanceName The name of the Vpn instance
      * @return The list of DPNs
      */
     List<BigInteger> getDpnsOnVpn(String vpnInstanceName);
 
-    /**
-     * Updates the footprint that a VPN has on a given DPN by adding/removing
-     * the specified interface
-     *
-     * @param dpId DPN where the VPN interface belongs to
-     * @param vpnName Name of the VPN whose footprint is being modified
-     * @param interfaceName Name of the VPN interface to be added/removed
-     *          to/from the specified DPN
-     * @param add true for addition, false for removal
-     */
-    void updateVpnFootprint(BigInteger dpId, String vpnName, String interfaceName, boolean add);
-
-    void setupSubnetMacIntoVpnInstance(String vpnName, String srcMacAddress,
+    void setupSubnetMacIntoVpnInstance(String vpnName, String subnetVpnName, String srcMacAddress,
             BigInteger dpnId, WriteTransaction writeTx, int addOrRemove);
 
     void setupRouterGwMacFlow(String routerName, String routerGwMac, BigInteger dpnId, Uuid extNetworkId,
@@ -63,7 +54,19 @@ public interface IVpnManager {
             BigInteger dpnId, Uuid extNetworkId, WriteTransaction writeTx, int addOrRemove);
 
     void setupArpResponderFlowsToExternalNetworkIps(String id, Collection<String> fixedIps, String routerGwMac,
-            BigInteger dpnId, long vpnId, String extInterfaceName, int lPortTag, WriteTransaction writeTx,
+            BigInteger dpnId, long vpnId, String extInterfaceName, int lportTag, WriteTransaction writeTx,
             int addOrRemove);
 
+    void onSubnetAddedToVpn(Subnetmap subnetmap, boolean isBgpVpn, Long elanTag);
+
+    void onSubnetDeletedFromVpn(Subnetmap subnetmap, boolean isBgpVpn);
+
+    List<MatchInfoBase> getEgressMatchesForVpn(String vpnName);
+
+    VpnInstance getVpnInstance(DataBroker broker, String vpnInstanceName);
+
+    String getVpnRd(DataBroker broker, String vpnName);
+
+    VpnPortipToPort getNeutronPortFromVpnPortFixedIp(DataBroker broker, String vpnName, String fixedIp);
+
 }