CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 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.ovsdb.controller; |
| 17 | |
Ray Milkey | b125032 | 2017-06-05 17:18:17 -0700 | [diff] [blame] | 18 | import java.util.List; |
tanbangcheng | c944c28 | 2017-11-12 20:42:59 +0800 | [diff] [blame] | 19 | import java.util.Map; |
nitinanand | 9e8f836 | 2018-05-31 15:11:04 +0530 | [diff] [blame^] | 20 | import java.util.Optional; |
Ray Milkey | b125032 | 2017-06-05 17:18:17 -0700 | [diff] [blame] | 21 | import java.util.Set; |
| 22 | |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 23 | import org.onosproject.net.DeviceId; |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 24 | import org.onosproject.net.PortNumber; |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 25 | import org.onosproject.net.behaviour.ControllerInfo; |
nitinanand | 9e8f836 | 2018-05-31 15:11:04 +0530 | [diff] [blame^] | 26 | import org.onosproject.net.behaviour.DeviceCpuStats; |
| 27 | import org.onosproject.net.behaviour.DeviceMemoryStats; |
Pier Ventre | f5d7236 | 2016-07-17 12:02:14 +0200 | [diff] [blame] | 28 | import org.onosproject.net.behaviour.MirroringName; |
Ray Milkey | b125032 | 2017-06-05 17:18:17 -0700 | [diff] [blame] | 29 | import org.onosproject.net.behaviour.MirroringStatistics; |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 30 | import org.onosproject.net.behaviour.QosId; |
tanbangcheng | c944c28 | 2017-11-12 20:42:59 +0800 | [diff] [blame] | 31 | import org.onosproject.net.behaviour.QueueDescription; |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 32 | import org.onosproject.net.behaviour.QueueId; |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 33 | import org.onosproject.ovsdb.rfc.jsonrpc.OvsdbRpc; |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 34 | import org.onosproject.ovsdb.rfc.message.TableUpdates; |
| 35 | import org.onosproject.ovsdb.rfc.notation.Row; |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 36 | import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; |
| 37 | |
Ray Milkey | b125032 | 2017-06-05 17:18:17 -0700 | [diff] [blame] | 38 | import com.google.common.util.concurrent.ListenableFuture; |
nitinanand | 9e8f836 | 2018-05-31 15:11:04 +0530 | [diff] [blame^] | 39 | import org.onosproject.ovsdb.rfc.table.OvsdbTable; |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 40 | |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 41 | /** |
| 42 | * Represents to provider facing side of a node. |
| 43 | */ |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 44 | public interface OvsdbClientService extends OvsdbRpc { |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 45 | /** |
| 46 | * Gets the node identifier. |
| 47 | * |
| 48 | * @return node identifier |
| 49 | */ |
| 50 | OvsdbNodeId nodeId(); |
| 51 | |
| 52 | /** |
Pier Ventre | f5d7236 | 2016-07-17 12:02:14 +0200 | [diff] [blame] | 53 | * Creates a mirror port. Mirrors the traffic |
| 54 | * that goes to selectDstPort or comes from |
| 55 | * selectSrcPort or packets containing selectVlan |
| 56 | * to mirrorPort or to all ports that trunk mirrorVlan. |
| 57 | * |
| 58 | * @param bridgeName the name of the bridge |
| 59 | * @param mirror the OVSDB mirror description |
| 60 | * @return true if mirror creation is successful, false otherwise |
| 61 | */ |
| 62 | boolean createMirror(String bridgeName, OvsdbMirror mirror); |
| 63 | |
| 64 | /** |
| 65 | * Gets the Mirror uuid. |
| 66 | * |
| 67 | * @param mirrorName mirror name |
| 68 | * @return mirror uuid, empty if no uuid is found |
| 69 | */ |
| 70 | String getMirrorUuid(String mirrorName); |
| 71 | |
| 72 | /** |
| 73 | * Gets mirroring statistics of the device. |
| 74 | * |
| 75 | * @param deviceId target device id |
| 76 | * @return set of mirroring statistics; empty if no mirror is found |
| 77 | */ |
| 78 | Set<MirroringStatistics> getMirroringStatistics(DeviceId deviceId); |
| 79 | |
| 80 | /** |
| 81 | * Drops the configuration for mirror. |
| 82 | * |
Ray Milkey | ef79434 | 2016-11-09 16:20:29 -0800 | [diff] [blame] | 83 | * @param mirroringName name of mirror to drop |
Pier Ventre | f5d7236 | 2016-07-17 12:02:14 +0200 | [diff] [blame] | 84 | */ |
| 85 | void dropMirror(MirroringName mirroringName); |
| 86 | |
| 87 | /** |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 88 | * apply qos to port. |
| 89 | * |
| 90 | * @param portNumber port identifier |
| 91 | * @param qosName the qos name |
| 92 | */ |
| 93 | void applyQos(PortNumber portNumber, String qosName); |
| 94 | |
| 95 | /** |
| 96 | * Creates a qos port. |
| 97 | * |
| 98 | * @param portNumber port identifier |
| 99 | */ |
| 100 | void removeQos(PortNumber portNumber); |
| 101 | |
| 102 | /** |
| 103 | * Creates a qos. associates with queue to |
| 104 | * provide the ability of limit the rate of different flows |
| 105 | * depend on itself priority. |
| 106 | * |
| 107 | * @param ovsdbQos the OVSDB Qos |
| 108 | * @return true if qos creation is successful, false otherwise |
| 109 | */ |
| 110 | boolean createQos(OvsdbQos ovsdbQos); |
| 111 | |
| 112 | /** |
| 113 | * Drops the configuration for qos. |
| 114 | * |
| 115 | * @param qosId qos identifier |
| 116 | */ |
| 117 | void dropQos(QosId qosId); |
| 118 | |
| 119 | /** |
| 120 | * Gets a qos of node. |
| 121 | * @param qosId qos identifier |
| 122 | * @return null if no qos is find |
| 123 | */ |
| 124 | OvsdbQos getQos(QosId qosId); |
| 125 | |
| 126 | /** |
| 127 | * Gets qoses of node. |
| 128 | * |
| 129 | * @return set of qoses; empty if no qos is find |
| 130 | */ |
| 131 | Set<OvsdbQos> getQoses(); |
| 132 | |
| 133 | /** |
tanbangcheng | c944c28 | 2017-11-12 20:42:59 +0800 | [diff] [blame] | 134 | * Bind Queue to QoS. |
| 135 | * |
| 136 | * @param qosId qos identifier |
| 137 | * @param queues the Queue key and Queue description |
| 138 | */ |
| 139 | void bindQueues(QosId qosId, Map<Long, QueueDescription> queues); |
| 140 | |
| 141 | /** |
| 142 | * Unbind Queue from QoS. |
| 143 | * |
| 144 | * @param qosId qos identifier |
| 145 | * @param queueKeys queue key |
| 146 | */ |
| 147 | void unbindQueues(QosId qosId, List<Long> queueKeys); |
| 148 | |
| 149 | /** |
Frank Wang | e11a98d | 2016-10-26 17:04:03 +0800 | [diff] [blame] | 150 | * Creates queues. limits the rate of each flow |
| 151 | * depend on itself priority. |
| 152 | * |
| 153 | * @param queue the OVSDB queue description |
| 154 | * @return true if queue creation is successful, false otherwise |
| 155 | */ |
| 156 | boolean createQueue(OvsdbQueue queue); |
| 157 | |
| 158 | /** |
| 159 | * Drops the configuration for queue. |
| 160 | * |
| 161 | * @param queueId queue identifier |
| 162 | */ |
| 163 | void dropQueue(QueueId queueId); |
| 164 | |
| 165 | /** |
| 166 | * Gets a queue of node. |
| 167 | * @param queueId the queue identifier |
| 168 | * @return null if no queue is find |
| 169 | */ |
| 170 | OvsdbQueue getQueue(QueueId queueId); |
| 171 | |
| 172 | /** |
| 173 | * Gets queues of node. |
| 174 | * |
| 175 | * @return set of queues; empty if no queue is find |
| 176 | */ |
| 177 | Set<OvsdbQueue> getQueues(); |
| 178 | |
| 179 | /** |
Hyunsun Moon | dd14e8e | 2016-06-09 16:17:32 -0700 | [diff] [blame] | 180 | * Creates an interface with a given OVSDB interface description. |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 181 | * |
Hyunsun Moon | dd14e8e | 2016-06-09 16:17:32 -0700 | [diff] [blame] | 182 | * @param bridgeName bridge name |
| 183 | * @param ovsdbIface ovsdb interface description |
| 184 | * @return true if interface creation is successful, false otherwise |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 185 | */ |
Hyunsun Moon | dd14e8e | 2016-06-09 16:17:32 -0700 | [diff] [blame] | 186 | boolean createInterface(String bridgeName, OvsdbInterface ovsdbIface); |
| 187 | |
| 188 | /** |
| 189 | * Removes an interface with the supplied interface name. |
| 190 | * |
| 191 | * @param ifaceName interface name |
| 192 | * @return true if interface creation is successful, false otherwise |
| 193 | */ |
| 194 | boolean dropInterface(String ifaceName); |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 195 | |
| 196 | /** |
Hyunsun Moon | 1251e19 | 2016-06-07 16:57:05 -0700 | [diff] [blame] | 197 | * Creates a bridge with a given bridge description. |
| 198 | * |
| 199 | * @param ovsdbBridge ovsdb bridge description |
| 200 | * @return true if bridge creation is successful, otherwise false |
| 201 | */ |
| 202 | boolean createBridge(OvsdbBridge ovsdbBridge); |
| 203 | |
| 204 | /** |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 205 | * Drops a bridge. |
| 206 | * |
| 207 | * @param bridgeName bridge name |
| 208 | */ |
| 209 | void dropBridge(String bridgeName); |
| 210 | |
| 211 | /** |
BitOhenry | 264f35a | 2015-11-03 20:58:39 +0800 | [diff] [blame] | 212 | * Gets bridges of node. |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 213 | * |
| 214 | * @return set of bridges; empty if no bridge is find |
| 215 | */ |
| 216 | Set<OvsdbBridge> getBridges(); |
| 217 | |
| 218 | /** |
BitOhenry | 264f35a | 2015-11-03 20:58:39 +0800 | [diff] [blame] | 219 | * Gets controllers of node. |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 220 | * |
Brian O'Connor | 5251562 | 2015-10-09 17:03:44 -0700 | [diff] [blame] | 221 | * @param openflowDeviceId target device id |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 222 | * @return set of controllers; empty if no controller is find |
| 223 | */ |
| 224 | Set<ControllerInfo> getControllers(DeviceId openflowDeviceId); |
| 225 | |
| 226 | /** |
Hyunsun Moon | 1251e19 | 2016-06-07 16:57:05 -0700 | [diff] [blame] | 227 | * Returns local controller information. |
| 228 | * The connection is a TCP connection to the local ONOS instance's IP |
| 229 | * and the default OpenFlow port. |
| 230 | * |
| 231 | * @return local controller |
| 232 | */ |
| 233 | ControllerInfo localController(); |
| 234 | |
| 235 | /** |
Brian O'Connor | 6ee8aa3 | 2015-10-09 16:07:42 -0700 | [diff] [blame] | 236 | * Sets the Controllers for the specified device. |
Brian O'Connor | 5251562 | 2015-10-09 17:03:44 -0700 | [diff] [blame] | 237 | * <p> |
Brian O'Connor | 6ee8aa3 | 2015-10-09 16:07:42 -0700 | [diff] [blame] | 238 | * This method will replace the existing controller list with the new controller |
| 239 | * list. |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 240 | * |
Brian O'Connor | 6ee8aa3 | 2015-10-09 16:07:42 -0700 | [diff] [blame] | 241 | * @param deviceId device id (likely Openflow device) |
| 242 | * @param controllers list of controllers |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 243 | */ |
| 244 | void setControllersWithDeviceId(DeviceId deviceId, List<ControllerInfo> controllers); |
| 245 | |
| 246 | /** |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 247 | * Creates a port. |
| 248 | * |
| 249 | * @param bridgeName bridge name |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 250 | * @param portName port name |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 251 | */ |
| 252 | void createPort(String bridgeName, String portName); |
| 253 | |
| 254 | /** |
| 255 | * Drops a port. |
| 256 | * |
| 257 | * @param bridgeName bridge name |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 258 | * @param portName port name |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 259 | */ |
| 260 | void dropPort(String bridgeName, String portName); |
| 261 | |
| 262 | /** |
BitOhenry | 264f35a | 2015-11-03 20:58:39 +0800 | [diff] [blame] | 263 | * Gets ports of bridge. |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 264 | * |
| 265 | * @return set of ports; empty if no ports is find |
| 266 | */ |
| 267 | Set<OvsdbPort> getPorts(); |
| 268 | |
| 269 | /** |
| 270 | * Checks if the node is still connected. |
| 271 | * |
| 272 | * @return true if the node is still connected |
| 273 | */ |
| 274 | boolean isConnected(); |
| 275 | |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 276 | /** |
| 277 | * Gets the Bridge uuid. |
| 278 | * |
| 279 | * @param bridgeName bridge name |
| 280 | * @return bridge uuid, empty if no uuid is find |
| 281 | */ |
| 282 | String getBridgeUuid(String bridgeName); |
| 283 | |
| 284 | /** |
| 285 | * Gets the Port uuid. |
| 286 | * |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 287 | * @param portName port name |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 288 | * @param bridgeUuid bridge uuid |
| 289 | * @return port uuid, empty if no uuid is find |
| 290 | */ |
| 291 | String getPortUuid(String portName, String bridgeUuid); |
| 292 | |
| 293 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 294 | * Gets the OVSDB database schema. |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 295 | * |
| 296 | * @param dbName database name |
| 297 | * @return database schema |
| 298 | */ |
| 299 | ListenableFuture<DatabaseSchema> getOvsdbSchema(String dbName); |
| 300 | |
| 301 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 302 | * Gets the OVSDB table updates. |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 303 | * |
| 304 | * @param dbName database name |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 305 | * @param id random uuid |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 306 | * @return table updates |
| 307 | */ |
| 308 | ListenableFuture<TableUpdates> monitorTables(String dbName, String id); |
| 309 | |
| 310 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 311 | * Gets the OVSDB database schema from local. |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 312 | * |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 313 | * @param dbName database name |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 314 | * @return database schema |
| 315 | */ |
| 316 | DatabaseSchema getDatabaseSchema(String dbName); |
| 317 | |
| 318 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 319 | * Gets the OVSDB row from local OVSDB store. |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 320 | * |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 321 | * @param dbName database name |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 322 | * @param tableName table name |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 323 | * @param uuid row uuid |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 324 | * @return row OVSDB row |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 325 | */ |
| 326 | Row getRow(String dbName, String tableName, String uuid); |
| 327 | |
| 328 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 329 | * Removes the OVSDB row from local OVSDB store. |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 330 | * |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 331 | * @param dbName database name |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 332 | * @param tableName table name |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 333 | * @param uuid row uuid |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 334 | */ |
| 335 | void removeRow(String dbName, String tableName, String uuid); |
| 336 | |
| 337 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 338 | * Updates the local OVSDB store. |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 339 | * |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 340 | * @param dbName database name |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 341 | * @param tableName table name |
andrea | ed976a4 | 2015-10-05 14:38:25 -0700 | [diff] [blame] | 342 | * @param uuid row uuid |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 343 | * @param row OVSDB row |
YuanyouZhang | d06bb6b | 2015-08-05 16:59:07 +0800 | [diff] [blame] | 344 | */ |
| 345 | void updateOvsdbStore(String dbName, String tableName, String uuid, Row row); |
| 346 | |
CNlucius | a66c397 | 2015-09-06 20:31:29 +0800 | [diff] [blame] | 347 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 348 | * Gets OVSDB local ports. |
CNlucius | a66c397 | 2015-09-06 20:31:29 +0800 | [diff] [blame] | 349 | * |
| 350 | * @param ifaceids the ifaceid that needed |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 351 | * @return OVSDB ports |
CNlucius | a66c397 | 2015-09-06 20:31:29 +0800 | [diff] [blame] | 352 | */ |
| 353 | Set<OvsdbPort> getLocalPorts(Iterable<String> ifaceids); |
Hyunsun Moon | 5fb20a5 | 2015-09-25 17:02:33 -0700 | [diff] [blame] | 354 | |
| 355 | /** |
BitOhenry | 3f28c68 | 2015-11-07 10:40:03 +0800 | [diff] [blame] | 356 | * Disconnects the OVSDB server. |
Hyunsun Moon | 5fb20a5 | 2015-09-25 17:02:33 -0700 | [diff] [blame] | 357 | */ |
| 358 | void disconnect(); |
Saritha | 1583a6f | 2017-06-16 14:42:58 +0530 | [diff] [blame] | 359 | |
| 360 | /** |
| 361 | * Gets created ports for the particular bridgeId. |
| 362 | * |
| 363 | * @param portNames the portNames which needs to checked for create |
| 364 | * @param bridgeId bridgeIdentifier |
| 365 | * @return OvsdbPortNames the created ports from port table for the bridgeId by considering input port list. |
| 366 | * Considered port as created if port's interface table also gets created,irrespective |
| 367 | * of ofport value(has errors or not) |
| 368 | */ |
| 369 | public List<OvsdbPortName> getPorts(List<String> portNames, DeviceId bridgeId); |
| 370 | |
| 371 | /** |
| 372 | * Gets error status for the given portNames. |
| 373 | * |
| 374 | * @param portNames the portNames which need to be checked for errors |
| 375 | * @param bridgeId bridgeIdentifier |
| 376 | * @return errorstatus true if input port list contains error, false otherwise |
| 377 | */ |
| 378 | boolean getPortError(List<OvsdbPortName> portNames, DeviceId bridgeId); |
nitinanand | 9e8f836 | 2018-05-31 15:11:04 +0530 | [diff] [blame^] | 379 | |
| 380 | /** |
| 381 | * Gets First row for the given table of given DB. |
| 382 | * |
| 383 | * @param dbName db name |
| 384 | * @param tblName table name |
| 385 | * @return first table entry |
| 386 | */ |
| 387 | |
| 388 | public Optional<Object> getFirstRow(String dbName, OvsdbTable tblName); |
| 389 | |
| 390 | /** |
| 391 | * Gets device CPU usage in percentage. |
| 392 | * @return device memory usage. |
| 393 | */ |
| 394 | Optional<DeviceCpuStats> getDeviceCpuUsage(); |
| 395 | |
| 396 | /** |
| 397 | * Gets device memory usage in kilobytes. |
| 398 | * @return device memory usage. |
| 399 | */ |
| 400 | Optional<DeviceMemoryStats> getDeviceMemoryUsage(); |
| 401 | |
CNlucius | 74fd494 | 2015-07-20 14:28:04 +0800 | [diff] [blame] | 402 | } |