Remove unused parameters
[netvirt.git] / vpnmanager / api / src / main / java / org / opendaylight / netvirt / vpnmanager / api / intervpnlink / IVpnLinkService.java
1 /*
2  * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.netvirt.vpnmanager.api.intervpnlink;
9
10 import java.util.List;
11 import org.opendaylight.netvirt.fibmanager.api.RouteOrigin;
12
13 public interface IVpnLinkService {
14
15     /**
16      * Leaks a route belonging to a L3VPN to other L3VPN if the necessary
17      * circumstances are met, like there is an InterVpnLink linking both L3VPNs
18      * and the corresponding leaking flag is active (bgp/static/connected).
19      *
20      * @param vpnName Vpn name of the L3VPN that holds the original route
21      * @param prefix Prefix/destination of the route
22      * @param nextHopList List of nexthops (ECMP) of the route
23      * @param label Label of the route to be leaked
24      * @param origin Origin of the route (BGP|STATIC|CONNECTED)
25      * @param addOrRemove states if the routes must be leaked or withdrawn
26      */
27     void leakRouteIfNeeded(String vpnName, String prefix, List<String> nextHopList, int label, RouteOrigin origin,
28                            int addOrRemove);
29
30     /**
31      * Leaks a route from one VPN to another.
32      *
33      * @param interVpnLink     Reference to the object that holds the info about the link between the 2 VPNs
34      * @param srcVpnUuid       UUID of the VPN that has the route that is going to be leaked to the other VPN
35      * @param dstVpnUuid       UUID of the VPN that is going to receive the route
36      * @param prefix           Prefix of the route
37      * @param label            Label of the route in the original VPN
38      * @param forcedOrigin     By default, origin for leaked routes is INTERVPN, however it is possible to
39      *                         provide a different origin if desired.
40      */
41     void leakRoute(InterVpnLinkDataComposite interVpnLink, String srcVpnUuid, String dstVpnUuid,
42                    String prefix, Long label, RouteOrigin forcedOrigin);
43
44     /**
45      * Similar to leakRouteIfNeeded but the only requisite to be met is that
46      * there exists an InterVpnLink linking both VPNs.
47      *
48      * @param vpnName Vpn name of the L3VPN that holds the original route
49      * @param prefix Prefix/destination of the route
50      * @param nextHopList List of nexthops (ECMP) of the route
51      * @param label Label of the route to be leaked
52      * @param addOrRemove states if the routes must be leaked or withdrawn
53      */
54     void leakRoute(String vpnName, String prefix, List<String> nextHopList, int label, int addOrRemove);
55
56     /**
57      * Checks both L3VPNs linked by the InterVpnLink and performs all the
58      * corresponding route leaking between them.
59      *
60      * @param interVpnLinkDataComposite InterVpnLink to be considered
61      */
62     void exchangeRoutes(InterVpnLinkDataComposite interVpnLinkDataComposite);
63
64     /**
65      * Requests IVpnLinkService to take care of those static routes that point
66      * to the specified InterVpnLink and that may be configured in any Neutron
67      * Router.
68      *
69      * @param interVpnLink InterVpnLink to be considered.
70      */
71     void handleStaticRoutes(InterVpnLinkDataComposite interVpnLink);
72
73 }