5.6.5.7. vlcp.service.sdn.ioprocessing

Note

This document is generated from the source file.

View Source on GitHub

Created on 2016/4/13

author:hubo
class vlcp.service.sdn.ioprocessing.DataObjectChanged(*args, **kwargs)
class vlcp.service.sdn.ioprocessing.FlowReadyEvent(*args, **kwargs)
class vlcp.service.sdn.ioprocessing.IOFlowUpdater(connection, systemid, bridgename, parent)
__init__(connection, systemid, bridgename, 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
reset_initialkeys(keys, values)

Callback after walk complete, can be used to update self._initialkeys.

update_ports(ports, ovsdb_ports)

Called from main module to update port information

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.

walkcomplete(keys, values)

Async callback after walk complete, before flow update

class vlcp.service.sdn.ioprocessing.IOProcessing(server)

Ingress and Egress processing

__init__(server)

Constructor

flowready(connection, logicalnetworkid, physicalportid)

Wait until flows are sent to switch

Parameters:
  • connection – Openflow connection
  • logicalnetworkid – logical network id (integer)
  • physicalportid – physical port id (integer)
Returns:

If connection/network/port not exists, return False, else return True