mnoptical.rest

rest.py: Simple REST-based SDN control plane for mininet-optical

Module Contents

Classes

QuietHandler

Handler with quiet logging

RestServer

Simple REST server

Functions

net()

Return current network object

nodes()

Return list of nodes

monitors()

Return list of monitors

monitor()

Return information for monitor

opticalLinks()

Return optical links

links()

Return list of links

linkspec(link)

Return specifier dict(node1, port1, node2, port2) for link

interRoadmLinks()

Return links between ROADMs (only)

terminalLinks()

Return links from terminals to ROADMs (only)

routerLinks()

Return links to/from packet switches/routers

lookUpNode(node)

Look up node from query

nodeHandler(handlerName)

Handle a node query

monitorHandler(handlerName)

Handle a node query

reset()

Reset/clear a node's flow rules

connect()

Configure (or install/remove) connection in optical node

disconnect()

Configure (or install/remove) connection in optical node

ports()

Return a node's ports

info()

Return an object's configuration and other information

config()

Set an object's configuration

rules()

Return rules for node

cleanme()

Return cleanme for node

turn_on()

setgain()

Demo support: tell Mininet to adjust the gain for am amplifier

set_ripple()

Demo support: tell Mininet to adjust the ripple function for am amplifier

mnoptical.rest.net()

Return current network object

mnoptical.rest.nodes()

Return list of nodes

mnoptical.rest.monitors()

Return list of monitors

mnoptical.rest.monitor()

Return information for monitor

Return optical links

Return list of links

mnoptical.rest.linkspec(link)

Return specifier dict(node1, port1, node2, port2) for link

Return links between ROADMs (only)

Return links from terminals to ROADMs (only)

Return links to/from packet switches/routers

mnoptical.rest.lookUpNode(node)

Look up node from query

mnoptical.rest.nodeHandler(handlerName)

Handle a node query

mnoptical.rest.monitorHandler(handlerName)

Handle a node query

mnoptical.rest.reset()

Reset/clear a node’s flow rules

mnoptical.rest.connect()

Configure (or install/remove) connection in optical node

mnoptical.rest.disconnect()

Configure (or install/remove) connection in optical node

mnoptical.rest.ports()

Return a node’s ports

mnoptical.rest.info()

Return an object’s configuration and other information

mnoptical.rest.config()

Set an object’s configuration

mnoptical.rest.rules()

Return rules for node

mnoptical.rest.cleanme()

Return cleanme for node

mnoptical.rest.turn_on()
mnoptical.rest.setgain()

Demo support: tell Mininet to adjust the gain for am amplifier

mnoptical.rest.set_ripple()

Demo support: tell Mininet to adjust the ripple function for am amplifier

class mnoptical.rest.QuietHandler(request, client_address, server)

Bases: wsgiref.simple_server.WSGIRequestHandler

Handler with quiet logging

quiet = True
log_request(*args, **kwargs)

Log an accepted request.

This is called by send_response().

class mnoptical.rest.RestServer(net, quiet=True)

Bases: object

Simple REST server

net
start()

Start REST server

stop()