This document is generated from the source file.

View Source on GitHub

Created on 2015/7/8

class vlcp.protocol.openflow.openflow.Openflow(allowedVersions=None)

Openflow control protocol



Parameters:allowedVersions – if specified, should be a tuple of allowed OpenFlow versions.
batch(requests, connection, container, raiseonerror=True)

Send multiple requests, return when all the requests are done. Requests can have no responses. The attributes are set even if an OpenflowErrorResultException is raised.

Returns:(openflow_reply, openflow_replydict) in which openflow_reply is the list of messages in receiving order. openflow_replydict is the dictionary {request:reply}.
Raises:OpenflowErrorResultException – when some replies are errors. exc.result returns (openflow_reply, openflow_replydict)

routine for connection closed


routine for connection error


routine for connection initialization


routine executed when there has been a long time since last data arrival. Check if the connection is down.

parse(connection, data, laststart)

Parse input data into events

  • connection – connection object
  • data – view for input data
  • laststart – last parsed position

(events, keep) where events are parsed events to send, keep is the unused data length to be keeped for next parse.

querymultipart(request, connection, container=None, raiseonerror=True)

Send a multipart request, wait for all the responses. Return a list of reply messages

querywithreply(request, connection, container=None, raiseonerror=True)

Send an OpenFlow normal request, wait for the response of this request. The request must have exactly one response.


routine for reconnect

replymatcher(request, connection, iserror=None)

Create an event matcher to match a reply to this request

statematcher(connection, state='down', currentconn=True)

Create an event matcher to match the connection state of this connection

class vlcp.protocol.openflow.openflow.OpenflowAsyncMessageEvent(*args, **kwargs)

Event for an async message is received

class vlcp.protocol.openflow.openflow.OpenflowConnectionStateEvent(*args, **kwargs)

Event when connection state changes

exception vlcp.protocol.openflow.openflow.OpenflowErrorResultException(errormsg, prompt='An error message is returned: ', result=None)

OpenFlow returns error

__init__(errormsg, prompt='An error message is returned: ', result=None)

Initialize self. See help(type(self)) for accurate signature.

class vlcp.protocol.openflow.openflow.OpenflowExperimenterMessageEvent(*args, **kwargs)

Event for experimenter messages

class vlcp.protocol.openflow.openflow.OpenflowPresetupMessageEvent(*args, **kwargs)

Event for messages before connection setup

exception vlcp.protocol.openflow.openflow.OpenflowProtocolException

Critical protocol break exception

class vlcp.protocol.openflow.openflow.OpenflowResponseEvent(*args, **kwargs)

Event for an OpenFlow response is received