Hyunsun Moon | 44aac66 | 2017-02-18 02:07:01 +0900 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Hyunsun Moon | 44aac66 | 2017-02-18 02:07:01 +0900 | [diff] [blame] | 3 | * |
| 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 |
| 7 | * |
| 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. |
| 15 | */ |
| 16 | package org.onosproject.openstacknetworking.api; |
| 17 | |
| 18 | import org.onosproject.event.ListenerService; |
| 19 | import org.openstack4j.model.network.NetFloatingIP; |
| 20 | import org.openstack4j.model.network.Router; |
| 21 | import org.openstack4j.model.network.RouterInterface; |
| 22 | |
| 23 | import java.util.Set; |
| 24 | |
| 25 | /** |
| 26 | * Handles router update requests from OpenStack. |
| 27 | */ |
| 28 | public interface OpenstackRouterService |
| 29 | extends ListenerService<OpenstackRouterEvent, OpenstackRouterListener> { |
| 30 | |
| 31 | /** |
| 32 | * Returns the router with the supplied router ID. |
| 33 | * |
| 34 | * @param osRouterId openstack router id |
| 35 | * @return openstack router |
| 36 | */ |
| 37 | Router router(String osRouterId); |
| 38 | |
| 39 | /** |
| 40 | * Returns all routers. |
| 41 | * |
| 42 | * @return set of openstack routers |
| 43 | */ |
| 44 | Set<Router> routers(); |
| 45 | |
| 46 | /** |
| 47 | * Returns the router interface with the given ID. |
| 48 | * |
| 49 | * @param osRouterIfaceId openstack router interface port id |
| 50 | * @return openstack router interface |
| 51 | */ |
| 52 | RouterInterface routerInterface(String osRouterIfaceId); |
| 53 | |
| 54 | /** |
| 55 | * Returns all router interfaces. |
| 56 | * |
| 57 | * @return set of openstack router interfaces |
| 58 | */ |
| 59 | Set<RouterInterface> routerInterfaces(); |
| 60 | |
| 61 | /** |
| 62 | * Returns all router interfaces with the router ID. |
| 63 | * |
| 64 | * @param osRouterId openstack router id |
| 65 | * @return set of router interfaces |
| 66 | */ |
| 67 | Set<RouterInterface> routerInterfaces(String osRouterId); |
| 68 | |
| 69 | /** |
| 70 | * Returns the floating IP with the supplied floating IP ID. |
Jian Li | c38e903 | 2018-08-09 17:08:38 +0900 | [diff] [blame] | 71 | * |
Hyunsun Moon | 44aac66 | 2017-02-18 02:07:01 +0900 | [diff] [blame] | 72 | * @param floatingIpId floating ip id |
| 73 | * @return openstack floating ip |
| 74 | */ |
| 75 | NetFloatingIP floatingIp(String floatingIpId); |
| 76 | |
| 77 | /** |
| 78 | * Returns all floating IPs. |
| 79 | * |
| 80 | * @return set of openstack floating ips |
| 81 | */ |
| 82 | Set<NetFloatingIP> floatingIps(); |
| 83 | |
| 84 | /** |
| 85 | * Returns all floating IPs associated with the router ID. |
| 86 | * |
| 87 | * @param routerId router id |
| 88 | * @return set of openstack floating ips |
| 89 | */ |
| 90 | Set<NetFloatingIP> floatingIps(String routerId); |
| 91 | } |