public class TeamControllerServiceAdapter extends Object implements TeamControllerService
TeamControllerService
API, provided specifically
for unit tests to use, to insulate themselves from changes in the API.Constructor and Description |
---|
TeamControllerServiceAdapter() |
Modifier and Type | Method and Description |
---|---|
MessageFuture |
enablePort(DataPathId dpid,
BigPortNumber port,
boolean enable)
Instructs the controller to enable or disable the given port on the
specified datapath.
|
Set<DataPathInfo> |
getAllDataPathInfo()
Returns information describing each of the OpenFlow datapaths
currently connected to the controller or team of controller.
|
Set<DataPathInfo> |
getAllLocalDataPathInfo()
Returns information describing each of the OpenFlow datapaths
currently connected to the controller.
|
DataPathInfo |
getDataPathInfo(DataPathId dpid)
Returns information describing a specific OpenFlow datapath.
|
List<MBodyExperimenter> |
getExperimenter(DataPathId dpid)
Lists meters configured on the datapath.
|
List<MBodyFlowStats> |
getFlows(DataPathId dpid,
TableId tableId)
Returns flows installed in the specified table of the given datapath.
|
List<MBodyGroupDescStats> |
getGroupDescription(DataPathId dpid)
Returns the groups description on the specified datapath.
|
MBodyGroupDescStats |
getGroupDescription(DataPathId dpid,
GroupId groupId)
Returns the group description on the specified datapath and groupId.
|
MBodyGroupFeatures |
getGroupFeatures(DataPathId dpid)
Returns the supported group features for the specified datapath.
|
List<MBodyGroupStats> |
getGroupStats(DataPathId dpid)
Returns the groups statistics on the specified datapath.
|
MBodyGroupStats |
getGroupStats(DataPathId dpid,
GroupId groupId)
Returns the group statistics on the specified datapath and groupId.
|
List<MBodyMeterConfig> |
getMeterConfig(DataPathId dpid)
Lists meters configured on the datapath.
|
MBodyMeterConfig |
getMeterConfig(DataPathId dpid,
MeterId meterId)
Returns the meter configuration for the given meter ID, from the
specified datapath.
|
MBodyMeterFeatures |
getMeterFeatures(DataPathId dpid)
Returns the meter features for the specified datapath.
|
List<MBodyMeterStats> |
getMeterStats(DataPathId dpid)
Lists meters configured on the datapath.
|
MBodyMeterStats |
getMeterStats(DataPathId dpid,
MeterId meterId)
Returns the meter statistics for the given meter ID, from the specified
datapath.
|
Port |
getPort(DataPathId dpid,
BigPortNumber portNumber)
Returns the port description for the given port, from the specified
datapath.
|
List<Port> |
getPorts(DataPathId dpid)
Returns the port description from the specified datapath.
|
List<MBodyPortStats> |
getPortStats(DataPathId dpid)
Returns the port statistics from the specified datapath.
|
MBodyPortStats |
getPortStats(DataPathId dpid,
BigPortNumber portNumber)
Returns the port statistics for the given port, from the specified
datapath.
|
Map<UUID,ControllerStats> |
getStats()
Returns statistical information about the controller.
|
List<MessageFuture> |
send(List<OpenflowMessage> msgs,
DataPathId dpid)
Instructs the controller to send the specified list of messages
(in order) to the specified datapath.
|
MessageFuture |
send(OpenflowMessage msg,
DataPathId dpid)
Instructs the controller to send the specified message to the
specified datapath.
|
void |
sendFlowMod(OfmFlowMod flowMod,
DataPathId dpid)
Dispatches the OpenFlow FlowMod message to the given datapath
via the Flow Tracker.
|
MessageFuture |
sendGroupMod(OfmGroupMod groupMod,
DataPathId dpid)
Sends the given GROUP_MOD message to the specified datapath.
|
MessageFuture |
sendMeterMod(OfmMeterMod meterMod,
DataPathId dpid)
Sends the OpenFlow METER_MOD message to the specified datapath.
|
public Set<DataPathInfo> getAllDataPathInfo()
TeamControllerService
getAllDataPathInfo
in interface TeamControllerService
public Set<DataPathInfo> getAllLocalDataPathInfo()
TeamControllerService
getAllLocalDataPathInfo
in interface TeamControllerService
public DataPathInfo getDataPathInfo(DataPathId dpid)
TeamControllerService
getDataPathInfo
in interface TeamControllerService
dpid
- the datapath idpublic MessageFuture send(OpenflowMessage msg, DataPathId dpid) throws OpenflowException
TeamControllerService
send
in interface TeamControllerService
msg
- the OpenFlow message to senddpid
- the OpenFlow datapath to which the message is to be sentOpenflowException
- if there was a problem encoding or sending
the messagepublic List<MessageFuture> send(List<OpenflowMessage> msgs, DataPathId dpid) throws OpenflowException
TeamControllerService
send
in interface TeamControllerService
msgs
- the OpenFlow messages to senddpid
- the OpenFlow datapath to which the messages are to be sentOpenflowException
- if there was a problem encoding or sending
the messagespublic List<MBodyFlowStats> getFlows(DataPathId dpid, TableId tableId)
TeamControllerService
If the specified table ID is TableId.ALL
or null, all flows
from all tables will be returned.
Note that table ID is ignored for OpenFlow 1.0 devices.
getFlows
in interface TeamControllerService
dpid
- the datapath from which the flows are requestedtableId
- the ID of the flow tablepublic void sendFlowMod(OfmFlowMod flowMod, DataPathId dpid) throws OpenflowException
TeamControllerService
Adds the specified flow to the given datapath if the message's
FlowModCommand
is ADD
.
Deletes the specified flow from the given datapath if the message's
FlowModCommand
is DELETE
.
Note that this call is synchronous; blocking until the flow has been accepted or an error occurred.
sendFlowMod
in interface TeamControllerService
flowMod
- the FlowMod message to senddpid
- the target datapathOpenflowException
- if there was a problem encoding
or sending the messagepublic List<MBodyMeterConfig> getMeterConfig(DataPathId dpid)
TeamControllerService
getMeterConfig
in interface TeamControllerService
dpid
- the target datapathpublic MBodyMeterConfig getMeterConfig(DataPathId dpid, MeterId meterId)
TeamControllerService
getMeterConfig
in interface TeamControllerService
dpid
- the target datapathmeterId
- the ID of the meterpublic List<MBodyExperimenter> getExperimenter(DataPathId dpid)
TeamControllerService
getExperimenter
in interface TeamControllerService
dpid
- the target datapathpublic MessageFuture sendMeterMod(OfmMeterMod meterMod, DataPathId dpid) throws OpenflowException
TeamControllerService
Adds the meter to the specified datapath if the message's
command
is ADD
.
Modifies the meter on the specified datapath if the message's
command
is MODIFY
.
Deletes the meter from the specified datapath if the message's
command
is DELETE
.
sendMeterMod
in interface TeamControllerService
meterMod
- OpenFlow METER_MOD message to datapathdpid
- the target datapathOpenflowException
- if there was a problem sending the
METER_MOD messagepublic MBodyGroupDescStats getGroupDescription(DataPathId dpid, GroupId groupId)
TeamControllerService
getGroupDescription
in interface TeamControllerService
dpid
- the target datapathgroupId
- the ID of the grouppublic List<MBodyGroupDescStats> getGroupDescription(DataPathId dpid)
TeamControllerService
getGroupDescription
in interface TeamControllerService
dpid
- the target datapathpublic MBodyGroupStats getGroupStats(DataPathId dpid, GroupId groupId)
TeamControllerService
getGroupStats
in interface TeamControllerService
dpid
- the target datapathgroupId
- the ID of the grouppublic List<MBodyGroupStats> getGroupStats(DataPathId dpid)
TeamControllerService
getGroupStats
in interface TeamControllerService
dpid
- the target datapathpublic MessageFuture sendGroupMod(OfmGroupMod groupMod, DataPathId dpid) throws OpenflowException
TeamControllerService
Adds the group entry to the specified datapath if the message's
command
is ADD
.
Modifies the group entry on the specified datapath if the message's
command
is MODIFY
.
Deletes the group entry from the specified datapath if the message's
command
is DELETE
.
sendGroupMod
in interface TeamControllerService
groupMod
- OpenFlow GROUP_MOD message to datapathdpid
- the target datapathOpenflowException
- if there was a problem sending the
GROUP_MOD messagepublic List<Port> getPorts(DataPathId dpid)
TeamControllerService
getPorts
in interface TeamControllerService
dpid
- the target datapathpublic Port getPort(DataPathId dpid, BigPortNumber portNumber)
TeamControllerService
getPort
in interface TeamControllerService
dpid
- the target datapathportNumber
- the target portpublic Map<UUID,ControllerStats> getStats()
TeamControllerService
getStats
in interface TeamControllerService
public List<MBodyPortStats> getPortStats(DataPathId dpid)
TeamControllerService
Note that this is a synchronous call that blocks until all the port statistics replies have returned from the datapath.
getPortStats
in interface TeamControllerService
dpid
- the target datapathpublic MBodyPortStats getPortStats(DataPathId dpid, BigPortNumber portNumber)
TeamControllerService
Note that this is a synchronous call that blocks until the port statistics reply has returned from the datapath.
getPortStats
in interface TeamControllerService
dpid
- the target datapathportNumber
- the target portpublic List<MBodyMeterStats> getMeterStats(DataPathId dpid)
TeamControllerService
getMeterStats
in interface TeamControllerService
dpid
- the target datapathpublic MBodyMeterStats getMeterStats(DataPathId dpid, MeterId meterId)
TeamControllerService
Note that this is a synchronous call that blocks until the meter statistics reply has returned from the datapath.
getMeterStats
in interface TeamControllerService
dpid
- the target datapathmeterId
- the target meter IDpublic MBodyGroupFeatures getGroupFeatures(DataPathId dpid)
TeamControllerService
Note that this is a synchronous call that blocks until the group features reply has returned from the datapath.
getGroupFeatures
in interface TeamControllerService
dpid
- the target datapathpublic MBodyMeterFeatures getMeterFeatures(DataPathId dpid)
TeamControllerService
Note that this is a synchronous call that blocks until the meter features reply has returned from the datapath.
getMeterFeatures
in interface TeamControllerService
dpid
- the target datapathpublic MessageFuture enablePort(DataPathId dpid, BigPortNumber port, boolean enable)
TeamControllerService
enablePort
in interface TeamControllerService
dpid
- the target datapathport
- the target portenable
- true to enable; false to disableCopyright © 2015. All Rights Reserved.