blob: a20f852b9837d1ea7926b164ea5c7c0c61f07676 [file] [log] [blame]
samuele4e75052015-07-21 11:51:22 +08001/*
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 */
samuela5e17fc2015-07-29 15:46:40 +080016package org.onosproject.vtn;
samuele4e75052015-07-21 11:51:22 +080017
18import org.onosproject.net.Device;
19import org.onosproject.net.Host;
20
21/**
22 * VTN application that applies configuration and flows to the device.
23 */
24public 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}