Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 2 | * Copyright 2014 Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * 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 Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * 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 Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Jonathan Hart | 2da1e60 | 2015-02-18 19:09:24 -0800 | [diff] [blame] | 16 | package org.onosproject.routing.config; |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 17 | |
Pavlin Radoslavov | 2020eac | 2015-01-06 17:26:10 -0800 | [diff] [blame] | 18 | import org.onlab.packet.IpAddress; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 19 | import org.onosproject.net.ConnectPoint; |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 20 | |
| 21 | import java.util.Map; |
| 22 | import java.util.Set; |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 23 | |
| 24 | /** |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 25 | * Provides information about the routing configuration. |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 26 | */ |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 27 | public interface RoutingConfigurationService { |
| 28 | |
| 29 | /** |
| 30 | * Gets the list of BGP speakers inside the SDN network. |
| 31 | * |
| 32 | * @return the map of BGP speaker names to BGP speaker objects |
| 33 | */ |
| 34 | public Map<String, BgpSpeaker> getBgpSpeakers(); |
| 35 | |
| 36 | /** |
| 37 | * Gets the list of configured BGP peers. |
| 38 | * |
| 39 | * @return the map from peer IP address to BgpPeer object |
| 40 | */ |
| 41 | public Map<IpAddress, BgpPeer> getBgpPeers(); |
| 42 | |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 43 | /** |
| 44 | * Retrieves the entire set of interfaces in the network. |
| 45 | * |
| 46 | * @return the set of interfaces |
| 47 | */ |
| 48 | Set<Interface> getInterfaces(); |
| 49 | |
| 50 | /** |
| 51 | * Retrieves the interface associated with the given connect point. |
| 52 | * |
| 53 | * @param connectPoint the connect point to retrieve interface information |
| 54 | * for |
| 55 | * @return the interface |
| 56 | */ |
| 57 | Interface getInterface(ConnectPoint connectPoint); |
| 58 | |
| 59 | /** |
| 60 | * Retrieves the interface that matches the given IP address. Matching |
| 61 | * means that the IP address is in one of the interface's assigned subnets. |
| 62 | * |
| 63 | * @param ipAddress IP address to match |
| 64 | * @return the matching interface |
| 65 | */ |
| 66 | Interface getMatchingInterface(IpAddress ipAddress); |
Jonathan Hart | 90a02c2 | 2015-02-13 11:52:07 -0800 | [diff] [blame] | 67 | |
Jonathan Hart | dc711bd | 2014-10-15 11:24:23 -0700 | [diff] [blame] | 68 | } |