public class DefaultOvsdbClient extends Object implements OvsdbProviderService, OvsdbClientService
| Constructor and Description |
|---|
DefaultOvsdbClient(OvsdbNodeId nodeId)
Creates an OvsdbClient.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
createBridge(OvsdbBridge ovsdbBridge)
Creates a bridge with a given bridge description.
|
void |
createBridge(String bridgeName)
Deprecated.
|
boolean |
createBridge(String bridgeName,
String dpid,
List<org.onosproject.net.behaviour.ControllerInfo> controllers)
Deprecated.
|
void |
createBridge(String bridgeName,
String dpid,
String exPortName)
Deprecated.
|
boolean |
createInterface(String bridgeName,
OvsdbInterface ovsdbIface)
Creates an interface with a given OVSDB interface description.
|
boolean |
createMirror(String bridgeName,
OvsdbMirror mirror)
Creates a mirror port.
|
void |
createPort(String bridgeName,
String portName)
Creates a port.
|
boolean |
createTunnel(String bridgeName,
String ifaceName,
String tunnelType,
Map<String,String> options)
Deprecated.
|
void |
disconnect()
Disconnects the OVSDB server.
|
void |
dropBridge(String bridgeName)
Drops a bridge.
|
boolean |
dropInterface(String ifaceName)
Removes an interface with the supplied interface name.
|
void |
dropMirror(org.onosproject.net.behaviour.MirroringName mirroringName)
Drops the configuration for mirror.
|
void |
dropPort(String bridgeName,
String portName)
Drops a port.
|
void |
dropTunnel(org.onlab.packet.IpAddress srcIp,
org.onlab.packet.IpAddress dstIp)
Deprecated.
|
com.google.common.util.concurrent.ListenableFuture<List<String>> |
echo()
The "echo" method can be used by both clients and servers to verify the
liveness of a database connection.
|
Set<OvsdbBridge> |
getBridges()
Gets bridges of node.
|
String |
getBridgeUuid(String bridgeName)
Gets the Bridge uuid.
|
Set<org.onosproject.net.behaviour.ControllerInfo> |
getControllers(org.onosproject.net.DeviceId openflowDeviceId)
Gets controllers of node.
|
DatabaseSchema |
getDatabaseSchema(String dbName)
Gets the OVSDB database schema from local.
|
Set<OvsdbPort> |
getLocalPorts(Iterable<String> ifaceids)
Gets OVSDB local ports.
|
Set<org.onosproject.net.behaviour.MirroringStatistics> |
getMirroringStatistics(org.onosproject.net.DeviceId deviceId)
Gets mirrors of the device.
|
String |
getMirrorUuid(String mirrorName)
Gets the Mirror uuid.
|
com.google.common.util.concurrent.ListenableFuture<DatabaseSchema> |
getOvsdbSchema(String dbName)
Gets the OVSDB database schema.
|
Set<OvsdbPort> |
getPorts()
Gets ports of bridge.
|
String |
getPortUuid(String portName,
String bridgeUuid)
Gets the Port uuid.
|
Row |
getRow(String dbName,
String tableName,
String uuid)
Gets the ovsdb row.
|
com.google.common.util.concurrent.ListenableFuture<com.fasterxml.jackson.databind.JsonNode> |
getSchema(List<String> dbnames)
This operation retrieves a database-schema that describes hosted database
db-name.
|
boolean |
isConnected()
Checks if the node is still connected.
|
com.google.common.util.concurrent.ListenableFuture<List<String>> |
listDbs()
This operation retrieves an array whose elements are the names of the
databases that can be accessed over this management protocol connection.
|
org.onosproject.net.behaviour.ControllerInfo |
localController()
Returns local controller information.
|
com.google.common.util.concurrent.ListenableFuture<com.fasterxml.jackson.databind.JsonNode> |
monitor(DatabaseSchema dbSchema,
String monitorId)
The "monitor" request enables a client to replicate tables or subsets of
tables within an OVSDB database by requesting notifications of changes to
those tables and by receiving the complete initial state of a table or a
subset of a table.
|
com.google.common.util.concurrent.ListenableFuture<TableUpdates> |
monitorTables(String dbName,
String id)
Gets the OVSDB table updates.
|
void |
nodeAdded()
Announces to the ovsdb agent that this node has added.
|
OvsdbNodeId |
nodeId()
Gets the node identifier.
|
void |
nodeRemoved()
Announces to the ovsdb agent that this node has removed.
|
void |
processRequest(com.fasterxml.jackson.databind.JsonNode requestJson)
processes request from ovsdb.
|
void |
processResult(com.fasterxml.jackson.databind.JsonNode response)
Processes result from ovsdb.
|
void |
removeRow(String dbName,
String tableName,
String uuid)
Removes the OVSDB row from local OVSDB store.
|
void |
setAgent(OvsdbAgent agent)
Sets the ovsdb agent to be used.
|
void |
setCallback(Callback monitorCallback)
Sets call back.
|
void |
setChannel(io.netty.channel.Channel channel)
Sets the associated Netty channel for this node.
|
void |
setConnection(boolean connected)
Sets whether the node is connected.
|
void |
setControllersWithDeviceId(org.onosproject.net.DeviceId deviceId,
List<org.onosproject.net.behaviour.ControllerInfo> controllers)
Sets the Controllers for the specified device.
|
com.google.common.util.concurrent.ListenableFuture<List<com.fasterxml.jackson.databind.JsonNode>> |
transact(DatabaseSchema dbSchema,
List<Operation> operations)
This RPC method causes the database server to execute a series of
operations in the specified order on a given database.
|
void |
updateOvsdbStore(String dbName,
String tableName,
String uuid,
Row row)
Updates the local OVSDB store.
|
public DefaultOvsdbClient(OvsdbNodeId nodeId)
nodeId - ovsdb node idpublic OvsdbNodeId nodeId()
OvsdbClientServicenodeId in interface OvsdbClientServicepublic void setAgent(OvsdbAgent agent)
OvsdbProviderServicesetAgent in interface OvsdbProviderServiceagent - the agent to set.public void setChannel(io.netty.channel.Channel channel)
OvsdbProviderServicesetChannel in interface OvsdbProviderServicechannel - the Netty channelpublic void setConnection(boolean connected)
OvsdbProviderServicesetConnection in interface OvsdbProviderServiceconnected - whether the node is connectedpublic boolean isConnected()
OvsdbClientServiceisConnected in interface OvsdbClientServicepublic void nodeAdded()
OvsdbProviderServicenodeAdded in interface OvsdbProviderServicepublic void nodeRemoved()
OvsdbProviderServicenodeRemoved in interface OvsdbProviderServicepublic Row getRow(String dbName, String tableName, String uuid)
getRow in interface OvsdbClientServicedbName - the ovsdb database nametableName - the ovsdb table nameuuid - the key of the rowpublic void removeRow(String dbName, String tableName, String uuid)
OvsdbClientServiceremoveRow in interface OvsdbClientServicedbName - database nametableName - table nameuuid - row uuidpublic void updateOvsdbStore(String dbName, String tableName, String uuid, Row row)
OvsdbClientServiceupdateOvsdbStore in interface OvsdbClientServicedbName - database nametableName - table nameuuid - row uuidrow - OVSDB rowpublic String getMirrorUuid(String mirrorName)
getMirrorUuid in interface OvsdbClientServicemirrorName - mirror namepublic Set<org.onosproject.net.behaviour.MirroringStatistics> getMirroringStatistics(org.onosproject.net.DeviceId deviceId)
getMirroringStatistics in interface OvsdbClientServicedeviceId - target device idpublic String getPortUuid(String portName, String bridgeUuid)
OvsdbClientServicegetPortUuid in interface OvsdbClientServiceportName - port namebridgeUuid - bridge uuidpublic String getBridgeUuid(String bridgeName)
OvsdbClientServicegetBridgeUuid in interface OvsdbClientServicebridgeName - bridge namepublic void createPort(String bridgeName, String portName)
OvsdbClientServicecreatePort in interface OvsdbClientServicebridgeName - bridge nameportName - port namepublic void dropPort(String bridgeName, String portName)
OvsdbClientServicedropPort in interface OvsdbClientServicebridgeName - bridge nameportName - port name@Deprecated public void createBridge(String bridgeName)
OvsdbClientServicecreateBridge in interface OvsdbClientServicebridgeName - bridge name@Deprecated public void createBridge(String bridgeName, String dpid, String exPortName)
OvsdbClientServicecreateBridge in interface OvsdbClientServicebridgeName - bridge namedpid - data path idexPortName - external port name@Deprecated public boolean createBridge(String bridgeName, String dpid, List<org.onosproject.net.behaviour.ControllerInfo> controllers)
OvsdbClientServicecreateBridge in interface OvsdbClientServicebridgeName - bridge namedpid - data path idcontrollers - controllerspublic boolean createBridge(OvsdbBridge ovsdbBridge)
OvsdbClientServicecreateBridge in interface OvsdbClientServiceovsdbBridge - ovsdb bridge descriptionpublic org.onosproject.net.behaviour.ControllerInfo localController()
OvsdbClientServicelocalController in interface OvsdbClientServicepublic void setControllersWithDeviceId(org.onosproject.net.DeviceId deviceId,
List<org.onosproject.net.behaviour.ControllerInfo> controllers)
OvsdbClientServiceThis method will replace the existing controller list with the new controller list.
setControllersWithDeviceId in interface OvsdbClientServicedeviceId - device id (likely Openflow device)controllers - list of controllerspublic void dropBridge(String bridgeName)
OvsdbClientServicedropBridge in interface OvsdbClientServicebridgeName - bridge namepublic boolean createMirror(String bridgeName, OvsdbMirror mirror)
createMirror in interface OvsdbClientServicemirror - the OVSDB mirror descriptionbridgeName - the name of the bridgepublic void dropMirror(org.onosproject.net.behaviour.MirroringName mirroringName)
dropMirror in interface OvsdbClientServicemirroringName - name of mirror to drop@Deprecated public boolean createTunnel(String bridgeName, String ifaceName, String tunnelType, Map<String,String> options)
OvsdbClientServicecreateTunnel in interface OvsdbClientServicebridgeName - bridge nameifaceName - port nametunnelType - tunnel typeoptions - tunnel options@Deprecated public void dropTunnel(org.onlab.packet.IpAddress srcIp, org.onlab.packet.IpAddress dstIp)
OvsdbClientServicedropTunnel in interface OvsdbClientServicesrcIp - source IP addressdstIp - destination IP addresspublic boolean createInterface(String bridgeName, OvsdbInterface ovsdbIface)
OvsdbClientServicecreateInterface in interface OvsdbClientServicebridgeName - bridge nameovsdbIface - ovsdb interface descriptionpublic boolean dropInterface(String ifaceName)
OvsdbClientServicedropInterface in interface OvsdbClientServiceifaceName - interface namepublic com.google.common.util.concurrent.ListenableFuture<DatabaseSchema> getOvsdbSchema(String dbName)
OvsdbClientServicegetOvsdbSchema in interface OvsdbClientServicedbName - database namepublic com.google.common.util.concurrent.ListenableFuture<TableUpdates> monitorTables(String dbName, String id)
OvsdbClientServicemonitorTables in interface OvsdbClientServicedbName - database nameid - random uuidpublic com.google.common.util.concurrent.ListenableFuture<com.fasterxml.jackson.databind.JsonNode> getSchema(List<String> dbnames)
OvsdbRpcpublic com.google.common.util.concurrent.ListenableFuture<List<String>> echo()
OvsdbRpcpublic com.google.common.util.concurrent.ListenableFuture<com.fasterxml.jackson.databind.JsonNode> monitor(DatabaseSchema dbSchema, String monitorId)
OvsdbRpcpublic com.google.common.util.concurrent.ListenableFuture<List<String>> listDbs()
OvsdbRpcpublic com.google.common.util.concurrent.ListenableFuture<List<com.fasterxml.jackson.databind.JsonNode>> transact(DatabaseSchema dbSchema, List<Operation> operations)
OvsdbRpcpublic void processResult(com.fasterxml.jackson.databind.JsonNode response)
OvsdbProviderServiceprocessResult in interface OvsdbProviderServiceresponse - JsonNode response from ovsdbpublic void processRequest(com.fasterxml.jackson.databind.JsonNode requestJson)
OvsdbProviderServiceprocessRequest in interface OvsdbProviderServicerequestJson - JsonNode request from ovsdbpublic void setCallback(Callback monitorCallback)
OvsdbProviderServicesetCallback in interface OvsdbProviderServicemonitorCallback - the callback to setpublic Set<OvsdbBridge> getBridges()
OvsdbClientServicegetBridges in interface OvsdbClientServicepublic Set<org.onosproject.net.behaviour.ControllerInfo> getControllers(org.onosproject.net.DeviceId openflowDeviceId)
OvsdbClientServicegetControllers in interface OvsdbClientServiceopenflowDeviceId - target device idpublic Set<OvsdbPort> getPorts()
OvsdbClientServicegetPorts in interface OvsdbClientServicepublic DatabaseSchema getDatabaseSchema(String dbName)
OvsdbClientServicegetDatabaseSchema in interface OvsdbClientServicedbName - database namepublic Set<OvsdbPort> getLocalPorts(Iterable<String> ifaceids)
OvsdbClientServicegetLocalPorts in interface OvsdbClientServiceifaceids - the ifaceid that neededpublic void disconnect()
OvsdbClientServicedisconnect in interface OvsdbClientService