Hyunsun Moon
Committed by Gerrit Code Review

[Emu] CORD-151 initial sketch for CORD virtual network service

Change-Id: If0dfd71b2c14ed5ebaa28adfb8fefbb26b5ca9fd
1 +<?xml version="1.0" encoding="UTF-8"?>
2 +<!--
3 + ~ Copyright 2014 Open Networking Laboratory
4 + ~
5 + ~ Licensed under the Apache License, Version 2.0 (the "License");
6 + ~ you may not use this file except in compliance with the License.
7 + ~ You may obtain a copy of the License at
8 + ~
9 + ~ http://www.apache.org/licenses/LICENSE-2.0
10 + ~
11 + ~ Unless required by applicable law or agreed to in writing, software
12 + ~ distributed under the License is distributed on an "AS IS" BASIS,
13 + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 + ~ See the License for the specific language governing permissions and
15 + ~ limitations under the License.
16 + -->
17 +<project xmlns="http://maven.apache.org/POM/4.0.0"
18 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 + <modelVersion>4.0.0</modelVersion>
21 +
22 + <parent>
23 + <groupId>org.onosproject</groupId>
24 + <artifactId>onos-apps</artifactId>
25 + <version>1.3.0-SNAPSHOT</version>
26 + <relativePath>../pom.xml</relativePath>
27 + </parent>
28 +
29 + <artifactId>onos-app-cordvtn</artifactId>
30 + <packaging>bundle</packaging>
31 +
32 + <description>Virtual tenant network service for CORD</description>
33 +
34 + <properties>
35 + <onos.app.name>org.onosproject.cordvtn</onos.app.name>
36 + </properties>
37 +
38 + <dependencies>
39 + </dependencies>
40 +
41 +</project>
1 +/*
2 + * Copyright 2014-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.cordvtn;
17 +
18 +import java.util.List;
19 +
20 +/**
21 + * Service for provisioning overlay virtual networks on compute nodes.
22 + */
23 +public interface CordVtnService {
24 + /**
25 + * Adds new nodes to the service and processes initial setup.
26 + *
27 + * @param ovsdbNodes list of nodes
28 + */
29 + void addNodes(List<OvsdbNode> ovsdbNodes);
30 +
31 + /**
32 + * Deletes the nodes from the service and cleans up unnecessary configurations
33 + * associated with the deleted nodes.
34 + *
35 + * @param ovsdbNodes list of nodes
36 + */
37 + void deleteNodes(List<OvsdbNode> ovsdbNodes);
38 +
39 + /**
40 + * Returns the number of the nodes known to the service.
41 + *
42 + * @return number of nodes
43 + */
44 + int getNodeCount();
45 +
46 + /**
47 + * Returns all nodes known to the service.
48 + *
49 + * @return list of nodes
50 + */
51 + List<OvsdbNode> getNodes();
52 +}
1 +/*
2 + * Copyright 2014-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.cordvtn;
17 +
18 +import org.onlab.packet.IpAddress;
19 +import org.onlab.packet.TpPort;
20 +import org.onosproject.net.DeviceId;
21 +import org.onosproject.net.behaviour.BridgeConfig;
22 +import org.onosproject.net.behaviour.TunnelConfig;
23 +
24 +/**
25 + * Representation of a node with ovsdb server.
26 + */
27 +public interface OvsdbNode {
28 + /**
29 + * State of the ovsdb node.
30 + */
31 + enum State {
32 + READY, CONNECTED, DISCONNECTED
33 + }
34 +
35 + /**
36 + * Returns the IP address of ovsdb server.
37 + *
38 + * @return ip address
39 + */
40 + IpAddress ip();
41 +
42 + /**
43 + * Returns the port number of ovsdb server.
44 + *
45 + * @return port number
46 + */
47 + TpPort port();
48 +
49 + /**
50 + * Returns the state of the node.
51 + *
52 + * @return state of the node
53 + */
54 + State getState();
55 +
56 + /**
57 + * Sets the state of the node.
58 + *
59 + * @param state state of the node
60 + */
61 + void setState(State state);
62 +
63 + /**
64 + * Returns the device ID of the node.
65 + *
66 + * @return device id
67 + */
68 + DeviceId getDeviceId();
69 +
70 + /**
71 + * Sets the device id of the node.
72 + *
73 + * @param deviceId device identifier
74 + */
75 + void setDeviceId(DeviceId deviceId);
76 +
77 + /**
78 + * Returns the bridge configuration handler of the node.
79 + *
80 + * @return bridge config behavior instance
81 + */
82 + BridgeConfig getBridgeConfig();
83 +
84 + /**
85 + * Returns the tunnel configuration handler of the node.
86 + *
87 + * @return tunnel config behavior instance
88 + */
89 + TunnelConfig getTunnelConfig();
90 +}
...@@ -58,7 +58,8 @@ ...@@ -58,7 +58,8 @@
58 <module>vtn</module> 58 <module>vtn</module>
59 <module>vtnweb</module> 59 <module>vtnweb</module>
60 <module>dhcp</module> 60 <module>dhcp</module>
61 - </modules> 61 + <module>cordvtn</module>
62 + </modules>
62 63
63 <properties> 64 <properties>
64 <web.context>default</web.context> 65 <web.context>default</web.context>
......