|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.floodlightcontroller.staticflowentry.StaticFlowEntryPusher
public class StaticFlowEntryPusher
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.floodlightcontroller.core.IListener |
---|
IListener.Command |
Field Summary | |
---|---|
static java.lang.String |
COLUMN_ACTIONS
|
static java.lang.String |
COLUMN_ACTIVE
|
static java.lang.String |
COLUMN_COOKIE
|
static java.lang.String |
COLUMN_DL_DST
|
static java.lang.String |
COLUMN_DL_SRC
|
static java.lang.String |
COLUMN_DL_TYPE
|
static java.lang.String |
COLUMN_DL_VLAN
|
static java.lang.String |
COLUMN_DL_VLAN_PCP
|
static java.lang.String |
COLUMN_HARD_TIMEOUT
|
static java.lang.String |
COLUMN_IDLE_TIMEOUT
|
static java.lang.String |
COLUMN_IN_PORT
|
static java.lang.String |
COLUMN_NAME
|
static java.lang.String |
COLUMN_NW_DST
|
static java.lang.String |
COLUMN_NW_PROTO
|
static java.lang.String |
COLUMN_NW_SRC
|
static java.lang.String |
COLUMN_NW_TOS
|
static java.lang.String |
COLUMN_PRIORITY
|
static java.lang.String |
COLUMN_SWITCH
|
static java.lang.String |
COLUMN_TP_DST
|
static java.lang.String |
COLUMN_TP_SRC
|
static java.lang.String |
COLUMN_WILDCARD
|
static java.lang.String[] |
ColumnNames
|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,OFFlowMod>> |
entriesFromStorage
|
protected java.util.Map<java.lang.String,java.lang.String> |
entry2dpid
|
protected IFloodlightProviderService |
floodlightProvider
|
protected static org.slf4j.Logger |
log
|
protected IRestApiService |
restApi
|
static int |
STATIC_FLOW_APP_ID
|
static java.lang.String |
StaticFlowName
|
protected IStorageSourceService |
storageSource
|
static java.lang.String |
TABLE_NAME
|
Constructor Summary | |
---|---|
StaticFlowEntryPusher()
|
Method Summary | |
---|---|
void |
addFlow(java.lang.String name,
OFFlowMod fm,
java.lang.String swDpid)
Adds a static flow. |
protected java.util.Map<java.lang.String,java.lang.String> |
computeEntry2DpidMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,OFFlowMod>> map)
Used only for bundle-local indexing |
int |
countEntries()
used for debugging and unittests |
void |
deleteAllFlows()
Deletes all flows. |
void |
deleteFlow(java.lang.String name)
Deletes a static flow |
void |
deleteFlowsForSwitch(long dpid)
Deletes all static flows for a practicular switch |
IFloodlightProviderService |
getFloodlightProvider()
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,OFFlowMod>> |
getFlows()
Deletes all flows installed by static flow pusher on a given switch. |
java.util.Map<java.lang.String,OFFlowMod> |
getFlows(java.lang.String dpid)
Gets a list of flows by switch |
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleDependencies()
Get a list of Modules that this module depends on. |
java.util.Collection<java.lang.Class<? extends IFloodlightService>> |
getModuleServices()
Return the list of interfaces that this module implements. |
java.lang.String |
getName()
The name assigned to this listener |
java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> |
getServiceImpls()
Instantiate (as needed) and return objects that implement each of the services exported by this module. |
IListener.Command |
handleFlowRemoved(IOFSwitch sw,
OFFlowRemoved msg,
FloodlightContext cntx)
Handles a flow removed message from a switch. |
void |
init(FloodlightModuleContext context)
This is a hook for each module to do its internal initialization, e.g., call setService(context.getService("Service")) All module dependencies are resolved when this is called, but not every module is initialized. |
boolean |
isCallbackOrderingPostreq(OFType type,
java.lang.String name)
Check if the module called name is a callback ordering post-requisite for this module. |
boolean |
isCallbackOrderingPrereq(OFType type,
java.lang.String name)
Check if the module called name is a callback ordering prerequisite for this module. |
IListener.Command |
receive(IOFSwitch sw,
OFMessage msg,
FloodlightContext cntx)
This is the method Floodlight uses to call listeners with OpenFlow messages |
void |
rowsDeleted(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys)
Called when a new row is deleted from the table. |
void |
rowsModified(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys)
Called when rows are inserted or updated in the table. |
protected void |
sendEntriesToSwitch(long switchId)
Reads from our entriesFromStorage for the specified switch and sends the FlowMods down to the controller in sorted order. |
void |
setFloodlightProvider(IFloodlightProviderService floodlightProvider)
|
void |
setStorageSource(IStorageSourceService storageSource)
|
void |
startUp(FloodlightModuleContext context)
This is a hook for each module to do its external initializations, e.g., register for callbacks or query for state in other modules It is expected that this function will not block and that modules that want non-event driven CPU will spawn their own threads. |
void |
switchActivated(long switchId)
Fired when a switch becomes active *on the local controller*, I.e., the switch is connected to the local controller and is in MASTER mode |
void |
switchAdded(long switchId)
Fired when switch becomes known to the controller cluster. |
void |
switchChanged(long switchId)
Fired when any non-port related information (e.g., attributes, features) change after a switchAdded TODO: currently unused |
void |
switchPortChanged(long switchId,
ImmutablePort port,
IOFSwitch.PortChangeType type)
Fired when a port on a known switch changes. |
void |
switchRemoved(long switchId)
Fired when a switch disconnects from the cluster , |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger log
public static final java.lang.String StaticFlowName
public static final int STATIC_FLOW_APP_ID
public static final java.lang.String TABLE_NAME
public static final java.lang.String COLUMN_NAME
public static final java.lang.String COLUMN_SWITCH
public static final java.lang.String COLUMN_ACTIVE
public static final java.lang.String COLUMN_IDLE_TIMEOUT
public static final java.lang.String COLUMN_HARD_TIMEOUT
public static final java.lang.String COLUMN_PRIORITY
public static final java.lang.String COLUMN_COOKIE
public static final java.lang.String COLUMN_WILDCARD
public static final java.lang.String COLUMN_IN_PORT
public static final java.lang.String COLUMN_DL_SRC
public static final java.lang.String COLUMN_DL_DST
public static final java.lang.String COLUMN_DL_VLAN
public static final java.lang.String COLUMN_DL_VLAN_PCP
public static final java.lang.String COLUMN_DL_TYPE
public static final java.lang.String COLUMN_NW_TOS
public static final java.lang.String COLUMN_NW_PROTO
public static final java.lang.String COLUMN_NW_SRC
public static final java.lang.String COLUMN_NW_DST
public static final java.lang.String COLUMN_TP_DST
public static final java.lang.String COLUMN_TP_SRC
public static final java.lang.String COLUMN_ACTIONS
public static java.lang.String[] ColumnNames
protected IFloodlightProviderService floodlightProvider
protected IStorageSourceService storageSource
protected IRestApiService restApi
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,OFFlowMod>> entriesFromStorage
protected java.util.Map<java.lang.String,java.lang.String> entry2dpid
Constructor Detail |
---|
public StaticFlowEntryPusher()
Method Detail |
---|
public int countEntries()
public IFloodlightProviderService getFloodlightProvider()
public void setFloodlightProvider(IFloodlightProviderService floodlightProvider)
public void setStorageSource(IStorageSourceService storageSource)
protected void sendEntriesToSwitch(long switchId)
sw
- The switch to send entries toprotected java.util.Map<java.lang.String,java.lang.String> computeEntry2DpidMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,OFFlowMod>> map)
map
-
public void switchAdded(long switchId)
IOFSwitchListener
switchAdded
in interface IOFSwitchListener
switchId
- the datapath Id of the new switchpublic void switchRemoved(long switchId)
IOFSwitchListener
switchRemoved
in interface IOFSwitchListener
switchId
- the datapath Id of the switchpublic void switchActivated(long switchId)
IOFSwitchListener
switchActivated
in interface IOFSwitchListener
switchId
- the datapath Id of the switchpublic void switchChanged(long switchId)
IOFSwitchListener
switchChanged
in interface IOFSwitchListener
public void switchPortChanged(long switchId, ImmutablePort port, IOFSwitch.PortChangeType type)
IOFSwitchListener
IOFSwitch.getPorts()
or related
method a subsequent update might already be present in the information
returned by getPorts.
switchPortChanged
in interface IOFSwitchListener
public void rowsModified(java.lang.String tableName, java.util.Set<java.lang.Object> rowKeys)
IStorageSourceListener
rowsModified
in interface IStorageSourceListener
tableName
- The table where the rows were insertedrowKeys
- The keys of the rows that were insertedpublic void rowsDeleted(java.lang.String tableName, java.util.Set<java.lang.Object> rowKeys)
IStorageSourceListener
rowsDeleted
in interface IStorageSourceListener
tableName
- The table where the rows were deletedrowKeys
- The keys of the rows that were deletedpublic java.lang.String getName()
IListener
getName
in interface IListener<OFType>
public IListener.Command handleFlowRemoved(IOFSwitch sw, OFFlowRemoved msg, FloodlightContext cntx)
sw
- The switch that sent the flow removed message.msg
- The flow removed message.cntx
- The associated context.
public IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
IOFMessageListener
receive
in interface IOFMessageListener
sw
- the OpenFlow switch that sent this messagemsg
- the messagecntx
- a Floodlight message context object you can use to pass
information between listeners
public boolean isCallbackOrderingPrereq(OFType type, java.lang.String name)
IListener
isCallbackOrderingPrereq
in interface IListener<OFType>
type
- the object type to which this appliesname
- the name of the module
public boolean isCallbackOrderingPostreq(OFType type, java.lang.String name)
IListener
isCallbackOrderingPostreq
in interface IListener<OFType>
type
- the object type to which this appliesname
- the name of the module
public java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleServices()
IFloodlightModule
getModuleServices
in interface IFloodlightModule
public java.util.Map<java.lang.Class<? extends IFloodlightService>,IFloodlightService> getServiceImpls()
IFloodlightModule
getServiceImpls
in interface IFloodlightModule
public java.util.Collection<java.lang.Class<? extends IFloodlightService>> getModuleDependencies()
IFloodlightModule
getModuleDependencies
in interface IFloodlightModule
public void init(FloodlightModuleContext context) throws FloodlightModuleException
IFloodlightModule
init
in interface IFloodlightModule
FloodlightModuleException
public void startUp(FloodlightModuleContext context)
IFloodlightModule
startUp
in interface IFloodlightModule
public void addFlow(java.lang.String name, OFFlowMod fm, java.lang.String swDpid)
IStaticFlowEntryPusherService
addFlow
in interface IStaticFlowEntryPusherService
name
- Name of the flow mod. Must be unique.fm
- The flow to push.swDpid
- The switch DPID to push it to, in 00:00:00:00:00:00:00:01 notation.public void deleteFlow(java.lang.String name)
IStaticFlowEntryPusherService
deleteFlow
in interface IStaticFlowEntryPusherService
name
- The name of the static flow to delete.public void deleteAllFlows()
IStaticFlowEntryPusherService
deleteAllFlows
in interface IStaticFlowEntryPusherService
public void deleteFlowsForSwitch(long dpid)
IStaticFlowEntryPusherService
deleteFlowsForSwitch
in interface IStaticFlowEntryPusherService
dpid
- The DPID of the switch to delete flows for.public java.util.Map<java.lang.String,java.util.Map<java.lang.String,OFFlowMod>> getFlows()
getFlows
in interface IStaticFlowEntryPusherService
dpid
- The DPID of the switch to clear all it's flows.public java.util.Map<java.lang.String,OFFlowMod> getFlows(java.lang.String dpid)
IStaticFlowEntryPusherService
getFlows
in interface IStaticFlowEntryPusherService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |