geni.rspec.emulab.emuext¶
Common set of RSpec extensions supported by many Emulab-based aggregates
- class BridgedLink(name=None)[source]¶
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
- property bandwidth¶
- property latency¶
- property plr¶
- 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.
- 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.
- 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 setFailureAction(action)[source]¶
Added to a node this extension will tell Emulab based aggregates to ignore errors booting this node when starting an experiment. This allows the experiment to proceed so that the user has time to debug.
- 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.
- class setNoBandwidthShaping[source]¶
Added to a Link or LAN object, this extension forces Emulab link shaping to be disabled for bandwidth, even if it is necessary. This is ignored if the link must be shaped for other reason (delay, loss).
- class setNoInterSwitchLinks[source]¶
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