blob: 45316bd57ee69017b8a36298f90c1a738709acc2 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Ray Milkey34c95902015-04-15 09:47:53 -07002 * Copyright 2014-2015 Open Networking Laboratory
Thomas Vachuska781d18b2014-10-27 10:31:25 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Thomas Vachuska781d18b2014-10-27 10:31:25 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Thomas Vachuska781d18b2014-10-27 10:31:25 -070015 */
Jonathan Hart2da1e602015-02-18 19:09:24 -080016package org.onosproject.routing.config;
Jonathan Hartdc711bd2014-10-15 11:24:23 -070017
Pavlin Radoslavov2020eac2015-01-06 17:26:10 -080018import org.onlab.packet.IpAddress;
Pingping Line28ae4c2015-03-13 11:37:03 -070019import org.onlab.packet.IpPrefix;
Pingping Linc9e16bf2015-04-10 14:42:41 -070020import org.onlab.packet.MacAddress;
Brian O'Connorabafb502014-12-02 22:26:20 -080021import org.onosproject.net.ConnectPoint;
Jonathan Hart90a02c22015-02-13 11:52:07 -080022
23import java.util.Map;
24import java.util.Set;
Jonathan Hartdc711bd2014-10-15 11:24:23 -070025
26/**
Jonathan Hart90a02c22015-02-13 11:52:07 -080027 * Provides information about the routing configuration.
Jonathan Hartdc711bd2014-10-15 11:24:23 -070028 */
Jonathan Hart90a02c22015-02-13 11:52:07 -080029public interface RoutingConfigurationService {
30
31 /**
32 * Gets the list of BGP speakers inside the SDN network.
33 *
34 * @return the map of BGP speaker names to BGP speaker objects
35 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070036 Map<String, BgpSpeaker> getBgpSpeakers();
Jonathan Hart90a02c22015-02-13 11:52:07 -080037
38 /**
39 * Gets the list of configured BGP peers.
40 *
41 * @return the map from peer IP address to BgpPeer object
42 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070043 Map<IpAddress, BgpPeer> getBgpPeers();
Jonathan Hart90a02c22015-02-13 11:52:07 -080044
Jonathan Hartdc711bd2014-10-15 11:24:23 -070045 /**
Pingping Linc9e16bf2015-04-10 14:42:41 -070046 * Gets the MAC address configured for virtual gateway in SDN network.
47 *
48 * @return the MAC address of virtual gateway
49 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070050 MacAddress getVirtualGatewayMacAddress();
Pingping Linc9e16bf2015-04-10 14:42:41 -070051
52 /**
53 * Evaluates whether an IP address is a virtual gateway IP address.
54 *
55 * @param ipAddress the IP address to evaluate
56 * @return true if the IP address is a virtual gateway address, otherwise false
57 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070058 boolean isVirtualGatewayIpAddress(IpAddress ipAddress);
Pingping Linc9e16bf2015-04-10 14:42:41 -070059
60 /**
Pingping Line28ae4c2015-03-13 11:37:03 -070061 * Evaluates whether an IP address belongs to local SDN network.
62 *
63 * @param ipAddress the IP address to evaluate
64 * @return true if the IP address belongs to local SDN network, otherwise false
65 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070066 boolean isIpAddressLocal(IpAddress ipAddress);
Pingping Line28ae4c2015-03-13 11:37:03 -070067
68 /**
69 * Evaluates whether an IP prefix belongs to local SDN network.
70 *
71 * @param ipPrefix the IP prefix to evaluate
72 * @return true if the IP prefix belongs to local SDN network, otherwise false
73 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070074 boolean isIpPrefixLocal(IpPrefix ipPrefix);
Pingping Line28ae4c2015-03-13 11:37:03 -070075
76 /**
Pingping Lin8a524712015-06-24 14:58:24 -070077 * Retrieves the entire set of connect points connected to BGP peers in the
78 * network.
79 *
80 * @return the set of connect points connected to BGP peers
81 */
Jonathan Hart4cb39882015-08-12 23:50:55 -040082 Set<ConnectPoint> getBgpPeerConnectPoints();
Pingping Lin8a524712015-06-24 14:58:24 -070083
84 /**
Jonathan Hartdc711bd2014-10-15 11:24:23 -070085 * Retrieves the interface that matches the given IP address. Matching
86 * means that the IP address is in one of the interface's assigned subnets.
87 *
88 * @param ipAddress IP address to match
89 * @return the matching interface
Jonathan Hart4cb39882015-08-12 23:50:55 -040090 * @deprecated in Drake release - use InterfaceService instead
Jonathan Hartdc711bd2014-10-15 11:24:23 -070091 */
Jonathan Hart4cb39882015-08-12 23:50:55 -040092 @Deprecated
Jonathan Hartdc711bd2014-10-15 11:24:23 -070093 Interface getMatchingInterface(IpAddress ipAddress);
Jonathan Hart90a02c22015-02-13 11:52:07 -080094
Jonathan Hartdc711bd2014-10-15 11:24:23 -070095}