comnetsemu.overrides module

Overriding functionality that is provided outside the scope of this project and where subclassing is not possible

Authors: Patrick Ziegler, Dresden University of Technology

comnetsemu.overrides.makeIntfPairFixed(intf1, intf2, addr1=None, addr2=None, node1=None, node2=None, deleteIntfs=True, runCmd=None)

Make a veth pair connnecting new interfaces intf1 and intf2 intf1: name for interface 1 intf2: name for interface 2 addr1: MAC address for interface 1 (optional) addr2: MAC address for interface 2 (optional) node1: home node for interface 1 (optional) node2: home node for interface 2 (optional) deleteIntfs: delete intfs before creating them runCmd: function to run shell commands (quietRun) raises Exception on failure

comnetsemu.overrides.override(module, name)

A decorator for replacing a given function of a specified module with the decorated function

Caution: Be aware that functions named ‘name’ in any given module will be replaced!