5.6.5.8. vlcp.service.sdn.l2switch

Note

This document is generated from the source file.

View Source on GitHub

Created on 2016/5/24

author:hubo
class vlcp.service.sdn.l2switch.L2FlowUpdater(connection, parent)
__init__(connection, parent)

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.

Parameters:
  • 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
main()

Main coroutine

updateflow(conn, 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.

class vlcp.service.sdn.l2switch.L2Switch(server)

L2 switch functions

__init__(server)

Constructor