blob: bb2a0b7d144541ab31204e951f8cf6c77979691d [file] [log] [blame]
Hyunsun Moonab2cf252015-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 Moonab2cf252015-09-10 17:54:10 -070021
22/**
23 * Representation of a node with ovsdb server.
24 */
25public interface OvsdbNode {
26 /**
27 * State of the ovsdb node.
28 */
29 enum State {
Hyunsun Moond0e932a2015-09-15 22:39:16 -070030 INIT, READY, CONNECTED, DISCONNECTED
Hyunsun Moonab2cf252015-09-10 17:54:10 -070031 }
32
33 /**
34 * Returns the IP address of ovsdb server.
35 *
36 * @return ip address
37 */
38 IpAddress ip();
39
40 /**
41 * Returns the port number of ovsdb server.
42 *
43 * @return port number
44 */
45 TpPort port();
46
47 /**
Hyunsun Moond0e932a2015-09-15 22:39:16 -070048 * Returns the hostname of the node.
49 *
50 * @return hostname
51 */
52 String hostname();
53
54 /**
Hyunsun Moonab2cf252015-09-10 17:54:10 -070055 * Returns the state of the node.
56 *
57 * @return state of the node
58 */
Hyunsun Moond0e932a2015-09-15 22:39:16 -070059 State state();
Hyunsun Moonab2cf252015-09-10 17:54:10 -070060
61 /**
62 * Returns the device ID of the node.
63 *
64 * @return device id
65 */
Hyunsun Moond0e932a2015-09-15 22:39:16 -070066 DeviceId deviceId();
Hyunsun Moonab2cf252015-09-10 17:54:10 -070067
68 /**
Hyunsun Moond0e932a2015-09-15 22:39:16 -070069 * Returns the device ID of the bridge associated with this node.
Hyunsun Moonab2cf252015-09-10 17:54:10 -070070 *
Hyunsun Moond0e932a2015-09-15 22:39:16 -070071 * @return device id
Hyunsun Moonab2cf252015-09-10 17:54:10 -070072 */
Hyunsun Moond0e932a2015-09-15 22:39:16 -070073 DeviceId bridgeId();
Hyunsun Moonab2cf252015-09-10 17:54:10 -070074}