samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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; |
| 20 | |
| 21 | /** |
| 22 | * VTN application that applies configuration and flows to the device. |
| 23 | */ |
| 24 | public interface VTNService { |
| 25 | |
| 26 | /** |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 27 | * Creates a vxlan tunnel and creates the ovs when a ovs controller node is |
| 28 | * detected. |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 29 | * |
| 30 | * @param device controller-type device |
| 31 | */ |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 32 | void onControllerDetected(Device device); |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 33 | |
| 34 | /** |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 35 | * Drops a vxlan tunnel and drops the ovs when a ovs controller node is |
| 36 | * vanished. |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 37 | * |
| 38 | * @param device controller-type device |
| 39 | */ |
lishuai | 6c56f5e | 2015-11-17 16:38:19 +0800 | [diff] [blame] | 40 | void onControllerVanished(Device device); |
samuel | e4e7505 | 2015-07-21 11:51:22 +0800 | [diff] [blame] | 41 | |
| 42 | /** |
| 43 | * Applies default forwarding flows when a ovs is detected. |
| 44 | * |
| 45 | * @param device switch-type device |
| 46 | */ |
| 47 | void onOvsDetected(Device device); |
| 48 | |
| 49 | /** |
| 50 | * Remove default forwarding flows when a ovs is vanished. |
| 51 | * |
| 52 | * @param device switch-type device |
| 53 | */ |
| 54 | void onOvsVanished(Device device); |
| 55 | |
| 56 | /** |
| 57 | * Applies multicast flows and tunnel flows when a VM is detected. |
| 58 | * |
| 59 | * @param host a VM |
| 60 | */ |
| 61 | void onHostDetected(Host host); |
| 62 | |
| 63 | /** |
| 64 | * Remove multicast flows and tunnel flows when a VM is vanished. |
| 65 | * |
| 66 | * @param host a VM |
| 67 | */ |
| 68 | void onHostVanished(Host host); |
| 69 | |
| 70 | } |