samuel

[ONOS-2115]Create an application named vtn to apply configuration and

flows to ovsdb device.
1. Creates/drops vxlan tunnels and a ovs when a ovs controller node is
detected
2. Applies default forwarding flows when a ovs is detected
3. Applies tunnel flows and multicast flows when a VM is detected

Change-Id: I66d719eaaef364b197952c7b9d7f72c4b269c926
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
54 <module>olt</module> 54 <module>olt</module>
55 <module>flowanalyzer</module> 55 <module>flowanalyzer</module>
56 <module>vtnrsc</module> 56 <module>vtnrsc</module>
57 + <module>vtn</module>
57 </modules> 58 </modules>
58 59
59 <properties> 60 <properties>
......
1 +<?xml version="1.0"?>
2 +<project
3 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4 + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5 + <modelVersion>4.0.0</modelVersion>
6 + <parent>
7 + <groupId>org.onosproject</groupId>
8 + <artifactId>onos-apps</artifactId>
9 + <version>1.3.0-SNAPSHOT</version>
10 + <relativePath>../pom.xml</relativePath>
11 + </parent>
12 +
13 + <artifactId>onos-app-vtn</artifactId>
14 + <packaging>bundle</packaging>
15 +
16 +
17 + <properties>
18 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19 + <onos.app.name>org.onosproject.vtn</onos.app.name>
20 + </properties>
21 + <dependencies>
22 + <dependency>
23 + <groupId>javax.ws.rs</groupId>
24 + <artifactId>jsr311-api</artifactId>
25 + <version>1.1.1</version>
26 + </dependency>
27 + <dependency>
28 + <groupId>org.onosproject</groupId>
29 + <artifactId>onos-api</artifactId>
30 + </dependency>
31 + <dependency>
32 + <groupId>org.onosproject</groupId>
33 + <artifactId>onos-incubator-api</artifactId>
34 + </dependency>
35 + <dependency>
36 + <groupId>org.onosproject</groupId>
37 + <artifactId>onos-core-serializers</artifactId>
38 + <version>${project.version}</version>
39 + </dependency>
40 + </dependencies>
41 +</project>
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 + */
16 +package org.onosproject.app.vtn;
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 +}
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 + */
16 +
17 +/**
18 + * VTN application that applies configuration and flows to the device.
19 + */
20 +package org.onosproject.app.vtn;