geni.rspec.emulab.emuext

Common set of RSpec extensions supported by many Emulab-based aggregates

A bridged link is syntactic sugar used to create two links separated by an Emulab delay (bridge) node. The BridgedLink class will create the following topology:

left-link right-link

node1 =========== bridge ============ node2

The bridge is a special node type (sliver_type=”delay”) that tells the CM to insert an Emulab delay node instead of a plain (router) node. A delay node is a transparent Ethernet bridge between the left and right segments above, but on which the traffic can be shaped wrt. bandwidth, latency, and loss. For example:

# Create the bridged link between the two nodes. link = request.BridgedLink(“link”) # Add two interfaces link.addInterface(iface1) link.addInterface(iface2) # Give the link (bridge) some shaping parameters. link.bandwidth = 10000 link.latency = 15 link.plr = 0.01
addInterface(interface)[source]
bandwidth
latency
plr
exception EmulabExtensionDuplicateStatement(classname)[source]

This exception gets thrown if something that was only supposed to get added once to a Request, Node, Link, etc. gets added multiple times.

class InstantiateOn(parent)[source]

Added to a node to specify that it a Xen VM should be bound to (instantiated on) another node in the topology. Argument is the node instance or the client id of another node in the topology.

exception InvalidParent(parent)[source]
class ProgramAgent(name, command, directory=None, onexpstart=False)[source]

Add an Emulab Program Agent, which can be controlled via the Emulab event system. Optional argument ‘directory’ specifies where to invoke the command from. Optional argument ‘onexpstart’ says to invoke the command when the experiment starts (time=0 in event speak). This is different than the Execute service, which runs every time the node boots.

A ShapedLink is a synonym for BridgedLink

class setCollocateFactor(mfactor)[source]

Added to a top-level Request object, this extension limits the number of VMs from one experiment that Emulab will collocate on each physical host.

class setDelayImage(urn)[source]

Added to a top-level Request object, this extension sets the disk image that will be used for all delay nodes configured for the experiment.

class setForceShaping[source]

Added to a Link or LAN object, this extension forces Emulab link shaping to be enabled, even if it is not strictly necessary. This allows the link properties to be changed dynamically via the Emulab event system.

Added to a Link or LAN object, this extension forces the Emulab mapper to disallow mapping a link in the request topology to an inter-switch link. This allows users to require that specific nodes in their topology be attached to the same switch(es).

class setPackingStrategy(strategy)[source]

Added to a top-level Request object, this extension controls the strategy used for distributing VMs across physical hosts

class setRoutingStyle(style)[source]

Added to a top-level Request object, this extension controls the routing that is automatically configured on the experiment (data-plane) side of the network.

class setUseTypeDefaultImage[source]

Added to a node that does not specify a disk image, this extension forces Emulab to use the hardware type default image instead of the standard geni default image. Useful with special hardware that should run a special image.