blob: 87420796303fe480d2fa729348eb821b7399b146 [file] [log] [blame]
Hyunsun Moon44aac662017-02-18 02:07:01 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-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.openstack4j.model.network.NetFloatingIP;
19import org.openstack4j.model.network.Router;
20import org.openstack4j.model.network.RouterInterface;
21
22/**
23 * Service for administering the inventory of OpenStack router and floating IP.
24 */
25public interface OpenstackRouterAdminService {
26
27 /**
28 * Creates a router with the given information.
29 *
30 * @param osRouter the new router
31 */
32 void createRouter(Router osRouter);
33
34 /**
35 * Updates the router with the given information.
36 *
37 * @param osRouter updated router
38 */
39 void updateRouter(Router osRouter);
40
41 /**
42 * Removes the router with the given router ID.
43 *
44 * @param osRouterId router id
45 */
46 void removeRouter(String osRouterId);
47
Hyunsun Moonc7219222017-03-27 11:05:59 +090048 // TODO fix the logic adding a router interface to a router
Hyunsun Moon44aac662017-02-18 02:07:01 +090049 /**
50 * Adds a new interface to the router.
51 *
52 * @param osRouterIface openstack router interface
53 */
54 void addRouterInterface(RouterInterface osRouterIface);
55
56 /**
57 * Updates the router interface.
58 *
59 * @param osRouterIface openstack router interface
60 */
61 void updateRouterInterface(RouterInterface osRouterIface);
62
63 /**
64 * Removes the router interface.
65 *
66 * @param osRouterIfaceId openstack router interface id
67 */
68 void removeRouterInterface(String osRouterIfaceId);
69
70 /**
71 * Creates a floating IP with the given information.
72 *
73 * @param floatingIP the new floating ip
74 */
75 void createFloatingIp(NetFloatingIP floatingIP);
76
77 /**
78 * Updates the floating IP with the given information.
79 *
80 * @param floatingIP the updated floating ip
81 */
82 void updateFloatingIp(NetFloatingIP floatingIP);
83
84 /**
85 * Removes the floating IP with the given floating IP ID.
86 *
87 * @param floatingIpId floating ip id
88 */
89 void removeFloatingIp(String floatingIpId);
Hyunsun Moonc7219222017-03-27 11:05:59 +090090
91 /**
92 * Clears the existing routers and floating IPs.
93 */
94 void clear();
Hyunsun Moon44aac662017-02-18 02:07:01 +090095}