blob: a104e529b064d17b9eb9d2240600eb5b35bff530 [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 */
lishuai6c56f5e2015-11-17 16:38:19 +080016package org.onosproject.vtn.manager;
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 /**
lishuai6c56f5e2015-11-17 16:38:19 +080027 * Creates a vxlan tunnel and creates the ovs when a ovs controller node is
28 * detected.
samuele4e75052015-07-21 11:51:22 +080029 *
30 * @param device controller-type device
31 */
lishuai6c56f5e2015-11-17 16:38:19 +080032 void onControllerDetected(Device device);
samuele4e75052015-07-21 11:51:22 +080033
34 /**
lishuai6c56f5e2015-11-17 16:38:19 +080035 * Drops a vxlan tunnel and drops the ovs when a ovs controller node is
36 * vanished.
samuele4e75052015-07-21 11:51:22 +080037 *
38 * @param device controller-type device
39 */
lishuai6c56f5e2015-11-17 16:38:19 +080040 void onControllerVanished(Device device);
samuele4e75052015-07-21 11:51:22 +080041
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}