blob: 75e61d79aa924cda711ca6bbdb354178ec00d550 [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;
21import org.onosproject.net.behaviour.BridgeConfig;
22import org.onosproject.net.behaviour.TunnelConfig;
23
24/**
25 * Representation of a node with ovsdb server.
26 */
27public 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}