sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
sangho | 0c2a3da | 2016-02-16 13:39:07 +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; |
| 17 | |
sangho | 93447f1 | 2016-02-24 00:33:22 +0900 | [diff] [blame] | 18 | import org.onosproject.openstackinterface.OpenstackFloatingIP; |
| 19 | import org.onosproject.openstackinterface.OpenstackRouter; |
| 20 | import org.onosproject.openstackinterface.OpenstackRouterInterface; |
| 21 | |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 22 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 23 | * Supports L3 management REST API for openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 24 | */ |
| 25 | public interface OpenstackRoutingService { |
| 26 | |
| 27 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 28 | * Stores the floating IP information created by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 29 | * |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 30 | * @param openstackFloatingIp Floating IP information |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 31 | */ |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 32 | void createFloatingIP(OpenstackFloatingIP openstackFloatingIp); |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 33 | |
| 34 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 35 | * Updates flow rules corresponding to the floating IP information updated by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 36 | * |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 37 | * @param openstackFloatingIp Floating IP information |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 38 | */ |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 39 | void updateFloatingIP(OpenstackFloatingIP openstackFloatingIp); |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 40 | |
| 41 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 42 | * Removes flow rules corresponding to floating IP information removed by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 43 | * |
| 44 | * @param id Deleted Floating IP`s ID |
| 45 | */ |
| 46 | void deleteFloatingIP(String id); |
| 47 | |
| 48 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 49 | * Stores the router information created by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 50 | * |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 51 | * @param openstackRouter Router information |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 52 | */ |
| 53 | void createRouter(OpenstackRouter openstackRouter); |
| 54 | |
| 55 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 56 | * Updates flow rules corresponding to the router information updated by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 57 | * |
| 58 | * @param openstackRouter Router information |
| 59 | */ |
| 60 | void updateRouter(OpenstackRouter openstackRouter); |
| 61 | |
| 62 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 63 | * Removes flow rules corresponding to the router information removed by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 64 | * |
| 65 | * @param id Deleted router`s ID |
| 66 | */ |
| 67 | void deleteRouter(String id); |
| 68 | |
| 69 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 70 | * Updates flow rules corresponding to the router information updated by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 71 | * |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 72 | * @param openstackRouterInterface Router interface information |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 73 | */ |
| 74 | void updateRouterInterface(OpenstackRouterInterface openstackRouterInterface); |
| 75 | |
| 76 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 77 | * Removes flow rules corresponding to the router information removed by openstack. |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 78 | * |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 79 | * @param openstackRouterInterface Router interface information |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 80 | */ |
| 81 | void removeRouterInterface(OpenstackRouterInterface openstackRouterInterface); |
| 82 | |
Kyuhwi Choi | ee9e371 | 2016-02-22 22:49:36 +0900 | [diff] [blame] | 83 | /** |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 84 | * Checks floatingIp disassociation when corresponding deleted vm. |
Kyuhwi Choi | ee9e371 | 2016-02-22 22:49:36 +0900 | [diff] [blame] | 85 | * |
| 86 | * @param portId Deleted vm |
Ray Milkey | d4334db | 2016-04-05 17:39:44 -0700 | [diff] [blame] | 87 | * @param portInfo stored information about deleted vm |
Kyuhwi Choi | ee9e371 | 2016-02-22 22:49:36 +0900 | [diff] [blame] | 88 | void checkDisassociatedFloatingIp(String portId, OpenstackPortInfo portInfo); |
sangho | 6032f34 | 2016-07-07 14:32:03 +0900 | [diff] [blame] | 89 | */ |
Kyuhwi Choi | 5e65e2c | 2016-04-01 11:48:15 +0900 | [diff] [blame] | 90 | |
| 91 | /** |
| 92 | * Returns network id for routerInterface. |
| 93 | * |
| 94 | * @param portId routerInterface`s port id |
| 95 | */ |
| 96 | String networkIdForRouterInterface(String portId); |
sangho | 0c2a3da | 2016-02-16 13:39:07 +0900 | [diff] [blame] | 97 | } |