|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IFloodlightProviderService
The interface exposed by the core bundle that allows you to interact with connected switches.
| Nested Class Summary | |
|---|---|
static class |
IFloodlightProviderService.Role
The role of the controller as used by the OF 1.2 and OVS failover and load-balancing mechanism. |
| Field Summary | |
|---|---|
static FloodlightContextStore<Ethernet> |
bcStore
A FloodlightContextStore object that can be used to retrieve the packet-in payload |
static java.lang.String |
CONTEXT_PI_PAYLOAD
A value stored in the floodlight context containing a parsed packet representation of the payload of a packet-in message. |
| Method Summary | |
|---|---|
void |
addHAListener(IHAListener listener)
Adds a listener for HA role events |
void |
addInfoProvider(java.lang.String type,
IInfoProvider provider)
Add an info provider of a particular type |
void |
addOFMessageListener(OFType type,
IOFMessageListener listener)
Adds an OpenFlow message listener |
void |
addOFSwitchDriver(java.lang.String desc,
IOFSwitchDriver driver)
Adds an OFSwitch driver |
void |
addOFSwitchListener(IOFSwitchListener listener)
Add a switch listener |
void |
addReadyForReconcileListener(IReadyForReconcileListener l)
Add a listener for ready-for-flow-reconcile events |
void |
addSwitchEvent(long switchDPID,
java.lang.String reason,
boolean flushNow)
Record a switch event in in-memory debug-event |
java.util.Set<java.lang.Long> |
getAllSwitchDpids()
Returns a snapshot of the set DPIDs for all known switches. |
java.util.Map<java.lang.Long,IOFSwitch> |
getAllSwitchMap()
Return a snapshot FIXME: asdf |
java.util.Map<java.lang.String,java.lang.Object> |
getControllerInfo(java.lang.String type)
Return information of a particular type (for rest services) |
java.util.Map<java.lang.String,java.lang.String> |
getControllerNodeIPs()
Get the current mapping of controller IDs to their IP addresses Returns a copy of the current mapping. |
java.util.Map<OFType,java.util.List<IOFMessageListener>> |
getListeners()
Return a non-modifiable list of all current listeners |
java.util.Map<java.lang.String,java.lang.Long> |
getMemory()
Get controller memory information |
FloodlightFactory |
getOFMessageFactory()
Gets the FloodlightFactory |
IFloodlightProviderService.Role |
getRole()
Get the current role of the controller |
RoleInfo |
getRoleInfo()
Get the current role of the controller |
IOFSwitch |
getSwitch(long dpid)
If the switch with the given DPID is known to any controller in the cluster, this method returns the associated IOFSwitch instance. |
long |
getSystemStartTime()
Return the controller start time in milliseconds |
java.util.Set<java.lang.String> |
getUplinkPortPrefixSet()
Get the set of port prefixes that will define an UPLINK port. |
java.lang.Long |
getUptime()
returns the uptime of this controller. |
void |
handleOutgoingMessage(IOFSwitch sw,
OFMessage m,
FloodlightContext bc)
Process written messages through the message listeners for the controller |
boolean |
injectOfMessage(IOFSwitch sw,
OFMessage msg)
Re-injects an OFMessage back into the packet processing chain |
boolean |
injectOfMessage(IOFSwitch sw,
OFMessage msg,
FloodlightContext bContext)
Re-injects an OFMessage back into the packet processing chain |
void |
removeHAListener(IHAListener listener)
Removes a listener for HA role events |
void |
removeInfoProvider(java.lang.String type,
IInfoProvider provider)
Remove an info provider of a particular type |
void |
removeOFMessageListener(OFType type,
IOFMessageListener listener)
Removes an OpenFlow message listener |
void |
removeOFSwitchListener(IOFSwitchListener listener)
Remove a switch listener |
void |
run()
Run the main I/O loop of the Controller. |
void |
setAlwaysClearFlowsOnSwActivate(boolean value)
Configure controller to always clear the flow table on the switch, when it connects to controller. |
void |
setRole(IFloodlightProviderService.Role role,
java.lang.String changeDescription)
Set the role of the controller |
void |
terminate()
Terminate the process |
| Field Detail |
|---|
static final java.lang.String CONTEXT_PI_PAYLOAD
static final FloodlightContextStore<Ethernet> bcStore
| Method Detail |
|---|
void addOFMessageListener(OFType type,
IOFMessageListener listener)
type - The OFType the component wants to listen forlistener - The component that wants to listen for the message
void removeOFMessageListener(OFType type,
IOFMessageListener listener)
type - The OFType the component no long wants to listen forlistener - The component that no longer wants to receive the messagejava.util.Map<OFType,java.util.List<IOFMessageListener>> getListeners()
IOFSwitch getSwitch(long dpid)
dpid - the dpid of the switch to query
java.util.Set<java.lang.Long> getAllSwitchDpids()
getSwitch(long) for what "known" switch is.
java.util.Map<java.lang.Long,IOFSwitch> getAllSwitchMap()
IFloodlightProviderService.Role getRole()
RoleInfo getRoleInfo()
java.util.Map<java.lang.String,java.lang.String> getControllerNodeIPs()
IHAListener
void setRole(IFloodlightProviderService.Role role,
java.lang.String changeDescription)
role - The new role for the controller nodechangeDescription - The reason or other information for this role changevoid addOFSwitchListener(IOFSwitchListener listener)
listener - The module that wants to listen for eventsvoid removeOFSwitchListener(IOFSwitchListener listener)
listener - The The module that no longer wants to listen for eventsvoid addHAListener(IHAListener listener)
listener - The module that wants to listen for eventsvoid removeHAListener(IHAListener listener)
listener - The module that no longer wants to listen for eventsvoid addReadyForReconcileListener(IReadyForReconcileListener l)
l - void terminate()
boolean injectOfMessage(IOFSwitch sw,
OFMessage msg)
sw - The switch to use for the messagemsg - the message to inject
java.lang.NullPointerException - if switch or msg is null
boolean injectOfMessage(IOFSwitch sw,
OFMessage msg,
FloodlightContext bContext)
sw - The switch to use for the messagemsg - the message to injectbContext - a floodlight context to use if required. Can be null
java.lang.NullPointerException - if switch or msg is null
void handleOutgoingMessage(IOFSwitch sw,
OFMessage m,
FloodlightContext bc)
sw - The switch being written tom - the messagebc - any accompanying context object. Can be null in which case a
new context will be allocated and passed to listeners
java.lang.NullPointerException - if switch or msg is nullFloodlightFactory getOFMessageFactory()
void run()
run in interface java.lang.Runnable
void addInfoProvider(java.lang.String type,
IInfoProvider provider)
type - provider -
void removeInfoProvider(java.lang.String type,
IInfoProvider provider)
type - provider - java.util.Map<java.lang.String,java.lang.Object> getControllerInfo(java.lang.String type)
type -
long getSystemStartTime()
void setAlwaysClearFlowsOnSwActivate(boolean value)
java.util.Map<java.lang.String,java.lang.Long> getMemory()
java.lang.Long getUptime()
void addOFSwitchDriver(java.lang.String desc,
IOFSwitchDriver driver)
manufacturerDescriptionPrefix - Register the given prefix
with the driver.driver - A IOFSwitchDriver instance to handle IOFSwitch instaniation
for the given manufacturer description prefix
java.lang.IllegalStateException - If the the manufacturer description is
already registered
NullPointerExeption - if manufacturerDescriptionPrefix is null
NullPointerExeption - if driver is null
void addSwitchEvent(long switchDPID,
java.lang.String reason,
boolean flushNow)
switchDPID - reason - Reason for this eventflushNow - see debug-event flushing in IDebugEventServicejava.util.Set<java.lang.String> getUplinkPortPrefixSet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||