blob: 296bd439207b77ee4f852e55eeb86e59ec212f58 [file] [log] [blame]
Hyunsun Moon950f6392015-09-10 17:54:10 -07001/*
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 */
16package org.onosproject.cordvtn;
17
18import org.onlab.packet.IpAddress;
19import org.onlab.packet.TpPort;
20import org.onosproject.net.DeviceId;
Hyunsun Moon950f6392015-09-10 17:54:10 -070021
22/**
23 * Representation of a node with ovsdb server.
24 */
25public interface OvsdbNode {
26 /**
Hyunsun Moon9661d642015-09-23 13:24:35 -070027 * Ovsdb connection state.
Hyunsun Moon950f6392015-09-10 17:54:10 -070028 */
29 enum State {
Hyunsun Moon9661d642015-09-23 13:24:35 -070030 INIT, READY, CONNECTED, DISCONNECT, DISCONNECTED
Hyunsun Moon950f6392015-09-10 17:54:10 -070031 }
32
33 /**
Hyunsun Moon9661d642015-09-23 13:24:35 -070034 * Returns the IP address of the ovsdb server.
Hyunsun Moon950f6392015-09-10 17:54:10 -070035 *
36 * @return ip address
37 */
38 IpAddress ip();
39
40 /**
Hyunsun Moon9661d642015-09-23 13:24:35 -070041 * Returns the port number of the ovsdb server.
Hyunsun Moon950f6392015-09-10 17:54:10 -070042 *
43 * @return port number
44 */
45 TpPort port();
46
47 /**
Hyunsun Moon9661d642015-09-23 13:24:35 -070048 * Returns the host information of the ovsdb server.
49 * It could be hostname or ip address.
Hyunsun Moone9d75992015-09-15 22:39:16 -070050 *
Hyunsun Moon9661d642015-09-23 13:24:35 -070051 * @return host
Hyunsun Moone9d75992015-09-15 22:39:16 -070052 */
Hyunsun Moon9661d642015-09-23 13:24:35 -070053 String host();
Hyunsun Moone9d75992015-09-15 22:39:16 -070054
55 /**
Hyunsun Moon9661d642015-09-23 13:24:35 -070056 * Returns the connection state of the ovsdb server.
Hyunsun Moon950f6392015-09-10 17:54:10 -070057 *
Hyunsun Moon9661d642015-09-23 13:24:35 -070058 * @return connection state
Hyunsun Moon950f6392015-09-10 17:54:10 -070059 */
Hyunsun Moone9d75992015-09-15 22:39:16 -070060 State state();
Hyunsun Moon950f6392015-09-10 17:54:10 -070061
62 /**
Hyunsun Moon9661d642015-09-23 13:24:35 -070063 * Returns the device id of the ovsdb server.
Hyunsun Moon950f6392015-09-10 17:54:10 -070064 *
65 * @return device id
66 */
Hyunsun Moone9d75992015-09-15 22:39:16 -070067 DeviceId deviceId();
Hyunsun Moon950f6392015-09-10 17:54:10 -070068
69 /**
Hyunsun Moon9661d642015-09-23 13:24:35 -070070 * Returns the device id of the integration bridge associated with the node.
Hyunsun Moon950f6392015-09-10 17:54:10 -070071 *
Hyunsun Moone9d75992015-09-15 22:39:16 -070072 * @return device id
Hyunsun Moon950f6392015-09-10 17:54:10 -070073 */
Hyunsun Moon9661d642015-09-23 13:24:35 -070074 DeviceId intBrId();
Hyunsun Moon950f6392015-09-10 17:54:10 -070075}