aboutsummaryrefslogtreecommitdiff
path: root/rumba/testbeds/qemu.py
diff options
context:
space:
mode:
authorNick Aerts <aerts.nick@gmail.com>2018-03-23 23:36:34 +0100
committerNick Aerts <nick.aerts@ugent.be>2018-03-27 18:16:45 +0200
commitdfd400c2fb1383bcd6e3862d6199fffad4e78524 (patch)
tree22628b20331328e4d57657494d0321d07f89badb /rumba/testbeds/qemu.py
parenteef25fb48735a5db9613bf00b47f6cf4703b815d (diff)
downloadrumba-dfd400c2fb1383bcd6e3862d6199fffad4e78524.tar.gz
rumba-dfd400c2fb1383bcd6e3862d6199fffad4e78524.zip
linkquality: added link_quality to add delay, loss and rate limit to link
This adds the ability to assign delay and loss to links. 4 new object types are introduced: - LinkQuality - Delay - Loss - Rate All attributes are read-only, one attribute link_quality is added to the ShimEthDIF with a callback to the LinkQualityManager which will automatically apply a new link_quality profile when this attribute is written.
Diffstat (limited to 'rumba/testbeds/qemu.py')
-rw-r--r--rumba/testbeds/qemu.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/rumba/testbeds/qemu.py b/rumba/testbeds/qemu.py
index df80b7e..5f76684 100644
--- a/rumba/testbeds/qemu.py
+++ b/rumba/testbeds/qemu.py
@@ -125,14 +125,12 @@ class Testbed(mod.Testbed):
"ip link set dev %(ifname)s up"
% {'ifname': ipcp.ifname})
- def swap_in(self, experiment):
+ def _swap_in(self, experiment):
"""
:type experiment mod.Experiment
:param experiment: The experiment running
"""
- mod.Testbed.swap_in(self, experiment)
-
if os.geteuid() != 0:
try:
subprocess.check_call(["sudo", "-v"])
@@ -195,19 +193,6 @@ class Testbed(mod.Testbed):
'brctl addif %(br)s %(tap)s'
% {'tap': tap_id, 'br': shim.name}
).split('\n')
- if shim.link_speed > 0:
- speed = '%dmbit' % shim.link_speed
-
- # Rate limit the traffic transmitted on the TAP interface
- command_list += (
- 'tc qdisc add dev %(tap)s handle 1: root '
- 'htb default 11\n'
- 'tc class add dev %(tap)s parent 1: classid '
- '1:1 htb rate 10gbit\n'
- 'tc class add dev %(tap)s parent 1:1 classid '
- '1:11 htb rate %(speed)s'
- % {'tap': tap_id, 'speed': speed}
- ).split('\n')
# While we're at it, build vm ports table and ipcp table
vm['ports'].append({'tap_id': tap_id,