blob: a1a8d3041161407c5e14e4f9c1cbbfa28f33c722 [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.
71 * @param floatingIpId floating ip id
72 * @return openstack floating ip
73 */
74 NetFloatingIP floatingIp(String floatingIpId);
75
76 /**
77 * Returns all floating IPs.
78 *
79 * @return set of openstack floating ips
80 */
81 Set<NetFloatingIP> floatingIps();
82
83 /**
84 * Returns all floating IPs associated with the router ID.
85 *
86 * @param routerId router id
87 * @return set of openstack floating ips
88 */
89 Set<NetFloatingIP> floatingIps(String routerId);
90}