blob: caec3fa203d7749cb2b06765ddc5a6faf0f97e1d [file] [log] [blame]
samuele4e75052015-07-21 11:51:22 +08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
samuele4e75052015-07-21 11:51:22 +08003 *
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;
lishuai858efd32015-12-04 14:30:36 +080020import org.onosproject.vtnrsc.event.VtnRscEventFeedback;
samuele4e75052015-07-21 11:51:22 +080021
22/**
23 * VTN application that applies configuration and flows to the device.
24 */
Jonathan Hart51539b82015-10-29 09:53:04 -070025public interface VtnService {
samuele4e75052015-07-21 11:51:22 +080026
27 /**
lishuai6c56f5e2015-11-17 16:38:19 +080028 * Creates a vxlan tunnel and creates the ovs when a ovs controller node is
29 * detected.
samuele4e75052015-07-21 11:51:22 +080030 *
31 * @param device controller-type device
32 */
lishuai6c56f5e2015-11-17 16:38:19 +080033 void onControllerDetected(Device device);
samuele4e75052015-07-21 11:51:22 +080034
35 /**
lishuai6c56f5e2015-11-17 16:38:19 +080036 * Drops a vxlan tunnel and drops the ovs when a ovs controller node is
37 * vanished.
samuele4e75052015-07-21 11:51:22 +080038 *
39 * @param device controller-type device
40 */
lishuai6c56f5e2015-11-17 16:38:19 +080041 void onControllerVanished(Device device);
samuele4e75052015-07-21 11:51:22 +080042
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
lishuai858efd32015-12-04 14:30:36 +080071 /**
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
samuele4e75052015-07-21 11:51:22 +080099}