BGPManager module sync up
[netvirt.git] / vpnservice / bgpmanager / bgpmanager-api / src / main / java / org.opendaylight.netvirt.bgpmanager.api / IBgpManager.java
index 713a300c22a2ccfb1a31ad45157631c86d8a83de..986cdf69920e138b4226a9f80335c24abdae7413 100644 (file)
@@ -9,6 +9,7 @@
 package org.opendaylight.netvirt.bgpmanager.api;
 
 import java.util.Collection;
+import java.util.List;
 
 public interface IBgpManager {
 
@@ -18,53 +19,79 @@ public interface IBgpManager {
      * @param importRts
      * @param exportRts
      */
-    void addVrf(String rd, Collection<String> importRts, Collection<String> exportRts) throws Exception;
+    public void addVrf(String rd, Collection<String> importRts, Collection<String> exportRts) throws Exception;
 
     /**
      *
      * @param rd
      */
-    void deleteVrf(String rd) throws Exception;
+    public void deleteVrf(String rd) throws Exception;
 
     /**
+     * Adds one or more routes, as many as nexthops provided, in a BGP neighbour. It persists VrfEntry in datastore
+     * and sends the BGP message
+     *
+     * @param rd
+     * @param prefix
+     * @param nextHopList
+     * @param vpnLabel
+     */
+    public void addPrefix(String rd, String prefix, List<String> nextHopList, int vpnLabel, RouteOrigin origin) throws Exception;
+
+    /**
+     * Adds a route in a BGP neighbour. It persists the VrfEntry in Datastore and sends the BGP message
      *
      * @param rd
      * @param prefix
      * @param nextHop
      * @param vpnLabel
      */
-    void addPrefix(String rd, String prefix, String nextHop, int vpnLabel) throws Exception;
+    public void addPrefix(String rd, String prefix, String nextHop, int vpnLabel, RouteOrigin origin) throws Exception;
+
 
     /**
      *
      * @param rd
      * @param prefix
      */
-    void deletePrefix(String rd, String prefix) throws Exception;
+    public void deletePrefix(String rd, String prefix) throws Exception;
 
     /**
      *
      * @param fileName
      * @param logLevel
      */
-    void setQbgpLog(String fileName, String logLevel) throws Exception;
+    public void setQbgpLog(String fileName, String logLevel) throws Exception;
 
     /**
+     * Advertises a Prefix to a BGP neighbour, using several nexthops. Only sends the BGP messages, no writing to
+     * MD-SAL
+     *
      * @param rd
      * @param prefix
-     * @param nextHop
+     * @param nextHopList
+     * @param vpnLabel
+     */
+    public void advertisePrefix(String rd, String prefix, List<String> nextHopList, int vpnLabel) throws Exception;
+
+    /**
+     * Advertises a Prefix to a BGP neighbour. Only sends the BGP messages, no writing to MD-SAL
+     *
+     * @param rd
+     * @param prefix
+     * @param nextHopList
      * @param vpnLabel
      */
-    void advertisePrefix(String rd, String prefix, String nextHop, int vpnLabel) throws Exception;
+    public void advertisePrefix(String rd, String prefix, String nextHop, int vpnLabel) throws Exception;
 
     /**
      *
      * @param rd
      * @param prefix
      */
-    void withdrawPrefix(String rd, String prefix) throws Exception;
+    public void withdrawPrefix(String rd, String prefix) throws Exception;
 
 
-    String getDCGwIP();
+    public String getDCGwIP();
 
 }