blob: a30632866c3bf0bc359a357d533d35595d782355 [file] [log] [blame]
Thomas Vachuska781d18b2014-10-27 10:31:25 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 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;
Brian O'Connorabafb502014-12-02 22:26:20 -080020import org.onosproject.net.ConnectPoint;
Jonathan Hart90a02c22015-02-13 11:52:07 -080021
22import java.util.Map;
23import java.util.Set;
Jonathan Hartdc711bd2014-10-15 11:24:23 -070024
25/**
Jonathan Hart90a02c22015-02-13 11:52:07 -080026 * Provides information about the routing configuration.
Jonathan Hartdc711bd2014-10-15 11:24:23 -070027 */
Jonathan Hart90a02c22015-02-13 11:52:07 -080028public interface RoutingConfigurationService {
29
30 /**
31 * Gets the list of BGP speakers inside the SDN network.
32 *
33 * @return the map of BGP speaker names to BGP speaker objects
34 */
35 public Map<String, BgpSpeaker> getBgpSpeakers();
36
37 /**
38 * Gets the list of configured BGP peers.
39 *
40 * @return the map from peer IP address to BgpPeer object
41 */
42 public Map<IpAddress, BgpPeer> getBgpPeers();
43
Jonathan Hartdc711bd2014-10-15 11:24:23 -070044 /**
Pingping Line28ae4c2015-03-13 11:37:03 -070045 * Evaluates whether an IP address belongs to local SDN network.
46 *
47 * @param ipAddress the IP address to evaluate
48 * @return true if the IP address belongs to local SDN network, otherwise false
49 */
50 public boolean isIpAddressLocal(IpAddress ipAddress);
51
52 /**
53 * Evaluates whether an IP prefix belongs to local SDN network.
54 *
55 * @param ipPrefix the IP prefix to evaluate
56 * @return true if the IP prefix belongs to local SDN network, otherwise false
57 */
58 public boolean isIpPrefixLocal(IpPrefix ipPrefix);
59
60 /**
Jonathan Hartdc711bd2014-10-15 11:24:23 -070061 * Retrieves the entire set of interfaces in the network.
62 *
63 * @return the set of interfaces
64 */
65 Set<Interface> getInterfaces();
66
67 /**
68 * Retrieves the interface associated with the given connect point.
69 *
70 * @param connectPoint the connect point to retrieve interface information
71 * for
72 * @return the interface
73 */
74 Interface getInterface(ConnectPoint connectPoint);
75
76 /**
77 * Retrieves the interface that matches the given IP address. Matching
78 * means that the IP address is in one of the interface's assigned subnets.
79 *
80 * @param ipAddress IP address to match
81 * @return the matching interface
82 */
83 Interface getMatchingInterface(IpAddress ipAddress);
Jonathan Hart90a02c22015-02-13 11:52:07 -080084
Jonathan Hartdc711bd2014-10-15 11:24:23 -070085}