blob: 18bf9675f40455767585c36c0536cab668f10b6a [file] [log] [blame]
Hyunsun Moon44aac662017-02-18 02:07:01 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016-present Open Networking Foundation
Hyunsun Moon44aac662017-02-18 02:07:01 +09003 *
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 */
16package org.onosproject.openstacknetworking.api;
17
18import org.onosproject.event.ListenerService;
19import org.openstack4j.model.network.NetFloatingIP;
20import org.openstack4j.model.network.Router;
21import org.openstack4j.model.network.RouterInterface;
22
23import java.util.Set;
24
25/**
26 * Handles router update requests from OpenStack.
27 */
28public 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 Lic38e9032018-08-09 17:08:38 +090071 *
Hyunsun Moon44aac662017-02-18 02:07:01 +090072 * @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}