Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 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; |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 21 | |
| 22 | /** |
| 23 | * Representation of a node with ovsdb server. |
| 24 | */ |
| 25 | public interface OvsdbNode { |
| 26 | /** |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 27 | * Ovsdb connection state. |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 28 | */ |
| 29 | enum State { |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 30 | INIT, READY, CONNECTED, DISCONNECT, DISCONNECTED |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | /** |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 34 | * Returns the IP address of the ovsdb server. |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 35 | * |
| 36 | * @return ip address |
| 37 | */ |
| 38 | IpAddress ip(); |
| 39 | |
| 40 | /** |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 41 | * Returns the port number of the ovsdb server. |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 42 | * |
| 43 | * @return port number |
| 44 | */ |
| 45 | TpPort port(); |
| 46 | |
| 47 | /** |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 48 | * Returns the host information of the ovsdb server. |
| 49 | * It could be hostname or ip address. |
Hyunsun Moon | e9d7599 | 2015-09-15 22:39:16 -0700 | [diff] [blame] | 50 | * |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 51 | * @return host |
Hyunsun Moon | e9d7599 | 2015-09-15 22:39:16 -0700 | [diff] [blame] | 52 | */ |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 53 | String host(); |
Hyunsun Moon | e9d7599 | 2015-09-15 22:39:16 -0700 | [diff] [blame] | 54 | |
| 55 | /** |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 56 | * Returns the connection state of the ovsdb server. |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 57 | * |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 58 | * @return connection state |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 59 | */ |
Hyunsun Moon | e9d7599 | 2015-09-15 22:39:16 -0700 | [diff] [blame] | 60 | State state(); |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 61 | |
| 62 | /** |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 63 | * Returns the device id of the ovsdb server. |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 64 | * |
| 65 | * @return device id |
| 66 | */ |
Hyunsun Moon | e9d7599 | 2015-09-15 22:39:16 -0700 | [diff] [blame] | 67 | DeviceId deviceId(); |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 68 | |
| 69 | /** |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 70 | * Returns the device id of the integration bridge associated with the node. |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 71 | * |
Hyunsun Moon | e9d7599 | 2015-09-15 22:39:16 -0700 | [diff] [blame] | 72 | * @return device id |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 73 | */ |
Hyunsun Moon | 9661d64 | 2015-09-23 13:24:35 -0700 | [diff] [blame^] | 74 | DeviceId intBrId(); |
Hyunsun Moon | 950f639 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 75 | } |