5.3.1.2. vlcp.protocol.openflow.openflow

Note

This document is generated from the source file.

View Source on GitHub

Created on 2015/7/8

author:hubo
class vlcp.protocol.openflow.openflow.Openflow(allowedVersions=None)

Openflow control protocol

__init__(allowedVersions=None)

Constructor

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. container.openflow_reply is the list of messages in receiving order. container.openflow_replydict is the dictionary {request:reply}. The attributes are set even if an OpenflowErrorResultException is raised.

closed(connection)

routine for connection closed

error(connection)

routine for connection error

init(connection)

routine for connection initialization

keepalive(connection)

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 :param connection: connection object :param data: view for input data :param laststart: last parsed position :returns: (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, raiseonerror=True)

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

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

Send an OpenFlow normal request, wait for the response of this request. The request must have exactly one response. The reply is stored to container.openflow_reply

reconnect_init(connection)

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

OpenFlow returns error

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