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 2017-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.openstack4j.model.network.NetFloatingIP; |
| 19 | import org.openstack4j.model.network.Router; |
| 20 | import org.openstack4j.model.network.RouterInterface; |
| 21 | |
| 22 | /** |
| 23 | * Service for administering the inventory of OpenStack router and floating IP. |
| 24 | */ |
Jian Li | da7c6cb | 2018-03-06 14:58:54 +0900 | [diff] [blame] | 25 | public interface OpenstackRouterAdminService extends OpenstackRouterService { |
Hyunsun Moon | 44aac66 | 2017-02-18 02:07:01 +0900 | [diff] [blame] | 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 Moon | c721922 | 2017-03-27 11:05:59 +0900 | [diff] [blame] | 48 | // TODO fix the logic adding a router interface to a router |
Hyunsun Moon | 44aac66 | 2017-02-18 02:07:01 +0900 | [diff] [blame] | 49 | /** |
| 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 Moon | c721922 | 2017-03-27 11:05:59 +0900 | [diff] [blame] | 90 | |
| 91 | /** |
| 92 | * Clears the existing routers and floating IPs. |
| 93 | */ |
| 94 | void clear(); |
Hyunsun Moon | 44aac66 | 2017-02-18 02:07:01 +0900 | [diff] [blame] | 95 | } |