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 | */ |
samuel | a5e17fc | 2015-07-29 15:46:40 +0800 | [diff] [blame] | 16 | package org.onosproject.vtn; |
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 | /** |
| 27 | * Creates a vxlan tunnel and creates the ovs when a ovs controller node is detected. |
| 28 | * |
| 29 | * @param device controller-type device |
| 30 | */ |
| 31 | void onServerDetected(Device device); |
| 32 | |
| 33 | /** |
| 34 | * Drops a vxlan tunnel and drops the ovs when a ovs controller node is vanished. |
| 35 | * |
| 36 | * @param device controller-type device |
| 37 | */ |
| 38 | void onServerVanished(Device device); |
| 39 | |
| 40 | /** |
| 41 | * Applies default forwarding flows when a ovs is detected. |
| 42 | * |
| 43 | * @param device switch-type device |
| 44 | */ |
| 45 | void onOvsDetected(Device device); |
| 46 | |
| 47 | /** |
| 48 | * Remove default forwarding flows when a ovs is vanished. |
| 49 | * |
| 50 | * @param device switch-type device |
| 51 | */ |
| 52 | void onOvsVanished(Device device); |
| 53 | |
| 54 | /** |
| 55 | * Applies multicast flows and tunnel flows when a VM is detected. |
| 56 | * |
| 57 | * @param host a VM |
| 58 | */ |
| 59 | void onHostDetected(Host host); |
| 60 | |
| 61 | /** |
| 62 | * Remove multicast flows and tunnel flows when a VM is vanished. |
| 63 | * |
| 64 | * @param host a VM |
| 65 | */ |
| 66 | void onHostVanished(Host host); |
| 67 | |
| 68 | } |