This document is generated from the source file.
Created on 2016/4/11
FlowUpdater(connection, initialkeys=(), requestid=None, logger=None)¶
__init__(connection, initialkeys=(), requestid=None, logger=None)¶
Retrieve data objects from ObjectDB and use them to generate flows
The module starts ObjectDB.walk from initial keys and walkers. After the walk completes, the retrieved data objects are used by updateflow() to generate flows and send them to the OpenFlow connection. When the retrieved objects are updated, FlowUpdater either restart the walk process (re-walk) or directly call another updateflow(), according to the objects that are updated.
A subclass should re-initialize self._initialkeys and self._walkerdict before main() coroutine starts to customize the process.
updateflow() is guaranteed for no re-entrance i.e. will not be called until the last call returns. Multiple changes may be merged into the same call.
- connection – OpenFlow connection
- initialkeys – DEPRECATED The key list that triggers a re-walk
- requestid – request id to retrieve data objects from ObjectDB
- logger – inherit a logger from a module
Callback after walk complete, can be used to update self._initialkeys.
Force a re-walk
Callback when upate. Rewrite this method to ignore some updates.
If this callback returns False, the update is ignored.
updateflow(connection, addvalues, removevalues, updatedvalues)¶
Update flow callback. When data objects are updated (either by a re-walk or by a direct update), this method is called with the modification, after the last updateflow() call ends.
Force a update notification on specified objects, even if they are not actually updated in ObjectDB
Async callback after walk complete, before flow update
These notifications are edge triggered - they work with identifiers and set