samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame^] | 2 | * Copyright 2015-present Open Networking Foundation |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [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 | */ |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 16 | package org.onosproject.vtn.manager; |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 17 | |
| 18 | import org.onosproject.net.Device; |
| 19 | import org.onosproject.net.Host; |
lishuai | 858efd3 | 2015-12-04 14:30:36 +0800 | [diff] [blame] | 20 | import org.onosproject.vtnrsc.event.VtnRscEventFeedback; |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 21 | |
| 22 | /** |
| 23 | * VTN application that applies configuration and flows to the device. |
| 24 | */ |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 25 | public interface VtnService { |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 26 | |
| 27 | /** |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 28 | * Creates a vxlan tunnel and creates the ovs when a ovs controller node is |
| 29 | * detected. |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 30 | * |
| 31 | * @param device controller-type device |
| 32 | */ |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 33 | void onControllerDetected(Device device); |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 34 | |
| 35 | /** |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 36 | * Drops a vxlan tunnel and drops the ovs when a ovs controller node is |
| 37 | * vanished. |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 38 | * |
| 39 | * @param device controller-type device |
| 40 | */ |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 41 | void onControllerVanished(Device device); |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 42 | |
| 43 | /** |
| 44 | * Applies default forwarding flows when a ovs is detected. |
| 45 | * |
| 46 | * @param device switch-type device |
| 47 | */ |
| 48 | void onOvsDetected(Device device); |
| 49 | |
| 50 | /** |
| 51 | * Remove default forwarding flows when a ovs is vanished. |
| 52 | * |
| 53 | * @param device switch-type device |
| 54 | */ |
| 55 | void onOvsVanished(Device device); |
| 56 | |
| 57 | /** |
| 58 | * Applies multicast flows and tunnel flows when a VM is detected. |
| 59 | * |
| 60 | * @param host a VM |
| 61 | */ |
| 62 | void onHostDetected(Host host); |
| 63 | |
| 64 | /** |
| 65 | * Remove multicast flows and tunnel flows when a VM is vanished. |
| 66 | * |
| 67 | * @param host a VM |
| 68 | */ |
| 69 | void onHostVanished(Host host); |
| 70 | |
lishuai | 858efd3 | 2015-12-04 14:30:36 +0800 | [diff] [blame] | 71 | /** |
| 72 | * Applies east west flows when neutron created router interface. |
| 73 | * |
| 74 | * @param l3Feedback VtnrscEventFeedback |
| 75 | */ |
| 76 | void onRouterInterfaceDetected(VtnRscEventFeedback l3Feedback); |
| 77 | |
| 78 | /** |
| 79 | * Remove east west flows when neutron removed router interface. |
| 80 | * |
| 81 | * @param l3Feedback VtnrscEventFeedback |
| 82 | */ |
| 83 | void onRouterInterfaceVanished(VtnRscEventFeedback l3Feedback); |
| 84 | |
| 85 | /** |
| 86 | * Applies north south flows when neutron bind floating ip. |
| 87 | * |
| 88 | * @param l3Feedback VtnrscEventFeedback |
| 89 | */ |
| 90 | void onFloatingIpDetected(VtnRscEventFeedback l3Feedback); |
| 91 | |
| 92 | /** |
| 93 | * Applies north south flows when neutron unbind floating ip. |
| 94 | * |
| 95 | * @param l3Feedback VtnrscEventFeedback |
| 96 | */ |
| 97 | void onFloatingIpVanished(VtnRscEventFeedback l3Feedback); |
| 98 | |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 99 | } |